12011-02-15  Gavin Barraclough  <barraclough@apple.com>
2
3        Reviewed by Geoff Garen.
4
5        Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
6
7        Currently JSObject is both directly instantiated for regular JS objects, and
8        derived to implement subtypes. A consequence of this is that we need to ensure
9        that sufficient space from the cell is left unused and available for any data
10        members that will be introduced by subclasses of JSObject. By restructuring
11        the internal storage array out of JSObject we can increase the size in the
12        internal storage for regular objects.
13
14        Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
15        much additional capacity as is currently available to allow for data members
16        in subclasses. JSFinalObject utilizes all available space for internal storage,
17        and only allows construction through JSFinalObject::create().
18
19        The additional storage made available in the JSObject means that we need no
20        longer rely on a union of the internal storage with a pointer to storage that
21        is only valid for external storage. This means we can go back to always having
22        a valid pointer to property storage, regardless of whether this is internal or
23        external. This simplifies some cases of access to the array from C code, and
24        significantly simplifies JIT access, since repatching no longer needs to be
25        able to change between a load of the storage pointer / a LEA of the internal
26        storage.
27
28        * API/JSObjectRef.cpp:
29        (JSObjectMake):
30        * assembler/ARMAssembler.h:
31        * assembler/ARMv7Assembler.h:
32        * assembler/AbstractMacroAssembler.h:
33        (JSC::AbstractMacroAssembler::repatchPointer):
34        * assembler/MIPSAssembler.h:
35        * assembler/MacroAssemblerARM.h:
36        * assembler/MacroAssemblerARMv7.h:
37        * assembler/MacroAssemblerMIPS.h:
38        * assembler/MacroAssemblerX86.h:
39        * assembler/MacroAssemblerX86_64.h:
40        * assembler/RepatchBuffer.h:
41        * assembler/X86Assembler.h:
42        * debugger/DebuggerActivation.cpp:
43        (JSC::DebuggerActivation::DebuggerActivation):
44        * debugger/DebuggerActivation.h:
45        * interpreter/Interpreter.cpp:
46        (JSC::Interpreter::privateExecute):
47        * jit/JIT.h:
48        * jit/JITOpcodes.cpp:
49        (JSC::JIT::emit_op_resolve_global):
50        * jit/JITOpcodes32_64.cpp:
51        (JSC::JIT::emit_op_resolve_global):
52        * jit/JITPropertyAccess.cpp:
53        (JSC::JIT::compileGetDirectOffset):
54        (JSC::JIT::emit_op_get_by_pname):
55        (JSC::JIT::compileGetByIdHotPath):
56        (JSC::JIT::emit_op_put_by_id):
57        (JSC::JIT::compilePutDirectOffset):
58        (JSC::JIT::patchGetByIdSelf):
59        (JSC::JIT::patchPutByIdReplace):
60        (JSC::JIT::privateCompileGetByIdProto):
61        (JSC::JIT::privateCompileGetByIdSelfList):
62        (JSC::JIT::privateCompileGetByIdProtoList):
63        (JSC::JIT::privateCompileGetByIdChainList):
64        (JSC::JIT::privateCompileGetByIdChain):
65        * jit/JITPropertyAccess32_64.cpp:
66        (JSC::JIT::compileGetByIdHotPath):
67        (JSC::JIT::emit_op_put_by_id):
68        (JSC::JIT::compilePutDirectOffset):
69        (JSC::JIT::compileGetDirectOffset):
70        (JSC::JIT::patchGetByIdSelf):
71        (JSC::JIT::patchPutByIdReplace):
72        (JSC::JIT::privateCompileGetByIdProto):
73        (JSC::JIT::privateCompileGetByIdSelfList):
74        (JSC::JIT::privateCompileGetByIdProtoList):
75        (JSC::JIT::privateCompileGetByIdChainList):
76        (JSC::JIT::privateCompileGetByIdChain):
77        (JSC::JIT::emit_op_get_by_pname):
78        * jit/JITStubs.cpp:
79        (JSC::DEFINE_STUB_FUNCTION):
80        * runtime/Arguments.h:
81        (JSC::Arguments::Arguments):
82        * runtime/ErrorInstance.cpp:
83        (JSC::ErrorInstance::ErrorInstance):
84        * runtime/ErrorInstance.h:
85        * runtime/ExceptionHelpers.cpp:
86        (JSC::InterruptedExecutionError::InterruptedExecutionError):
87        (JSC::TerminatedExecutionError::TerminatedExecutionError):
88        * runtime/JSArray.cpp:
89        (JSC::JSArray::JSArray):
90        * runtime/JSArray.h:
91        * runtime/JSByteArray.cpp:
92        (JSC::JSByteArray::JSByteArray):
93        * runtime/JSByteArray.h:
94        (JSC::JSByteArray::JSByteArray):
95        * runtime/JSFunction.cpp:
96        (JSC::JSFunction::getOwnPropertySlot):
97        * runtime/JSGlobalData.cpp:
98        (JSC::JSGlobalData::JSGlobalData):
99        * runtime/JSGlobalObject.h:
100        (JSC::constructEmptyObject):
101        * runtime/JSNotAnObject.h:
102        (JSC::JSNotAnObject::JSNotAnObject):
103        * runtime/JSObject.cpp:
104        (JSC::JSObject::createInheritorID):
105        (JSC::JSObject::allocatePropertyStorage):
106        * runtime/JSObject.h:
107        (JSC::JSObject::propertyStorage):
108        (JSC::JSNonFinalObject::JSNonFinalObject):
109        (JSC::JSNonFinalObject::createStructure):
110        (JSC::JSFinalObject::create):
111        (JSC::JSFinalObject::createStructure):
112        (JSC::JSFinalObject::JSFinalObject):
113        (JSC::JSObject::offsetOfInlineStorage):
114        (JSC::constructEmptyObject):
115        (JSC::createEmptyObjectStructure):
116        (JSC::JSObject::JSObject):
117        (JSC::JSObject::~JSObject):
118        (JSC::Structure::isUsingInlineStorage):
119        * runtime/JSObjectWithGlobalObject.cpp:
120        (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
121        * runtime/JSObjectWithGlobalObject.h:
122        (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
123        * runtime/JSTypeInfo.h:
124        (JSC::TypeInfo::TypeInfo):
125        (JSC::TypeInfo::isVanilla):
126        * runtime/JSVariableObject.h:
127        (JSC::JSVariableObject::JSVariableObject):
128        * runtime/JSWrapperObject.h:
129        (JSC::JSWrapperObject::JSWrapperObject):
130        * runtime/ObjectConstructor.cpp:
131        (JSC::constructObject):
132        * runtime/ObjectPrototype.cpp:
133        (JSC::ObjectPrototype::ObjectPrototype):
134        * runtime/ObjectPrototype.h:
135        * runtime/StrictEvalActivation.cpp:
136        (JSC::StrictEvalActivation::StrictEvalActivation):
137        * runtime/StrictEvalActivation.h:
138        * runtime/Structure.cpp:
139        (JSC::Structure::Structure):
140        (JSC::Structure::growPropertyStorageCapacity):
141
1422011-02-16  Oliver Hunt  <oliver@apple.com>
143
144        Reviewed by Geoff Garen.
145
146        Incorrect handling of global writes in dynamic contexts
147        https://bugs.webkit.org/show_bug.cgi?id=49383
148
149        * interpreter/Interpreter.cpp:
150        (JSC::Interpreter::privateExecute):
151          Can't use the existing callframe to return an uncaught exception
152          as by definition that callframe has already been torn down.
153        * parser/ASTBuilder.h:
154        (JSC::ASTBuilder::ASTBuilder):
155        (JSC::ASTBuilder::varDeclarations):
156        (JSC::ASTBuilder::funcDeclarations):
157        (JSC::ASTBuilder::features):
158        (JSC::ASTBuilder::numConstants):
159        (JSC::ASTBuilder::createFuncDeclStatement):
160        (JSC::ASTBuilder::addVar):
161        (JSC::ASTBuilder::incConstants):
162        (JSC::ASTBuilder::usesThis):
163        (JSC::ASTBuilder::usesCatch):
164        (JSC::ASTBuilder::usesClosures):
165        (JSC::ASTBuilder::usesArguments):
166        (JSC::ASTBuilder::usesAssignment):
167        (JSC::ASTBuilder::usesWith):
168        (JSC::ASTBuilder::usesEval):
169          Don't need a vector of scopes in the ASTBuilder
170        * runtime/Operations.h:
171        (JSC::resolveBase):
172          In strict mode the optimisation that we use to skip a lookup
173          on the global object is incorrect and lead to us always
174          disallowing global writes when we needed to do a dynamic slot
175          lookup.  Now the strict mode path actually checks for the
176          property.
177
1782011-02-15  Jon Honeycutt  <jhoneycutt@apple.com>
179
180        Windows build fix for
181        https://bugs.webkit.org/show_bug.cgi?id=54415
182
183        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
184        Remove deleted files.
185
1862011-02-15  Oliver Hunt  <oliver@apple.com>
187
188        Fix EFL build for
189        https://bugs.webkit.org/show_bug.cgi?id=54415
190
191        * CMakeLists.txt:
192
1932011-02-14  Oliver Hunt  <oliver@apple.com>
194
195        Reviewed by Gavin Barraclough and Geoff Garen.
196
197        Refactor handles and weak pointers to become nicer and more automatic
198        https://bugs.webkit.org/show_bug.cgi?id=54415
199
200        Move to a true handle based mechanism for GC value protection.  This
201        also allows us to switch to a more sensible behaviour for weak pointers
202        in which weak pointers are automatically updated.
203
204        This allows us to remove the old (and convoluted) that required all
205        objects that may be held by a weak reference to be aware of the reference
206        and manually clear them in their destructors.
207
208        This also adds a few new data types to JSC that we use to efficiently
209        allocate and return the underlying handle storage.
210
211        This patch is largely renaming and removing now unnecessary destructors
212        from objects.
213
214        * API/JSClassRef.cpp:
215        (OpaqueJSClass::create):
216        (OpaqueJSClassContextData::OpaqueJSClassContextData):
217        (OpaqueJSClass::contextData):
218        (OpaqueJSClass::prototype):
219        * API/JSClassRef.h:
220        * CMakeLists.txt:
221        * GNUmakefile.am:
222        * JavaScriptCore.exp:
223        * JavaScriptCore.gypi:
224        * JavaScriptCore.pro:
225        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
226        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
227        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
228        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
229        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
230        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
231        * JavaScriptCore.xcodeproj/project.pbxproj:
232        * collector/handles/Global.h: Added.
233            New Global handle type used to keep gc objects live, even if they're not
234            marked.
235        (JSC::Global::Global):
236        (JSC::Global::~Global):
237        (JSC::Global::set):
238            We can only assign directly to a global from another global.
239            In all other cases we need the JSGlobalData to be provided
240            explicitly so we use a set function.
241        (JSC::Global::operator=):
242        (JSC::Global::clear):
243        (JSC::Global::isHashTableDeletedValue):
244        (JSC::Global::internalSet):
245        * collector/handles/Handle.h: Added.
246            Root "Handle" type used for immutable handles and to provide the basic
247            APIs needed for pointer-like behaviour.
248        (JSC::HandleBase::operator!):
249        (JSC::HandleBase::operator UnspecifiedBoolType*):
250        (JSC::HandleBase::isEmpty):
251        (JSC::HandleBase::HandleBase):
252        (JSC::HandleBase::slot):
253        (JSC::HandleBase::invalidate):
254        (JSC::HandleBase::setSlot):
255        (JSC::HandleTypes::getFromSlot):
256        (JSC::HandleTypes::toJSValue):
257        (JSC::HandleTypes::validateUpcast):
258        (JSC::HandleConverter::operator->):
259        (JSC::HandleConverter::operator*):
260        (JSC::Handle::Handle):
261        (JSC::Handle::get):
262        (JSC::Handle::wrapSlot):
263        (JSC::operator==):
264        (JSC::operator!=):
265        * collector/handles/HandleHeap.cpp: Added.
266            New heap for global handles.
267        (JSC::HandleHeap::HandleHeap):
268        (JSC::HandleHeap::grow):
269        (JSC::HandleHeap::markStrongHandles):
270        (JSC::HandleHeap::updateAfterMark):
271        (JSC::HandleHeap::clearWeakPointers):
272        (JSC::HandleHeap::writeBarrier):
273        * collector/handles/HandleHeap.h: Added.
274        (JSC::HandleHeap::heapFor):
275        (JSC::HandleHeap::toHandle):
276        (JSC::HandleHeap::toNode):
277        (JSC::HandleHeap::allocate):
278        (JSC::HandleHeap::deallocate):
279        (JSC::HandleHeap::makeWeak):
280            Convert a hard handle into weak handle that does not
281            protect the object it points to.
282        (JSC::HandleHeap::makeSelfDestroying):
283            Converts a handle to a weak handle that will be returned
284            to the free list when the referenced object dies.
285        (JSC::HandleHeap::Node::Node):
286        (JSC::HandleHeap::Node::slot):
287        (JSC::HandleHeap::Node::handleHeap):
288        (JSC::HandleHeap::Node::setFinalizer):
289        (JSC::HandleHeap::Node::makeWeak):
290        (JSC::HandleHeap::Node::isWeak):
291        (JSC::HandleHeap::Node::makeSelfDestroying):
292        (JSC::HandleHeap::Node::isSelfDestroying):
293        (JSC::HandleHeap::Node::finalizer):
294        (JSC::HandleHeap::Node::setPrev):
295        (JSC::HandleHeap::Node::prev):
296        (JSC::HandleHeap::Node::setNext):
297        (JSC::HandleHeap::Node::next):
298        * interpreter/Interpreter.cpp:
299        (JSC::Interpreter::Interpreter):
300        * interpreter/Interpreter.h:
301        * interpreter/RegisterFile.cpp:
302        (JSC::RegisterFile::globalObjectCollected):
303        * interpreter/RegisterFile.h:
304        (JSC::RegisterFile::RegisterFile):
305        * runtime/GCHandle.cpp: Removed.
306        * runtime/GCHandle.h: Removed.
307        * runtime/Heap.cpp:
308        (JSC::Heap::Heap):
309        (JSC::Heap::destroy):
310        (JSC::Heap::markRoots):
311        * runtime/Heap.h:
312        (JSC::Heap::allocateGlobalHandle):
313        (JSC::Heap::reportExtraMemoryCost):
314        * runtime/JSGlobalData.cpp:
315        (JSC::JSGlobalData::JSGlobalData):
316        * runtime/JSGlobalData.h:
317        (JSC::JSGlobalData::allocateGlobalHandle):
318        * runtime/JSGlobalObject.cpp:
319        (JSC::JSGlobalObject::~JSGlobalObject):
320        * runtime/JSPropertyNameIterator.cpp:
321        (JSC::JSPropertyNameIterator::create):
322        (JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
323        * runtime/JSPropertyNameIterator.h:
324        (JSC::JSPropertyNameIterator::createStructure):
325        (JSC::Structure::setEnumerationCache):
326        (JSC::Structure::clearEnumerationCache):
327        * runtime/Protect.h:
328        * runtime/Structure.cpp:
329        (JSC::Structure::~Structure):
330        * runtime/Structure.h:
331        * runtime/WeakGCPtr.h:
332        (JSC::WeakGCPtrBase::get):
333        (JSC::WeakGCPtrBase::clear):
334        (JSC::WeakGCPtrBase::operator!):
335        (JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
336        (JSC::WeakGCPtrBase::~WeakGCPtrBase):
337        (JSC::WeakGCPtrBase::WeakGCPtrBase):
338        (JSC::WeakGCPtrBase::internalSet):
339        (JSC::LazyWeakGCPtr::LazyWeakGCPtr):
340        (JSC::LazyWeakGCPtr::set):
341        (JSC::WeakGCPtr::WeakGCPtr):
342        (JSC::WeakGCPtr::operator=):
343        * runtime/WriteBarrier.h:
344        * wtf/BlockStack.h: Added.
345        (WTF::::BlockStack):
346        (WTF::::~BlockStack):
347        (WTF::::blocks):
348        (WTF::::grow):
349        (WTF::::shrink):
350        * wtf/SentinelLinkedList.h: Added.
351        (WTF::::SentinelLinkedList):
352        (WTF::::begin):
353        (WTF::::end):
354        (WTF::::push):
355        (WTF::::remove):
356        * wtf/SinglyLinkedList.h: Added.
357        (WTF::::SinglyLinkedList):
358        (WTF::::isEmpty):
359        (WTF::::push):
360        (WTF::::pop):
361
3622011-02-15  Pratik Solanki  <psolanki@apple.com>
363
364        Move WTF_USE_CFNETWORK to Platform.h
365        https://bugs.webkit.org/show_bug.cgi?id=54168
366
367        Reviewed by Darin Adler.
368
369        * wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds.
370
3712011-02-15  Geoffrey Garen  <ggaren@apple.com>
372
373        Reviewed by Darin Adler.
374
375        Moved MarkedBlock data members to the head of the block
376        https://bugs.webkit.org/show_bug.cgi?id=54482
377        
378        This allows for a variable-sized tail, to accommodate oversized blocks.
379
380        SunSpider reports no change.
381        
382        * runtime/JSCell.h:
383        (JSC::JSCell::MarkedBlock::allocate):
384        * runtime/MarkedBlock.cpp:
385        (JSC::MarkedBlock::destroy):
386        (JSC::MarkedBlock::MarkedBlock):
387        (JSC::MarkedBlock::sweep):
388        * runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
389        calculation. This kind of error is why we want to migrate to the system
390        described below.
391
392        (JSC::roundUpToMultipleOf):
393        (JSC::MarkedBlock::firstCell):
394        (JSC::MarkedBlock::cells):
395        (JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
396        calculate cell number. The mask is no longer correct because the first
397        cell is not at the head of the block.
398
399        (JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
400        accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
401        block header, so we can't have an explicit data member to represent the block tail.
402        
403        Also replaced iteration from zero with iteration from startCell(), since
404        the first N cells are now occupied by the header.
405
406        * runtime/MarkedSpace.cpp:
407        (JSC::MarkedSpace::MarkedSpace):
408        (JSC::MarkedSpace::reset): Replaced iteration from zero as above.
409
4102011-02-15  Chris Rogers  <crogers@google.com>
411
412        Reviewed by Alexey Proskuryakov.
413
414        Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait()
415        https://bugs.webkit.org/show_bug.cgi?id=54408
416
417        * wtf/ThreadingWin.cpp:
418        (WTF::PlatformCondition::timedWait):
419
4202011-02-15  Xan Lopez  <xlopez@igalia.com>
421
422        Reviewed by Martin Robinson.
423
424        Remove some dead code in ARMv7
425        https://bugs.webkit.org/show_bug.cgi?id=54461
426
427        * assembler/ARMv7Assembler.h: remove dead code.
428
4292011-02-14  Geoffrey Garen  <ggaren@apple.com>
430
431        Rubber-stamped by Gavin Barraclough.
432
433        Some MarkedBlock refactoring.
434        
435        Made cells private.
436        
437        Renamed cells => m_cells
438                marked => m_marks.
439
440        * runtime/JSCell.h:
441        (JSC::JSCell::MarkedBlock::allocate):
442        * runtime/MarkedBlock.cpp:
443        (JSC::MarkedBlock::destroy):
444        (JSC::MarkedBlock::MarkedBlock):
445        (JSC::MarkedBlock::sweep):
446        * runtime/MarkedBlock.h:
447        (JSC::MarkedBlock::isEmpty):
448        (JSC::MarkedBlock::clearMarks):
449        (JSC::MarkedBlock::markCount):
450        (JSC::MarkedBlock::isMarked):
451        (JSC::MarkedBlock::testAndSetMarked):
452        (JSC::MarkedBlock::setMarked):
453        (JSC::MarkedBlock::forEach):
454
4552011-02-14  Adam Barth  <abarth@webkit.org>
456
457        Reviewed by Eric Seidel.
458
459        Add basic parser for Content Security Policy
460        https://bugs.webkit.org/show_bug.cgi?id=54379
461
462        Add a constructor for copying a Vector into a String.  I suspect there
463        are a number of call sites that are doing this manually that would
464        benefit from being moved to this API.
465
466        * wtf/text/WTFString.h:
467        (WTF::String::String):
468
4692011-02-14  Pavel Podivilov  <podivilov@chromium.org>
470
471        Reviewed by Yury Semikhatsky.
472
473        Web Inspector: use call frame column to determine execution line in source frame.
474        https://bugs.webkit.org/show_bug.cgi?id=54001
475
476        * wtf/text/TextPosition.h:
477        (WTF::ZeroBasedNumber::convertAsOneBasedInt):
478
4792011-02-13  Jeremy Moskovich  <jeremy@chromium.org>
480
481        Reviewed by Adam Barth.
482
483        Add a compile-time option to completely disable WebArchive support.
484        https://bugs.webkit.org/show_bug.cgi?id=52712
485
486        Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
487        Ports Affected:
488            WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
489            This patch preserves this behavior except that it also disables support in the Chromium port.
490
491        * wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports.
492
4932011-02-13  Cameron Zwarich  <zwarich@apple.com>
494
495        Reviewed by Dan Bernstein.
496
497        Bug 53760 - JSC fails to build with TOT Clang
498        https://bugs.webkit.org/show_bug.cgi?id=53760
499
500        Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace
501        benchmark; it is nothing-to-noise on everything else.
502
503        * API/JSCallbackObject.h: Remove pointlessly overloaded method.
504        * API/JSCallbackObjectFunctions.h: Ditto.
505        * runtime/Arguments.cpp: 
506        (JSC::Arguments::put): Change signature to match the base class. This implementation
507        was no longer being called by anyone. This wasn't noticed because it is merely an
508        optimization of the base class' implementation.
509        * runtime/Arguments.h: Ditto.
510
5112011-02-12  Adam Barth  <abarth@webkit.org>
512
513        Reviewed by Mark Rowe.
514
515        Use /dev/urandom as the OSRandomSource on OS(DARWIN)
516        https://bugs.webkit.org/show_bug.cgi?id=54279
517
518        I'm not sure it makes much of a difference whether we use arc4random or
519        /dev/urandom on Mac.  However, there's some aesthetic benefit to using
520        the same underlying API on as many platforms as reasonable.
521
522        * config.h:
523        * wtf/OSRandomSource.cpp:
524        (WTF::cryptographicallyRandomValuesFromOS):
525
5262011-02-12  Adam Barth  <abarth@webkit.org>
527
528        Reviewed by Kenneth Russell.
529
530        Enable ArrayBuffers by default
531        https://bugs.webkit.org/show_bug.cgi?id=54310
532
533        Export the required functions.
534
535        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
536
5372011-02-11  Daniel Bates  <dbates@rim.com>
538
539        Reviewed by Geoffrey Garen.
540
541        Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports
542        https://bugs.webkit.org/show_bug.cgi?id=54107
543        
544        It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE
545        by the definition of ENABLE().
546
547        * wtf/Platform.h:
548
5492011-02-11  Geoffrey Garen  <ggaren@apple.com>
550
551        Not reviewed.
552
553        Randomly touch some build files in the hopes of fixing the Qt build.
554
555        * JavaScriptCore.gypi:
556        * JavaScriptCore.pri:
557        * JavaScriptCore.pro:
558
5592011-02-11  Geoffrey Garen  <ggaren@apple.com>
560
561        Reviewed by Sam Weinig.
562
563        Garbage collection timer cycles forever, even when nothing is happening
564        https://bugs.webkit.org/show_bug.cgi?id=54320
565        
566        (Rolling back in r78386 with the build fixed.)
567
568        * runtime/GCActivityCallbackCF.cpp:
569        (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
570        our timer inert after forcing a GC, to avoid GC'ing repeatedly.
571
5722011-02-11  Geoffrey Garen  <ggaren@apple.com>
573
574        Not reviewed.
575        
576        Used svn merge -r78386:78385 to roll out r78386 because it broke the build.
577
578        * runtime/GCActivityCallbackCF.cpp:
579        (JSC::DefaultGCActivityCallbackPlatformData::trigger):
580
5812011-02-11  Geoffrey Garen  <ggaren@apple.com>
582
583        Reviewed by Sam Weinig.
584
585        Garbage collection timer cycles forever, even when nothing is happening
586        https://bugs.webkit.org/show_bug.cgi?id=54320
587
588        * runtime/GCActivityCallbackCF.cpp:
589        (JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
590        our timer inert after forcing a GC, to avoid GC'ing repeatedly.
591
5922011-02-11  Geoffrey Garen  <ggaren@apple.com>
593
594        Try to fix the Windows build: added an exported symbol.
595
596        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
597
5982011-02-11  Geoffrey Garen  <ggaren@apple.com>
599
600        Reviewed by Oliver Hunt.
601
602        A little more encapsulation for the heap: Removed CollectorHeapIterator
603        https://bugs.webkit.org/show_bug.cgi?id=54298
604        
605        CollectorHeapIterator is a God object that knows the internals of each
606        of the pieces of the heap. This undermines the encapsulation I'm trying
607        to achieve by splitting concepts into different classes.
608        
609        As an alternative, I've given each class a forEach iteration function,
610        which takes a functor as an argument. Now, each class just needs to
611        know how to iterate the things it knows about.
612
613        * GNUmakefile.am:
614        * JavaScriptCore.exp:
615        * JavaScriptCore.gypi:
616        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator.
617
618        * debugger/Debugger.cpp:
619        (JSC::Recompiler::Recompiler):
620        (JSC::Recompiler::~Recompiler):
621        (JSC::Recompiler::operator()):
622        (JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface
623        instead of an iterator.
624
625        * runtime/CollectorHeapIterator.h: Removed.
626
627        * runtime/Heap.cpp:
628        (JSC::TypeCounter::TypeCounter):
629        (JSC::TypeCounter::typeName):
630        (JSC::TypeCounter::operator()):
631        (JSC::TypeCounter::take):
632        (JSC::Heap::protectedObjectTypeCounts):
633        (JSC::Heap::objectTypeCounts): Added forEach and removed iterator.
634
635        * runtime/Heap.h:
636        (JSC::Heap::forEach):
637        * runtime/JSGlobalData.cpp:
638        (JSC::Recompiler::operator()):
639        (JSC::JSGlobalData::recompileAllJSFunctions):
640
641        * runtime/MarkedBlock.h:
642        (JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration
643        for CollectorHeapIterator. Now, we can make all our data private and
644        change it without breaking any other classes.
645
646        * runtime/MarkedSpace.cpp:
647        * runtime/MarkedSpace.h:
648        (JSC::MarkedSpace::forEach): Added forEach and removed iterator.
649
6502011-02-11  Adam Barth  <abarth@webkit.org>
651
652        Reviewed by Andreas Kling.
653
654        CryptographicRandomNumber has its threading ifdefs backwards
655        https://bugs.webkit.org/show_bug.cgi?id=54280
656
657        Turns out we want the mutex when thread is enabled.  :)
658
659        * wtf/CryptographicallyRandomNumber.cpp:
660        (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
661        (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
662
6632011-02-10  Adam Barth  <abarth@webkit.org>
664
665        Reviewed by Eric Seidel.
666
667        WebKit should have a cryptographic RNG
668        https://bugs.webkit.org/show_bug.cgi?id=22049
669
670        Teach JavaScriptCore how to export this function.
671
672        * JavaScriptCore.exp:
673        * JavaScriptCore.xcodeproj/project.pbxproj:
674
6752011-02-10  Geoffrey Garen  <ggaren@apple.com>
676
677        Reviewed by Sam Weinig.
678
679        A little more encapsulation for MarkedBlock: Made all constants private
680        so clients don't know whether allocations are fixed-sized or not
681        https://bugs.webkit.org/show_bug.cgi?id=54270
682        
683        SunSpider reports no change.
684
685        * runtime/CollectorHeapIterator.h:
686        (JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
687
688        * runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
689        all other classes.
690
691        * runtime/Heap.cpp:
692        (JSC::Heap::allocate): Updated for removal of HeapConstants.
693        (JSC::Heap::reset): Updated to use size(), instead of calculating size
694        on our own.
695
696        * runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
697        on special knowledge of fixed-sizery, which only MarkedBlock is supposed
698        to know about.
699
700        * runtime/JSCell.h:
701        (JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
702        Also changed to reset nextCell to 0 at the end of a block, since that
703        seems more consistent.
704
705        * runtime/JSGlobalData.cpp:
706        (JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
707        This hard-coded size is a little wonky, but the compiler will tell us
708        if it's ever wrong, so I think it's OK.
709
710        * runtime/MarkedBlock.cpp:
711        (JSC::MarkedBlock::destroy):
712        (JSC::MarkedBlock::MarkedBlock):
713        (JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
714
715        * runtime/MarkedBlock.h:
716        (JSC::MarkedBlock::isEmpty):
717        (JSC::MarkedBlock::clearMarks):
718        (JSC::MarkedBlock::size):
719        (JSC::MarkedBlock::capacity): Made constants private to this class.
720        Removed HeapConstants. Added size() and capacity() functions.
721
722        * runtime/MarkedSpace.cpp:
723        (JSC::MarkedSpace::allocate):
724        (JSC::MarkedSpace::objectCount):
725        (JSC::MarkedSpace::size):
726        (JSC::MarkedSpace::capacity):
727        * runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
728        direct knowledge of MarkedBlock internals.
729
7302011-02-10  Geoffrey Garen  <ggaren@apple.com>
731
732        Reviewed by Sam Weinig.
733
734        A little more encapsulation for MarkedBlock: Made mark bits private
735        https://bugs.webkit.org/show_bug.cgi?id=54264
736        
737        SunSpider reports no change.
738
739        * runtime/Heap.cpp:
740        (JSC::Heap::markRoots):
741        (JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients
742        don't need to know that marks are represented as bits. Renamed
743        markedCells => markCount, since clients don't need to know that blocks
744        are split into cells.
745
746        * runtime/MarkedBlock.h:
747        (JSC::MarkedBlock::isEmpty):
748        (JSC::MarkedBlock::clearMarks):
749        (JSC::MarkedBlock::markCount): New helper functions for encapsulating
750        the information clients actually need.
751
752        * runtime/MarkedSpace.cpp:
753        (JSC::MarkedSpace::destroy):
754        (JSC::MarkedSpace::shrink):
755        (JSC::MarkedSpace::clearMarks):
756        (JSC::MarkedSpace::markCount):
757        (JSC::MarkedSpace::objectCount):
758        * runtime/MarkedSpace.h: Use new helper functions instead of accessing
759        MarkedBlock data directly.
760
7612011-02-10  Michael Saboff  <msaboff@apple.com>
762
763        Reviewed by Geoffrey Garen.
764
765        Cached JavaScript Parser Data Being Left in Memory Cache
766        https://bugs.webkit.org/show_bug.cgi?id=54245
767
768        Added clear method which removes SourceProviderCache items.
769        Cleaned up extraneous whitespace.
770
771        * JavaScriptCore.exp:
772        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
773        * parser/SourceProviderCache.cpp:
774        (JSC::SourceProviderCache::~SourceProviderCache):
775        (JSC::SourceProviderCache::clear):
776        (JSC::SourceProviderCache::byteSize):
777        (JSC::SourceProviderCache::add):
778        * parser/SourceProviderCache.h:
779
7802011-02-10  Joseph Pecoraro  <joepeck@webkit.org>
781
782        Follow-up fix to r78291. I should pass (int) 0, not '0' to memset. 
783
784        * runtime/GCActivityCallbackCF.cpp:
785        (JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change.
786
7872011-02-10  Joseph Pecoraro  <joepeck@webkit.org>
788
789        Reviewed by Geoffrey Garen.
790
791        Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
792        https://bugs.webkit.org/show_bug.cgi?id=54257
793
794        A subclass may want to specify the CFRunLoop that the Garbage Collection
795        will happen on. It was difficult to manipulate this in a subclass because
796        the current DefaultGCActivityCallback class does this in its constructor.
797        This patch generalizes things a bit more so that a specific run loop can
798        be passed in to the constructor. This makes it so all run loop management
799        can stay in DefaultGCActivityCallback and a subclass can specify any runloop.
800
801        * runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can
802        specify the runloop GC can be scheduled on.
803        * runtime/GCActivityCallbackCF.cpp:
804        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors,
805        one that specifies the run loop and passes that on to commonConstructor and
806        the old constructor defaults to the current run loop.
807        (JSC::DefaultGCActivityCallback::commonConstructor): do normal construction,
808        adding the timer to the given runloop.
809
8102011-02-10  Geoffrey Garen  <ggaren@apple.com>
811
812        Reviewed by Oliver Hunt.
813
814        A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
815        https://bugs.webkit.org/show_bug.cgi?id=54253
816        
817        SunSpider reports no change.
818
819        * runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
820        is now unused.
821
822        * runtime/Heap.cpp:
823        (JSC::Heap::reset): Moved the call to shrink() here, since it seems a
824        little more clear for MarkedSpace's client to tell it explicitly when to
825        shrink.
826
827        * runtime/JSCell.h:
828        (JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
829
830        * runtime/MarkedBlock.cpp:
831        (JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
832        converted to more directly iterate a MarkedBlock based on knowing its
833        internal structure.
834
835        * runtime/MarkedBlock.h:
836        * runtime/MarkedSpace.cpp:
837        (JSC::MarkedSpace::allocate):
838        (JSC::MarkedSpace::sweep):
839        * runtime/MarkedSpace.h: Split out the code mentioned above.
840
8412011-02-10  Patrick Gansterer  <paroga@webkit.org>
842
843        Reviewed by Andreas Kling.
844
845        Fix compilation error on OpenBSD
846        https://bugs.webkit.org/show_bug.cgi?id=53766
847
848        Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD.
849
850        * wtf/Platform.h:
851        * wtf/StringExtras.h: Use HAVE(STRNSTR) now.
852
8532011-02-10  Adam Roben  <aroben@apple.com>
854
855        Print locations of assertions and logs in a way that Visual Studio understands
856
857        With this change, double-clicking one of these locations in Visual Studio's Output Window
858        will focus that line of code in the editor.
859
860        Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
861        Studio's Output Window does nothing
862
863        Reviewed by Alexey Proskuryakov.
864
865        * wtf/Assertions.cpp:
866        (printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
867        the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
868        same format that cl.exe uses when it prints compiler errors.
869
8702011-02-10  Dan Bernstein  <mitz@apple.com>
871
872        LLVM Compiler build fix.
873
874        * runtime/MarkedBlock.cpp:
875        (JSC::MarkedBlock::create):
876
8772011-02-10  Peter Varga  <pvarga@webkit.org>
878
879        Reviewed by Csaba Osztrogonác.
880
881        Remove PCRE source from trunk
882        https://bugs.webkit.org/show_bug.cgi?id=54188
883
884        * Android.mk:
885        * Android.v8.wtf.mk:
886        * CMakeLists.txt:
887        * DerivedSources.make:
888        * DerivedSources.pro:
889        * GNUmakefile.am:
890        * JavaScriptCore.gypi:
891        * JavaScriptCore.order:
892        * JavaScriptCore.pri:
893        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
894        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
895        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
896        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
897        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
898        * JavaScriptCore.xcodeproj/project.pbxproj:
899        * pcre/AUTHORS: Removed.
900        * pcre/COPYING: Removed.
901        * pcre/dftables: Removed.
902        * pcre/pcre.h: Removed.
903        * pcre/pcre.pri: Removed.
904        * pcre/pcre_compile.cpp: Removed.
905        * pcre/pcre_exec.cpp: Removed.
906        * pcre/pcre_internal.h: Removed.
907        * pcre/pcre_tables.cpp: Removed.
908        * pcre/pcre_ucp_searchfuncs.cpp: Removed.
909        * pcre/pcre_xclass.cpp: Removed.
910        * pcre/ucpinternal.h: Removed.
911        * pcre/ucptable.cpp: Removed.
912        * wscript:
913
9142011-02-10  Patrick Gansterer  <paroga@webkit.org>
915
916        Reviewed by Adam Barth.
917
918        Add randomValuesFromOS for OS(WINDOWS)
919        https://bugs.webkit.org/show_bug.cgi?id=54155
920
921        Use CryptGenRandom for generating cryptographically secure random numbers.
922        This will work on WinCE and MinGW too.
923
924        * config.h:
925        * wtf/OSRandomSource.cpp:
926        (WTF::randomValuesFromOS):
927
9282011-02-10  Jarred Nicholls  <jarred@sencha.com>
929
930        Reviewed by Adam Barth.
931
932        REGRESSION(r78149): Return value of read() shouldn't be ignored.
933        https://bugs.webkit.org/show_bug.cgi?id=54167
934        
935        stdio read should have its return value handled. Build error in gcc 4.4.5.
936
937        * wtf/OSRandomSource.cpp:
938        (WTF::randomValuesFromOS):
939
9402011-02-10  Patrick Gansterer  <paroga@webkit.org>
941
942        Reviewed by Adam Barth.
943
944        Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
945        https://bugs.webkit.org/show_bug.cgi?id=54156
946
947        randomValuesFromOS generates random numbers of cryptographic quality.
948        Make this clear by adding "cryptographically" to the function name.
949
950        * wtf/CryptographicallyRandomNumber.cpp:
951        (WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
952        * wtf/OSRandomSource.cpp:
953        (WTF::cryptographicallyRandomValuesFromOS):
954        * wtf/OSRandomSource.h:
955
9562011-02-09  Mark Rowe  <mrowe@apple.com>
957
958        Reviewed by Sam Weinig.
959
960        <rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
961
962        * wtf/FastMalloc.cpp:
963        (WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
964        (WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
965        (WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
966        (WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
967        (WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
968        * wtf/MallocZoneSupport.h:
969        (WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
970        (WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
971        a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
972        handle gracefully.
973
9742011-02-09  Gavin Barraclough  <barraclough@apple.com>
975
976        Reviewed by Sam Weinig.
977
978        Bug 54164 - Optimize global_var accesses on JSVALUE64
979
980        Directly embed the pointer to d->registers, optimize out the load
981        from the variable object, as we do already in JSVALUE32_64.
982
983        This is a ~1.5% win on sunspidey.
984
985        * jit/JIT.cpp:
986        * jit/JIT.h:
987        * jit/JITOpcodes.cpp:
988        (JSC::JIT::emit_op_get_global_var):
989        (JSC::JIT::emit_op_put_global_var):
990        (JSC::JIT::emit_op_get_scoped_var):
991        (JSC::JIT::emit_op_put_scoped_var):
992
9932011-02-09  Geoffrey Garen  <ggaren@apple.com>
994
995        Reviewed by Oliver Hunt.
996
997        A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
998        for its own initialization and destruction
999        https://bugs.webkit.org/show_bug.cgi?id=54137
1000
1001        * runtime/CollectorHeapIterator.h: Removed ObjectIterator since it is
1002        now unused.
1003
1004        * runtime/JSCell.h: Maded MarkedBlock a friend so it can construct and
1005        destruct JSCells.
1006
1007        * runtime/MarkedBlock.cpp:
1008        (JSC::MarkedBlock::create):
1009        (JSC::MarkedBlock::destroy):
1010        (JSC::MarkedBlock::MarkedBlock): Migrated initialization and destruction
1011        code from MarkedSpace, updating it not to use ObjectIterator. We don't
1012        want to use an abstract iterator since iteration will be unique to each
1013        block in the future.
1014
1015        * runtime/MarkedBlock.h: Made the consructor private and moved it into
1016        the .cpp file because it's big now.
1017
1018        * runtime/MarkedSpace.cpp:
1019        (JSC::MarkedSpace::allocateBlock):
1020        (JSC::MarkedSpace::freeBlock): Migrated code.
1021
1022        * runtime/MarkedSpace.h:
1023        (JSC::CollectorHeap::collectorBlock): Keep a vector of MarkedBlock
1024        pointers instead of aligned allocations -- how MarkedBlocks are allocated
1025        is now an implementation detail of MarkedBlock.
1026
10272011-02-09  Adam Barth  <abarth@webkit.org>
1028
1029        Another attempt to fix the Qt Windows build.
1030
1031        * config.h:
1032        * wtf/OSRandomSource.cpp:
1033        (WTF::randomValuesFromOS):
1034
10352011-02-09  Adam Barth  <abarth@webkit.org>
1036
1037        Attempt to fix the Qt Windows build.
1038
1039        * wtf/OSRandomSource.cpp:
1040        (WTF::randomValuesFromOS):
1041
10422011-02-09  Adam Barth  <abarth@webkit.org>
1043
1044        Reviewed by Eric Seidel.
1045
1046        Add WTF::cryptographicallyRandomNumber
1047        https://bugs.webkit.org/show_bug.cgi?id=54083
1048
1049        Introduce a cryptographically strong random number generator to WTF.
1050        The random number generator is based on arc4random as found in:
1051
1052        http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/crypt/arc4random.c?rev=1.22
1053
1054        I've changed to source to WebKit style and abstracted the operating
1055        system interaction to OSRandomSource.  We'll use this functionality to
1056        expose a cryptographically strong random number generator to
1057        JavaScript.
1058
1059        * Android.mk:
1060        * Android.v8.wtf.mk:
1061        * GNUmakefile.am:
1062        * JavaScriptCore.gypi:
1063        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1064        * JavaScriptCore.xcodeproj/project.pbxproj:
1065        * config.h:
1066        * wtf/CMakeLists.txt:
1067        * wtf/CryptographicallyRandomNumber.cpp: Added.
1068        (WTF::initMutexIfNeeded):
1069        (WTF::init):
1070        (WTF::addRandomData):
1071        (WTF::stir):
1072        (WTF::stirIfNeeded):
1073        (WTF::getByte):
1074        (WTF::getWord):
1075        (WTF::cryptographicallyRandomNumber):
1076        (WTF::cryptographicallyRandomValues):
1077        * wtf/CryptographicallyRandomNumber.h: Added.
1078        * wtf/OSRandomSource.cpp: Added.
1079        (WTF::randomValuesFromOS):
1080        * wtf/OSRandomSource.h: Added.
1081        * wtf/wtf.pri:
1082
10832011-02-09  Geoffrey Garen  <ggaren@apple.com>
1084
1085        Try to fix the build.
1086
1087        * wtf/Bitmap.h: Include string.h for memset. Not sure why this started
1088        failing now.
1089
10902011-02-09  Geoffrey Garen  <ggaren@apple.com>
1091
1092        Reviewed by Sam Weinig.
1093
1094        A tiny bit of encapsulation for MarkedBlock: made its heap data member private
1095        https://bugs.webkit.org/show_bug.cgi?id=54129
1096
1097        * runtime/MarkedBlock.h:
1098        (JSC::MarkedBlock::isCellAligned):
1099        (JSC::MarkedBlock::MarkedBlock):
1100        (JSC::MarkedBlock::heap): Made the heap data member private, and provided
1101        a constructor and an accessor.
1102
1103        * runtime/MarkedSpace.cpp:
1104        (JSC::MarkedSpace::allocateBlock):
1105        * runtime/MarkedSpace.h:
1106        (JSC::MarkedSpace::heap): Use the constructor and accessor.
1107
11082011-02-09  Peter Varga  <pvarga@webkit.org>
1109
1110        Reviewed by Gavin Barraclough.
1111
1112        Replace PCRE with Yarr in WebCore
1113        https://bugs.webkit.org/show_bug.cgi?id=53496
1114
1115        * JavaScriptCore.exp:
1116        * JavaScriptCore.gyp/JavaScriptCore.gyp:
1117        * JavaScriptCore.gypi:
1118        * JavaScriptCore.pro:
1119        * JavaScriptCore.xcodeproj/project.pbxproj:
1120        * create_regex_tables:
1121        * runtime/RegExp.cpp:
1122        * wtf/Platform.h:
1123        * yarr/Yarr.h:
1124        * yarr/YarrJIT.cpp:
1125        * yarr/YarrJIT.h:
1126        * yarr/YarrParser.h:
1127        * yarr/YarrPattern.h:
1128        * yarr/YarrSyntaxChecker.h:
1129        * yarr/yarr.pri: Added.
1130
11312011-02-08  Geoffrey Garen  <ggaren@apple.com>
1132
1133        Reviewed by Sam Weinig.
1134
1135        Removed some dead code from Heap
1136        https://bugs.webkit.org/show_bug.cgi?id=54064
1137
1138        * runtime/MarkedSpace.cpp: Removed some now-unused constants and
1139        declarations.
1140
1141        (JSC::MarkedSpace::allocate): Removed some ASSERTs that are also ASSERTed
1142        by our caller. Removed redundant typedefs.
1143
11442011-02-08  Geoffrey Garen  <ggaren@apple.com>
1145
1146        Reviewed by Sam Weinig.
1147
1148        Use a vector to track blocks in the Heap, instead of hand-rolled vector-like code
1149        https://bugs.webkit.org/show_bug.cgi?id=54062
1150        
1151        SunSpider reports no change.
1152
1153        * runtime/CollectorHeapIterator.h:
1154        (JSC::CollectorHeapIterator::isValid):
1155        (JSC::CollectorHeapIterator::isLive): Updated for new mark invariant: To
1156        know if an object is live, you just need to test its mark bit.
1157
1158        * runtime/MarkedSpace.cpp:
1159        (JSC::MarkedSpace::MarkedSpace): Moved waterMark and highWaterMark from
1160        CollectorHeap into MarkedSpace, since they're global state. Removed call
1161        to memset since CollectorHeap is a true class with its own constructor now.
1162
1163        (JSC::MarkedSpace::destroy): Change uses of m_heap.usedBlocks to
1164        m_heap.blocks.size(), and m_heap.numBlocks to m_heap.blocks.capacity().
1165
1166        (JSC::MarkedSpace::allocateBlock):
1167        (JSC::MarkedSpace::freeBlock): No need to manage our vector manually anymore.
1168
1169        (JSC::MarkedSpace::allocate):
1170        (JSC::MarkedSpace::shrink):
1171        (JSC::MarkedSpace::clearMarkBits):
1172        (JSC::MarkedSpace::markedCells):
1173        (JSC::MarkedSpace::sweep):
1174        (JSC::MarkedSpace::objectCount):
1175        (JSC::MarkedSpace::capacity):
1176        (JSC::MarkedSpace::reset):
1177        (JSC::MarkedSpace::primaryHeapEnd):
1178        * runtime/MarkedSpace.h:
1179        (JSC::CollectorHeap::CollectorHeap):
1180        (JSC::MarkedSpace::highWaterMark):
1181        (JSC::MarkedSpace::setHighWaterMark):
1182        (JSC::MarkedSpace::contains): Same as above.
1183
11842011-02-08  Geoffrey Garen  <ggaren@apple.com>
1185
1186        Reviewed by Darin Adler.
1187
1188        Give each MarkedBlock enough mark bits to cover the whole block
1189        https://bugs.webkit.org/show_bug.cgi?id=54029
1190        
1191        SunSpider reports no change.
1192
1193        This simplifies access to mark bits, since any cell-aligned pointer
1194        into a block now has a valid mark bit to test.
1195        
1196        * runtime/MarkedBlock.h: Changed CELLS_PER_BLOCK to account for the extra
1197        mark bits. This happens not to change its actual value.
1198        (JSC::MarkedBlock::cellNumber):
1199        (JSC::MarkedBlock::isMarked):
1200        (JSC::MarkedBlock::testAndSetMarked):
1201        (JSC::MarkedBlock::setMarked): Changed const JSCell* to const void* to
1202        remove a cast from our caller, and to more accurately reflect the fact
1203        that MarkedBlock is agnostic about the types pointed to by the pointers
1204        you pass to it.
1205
1206        (JSC::MarkedBlock::isPossibleCell): Removed a null check. We now consider
1207        the null pointer to be a possible cell with a 0 (impossible) block. This
1208        removes a null check from marking.
1209
1210        * runtime/MarkedSpace.cpp:
1211        * runtime/MarkedSpace.h:
1212        (JSC::MarkedSpace::contains): Simplified the contains check, and inlined
1213        the whole thing, now that it's so simple.
1214
12152011-02-08  Daniel Bates  <dbates@rim.com>
1216
1217        Rubber-stamped by Martin Robinson.
1218
1219        Rename enum ProtectionSeting [sic] to ProtectionSetting.
1220
1221        * jit/ExecutableAllocator.cpp:
1222        (JSC::ExecutableAllocator::reprotectRegion):
1223        * jit/ExecutableAllocator.h:
1224
12252011-02-08  Balazs Kelemen  <kbalazs@webkit.org>
1226
1227        Reviewed by Andreas Kling.
1228
1229        [Qt] Should not always define USE_SYSTEM_MALLOC
1230        https://bugs.webkit.org/show_bug.cgi?id=54007
1231
1232        * wtf/Platform.h:
1233
12342011-02-08  Dan Bernstein  <mitz@apple.com>
1235
1236        Reviewed by Maciej Stachowiak.
1237
1238        LLVM Compiler build fix.
1239
1240        * runtime/WriteBarrier.h:
1241        (JSC::WriteBarrier::WriteBarrier):
1242
12432011-02-07  Ryosuke Niwa  <rniwa@webkit.org>
1244
1245        Reviewed by Darin Adler.
1246
1247        JSVariableObject::setRegisters should take PassOwnArrayPtr for registersArray.
1248        https://bugs.webkit.org/show_bug.cgi?id=53902
1249
1250        * runtime/Arguments.h:
1251        (JSC::JSActivation::copyRegisters): Uses OwnArrayPtr<Register> instead of Register*.
1252        * runtime/JSGlobalObject.cpp:
1253        (JSC::JSGlobalObject::copyGlobalsFrom): Ditto.
1254        * runtime/JSGlobalObject.h:
1255        (JSC::JSGlobalObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
1256        for registerArray.
1257        * runtime/JSVariableObject.h:
1258        (JSC::JSVariableObject::copyRegisterArray): Returns PassOwnArrayPtr<Register> instead of Register*.
1259        (JSC::JSVariableObject::setRegisters): Takes PassOwnArrayPtr<Register> instead of Register*
1260        for registerArray.
1261
12622011-02-07  Geoffrey Garen  <ggaren@apple.com>
1263
1264        Reviewed by Sam Weinig.
1265
1266        Removed some dead code from Heap
1267        https://bugs.webkit.org/show_bug.cgi?id=53969
1268        
1269        SunSpider reports no change.
1270
1271        * runtime/MarkedSpace.cpp:
1272        (JSC::MarkedSpace::shrink):
1273        (JSC::MarkedSpace::sweep):
1274        * runtime/MarkedSpace.h: Removed resizeBlocks and growBlocks, and
1275        renamed shrinkBlocks to shrink, making it unconditionally shrink as
1276        much as possible.
1277
12782011-02-07  Geoffrey Garen  <ggaren@apple.com>
1279
1280        Reviewed by Oliver Hunt.
1281
1282        Simplified the marked space's mark invariant
1283        https://bugs.webkit.org/show_bug.cgi?id=53968
1284        
1285        SunSpider reports no change.
1286        
1287        * runtime/MarkedSpace.cpp:
1288        (JSC::MarkedSpace::allocate): Mark objects when allocating them. This
1289        means that, at all times other than the mark phase, an object is live
1290        if and only if it is marked.
1291
1292        (JSC::MarkedSpace::containsSlowCase): Use the new mark invariant to
1293        simplify testing whether an object is live.
1294
12952011-02-07  Beth Dakin  <bdakin@apple.com>
1296
1297        Reviewed by Eric Seidel.
1298
1299        Fix for https://bugs.webkit.org/show_bug.cgi?id=53950
1300        USE_WK_SCROLLBAR_PAINTER in ScrollbarThemeMac should be in
1301        Platform.h instead
1302
1303        * wtf/Platform.h:
1304
13052011-02-07  Darin Adler  <darin@apple.com>
1306
1307        Reviewed by Antti Koivisto.
1308
1309        Add built-in decoder for UTF-8 for improved performance
1310        https://bugs.webkit.org/show_bug.cgi?id=53898
1311
1312        * wtf/unicode/UnicodeMacrosFromICU.h: Added U8_MAX_LENGTH and
1313        U8_APPEND_UNSAFE. Also fixed header.
1314
13152011-02-07  Adam Roben  <aroben@apple.com>
1316
1317        Delete precompiled headers whenever any .vsprops file changes
1318
1319        Precompiled headers need to be rebuilt if, e.g., an ENABLE_* macro is changed in one of our
1320        .vsprops files. Unfortunately, Visual Studio isn't smart enough to figure this out, so we
1321        give it some assistance by deleting the precompiled headers whenever any .vsprops file
1322        changes.
1323
1324        I also made some drive-by fixes while I was in the area.
1325
1326        Fixes <http://webkit.org/b/53826> react-to-vsprops-changes.py doesn't force precompiled
1327        headers to be rebuilt, but should
1328
1329        Reviewed by David Kilzer.
1330
1331        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stop ignoring the
1332        return code from react-to-vsprops-changes.py so we will notice when errors are introduced.
1333        But skip the script entirely in production builds, where it is both unnecessary and can't
1334        function correctly (due to not having the entire source tree available to it).
1335
1336        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1337        (main): Removed an extra '*' in the glob for finding manifest files. The extra '*' was
1338        leftover from before we rearranged WebKitBuild in r75138. Moved code to delete an old file
1339        to the new delete_if_older_than function. Added code to delete any precompiled headers older
1340        than the newest .vsprops file.
1341        (delete_if_older_than): Added. Code came from main.
1342
13432011-02-07  Antti Koivisto  <antti@apple.com>
1344
1345        Not reviewed.
1346        
1347        ASSERTS_DISABLED -> ASSERT_DISABLED
1348
1349        * wtf/BloomFilter.h:
1350
13512011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1352
1353        Unreviewed; speculative Qt build fix.
1354
1355        * JavaScriptCore.pro:
1356
13572011-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1358
1359        Reviewed by Darin Adler.
1360
1361        OwnArraryPtr.h uses deleteOwnedPtr but doesn’t include OwnPtrCommon.h
1362        https://bugs.webkit.org/show_bug.cgi?id=52867
1363
1364        Removed LOOSE_OWN_ARRAY_PTR and OwnArrayPtr<T>::set. Replaced all calls to OwnArrayPtr::set
1365        and loose instantiation of OwnArrayPtr by calls to operator= and adoptArrayPtr. Also removed
1366        OwnArrayPtrCommon.h since PassOwnArrayPtr.h needs to include OwnArrayPtr.h and there is
1367        no point in putting deleteOwnedArrayPtr into a separate header.
1368        
1369        Note: if this patch breaks build, the code is either instiantiating OwnArrayPtr
1370        without calling adoptArrayPtr or calling set on ArrayOwnPtr instead of operator=.
1371
1372        No tests are added since this is a refactoring.
1373
1374        * API/JSStringRefCF.cpp:
1375        (JSStringCreateWithCFString): Calls adoptArrayPtr.
1376        * GNUmakefile.am: Removed OwnArrayPtrCommon.h
1377        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
1378        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
1379        * runtime/Arguments.cpp:
1380        (JSC::Arguments::deleteProperty): Calls adoptArrayPtr.
1381        * runtime/Arguments.h:
1382        (JSC::Arguments::copyRegisters): Ditto.
1383        * runtime/JSPropertyNameIterator.cpp:
1384        (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Ditto.
1385        * runtime/JSVariableObject.h:
1386        (JSC::JSVariableObject::setRegisters): Calls operator= instead of set.
1387        * runtime/StructureChain.cpp:
1388        (JSC::StructureChain::StructureChain): Ditto.
1389        * wtf/CMakeLists.txt:
1390        * wtf/DateMath.h:
1391        (JSC::GregorianDateTime::GregorianDateTime): No longer instnatiates OwnArrayPtr
1392        with a null pointer.
1393        * wtf/OwnArrayPtr.h:
1394        * wtf/OwnArrayPtrCommon.h: Removed.
1395        * wtf/PassOwnArrayPtr.h: No longer includes OwnArrayCommon.h
1396        (WTF::deleteOwnedArrayPtr): Moved from OwnArrayPtrCommon.h
1397
13982011-02-06  Antti Koivisto  <antti@apple.com>
1399
1400        Reviewed by Maciej Stachowiak.
1401
1402        Use bloom filter for descendant selector filtering
1403        https://bugs.webkit.org/show_bug.cgi?id=53880
1404        
1405        Implement a bloom filter with k=2 and 8 bit counting.
1406
1407        * GNUmakefile.am:
1408        * JavaScriptCore.gypi:
1409        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1410        * JavaScriptCore.xcodeproj/project.pbxproj:
1411        * wtf/BloomFilter.h: Added.
1412        (WTF::BloomFilter::maximumCount):
1413        (WTF::BloomFilter::BloomFilter):
1414        (WTF::BloomFilter::mayContain):
1415        (WTF::BloomFilter::add):
1416        (WTF::BloomFilter::remove):
1417        (WTF::BloomFilter::firstSlot):
1418        (WTF::BloomFilter::secondSlot):
1419        (WTF::::add):
1420        (WTF::::remove):
1421        (WTF::::clear):
1422        (WTF::::likelyEmpty):
1423        (WTF::::isClear):
1424
14252011-02-04  Geoffrey Garen  <ggaren@apple.com>
1426
1427        Reviewed by Oliver Hunt.
1428
1429        Rolled back in r77612 with ASSERT/crash fixed.
1430        https://bugs.webkit.org/show_bug.cgi?id=53759
1431        
1432        Don't shrink the heap to 0 unconditionally. Instead, shrink to 1 if
1433        necessary. For now, the heap assumes that it always has at least one
1434        block live.
1435
1436        * runtime/Heap.cpp:
1437        (JSC::Heap::Heap):
1438        (JSC::Heap::reset):
1439        * runtime/Heap.h:
1440        * runtime/MarkedSpace.cpp:
1441        (JSC::MarkedSpace::allocate):
1442        (JSC::MarkedSpace::shrinkBlocks):
1443        (JSC::MarkedSpace::sweep):
1444        (JSC::MarkedSpace::reset):
1445        * runtime/MarkedSpace.h:
1446        (JSC::MarkedSpace::highWaterMark):
1447        (JSC::MarkedSpace::setHighWaterMark):
1448
14492011-02-04  David Kilzer  <ddkilzer@apple.com>
1450
1451        BUILD FIX: REALLY remove the last vestiges of JSVALUE32!
1452
1453        <rdar://problem/8957409> Remove last vestiges of JSVALUE32
1454        <http://webkit.org/b/53779>
1455
1456        * DerivedSources.make: Removed dependency on
1457        JavaScriptCore.JSVALUE32.exp.
1458
14592011-02-04  David Kilzer  <ddkilzer@apple.com>
1460
1461        <rdar://problem/8957409> Remove last vestiges of JSVALUE32
1462        <http://webkit.org/b/53779>
1463
1464        Reviewed by Darin Adler.
1465
1466        Support for JSVALUE32 was originaly removed in r70111.
1467
1468        * Configurations/JavaScriptCore.xcconfig: Changed armv6 to use
1469        JavaScriptCore.JSVALUE32_64.exp and ppc64 to use
1470        JavaScriptCore.JSVALUE64.exp to match Platform.h.
1471        * DerivedSources.make: Removed rule for
1472        JavaScriptCore.JSVALUE32.exp.
1473        * JavaScriptCore.JSVALUE32only.exp: Removed.
1474        * JavaScriptCore.xcodeproj/project.pbxproj: Removed references
1475        to JavaScriptCore.JSVALUE32only.exp.
1476
14772011-02-04  David Kilzer  <ddkilzer@apple.com>
1478
1479        Use static_cast and other style cleanup in YarrInterpreter.cpp
1480        <http://webkit.org/b/53772>
1481
1482        Reviewed by John Sullivan.
1483
1484        * yarr/YarrInterpreter.cpp:
1485        (JSC::Yarr::Interpreter::InputStream::readChecked): Use
1486        static_cast.
1487        (JSC::Yarr::Interpreter::InputStream::checkInput): Remove
1488        unnecessary else block.
1489        (JSC::Yarr::Interpreter::matchAssertionEOL): Ditto.
1490        (JSC::Yarr::Interpreter::backtrackBackReference): Ditto.
1491        (JSC::Yarr::ByteCompiler::emitDisjunction): Use static_cast.
1492
14932011-02-04  Sheriff Bot  <webkit.review.bot@gmail.com>
1494
1495        Unreviewed, rolling out r77625 and r77626.
1496        http://trac.webkit.org/changeset/77625
1497        http://trac.webkit.org/changeset/77626
1498        https://bugs.webkit.org/show_bug.cgi?id=53765
1499
1500        It broke Windows builds (Requested by Ossy_ on #webkit).
1501
1502        * JavaScriptCore.exp:
1503        * JavaScriptCore.gyp/JavaScriptCore.gyp:
1504        * JavaScriptCore.gypi:
1505        * JavaScriptCore.pro:
1506        * JavaScriptCore.xcodeproj/project.pbxproj:
1507        * create_regex_tables:
1508        * runtime/RegExp.cpp:
1509        * wtf/Platform.h:
1510        * yarr/Yarr.h:
1511        * yarr/YarrJIT.cpp:
1512        * yarr/YarrJIT.h:
1513        * yarr/YarrParser.h:
1514        * yarr/YarrPattern.h:
1515        * yarr/YarrSyntaxChecker.h:
1516        * yarr/yarr.pri: Removed.
1517
15182011-02-04  Jessie Berlin  <jberlin@apple.com>
1519
1520        Windows build fix. Unreviewed.
1521
1522        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1523
15242011-02-04  Peter Varga  <pvarga@webkit.org>
1525
1526        Reviewed by Gavin Barraclough.
1527
1528        Replace PCRE with Yarr in WebCore
1529        https://bugs.webkit.org/show_bug.cgi?id=53496
1530
1531        * JavaScriptCore.exp:
1532        * JavaScriptCore.gyp/JavaScriptCore.gyp:
1533        * JavaScriptCore.gypi:
1534        * JavaScriptCore.pro:
1535        * JavaScriptCore.xcodeproj/project.pbxproj:
1536        * create_regex_tables:
1537        * runtime/RegExp.cpp:
1538        * wtf/Platform.h:
1539        * yarr/Yarr.h:
1540        * yarr/YarrJIT.cpp:
1541        * yarr/YarrJIT.h:
1542        * yarr/YarrParser.h:
1543        * yarr/YarrPattern.h:
1544        * yarr/YarrSyntaxChecker.h:
1545        * yarr/yarr.pri: Added.
1546
15472011-02-04  Ilya Tikhonovsky  <loislo@chromium.org>
1548
1549        Unreviewed rollout two patches r77614 and r77612.
1550
1551        REGRESSION: Snow Leopard Intel Release anumber of failing tests.
1552
1553        * runtime/Heap.cpp:
1554        (JSC::Heap::Heap):
1555        (JSC::Heap::reset):
1556        * runtime/Heap.h:
1557        * runtime/MarkedSpace.cpp:
1558        (JSC::MarkedSpace::allocate):
1559        (JSC::MarkedSpace::sweep):
1560        (JSC::MarkedSpace::reset):
1561        * runtime/MarkedSpace.h:
1562
15632011-02-04  Geoffrey Garen  <ggaren@apple.com>
1564
1565        Try to fix 32bit build.
1566
1567        * runtime/Heap.cpp:
1568        (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
1569        since 1.5 is double (64bit), and the result is size_t (32bit).
1570
15712011-02-03  Geoffrey Garen  <ggaren@apple.com>
1572
1573        Reviewed by Cameron Zwarich.
1574
1575        Changed MarkedSpace to delegate grow/shrink decisions to Heap
1576        https://bugs.webkit.org/show_bug.cgi?id=53759
1577        
1578        SunSpider reports no change.
1579        
1580        * runtime/Heap.cpp:
1581        (JSC::Heap::Heap):
1582        (JSC::Heap::reset):
1583        * runtime/Heap.h: Reorganized a few data members for better cache locality.
1584        Added a grow policy.
1585        
1586        * runtime/MarkedSpace.cpp:
1587        (JSC::MarkedSpace::allocate):
1588        (JSC::MarkedSpace::sweep):
1589        (JSC::MarkedSpace::reset): Don't shrink automatically. Instead, wait for
1590        the heap to make an explicit sweep call.
1591
1592        * runtime/MarkedSpace.h:
1593        (JSC::MarkedSpace::highWaterMark):
1594        (JSC::MarkedSpace::setHighWaterMark): Use a watermark to determine how
1595        many bytes to allocate before failing and giving the heap an opportunity
1596        to collect garbage. This also means that we allocate blocks on demand,
1597        instead of ahead of time.
1598
15992011-02-03  James Kozianski  <koz@chromium.org>
1600
1601        Reviewed by Dimitri Glazkov.
1602
1603        Add navigator.registerProtocolHandler behind a flag.
1604        https://bugs.webkit.org/show_bug.cgi?id=52609
1605
1606        * Configurations/FeatureDefines.xcconfig:
1607
16082011-02-03  Geoffrey Garen  <ggaren@apple.com>
1609
1610        Reviewed by Oliver Hunt.
1611
1612        Not all blocks are freed when the heap is freed (counting is hard!)
1613        https://bugs.webkit.org/show_bug.cgi?id=53732
1614
1615        * runtime/MarkedSpace.cpp:
1616        (JSC::MarkedSpace::destroy): Freeing a block compacts the list, so just
1617        keep freeing block 0 until there are no blocks left.
1618
16192011-02-03  Geoffrey Garen  <ggaren@apple.com>
1620
1621        Try to fix the Mac build.
1622
1623        * JavaScriptCore.xcodeproj/project.pbxproj: The new MarkedBlock.h header
1624        needs to be private, not project, so other projects can include headers
1625        that depend on it.
1626
16272011-02-03  Geoffrey Garen  <ggaren@apple.com>
1628
1629        Reviewed by Sam Weinig.
1630
1631        Start using MarkedBlock instead of CollectorBlock
1632        https://bugs.webkit.org/show_bug.cgi?id=53693
1633        
1634        SunSpider reports no change.
1635        
1636        * runtime/MarkedBlock.h:
1637        (JSC::MarkedBlock::blockFor):
1638        (JSC::MarkedBlock::setMarked):
1639        (JSC::MarkedBlock::isCellAligned):
1640        (JSC::MarkedBlock::isPossibleCell): Updated for const-ness.
1641
1642        * runtime/MarkedSpace.cpp:
1643        (JSC::MarkedSpace::allocateBlock):
1644        (JSC::MarkedSpace::containsSlowCase):
1645        (JSC::MarkedSpace::clearMarkBits): Updated for const-ness.
1646
1647        * runtime/MarkedSpace.h:
1648        (JSC::CollectorHeap::collectorBlock):
1649        (JSC::MarkedSpace::heap):
1650        (JSC::MarkedSpace::isMarked):
1651        (JSC::MarkedSpace::testAndSetMarked):
1652        (JSC::MarkedSpace::setMarked):
1653        (JSC::MarkedSpace::contains): Switched from CollectorBlock to MarkedBlock,
1654        and deleted dead CollectorBlock-related code.
1655
16562011-02-03  Patrick Gansterer  <paroga@webkit.org>
1657
1658        Reviewed by Darin Adler.
1659
1660        Avoid strlen() in AtomicString::fromUTF8
1661        https://bugs.webkit.org/show_bug.cgi?id=50516
1662
1663        Add an overload to calculateStringHashFromUTF8 to get
1664        strlen() of the input data with only one call.
1665
1666        This change shows about 3% performance win on the xml-parser benchmark.
1667
1668        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1669        * wtf/text/AtomicString.cpp:
1670        (WTF::AtomicString::fromUTF8):
1671        * wtf/unicode/UTF8.cpp:
1672        (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
1673        (WTF::Unicode::calculateStringHashFromUTF8):
1674        (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
1675        * wtf/unicode/UTF8.h:
1676
16772011-02-02  Gavin Barraclough  <barraclough@apple.com>
1678
1679        Windows build fix.
1680
1681        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1682
16832011-02-02  Gavin Barraclough  <barraclough@apple.com>
1684
1685        oops, build fix!
1686
1687        * wtf/Assertions.cpp:
1688
16892011-02-02  Gavin Barraclough  <barraclough@apple.com>
1690
1691        Reviewed by Sam Weinig.
1692
1693        Bug 53650 - Add a BACKTRACE macro to Assertions.h
1694
1695        Add a BACKTRACE macro to Assertions.h, which will print a backtrace on
1696        debug Mac builds, make CRASH (and thus ASSERT) automatically call this.
1697
1698        * JavaScriptCore.exp:
1699        * wtf/Assertions.cpp:
1700        * wtf/Assertions.h:
1701
17022011-02-02  Michael Saboff  <msaboff@apple.com>
1703
1704        Reviewed by Gavin Barraclough.
1705
1706        Improper backtrack of nested non-capturing greedy paren to prior paren
1707        https://bugs.webkit.org/show_bug.cgi?id=53261
1708
1709        A paren that follows a non-capturing greedy paren nested within a 
1710        non-capturing fixed paren was back tracking to the last paren 
1711        processed instead of the immediately prior paren.
1712        Refactored default backtracking of parens to prior paren to work for
1713        both nested (within) and immediately prior (after) parens.
1714
1715        * yarr/YarrJIT.cpp:
1716        (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
1717        (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
1718        (JSC::Yarr::YarrGenerator::TermGenerationState::setJumpListToPriorParen):
1719        (JSC::Yarr::YarrGenerator::TermGenerationState::getJumpListToPriorParen):
1720        (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
1721        (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
1722        (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
1723        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
1724        (JSC::Yarr::YarrGenerator::generateDisjunction):
1725
17262011-02-02  Jeff Miller  <jeffm@apple.com>
1727
1728        Reviewed by Darin Adler and Steve Falkenburg.
1729
1730        Add DerivedSources.make to some Visual Studio projects
1731        https://bugs.webkit.org/show_bug.cgi?id=53607
1732
1733        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add DerivedSources.make.
1734
17352011-02-02  Steve Lacey  <sjl@chromium.org>
1736
1737        Reviewed by Eric Carlson.
1738
1739        Implement basic media statistics on media elements.
1740        https://bugs.webkit.org/show_bug.cgi?id=53322
1741
1742        * Configurations/FeatureDefines.xcconfig:
1743
17442011-02-02  Kevin Ollivier  <kevino@theolliviers.com>
1745
1746        [wx] Build fixes for wxWebKit.
1747
1748        * wtf/wx/StringWx.cpp:
1749        (WTF::String::String):
1750
17512011-02-01  Geoffrey Garen  <ggaren@apple.com>
1752
1753        Reviewed by Sam Weinig.
1754
1755        A little more Heap refactoring
1756        https://bugs.webkit.org/show_bug.cgi?id=53577
1757        
1758        SunSpider reports no change.
1759        
1760        Split out MarkedBlock into its own file / class.
1761        
1762        Did the following renames:
1763            isCellMarked => isMarked
1764            checkMarkCell => testAndSetMarked
1765            markCell => setMarked
1766            cellOffset => cellNumber
1767            collectorBlock => blockFor
1768
1769        * Android.mk:
1770        * CMakeLists.txt:
1771        * GNUmakefile.am:
1772        * JavaScriptCore.gypi:
1773        * JavaScriptCore.pro:
1774        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1775        * JavaScriptCore.xcodeproj/project.pbxproj:
1776        * runtime/Heap.cpp:
1777        (JSC::WeakGCHandlePool::update):
1778        * runtime/Heap.h:
1779        (JSC::Heap::isMarked):
1780        (JSC::Heap::testAndSetMarked):
1781        (JSC::Heap::setMarked):
1782        * runtime/JSArray.h:
1783        (JSC::MarkStack::markChildren):
1784        (JSC::MarkStack::drain):
1785        * runtime/JSCell.h:
1786        (JSC::JSCell::MarkStack::internalAppend):
1787        * runtime/MarkedBlock.cpp: Added.
1788        * runtime/MarkedBlock.h: Added.
1789        (JSC::MarkedBlock::blockFor):
1790        (JSC::MarkedBlock::cellNumber):
1791        (JSC::MarkedBlock::isMarked):
1792        (JSC::MarkedBlock::testAndSetMarked):
1793        (JSC::MarkedBlock::setMarked):
1794        (JSC::MarkedBlock::isCellAligned):
1795        (JSC::MarkedBlock::isPossibleCell):
1796        * runtime/MarkedSpace.h:
1797        (JSC::MarkedSpace::isMarked):
1798        (JSC::MarkedSpace::testAndSetMarked):
1799        (JSC::MarkedSpace::setMarked):
1800        * runtime/SmallStrings.cpp:
1801        (JSC::isMarked):
1802        * runtime/WeakGCMap.h:
1803        (JSC::WeakGCMap::isValid):
1804        (JSC::::get):
1805        (JSC::::take):
1806        (JSC::::set):
1807
18082011-02-02  Sam Weinig  <sam@webkit.org>
1809
1810        Fix windows clean build.
1811
1812        * DerivedSources.make:
1813
18142011-02-02  Alejandro G. Castro  <alex@igalia.com>
1815
1816        Reviewed by Martin Robinson.
1817
1818        [GTK] Fix dist compilation
1819        https://bugs.webkit.org/show_bug.cgi?id=53579
1820
1821        * GNUmakefile.am: Added WriteBarrier.h to the sources, it was
1822        added in r77151
1823
18242011-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1825
1826        Unreviewed, rolling out r77297.
1827        http://trac.webkit.org/changeset/77297
1828        https://bugs.webkit.org/show_bug.cgi?id=53538
1829
1830        caused leopard crashes (Requested by paroga on #webkit).
1831
1832        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1833        * wtf/text/AtomicString.cpp:
1834        (WTF::AtomicString::fromUTF8):
1835        * wtf/unicode/UTF8.cpp:
1836        (WTF::Unicode::calculateStringHashFromUTF8):
1837        * wtf/unicode/UTF8.h:
1838
18392011-02-01  Sam Weinig  <sam@webkit.org>
1840
1841        Fix Mac production builds.
1842
1843        * JavaScriptCore.xcodeproj/project.pbxproj:
1844
18452011-02-01  Sam Weinig  <sam@webkit.org>
1846
1847        Try to fix the windows build.
1848
1849        * DerivedSources.make:
1850
18512011-02-01  Patrick Gansterer  <paroga@webkit.org>
1852
1853        Reviewed by Darin Adler.
1854
1855        Avoid strlen() in AtomicString::fromUTF8
1856        https://bugs.webkit.org/show_bug.cgi?id=50516
1857
1858        Add an overload to calculateStringHashFromUTF8 to get
1859        strlen() of the input data with only one call.
1860
1861        This change shows about 3% performance win on the xml-parser benchmark.
1862
1863        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1864        * wtf/text/AtomicString.cpp:
1865        (WTF::AtomicString::fromUTF8):
1866        * wtf/unicode/UTF8.cpp:
1867        (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
1868        (WTF::Unicode::calculateStringHashFromUTF8):
1869        (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
1870        * wtf/unicode/UTF8.h:
1871
18722011-02-01  Sam Weinig  <sam@webkit.org>
1873
1874        Reviewed by Beth Dakin.
1875
1876        Part 2 for <rdar://problem/8492788>
1877        Adopt WKScrollbarPainterController
1878
1879        Use header detection to define scrollbar painting controller #define.
1880
1881        * DerivedSources.make:
1882        * JavaScriptCore.xcodeproj/project.pbxproj:
1883
18842011-02-01  Geoffrey Garen  <ggaren@apple.com>
1885
1886        Reviewed by Oliver Hunt.
1887
1888        Refactor JSGlobalObject-related tear-down
1889        https://bugs.webkit.org/show_bug.cgi?id=53478
1890        
1891        While investigating crashes caused by r77082, I noticed some strange
1892        destructor-time behaviors. This patch makes them less strange.
1893
1894        * bytecode/CodeBlock.cpp:
1895        (JSC::CodeBlock::CodeBlock):
1896        (JSC::CodeBlock::markAggregate):
1897        * bytecode/CodeBlock.h:
1898        (JSC::CodeBlock::globalObject):
1899        (JSC::GlobalCodeBlock::GlobalCodeBlock):
1900        (JSC::GlobalCodeBlock::~GlobalCodeBlock): Store the set of global code
1901        blocks on the Heap, instead of on independent global objects. The heap
1902        is guaranteed to outlast any GC-owned data structure. The heap is also
1903        a natural place to store objects that needs out-of-band marking, since
1904        the heap is responsible for marking all roots.
1905
1906        * runtime/Heap.cpp:
1907        (JSC::Heap::markRoots):
1908        (JSC::Heap::globalObjectCount):
1909        (JSC::Heap::protectedGlobalObjectCount):
1910        * runtime/Heap.h:
1911        (JSC::Heap::codeBlocks):
1912        * runtime/JSGlobalData.cpp:
1913        (JSC::JSGlobalData::JSGlobalData):
1914        * runtime/JSGlobalData.h:
1915        * runtime/JSGlobalObject.cpp:
1916        (JSC::JSGlobalObject::~JSGlobalObject):
1917        (JSC::JSGlobalObject::init):
1918        (JSC::JSGlobalObject::markChildren):
1919        * runtime/JSGlobalObject.h:
1920        * runtime/MarkedSpace.cpp: Store the set of global objects in a weak map
1921        owned by JSGlobalData, instead of an instrusive circular linked list.
1922        This is simpler, and it avoids destructor-time access between garbage
1923        collected objects, which is hard to get right.
1924
1925        (JSC::MarkedSpace::destroy): Make sure to clear mark bits before tearing
1926        everything down. Otherwise, weak data structures will incorrectly report
1927        that objects pending destruction are still alive.
1928
19292011-02-01  Geoffrey Garen  <ggaren@apple.com>
1930
1931        Reviewed by Oliver Hunt.
1932
1933        REGRESSION(77082): GC-related crashes seen: on WebKit2 bot; on GTK 32bit
1934        bot; loading trac pages; typing in search field
1935        https://bugs.webkit.org/show_bug.cgi?id=53519
1936        
1937        The crashes were all caused by failure to run an object's destructor.
1938
1939        * runtime/CollectorHeapIterator.h:
1940        (JSC::ObjectIterator::ObjectIterator): Don't skip forward upon
1941        construction. The iterator class used to do that when it was designed
1942        for prior-to-beginning initialization. I forgot to remove this line
1943        of code when I changed the iterator to normal initialization.
1944        
1945        Skipping forward upon construction was causing the heap to skip running
1946        the destructor for the very first object in a block when destroying the
1947        block. This usually did not crash, since block destruction is rare and
1948        most objects have pretty trivial destructors. However, in the rare case
1949        when the heap would destroy a block whose first object was a global
1950        object or a DOM node, BOOM.
1951
19522011-01-31  Oliver Hunt  <oliver@apple.com>
1953
1954        Reviewed by Geoffrey Garen.
1955
1956        Update JSObject storage for new marking API
1957        https://bugs.webkit.org/show_bug.cgi?id=53467
1958
1959        JSObject no longer uses EncodedJSValue for its property storage.
1960        This produces a stream of mechanical changes to PropertySlot and
1961        anonymous storage APIs.
1962
1963        * JavaScriptCore.exp:
1964        * runtime/ArrayPrototype.cpp:
1965        (JSC::ArrayPrototype::ArrayPrototype):
1966        * runtime/BooleanConstructor.cpp:
1967        (JSC::constructBoolean):
1968        (JSC::constructBooleanFromImmediateBoolean):
1969        * runtime/BooleanObject.cpp:
1970        (JSC::BooleanObject::BooleanObject):
1971        * runtime/BooleanObject.h:
1972        * runtime/BooleanPrototype.cpp:
1973        (JSC::BooleanPrototype::BooleanPrototype):
1974        * runtime/DateInstance.cpp:
1975        (JSC::DateInstance::DateInstance):
1976        * runtime/DatePrototype.cpp:
1977        (JSC::DatePrototype::DatePrototype):
1978        * runtime/JSActivation.cpp:
1979        (JSC::JSActivation::getOwnPropertySlot):
1980        * runtime/JSArray.cpp:
1981        (JSC::JSArray::getOwnPropertySlot):
1982        * runtime/JSFunction.cpp:
1983        (JSC::JSFunction::getOwnPropertySlot):
1984        * runtime/JSGlobalObject.h:
1985        (JSC::JSGlobalObject::JSGlobalObject):
1986        * runtime/JSObject.cpp:
1987        (JSC::JSObject::fillGetterPropertySlot):
1988        * runtime/JSObject.h:
1989        (JSC::JSObject::getDirectLocation):
1990        (JSC::JSObject::offsetForLocation):
1991        (JSC::JSObject::putAnonymousValue):
1992        (JSC::JSObject::clearAnonymousValue):
1993        (JSC::JSObject::getAnonymousValue):
1994        (JSC::JSObject::putThisToAnonymousValue):
1995        (JSC::JSObject::locationForOffset):
1996        (JSC::JSObject::inlineGetOwnPropertySlot):
1997        * runtime/JSObjectWithGlobalObject.cpp:
1998        (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
1999        * runtime/JSWrapperObject.h:
2000        (JSC::JSWrapperObject::JSWrapperObject):
2001        (JSC::JSWrapperObject::setInternalValue):
2002        * runtime/Lookup.cpp:
2003        (JSC::setUpStaticFunctionSlot):
2004        * runtime/NumberConstructor.cpp:
2005        (JSC::constructWithNumberConstructor):
2006        * runtime/NumberObject.cpp:
2007        (JSC::NumberObject::NumberObject):
2008        (JSC::constructNumber):
2009        * runtime/NumberObject.h:
2010        * runtime/NumberPrototype.cpp:
2011        (JSC::NumberPrototype::NumberPrototype):
2012        * runtime/PropertySlot.h:
2013        (JSC::PropertySlot::getValue):
2014        (JSC::PropertySlot::setValue):
2015        (JSC::PropertySlot::setRegisterSlot):
2016        * runtime/StringObject.cpp:
2017        (JSC::StringObject::StringObject):
2018        * runtime/StringPrototype.cpp:
2019        (JSC::StringPrototype::StringPrototype):
2020        * runtime/WriteBarrier.h:
2021        (JSC::WriteBarrierBase::setWithoutWriteBarrier):
2022
20232011-02-01  Daniel Bates  <dbates@rim.com>
2024
2025        Reviewed by Antonio Gomes.
2026
2027        Modify RandomNumberSeed.h to use USE(MERSENNE_TWISTER_19937)
2028        https://bugs.webkit.org/show_bug.cgi?id=53506
2029
2030        Currently, use of the Mersenne Twister pseudorandom number generator
2031        is hardcoded to the Windows CE port. With the passing of bug #53253,
2032        we can generalize support for this PRNG to all ports that use srand(3)
2033        and rand(3), including Windows CE.
2034
2035        * wtf/RandomNumberSeed.h:
2036        (WTF::initializeRandomNumberGenerator):
2037
20382011-02-01  Dave Tapuska  <dtapuska@rim.com>
2039
2040        Reviewed by Gavin Barraclough.
2041
2042        MacroAssemblerARM would generate code that did 32bit loads
2043        on addresses that were not aligned. More specifically it would
2044        generate a ldr r8,[r1, #7] which isn't valid on ARMv5 and lower.
2045        The intended instruction really is ldrb r8,[r1, #7]; ensure we
2046        call load8 instead of load32.
2047
2048        https://bugs.webkit.org/show_bug.cgi?id=46095
2049
2050        * assembler/MacroAssemblerARM.h:
2051        (JSC::MacroAssemblerARM::set32Test32):
2052        (JSC::MacroAssemblerARM::set32Test8):
2053
20542011-02-01  Darin Fisher  <darin@chromium.org>
2055
2056        Reviewed by Eric Seidel.
2057
2058        Fix some Visual Studio compiler warnings.
2059        https://bugs.webkit.org/show_bug.cgi?id=53476
2060
2061        * wtf/MathExtras.h:
2062        (clampToInteger):
2063        (clampToPositiveInteger):
2064        * wtf/ThreadingWin.cpp:
2065        (WTF::absoluteTimeToWaitTimeoutInterval):
2066
20672011-01-31  Oliver Hunt  <oliver@apple.com>
2068
2069        Reviewed by Sam Weinig.
2070
2071        Bogus callframe during stack unwinding
2072        https://bugs.webkit.org/show_bug.cgi?id=53454
2073
2074        Trying to access a callframe's globalData after destroying its
2075        ScopeChain is not a good thing.  While we could access the
2076        globalData directly through the (known valid) scopechain we're
2077        holding on to, it feels fragile.  Instead we push the valid
2078        ScopeChain onto the callframe again to ensure that the callframe
2079        itself remains valid.
2080
2081        * interpreter/Interpreter.cpp:
2082        (JSC::Interpreter::unwindCallFrame):
2083
20842011-01-31  Michael Saboff  <msaboff@apple.com>
2085
2086        Reviewed by Geoffrey Garen.
2087
2088        Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
2089        https://bugs.webkit.org/show_bug.cgi?id=53271
2090
2091        Reapplying this change again.
2092        Changed isValid() to use .get() as a result of change r77151.
2093
2094        Added new isValid() methods to check if a contained object in
2095        a WeakGCMap is valid when using an unchecked iterator.
2096
2097        * runtime/WeakGCMap.h:
2098        (JSC::WeakGCMap::isValid):
2099
21002011-01-31  Oliver Hunt  <oliver@apple.com>
2101
2102        Convert markstack to a slot visitor API
2103        https://bugs.webkit.org/show_bug.cgi?id=53219
2104
2105        rolling r77098, r77099, r77100, r77109, and
2106        r77111 back in, along with a few more Qt fix attempts.
2107
2108        * API/JSCallbackObject.h:
2109        (JSC::JSCallbackObjectData::setPrivateProperty):
2110        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2111        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2112        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2113        (JSC::JSCallbackObject::setPrivateProperty):
2114        * API/JSCallbackObjectFunctions.h:
2115        (JSC::::put):
2116        (JSC::::staticFunctionGetter):
2117        * API/JSObjectRef.cpp:
2118        (JSObjectMakeConstructor):
2119        (JSObjectSetPrivateProperty):
2120        * API/JSWeakObjectMapRefInternal.h:
2121        * JavaScriptCore.exp:
2122        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2123        * JavaScriptCore.xcodeproj/project.pbxproj:
2124        * bytecode/CodeBlock.cpp:
2125        (JSC::CodeBlock::markAggregate):
2126        * bytecode/CodeBlock.h:
2127        (JSC::CodeBlock::globalObject):
2128        * bytecompiler/BytecodeGenerator.cpp:
2129        (JSC::BytecodeGenerator::BytecodeGenerator):
2130        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2131        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2132        (JSC::BytecodeGenerator::findScopedProperty):
2133        * debugger/Debugger.cpp:
2134        (JSC::evaluateInGlobalCallFrame):
2135        * debugger/DebuggerActivation.cpp:
2136        (JSC::DebuggerActivation::DebuggerActivation):
2137        (JSC::DebuggerActivation::markChildren):
2138        * debugger/DebuggerActivation.h:
2139        * debugger/DebuggerCallFrame.cpp:
2140        (JSC::DebuggerCallFrame::evaluate):
2141        * interpreter/CallFrame.h:
2142        (JSC::ExecState::exception):
2143        * interpreter/Interpreter.cpp:
2144        (JSC::Interpreter::resolve):
2145        (JSC::Interpreter::resolveSkip):
2146        (JSC::Interpreter::resolveGlobal):
2147        (JSC::Interpreter::resolveGlobalDynamic):
2148        (JSC::Interpreter::resolveBaseAndProperty):
2149        (JSC::Interpreter::unwindCallFrame):
2150        (JSC::appendSourceToError):
2151        (JSC::Interpreter::execute):
2152        (JSC::Interpreter::tryCacheGetByID):
2153        (JSC::Interpreter::privateExecute):
2154        * jit/JITStubs.cpp:
2155        (JSC::JITThunks::tryCacheGetByID):
2156        (JSC::DEFINE_STUB_FUNCTION):
2157        * jsc.cpp:
2158        (GlobalObject::GlobalObject):
2159        * runtime/ArgList.cpp:
2160        (JSC::MarkedArgumentBuffer::markLists):
2161        * runtime/Arguments.cpp:
2162        (JSC::Arguments::markChildren):
2163        (JSC::Arguments::getOwnPropertySlot):
2164        (JSC::Arguments::getOwnPropertyDescriptor):
2165        (JSC::Arguments::put):
2166        * runtime/Arguments.h:
2167        (JSC::Arguments::setActivation):
2168        (JSC::Arguments::Arguments):
2169        * runtime/ArrayConstructor.cpp:
2170        (JSC::ArrayConstructor::ArrayConstructor):
2171        (JSC::constructArrayWithSizeQuirk):
2172        * runtime/ArrayPrototype.cpp:
2173        (JSC::arrayProtoFuncSplice):
2174        * runtime/BatchedTransitionOptimizer.h:
2175        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2176        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2177        * runtime/BooleanConstructor.cpp:
2178        (JSC::BooleanConstructor::BooleanConstructor):
2179        (JSC::constructBoolean):
2180        (JSC::constructBooleanFromImmediateBoolean):
2181        * runtime/BooleanPrototype.cpp:
2182        (JSC::BooleanPrototype::BooleanPrototype):
2183        * runtime/ConservativeSet.cpp:
2184        (JSC::ConservativeSet::grow):
2185        * runtime/ConservativeSet.h:
2186        (JSC::ConservativeSet::~ConservativeSet):
2187        (JSC::ConservativeSet::mark):
2188        * runtime/DateConstructor.cpp:
2189        (JSC::DateConstructor::DateConstructor):
2190        * runtime/DateInstance.cpp:
2191        (JSC::DateInstance::DateInstance):
2192        * runtime/DatePrototype.cpp:
2193        (JSC::dateProtoFuncSetTime):
2194        (JSC::setNewValueFromTimeArgs):
2195        (JSC::setNewValueFromDateArgs):
2196        (JSC::dateProtoFuncSetYear):
2197        * runtime/ErrorConstructor.cpp:
2198        (JSC::ErrorConstructor::ErrorConstructor):
2199        * runtime/ErrorInstance.cpp:
2200        (JSC::ErrorInstance::ErrorInstance):
2201        * runtime/ErrorPrototype.cpp:
2202        (JSC::ErrorPrototype::ErrorPrototype):
2203        * runtime/FunctionConstructor.cpp:
2204        (JSC::FunctionConstructor::FunctionConstructor):
2205        * runtime/FunctionPrototype.cpp:
2206        (JSC::FunctionPrototype::FunctionPrototype):
2207        * runtime/GetterSetter.cpp:
2208        (JSC::GetterSetter::markChildren):
2209        * runtime/GetterSetter.h:
2210        (JSC::GetterSetter::GetterSetter):
2211        (JSC::GetterSetter::getter):
2212        (JSC::GetterSetter::setGetter):
2213        (JSC::GetterSetter::setter):
2214        (JSC::GetterSetter::setSetter):
2215        * runtime/GlobalEvalFunction.cpp:
2216        (JSC::GlobalEvalFunction::GlobalEvalFunction):
2217        (JSC::GlobalEvalFunction::markChildren):
2218        * runtime/GlobalEvalFunction.h:
2219        (JSC::GlobalEvalFunction::cachedGlobalObject):
2220        * runtime/Heap.cpp:
2221        (JSC::Heap::markProtectedObjects):
2222        (JSC::Heap::markTempSortVectors):
2223        (JSC::Heap::markRoots):
2224        * runtime/InternalFunction.cpp:
2225        (JSC::InternalFunction::InternalFunction):
2226        * runtime/JSAPIValueWrapper.h:
2227        (JSC::JSAPIValueWrapper::value):
2228        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2229        * runtime/JSActivation.cpp:
2230        (JSC::JSActivation::markChildren):
2231        (JSC::JSActivation::put):
2232        * runtime/JSArray.cpp:
2233        (JSC::JSArray::JSArray):
2234        (JSC::JSArray::getOwnPropertySlot):
2235        (JSC::JSArray::getOwnPropertyDescriptor):
2236        (JSC::JSArray::put):
2237        (JSC::JSArray::putSlowCase):
2238        (JSC::JSArray::deleteProperty):
2239        (JSC::JSArray::increaseVectorLength):
2240        (JSC::JSArray::setLength):
2241        (JSC::JSArray::pop):
2242        (JSC::JSArray::push):
2243        (JSC::JSArray::unshiftCount):
2244        (JSC::JSArray::sort):
2245        (JSC::JSArray::fillArgList):
2246        (JSC::JSArray::copyToRegisters):
2247        (JSC::JSArray::compactForSorting):
2248        * runtime/JSArray.h:
2249        (JSC::JSArray::getIndex):
2250        (JSC::JSArray::setIndex):
2251        (JSC::JSArray::uncheckedSetIndex):
2252        (JSC::JSArray::markChildrenDirect):
2253        * runtime/JSByteArray.cpp:
2254        (JSC::JSByteArray::JSByteArray):
2255        * runtime/JSCell.h:
2256        (JSC::JSCell::MarkStack::append):
2257        (JSC::JSCell::MarkStack::internalAppend):
2258        (JSC::JSCell::MarkStack::deprecatedAppend):
2259        * runtime/JSFunction.cpp:
2260        (JSC::JSFunction::JSFunction):
2261        (JSC::JSFunction::getOwnPropertySlot):
2262        * runtime/JSGlobalData.h:
2263        * runtime/JSGlobalObject.cpp:
2264        (JSC::markIfNeeded):
2265        (JSC::JSGlobalObject::reset):
2266        (JSC::JSGlobalObject::resetPrototype):
2267        (JSC::JSGlobalObject::markChildren):
2268        * runtime/JSGlobalObject.h:
2269        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2270        (JSC::JSGlobalObject::regExpConstructor):
2271        (JSC::JSGlobalObject::errorConstructor):
2272        (JSC::JSGlobalObject::evalErrorConstructor):
2273        (JSC::JSGlobalObject::rangeErrorConstructor):
2274        (JSC::JSGlobalObject::referenceErrorConstructor):
2275        (JSC::JSGlobalObject::syntaxErrorConstructor):
2276        (JSC::JSGlobalObject::typeErrorConstructor):
2277        (JSC::JSGlobalObject::URIErrorConstructor):
2278        (JSC::JSGlobalObject::evalFunction):
2279        (JSC::JSGlobalObject::objectPrototype):
2280        (JSC::JSGlobalObject::functionPrototype):
2281        (JSC::JSGlobalObject::arrayPrototype):
2282        (JSC::JSGlobalObject::booleanPrototype):
2283        (JSC::JSGlobalObject::stringPrototype):
2284        (JSC::JSGlobalObject::numberPrototype):
2285        (JSC::JSGlobalObject::datePrototype):
2286        (JSC::JSGlobalObject::regExpPrototype):
2287        (JSC::JSGlobalObject::methodCallDummy):
2288        (JSC::Structure::prototypeForLookup):
2289        (JSC::constructArray):
2290        * runtime/JSONObject.cpp:
2291        (JSC::Stringifier::Holder::object):
2292        (JSC::Stringifier::Holder::objectSlot):
2293        (JSC::Stringifier::markAggregate):
2294        (JSC::Stringifier::stringify):
2295        (JSC::Stringifier::Holder::appendNextProperty):
2296        (JSC::Walker::callReviver):
2297        (JSC::Walker::walk):
2298        * runtime/JSObject.cpp:
2299        (JSC::JSObject::defineGetter):
2300        (JSC::JSObject::defineSetter):
2301        (JSC::JSObject::removeDirect):
2302        (JSC::JSObject::putDirectFunction):
2303        (JSC::JSObject::putDirectFunctionWithoutTransition):
2304        (JSC::putDescriptor):
2305        (JSC::JSObject::defineOwnProperty):
2306        * runtime/JSObject.h:
2307        (JSC::JSObject::getDirectOffset):
2308        (JSC::JSObject::putDirectOffset):
2309        (JSC::JSObject::putUndefinedAtDirectOffset):
2310        (JSC::JSObject::flattenDictionaryObject):
2311        (JSC::JSObject::putDirectInternal):
2312        (JSC::JSObject::putDirect):
2313        (JSC::JSObject::putDirectFunction):
2314        (JSC::JSObject::putDirectWithoutTransition):
2315        (JSC::JSObject::putDirectFunctionWithoutTransition):
2316        (JSC::JSValue::putDirect):
2317        (JSC::JSObject::allocatePropertyStorageInline):
2318        (JSC::JSObject::markChildrenDirect):
2319        * runtime/JSPropertyNameIterator.cpp:
2320        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2321        (JSC::JSPropertyNameIterator::get):
2322        * runtime/JSPropertyNameIterator.h:
2323        * runtime/JSStaticScopeObject.cpp:
2324        (JSC::JSStaticScopeObject::markChildren):
2325        * runtime/JSString.cpp:
2326        (JSC::StringObject::create):
2327        * runtime/JSValue.h:
2328        * runtime/JSWrapperObject.cpp:
2329        (JSC::JSWrapperObject::markChildren):
2330        * runtime/JSWrapperObject.h:
2331        (JSC::JSWrapperObject::internalValue):
2332        (JSC::JSWrapperObject::setInternalValue):
2333        * runtime/LiteralParser.cpp:
2334        (JSC::LiteralParser::parse):
2335        * runtime/Lookup.cpp:
2336        (JSC::setUpStaticFunctionSlot):
2337        * runtime/Lookup.h:
2338        (JSC::lookupPut):
2339        * runtime/MarkStack.h:
2340        (JSC::MarkStack::MarkStack):
2341        (JSC::MarkStack::deprecatedAppendValues):
2342        (JSC::MarkStack::appendValues):
2343        * runtime/MathObject.cpp:
2344        (JSC::MathObject::MathObject):
2345        * runtime/NativeErrorConstructor.cpp:
2346        (JSC::NativeErrorConstructor::NativeErrorConstructor):
2347        * runtime/NativeErrorPrototype.cpp:
2348        (JSC::NativeErrorPrototype::NativeErrorPrototype):
2349        * runtime/NumberConstructor.cpp:
2350        (JSC::NumberConstructor::NumberConstructor):
2351        (JSC::constructWithNumberConstructor):
2352        * runtime/NumberObject.cpp:
2353        (JSC::constructNumber):
2354        * runtime/NumberPrototype.cpp:
2355        (JSC::NumberPrototype::NumberPrototype):
2356        * runtime/ObjectConstructor.cpp:
2357        (JSC::ObjectConstructor::ObjectConstructor):
2358        (JSC::objectConstructorGetOwnPropertyDescriptor):
2359        * runtime/Operations.h:
2360        (JSC::normalizePrototypeChain):
2361        (JSC::resolveBase):
2362        * runtime/PrototypeFunction.cpp:
2363        (JSC::PrototypeFunction::PrototypeFunction):
2364        * runtime/PutPropertySlot.h:
2365        (JSC::PutPropertySlot::setExistingProperty):
2366        (JSC::PutPropertySlot::setNewProperty):
2367        (JSC::PutPropertySlot::base):
2368        * runtime/RegExpConstructor.cpp:
2369        (JSC::RegExpConstructor::RegExpConstructor):
2370        * runtime/ScopeChain.cpp:
2371        (JSC::ScopeChainNode::print):
2372        * runtime/ScopeChain.h:
2373        (JSC::ScopeChainNode::~ScopeChainNode):
2374        (JSC::ScopeChainIterator::operator*):
2375        (JSC::ScopeChainIterator::operator->):
2376        (JSC::ScopeChain::top):
2377        * runtime/ScopeChainMark.h:
2378        (JSC::ScopeChain::markAggregate):
2379        * runtime/SmallStrings.cpp:
2380        (JSC::isMarked):
2381        (JSC::SmallStrings::markChildren):
2382        * runtime/SmallStrings.h:
2383        (JSC::SmallStrings::emptyString):
2384        (JSC::SmallStrings::singleCharacterString):
2385        (JSC::SmallStrings::singleCharacterStrings):
2386        * runtime/StringConstructor.cpp:
2387        (JSC::StringConstructor::StringConstructor):
2388        * runtime/StringObject.cpp:
2389        (JSC::StringObject::StringObject):
2390        * runtime/StringObject.h:
2391        * runtime/StringPrototype.cpp:
2392        (JSC::StringPrototype::StringPrototype):
2393        * runtime/Structure.cpp:
2394        (JSC::Structure::Structure):
2395        (JSC::Structure::addPropertyTransition):
2396        (JSC::Structure::toDictionaryTransition):
2397        (JSC::Structure::flattenDictionaryStructure):
2398        * runtime/Structure.h:
2399        (JSC::Structure::storedPrototype):
2400        (JSC::Structure::storedPrototypeSlot):
2401        * runtime/WeakGCMap.h:
2402        (JSC::WeakGCMap::uncheckedGet):
2403        (JSC::WeakGCMap::uncheckedGetSlot):
2404        (JSC::::get):
2405        (JSC::::take):
2406        (JSC::::set):
2407        (JSC::::uncheckedRemove):
2408        * runtime/WriteBarrier.h: Added.
2409        (JSC::DeprecatedPtr::DeprecatedPtr):
2410        (JSC::DeprecatedPtr::get):
2411        (JSC::DeprecatedPtr::operator*):
2412        (JSC::DeprecatedPtr::operator->):
2413        (JSC::DeprecatedPtr::slot):
2414        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
2415        (JSC::DeprecatedPtr::operator!):
2416        (JSC::WriteBarrierBase::set):
2417        (JSC::WriteBarrierBase::get):
2418        (JSC::WriteBarrierBase::operator*):
2419        (JSC::WriteBarrierBase::operator->):
2420        (JSC::WriteBarrierBase::clear):
2421        (JSC::WriteBarrierBase::slot):
2422        (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
2423        (JSC::WriteBarrierBase::operator!):
2424        (JSC::WriteBarrier::WriteBarrier):
2425        (JSC::operator==):
2426
24272011-01-31  Dan Winship  <danw@gnome.org>
2428
2429        Reviewed by Gustavo Noronha Silva.
2430
2431        wss (websockets ssl) support for gtk via new gio TLS support
2432        https://bugs.webkit.org/show_bug.cgi?id=50344
2433
2434        Add a GPollableOutputStream typedef for TLS WebSockets support
2435
2436        * wtf/gobject/GTypedefs.h:
2437
24382011-01-31  Gavin Barraclough  <barraclough@apple.com>
2439
2440        Reviewed by Geoff Garen.
2441
2442        https://bugs.webkit.org/show_bug.cgi?id=53352
2443        Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
2444
2445        The FixedVMPoolAllocator currently uses a best fix policy -
2446        switch to first fit, this is less prone to external fragmentation.
2447
2448        * jit/ExecutableAllocatorFixedVMPool.cpp:
2449        (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
2450        (JSC::AllocationTableSizeClass::blockSize):
2451        (JSC::AllocationTableSizeClass::blockCount):
2452        (JSC::AllocationTableSizeClass::blockAlignment):
2453        (JSC::AllocationTableSizeClass::size):
2454        (JSC::AllocationTableLeaf::AllocationTableLeaf):
2455        (JSC::AllocationTableLeaf::~AllocationTableLeaf):
2456        (JSC::AllocationTableLeaf::allocate):
2457        (JSC::AllocationTableLeaf::free):
2458        (JSC::AllocationTableLeaf::isEmpty):
2459        (JSC::AllocationTableLeaf::isFull):
2460        (JSC::AllocationTableLeaf::size):
2461        (JSC::AllocationTableLeaf::classForSize):
2462        (JSC::AllocationTableLeaf::dump):
2463        (JSC::LazyAllocationTable::LazyAllocationTable):
2464        (JSC::LazyAllocationTable::~LazyAllocationTable):
2465        (JSC::LazyAllocationTable::allocate):
2466        (JSC::LazyAllocationTable::free):
2467        (JSC::LazyAllocationTable::isEmpty):
2468        (JSC::LazyAllocationTable::isFull):
2469        (JSC::LazyAllocationTable::size):
2470        (JSC::LazyAllocationTable::dump):
2471        (JSC::LazyAllocationTable::classForSize):
2472        (JSC::AllocationTableDirectory::AllocationTableDirectory):
2473        (JSC::AllocationTableDirectory::~AllocationTableDirectory):
2474        (JSC::AllocationTableDirectory::allocate):
2475        (JSC::AllocationTableDirectory::free):
2476        (JSC::AllocationTableDirectory::isEmpty):
2477        (JSC::AllocationTableDirectory::isFull):
2478        (JSC::AllocationTableDirectory::size):
2479        (JSC::AllocationTableDirectory::classForSize):
2480        (JSC::AllocationTableDirectory::dump):
2481        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2482        (JSC::FixedVMPoolAllocator::alloc):
2483        (JSC::FixedVMPoolAllocator::free):
2484        (JSC::FixedVMPoolAllocator::allocated):
2485        (JSC::FixedVMPoolAllocator::isValid):
2486        (JSC::FixedVMPoolAllocator::classForSize):
2487        (JSC::FixedVMPoolAllocator::offsetToPointer):
2488        (JSC::FixedVMPoolAllocator::pointerToOffset):
2489        (JSC::ExecutableAllocator::committedByteCount):
2490        (JSC::ExecutableAllocator::isValid):
2491        (JSC::ExecutableAllocator::underMemoryPressure):
2492        (JSC::ExecutablePool::systemAlloc):
2493        (JSC::ExecutablePool::systemRelease):
2494        * wtf/PageReservation.h:
2495        (WTF::PageReservation::PageReservation):
2496        (WTF::PageReservation::commit):
2497        (WTF::PageReservation::decommit):
2498        (WTF::PageReservation::committed):
2499
25002011-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2501
2502        Unreviewed, rolling out r76969.
2503        http://trac.webkit.org/changeset/76969
2504        https://bugs.webkit.org/show_bug.cgi?id=53418
2505
2506        "It is causing crashes in GTK+ and Leopard bots" (Requested by
2507        alexg__ on #webkit).
2508
2509        * runtime/WeakGCMap.h:
2510
25112011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
2512
2513        Unreviewed, rolling out r77098, r77099, r77100, r77109, and
2514        r77111.
2515        http://trac.webkit.org/changeset/77098
2516        http://trac.webkit.org/changeset/77099
2517        http://trac.webkit.org/changeset/77100
2518        http://trac.webkit.org/changeset/77109
2519        http://trac.webkit.org/changeset/77111
2520        https://bugs.webkit.org/show_bug.cgi?id=53219
2521
2522        Qt build is broken
2523
2524        * API/JSCallbackObject.h:
2525        (JSC::JSCallbackObjectData::setPrivateProperty):
2526        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2527        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2528        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2529        (JSC::JSCallbackObject::setPrivateProperty):
2530        * API/JSCallbackObjectFunctions.h:
2531        (JSC::::put):
2532        (JSC::::staticFunctionGetter):
2533        * API/JSObjectRef.cpp:
2534        (JSObjectMakeConstructor):
2535        (JSObjectSetPrivateProperty):
2536        * API/JSWeakObjectMapRefInternal.h:
2537        * JavaScriptCore.exp:
2538        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2539        * JavaScriptCore.xcodeproj/project.pbxproj:
2540        * bytecode/CodeBlock.cpp:
2541        (JSC::CodeBlock::markAggregate):
2542        * bytecode/CodeBlock.h:
2543        (JSC::CodeBlock::globalObject):
2544        * bytecompiler/BytecodeGenerator.cpp:
2545        (JSC::BytecodeGenerator::BytecodeGenerator):
2546        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2547        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2548        (JSC::BytecodeGenerator::findScopedProperty):
2549        * debugger/Debugger.cpp:
2550        (JSC::evaluateInGlobalCallFrame):
2551        * debugger/DebuggerActivation.cpp:
2552        (JSC::DebuggerActivation::DebuggerActivation):
2553        (JSC::DebuggerActivation::markChildren):
2554        * debugger/DebuggerActivation.h:
2555        * debugger/DebuggerCallFrame.cpp:
2556        (JSC::DebuggerCallFrame::evaluate):
2557        * interpreter/CallFrame.h:
2558        (JSC::ExecState::exception):
2559        * interpreter/Interpreter.cpp:
2560        (JSC::Interpreter::resolve):
2561        (JSC::Interpreter::resolveSkip):
2562        (JSC::Interpreter::resolveGlobal):
2563        (JSC::Interpreter::resolveGlobalDynamic):
2564        (JSC::Interpreter::resolveBaseAndProperty):
2565        (JSC::Interpreter::unwindCallFrame):
2566        (JSC::appendSourceToError):
2567        (JSC::Interpreter::execute):
2568        (JSC::Interpreter::tryCacheGetByID):
2569        (JSC::Interpreter::privateExecute):
2570        * jit/JITStubs.cpp:
2571        (JSC::JITThunks::tryCacheGetByID):
2572        (JSC::DEFINE_STUB_FUNCTION):
2573        * jsc.cpp:
2574        (GlobalObject::GlobalObject):
2575        * runtime/ArgList.cpp:
2576        (JSC::MarkedArgumentBuffer::markLists):
2577        * runtime/Arguments.cpp:
2578        (JSC::Arguments::markChildren):
2579        (JSC::Arguments::getOwnPropertySlot):
2580        (JSC::Arguments::getOwnPropertyDescriptor):
2581        (JSC::Arguments::put):
2582        * runtime/Arguments.h:
2583        (JSC::Arguments::setActivation):
2584        (JSC::Arguments::Arguments):
2585        * runtime/ArrayConstructor.cpp:
2586        (JSC::ArrayConstructor::ArrayConstructor):
2587        (JSC::constructArrayWithSizeQuirk):
2588        * runtime/ArrayPrototype.cpp:
2589        (JSC::arrayProtoFuncSplice):
2590        * runtime/BatchedTransitionOptimizer.h:
2591        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2592        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2593        * runtime/BooleanConstructor.cpp:
2594        (JSC::BooleanConstructor::BooleanConstructor):
2595        (JSC::constructBoolean):
2596        (JSC::constructBooleanFromImmediateBoolean):
2597        * runtime/BooleanPrototype.cpp:
2598        (JSC::BooleanPrototype::BooleanPrototype):
2599        * runtime/ConservativeSet.cpp:
2600        (JSC::ConservativeSet::grow):
2601        * runtime/ConservativeSet.h:
2602        (JSC::ConservativeSet::~ConservativeSet):
2603        (JSC::ConservativeSet::mark):
2604        * runtime/DateConstructor.cpp:
2605        (JSC::DateConstructor::DateConstructor):
2606        * runtime/DateInstance.cpp:
2607        (JSC::DateInstance::DateInstance):
2608        * runtime/DatePrototype.cpp:
2609        (JSC::dateProtoFuncSetTime):
2610        (JSC::setNewValueFromTimeArgs):
2611        (JSC::setNewValueFromDateArgs):
2612        (JSC::dateProtoFuncSetYear):
2613        * runtime/ErrorConstructor.cpp:
2614        (JSC::ErrorConstructor::ErrorConstructor):
2615        * runtime/ErrorInstance.cpp:
2616        (JSC::ErrorInstance::ErrorInstance):
2617        * runtime/ErrorPrototype.cpp:
2618        (JSC::ErrorPrototype::ErrorPrototype):
2619        * runtime/FunctionConstructor.cpp:
2620        (JSC::FunctionConstructor::FunctionConstructor):
2621        * runtime/FunctionPrototype.cpp:
2622        (JSC::FunctionPrototype::FunctionPrototype):
2623        * runtime/GetterSetter.cpp:
2624        (JSC::GetterSetter::markChildren):
2625        * runtime/GetterSetter.h:
2626        (JSC::GetterSetter::GetterSetter):
2627        (JSC::GetterSetter::getter):
2628        (JSC::GetterSetter::setGetter):
2629        (JSC::GetterSetter::setter):
2630        (JSC::GetterSetter::setSetter):
2631        * runtime/GlobalEvalFunction.cpp:
2632        (JSC::GlobalEvalFunction::GlobalEvalFunction):
2633        (JSC::GlobalEvalFunction::markChildren):
2634        * runtime/GlobalEvalFunction.h:
2635        (JSC::GlobalEvalFunction::cachedGlobalObject):
2636        * runtime/Heap.cpp:
2637        (JSC::Heap::markProtectedObjects):
2638        (JSC::Heap::markTempSortVectors):
2639        (JSC::Heap::markRoots):
2640        * runtime/InternalFunction.cpp:
2641        (JSC::InternalFunction::InternalFunction):
2642        * runtime/JSAPIValueWrapper.h:
2643        (JSC::JSAPIValueWrapper::value):
2644        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2645        * runtime/JSActivation.cpp:
2646        (JSC::JSActivation::markChildren):
2647        (JSC::JSActivation::put):
2648        * runtime/JSArray.cpp:
2649        (JSC::JSArray::JSArray):
2650        (JSC::JSArray::getOwnPropertySlot):
2651        (JSC::JSArray::getOwnPropertyDescriptor):
2652        (JSC::JSArray::put):
2653        (JSC::JSArray::putSlowCase):
2654        (JSC::JSArray::deleteProperty):
2655        (JSC::JSArray::increaseVectorLength):
2656        (JSC::JSArray::setLength):
2657        (JSC::JSArray::pop):
2658        (JSC::JSArray::push):
2659        (JSC::JSArray::unshiftCount):
2660        (JSC::JSArray::sort):
2661        (JSC::JSArray::fillArgList):
2662        (JSC::JSArray::copyToRegisters):
2663        (JSC::JSArray::compactForSorting):
2664        * runtime/JSArray.h:
2665        (JSC::JSArray::getIndex):
2666        (JSC::JSArray::setIndex):
2667        (JSC::JSArray::uncheckedSetIndex):
2668        (JSC::JSArray::markChildrenDirect):
2669        * runtime/JSByteArray.cpp:
2670        (JSC::JSByteArray::JSByteArray):
2671        * runtime/JSCell.h:
2672        (JSC::JSCell::JSValue::toThisObject):
2673        (JSC::JSCell::MarkStack::append):
2674        * runtime/JSFunction.cpp:
2675        (JSC::JSFunction::JSFunction):
2676        (JSC::JSFunction::getOwnPropertySlot):
2677        * runtime/JSGlobalData.h:
2678        * runtime/JSGlobalObject.cpp:
2679        (JSC::markIfNeeded):
2680        (JSC::JSGlobalObject::reset):
2681        (JSC::JSGlobalObject::resetPrototype):
2682        (JSC::JSGlobalObject::markChildren):
2683        * runtime/JSGlobalObject.h:
2684        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
2685        (JSC::JSGlobalObject::regExpConstructor):
2686        (JSC::JSGlobalObject::errorConstructor):
2687        (JSC::JSGlobalObject::evalErrorConstructor):
2688        (JSC::JSGlobalObject::rangeErrorConstructor):
2689        (JSC::JSGlobalObject::referenceErrorConstructor):
2690        (JSC::JSGlobalObject::syntaxErrorConstructor):
2691        (JSC::JSGlobalObject::typeErrorConstructor):
2692        (JSC::JSGlobalObject::URIErrorConstructor):
2693        (JSC::JSGlobalObject::evalFunction):
2694        (JSC::JSGlobalObject::objectPrototype):
2695        (JSC::JSGlobalObject::functionPrototype):
2696        (JSC::JSGlobalObject::arrayPrototype):
2697        (JSC::JSGlobalObject::booleanPrototype):
2698        (JSC::JSGlobalObject::stringPrototype):
2699        (JSC::JSGlobalObject::numberPrototype):
2700        (JSC::JSGlobalObject::datePrototype):
2701        (JSC::JSGlobalObject::regExpPrototype):
2702        (JSC::JSGlobalObject::methodCallDummy):
2703        (JSC::Structure::prototypeForLookup):
2704        (JSC::constructArray):
2705        * runtime/JSONObject.cpp:
2706        (JSC::Stringifier::Holder::object):
2707        (JSC::Stringifier::markAggregate):
2708        (JSC::Stringifier::stringify):
2709        (JSC::Stringifier::Holder::appendNextProperty):
2710        (JSC::Walker::callReviver):
2711        (JSC::Walker::walk):
2712        * runtime/JSObject.cpp:
2713        (JSC::JSObject::defineGetter):
2714        (JSC::JSObject::defineSetter):
2715        (JSC::JSObject::removeDirect):
2716        (JSC::JSObject::putDirectFunction):
2717        (JSC::JSObject::putDirectFunctionWithoutTransition):
2718        (JSC::putDescriptor):
2719        (JSC::JSObject::defineOwnProperty):
2720        * runtime/JSObject.h:
2721        (JSC::JSObject::getDirectOffset):
2722        (JSC::JSObject::putDirectOffset):
2723        (JSC::JSObject::flattenDictionaryObject):
2724        (JSC::JSObject::putDirectInternal):
2725        (JSC::JSObject::putDirect):
2726        (JSC::JSObject::putDirectFunction):
2727        (JSC::JSObject::putDirectWithoutTransition):
2728        (JSC::JSObject::putDirectFunctionWithoutTransition):
2729        (JSC::JSValue::putDirect):
2730        (JSC::JSObject::allocatePropertyStorageInline):
2731        (JSC::JSObject::markChildrenDirect):
2732        * runtime/JSPropertyNameIterator.cpp:
2733        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
2734        (JSC::JSPropertyNameIterator::get):
2735        * runtime/JSPropertyNameIterator.h:
2736        * runtime/JSStaticScopeObject.cpp:
2737        (JSC::JSStaticScopeObject::markChildren):
2738        * runtime/JSString.cpp:
2739        (JSC::StringObject::create):
2740        * runtime/JSValue.h:
2741        * runtime/JSWrapperObject.cpp:
2742        (JSC::JSWrapperObject::markChildren):
2743        * runtime/JSWrapperObject.h:
2744        (JSC::JSWrapperObject::internalValue):
2745        (JSC::JSWrapperObject::setInternalValue):
2746        * runtime/LiteralParser.cpp:
2747        (JSC::LiteralParser::parse):
2748        * runtime/Lookup.cpp:
2749        (JSC::setUpStaticFunctionSlot):
2750        * runtime/Lookup.h:
2751        (JSC::lookupPut):
2752        * runtime/MarkStack.h:
2753        (JSC::MarkStack::appendValues):
2754        * runtime/MathObject.cpp:
2755        (JSC::MathObject::MathObject):
2756        * runtime/NativeErrorConstructor.cpp:
2757        (JSC::NativeErrorConstructor::NativeErrorConstructor):
2758        * runtime/NativeErrorPrototype.cpp:
2759        (JSC::NativeErrorPrototype::NativeErrorPrototype):
2760        * runtime/NumberConstructor.cpp:
2761        (JSC::NumberConstructor::NumberConstructor):
2762        (JSC::constructWithNumberConstructor):
2763        * runtime/NumberObject.cpp:
2764        (JSC::constructNumber):
2765        * runtime/NumberPrototype.cpp:
2766        (JSC::NumberPrototype::NumberPrototype):
2767        * runtime/ObjectConstructor.cpp:
2768        (JSC::ObjectConstructor::ObjectConstructor):
2769        (JSC::objectConstructorGetOwnPropertyDescriptor):
2770        * runtime/Operations.h:
2771        (JSC::normalizePrototypeChain):
2772        (JSC::resolveBase):
2773        * runtime/PrototypeFunction.cpp:
2774        (JSC::PrototypeFunction::PrototypeFunction):
2775        * runtime/PutPropertySlot.h:
2776        (JSC::PutPropertySlot::setExistingProperty):
2777        (JSC::PutPropertySlot::setNewProperty):
2778        (JSC::PutPropertySlot::base):
2779        * runtime/RegExpConstructor.cpp:
2780        (JSC::RegExpConstructor::RegExpConstructor):
2781        * runtime/ScopeChain.cpp:
2782        (JSC::ScopeChainNode::print):
2783        * runtime/ScopeChain.h:
2784        (JSC::ScopeChainNode::~ScopeChainNode):
2785        (JSC::ScopeChainIterator::operator*):
2786        (JSC::ScopeChainIterator::operator->):
2787        (JSC::ScopeChain::top):
2788        * runtime/ScopeChainMark.h:
2789        (JSC::ScopeChain::markAggregate):
2790        * runtime/SmallStrings.cpp:
2791        (JSC::isMarked):
2792        (JSC::SmallStrings::markChildren):
2793        * runtime/SmallStrings.h:
2794        (JSC::SmallStrings::emptyString):
2795        (JSC::SmallStrings::singleCharacterString):
2796        (JSC::SmallStrings::singleCharacterStrings):
2797        * runtime/StringConstructor.cpp:
2798        (JSC::StringConstructor::StringConstructor):
2799        * runtime/StringObject.cpp:
2800        (JSC::StringObject::StringObject):
2801        * runtime/StringObject.h:
2802        * runtime/StringPrototype.cpp:
2803        (JSC::StringPrototype::StringPrototype):
2804        * runtime/Structure.cpp:
2805        (JSC::Structure::Structure):
2806        (JSC::Structure::addPropertyTransition):
2807        (JSC::Structure::toDictionaryTransition):
2808        (JSC::Structure::flattenDictionaryStructure):
2809        * runtime/Structure.h:
2810        (JSC::Structure::storedPrototype):
2811        * runtime/WeakGCMap.h:
2812        (JSC::WeakGCMap::uncheckedGet):
2813        (JSC::WeakGCMap::isValid):
2814        (JSC::::get):
2815        (JSC::::take):
2816        (JSC::::set):
2817        (JSC::::uncheckedRemove):
2818        * runtime/WriteBarrier.h: Removed.
2819
28202011-01-30  Simon Fraser  <simon.fraser@apple.com>
2821
2822        Build fix the build fix. I assume Oliver meant m_cell, not m_value.
2823
2824        * runtime/WriteBarrier.h:
2825        (JSC::WriteBarrierBase::clear):
2826
28272011-01-30  Oliver Hunt  <oliver@apple.com>
2828
2829        More Qt build fixes
2830
2831        * runtime/WriteBarrier.h:
2832        (JSC::WriteBarrierBase::clear):
2833
28342011-01-30  Oliver Hunt  <oliver@apple.com>
2835
2836        Convert markstack to a slot visitor API
2837        https://bugs.webkit.org/show_bug.cgi?id=53219
2838
2839        rolling r77006 and r77020 back in.
2840
2841        * API/JSCallbackObject.h:
2842        (JSC::JSCallbackObjectData::setPrivateProperty):
2843        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
2844        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
2845        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
2846        (JSC::JSCallbackObject::setPrivateProperty):
2847        * API/JSCallbackObjectFunctions.h:
2848        (JSC::::put):
2849        (JSC::::staticFunctionGetter):
2850        * API/JSObjectRef.cpp:
2851        (JSObjectMakeConstructor):
2852        (JSObjectSetPrivateProperty):
2853        * API/JSWeakObjectMapRefInternal.h:
2854        * JavaScriptCore.exp:
2855        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2856        * JavaScriptCore.xcodeproj/project.pbxproj:
2857        * bytecode/CodeBlock.cpp:
2858        (JSC::CodeBlock::markAggregate):
2859        * bytecode/CodeBlock.h:
2860        (JSC::CodeBlock::globalObject):
2861        * bytecompiler/BytecodeGenerator.cpp:
2862        (JSC::BytecodeGenerator::BytecodeGenerator):
2863        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2864        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2865        (JSC::BytecodeGenerator::findScopedProperty):
2866        * debugger/Debugger.cpp:
2867        (JSC::evaluateInGlobalCallFrame):
2868        * debugger/DebuggerActivation.cpp:
2869        (JSC::DebuggerActivation::DebuggerActivation):
2870        (JSC::DebuggerActivation::markChildren):
2871        * debugger/DebuggerActivation.h:
2872        * debugger/DebuggerCallFrame.cpp:
2873        (JSC::DebuggerCallFrame::evaluate):
2874        * interpreter/CallFrame.h:
2875        (JSC::ExecState::exception):
2876        * interpreter/Interpreter.cpp:
2877        (JSC::Interpreter::resolve):
2878        (JSC::Interpreter::resolveSkip):
2879        (JSC::Interpreter::resolveGlobal):
2880        (JSC::Interpreter::resolveGlobalDynamic):
2881        (JSC::Interpreter::resolveBaseAndProperty):
2882        (JSC::Interpreter::unwindCallFrame):
2883        (JSC::appendSourceToError):
2884        (JSC::Interpreter::execute):
2885        (JSC::Interpreter::tryCacheGetByID):
2886        (JSC::Interpreter::privateExecute):
2887        * jit/JITStubs.cpp:
2888        (JSC::JITThunks::tryCacheGetByID):
2889        (JSC::DEFINE_STUB_FUNCTION):
2890        * jsc.cpp:
2891        (GlobalObject::GlobalObject):
2892        * runtime/ArgList.cpp:
2893        (JSC::MarkedArgumentBuffer::markLists):
2894        * runtime/Arguments.cpp:
2895        (JSC::Arguments::markChildren):
2896        (JSC::Arguments::getOwnPropertySlot):
2897        (JSC::Arguments::getOwnPropertyDescriptor):
2898        (JSC::Arguments::put):
2899        * runtime/Arguments.h:
2900        (JSC::Arguments::setActivation):
2901        (JSC::Arguments::Arguments):
2902        * runtime/ArrayConstructor.cpp:
2903        (JSC::ArrayConstructor::ArrayConstructor):
2904        (JSC::constructArrayWithSizeQuirk):
2905        * runtime/ArrayPrototype.cpp:
2906        (JSC::arrayProtoFuncSplice):
2907        * runtime/BatchedTransitionOptimizer.h:
2908        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
2909        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
2910        * runtime/BooleanConstructor.cpp:
2911        (JSC::BooleanConstructor::BooleanConstructor):
2912        (JSC::constructBoolean):
2913        (JSC::constructBooleanFromImmediateBoolean):
2914        * runtime/BooleanPrototype.cpp:
2915        (JSC::BooleanPrototype::BooleanPrototype):
2916        * runtime/ConservativeSet.cpp:
2917        (JSC::ConservativeSet::grow):
2918        * runtime/ConservativeSet.h:
2919        (JSC::ConservativeSet::~ConservativeSet):
2920        (JSC::ConservativeSet::mark):
2921        * runtime/DateConstructor.cpp:
2922        (JSC::DateConstructor::DateConstructor):
2923        * runtime/DateInstance.cpp:
2924        (JSC::DateInstance::DateInstance):
2925        * runtime/DatePrototype.cpp:
2926        (JSC::dateProtoFuncSetTime):
2927        (JSC::setNewValueFromTimeArgs):
2928        (JSC::setNewValueFromDateArgs):
2929        (JSC::dateProtoFuncSetYear):
2930        * runtime/ErrorConstructor.cpp:
2931        (JSC::ErrorConstructor::ErrorConstructor):
2932        * runtime/ErrorInstance.cpp:
2933        (JSC::ErrorInstance::ErrorInstance):
2934        * runtime/ErrorPrototype.cpp:
2935        (JSC::ErrorPrototype::ErrorPrototype):
2936        * runtime/FunctionConstructor.cpp:
2937        (JSC::FunctionConstructor::FunctionConstructor):
2938        * runtime/FunctionPrototype.cpp:
2939        (JSC::FunctionPrototype::FunctionPrototype):
2940        * runtime/GetterSetter.cpp:
2941        (JSC::GetterSetter::markChildren):
2942        * runtime/GetterSetter.h:
2943        (JSC::GetterSetter::GetterSetter):
2944        (JSC::GetterSetter::getter):
2945        (JSC::GetterSetter::setGetter):
2946        (JSC::GetterSetter::setter):
2947        (JSC::GetterSetter::setSetter):
2948        * runtime/GlobalEvalFunction.cpp:
2949        (JSC::GlobalEvalFunction::GlobalEvalFunction):
2950        (JSC::GlobalEvalFunction::markChildren):
2951        * runtime/GlobalEvalFunction.h:
2952        (JSC::GlobalEvalFunction::cachedGlobalObject):
2953        * runtime/Heap.cpp:
2954        (JSC::Heap::markProtectedObjects):
2955        (JSC::Heap::markTempSortVectors):
2956        (JSC::Heap::markRoots):
2957        * runtime/InternalFunction.cpp:
2958        (JSC::InternalFunction::InternalFunction):
2959        * runtime/JSAPIValueWrapper.h:
2960        (JSC::JSAPIValueWrapper::value):
2961        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
2962        * runtime/JSActivation.cpp:
2963        (JSC::JSActivation::markChildren):
2964        (JSC::JSActivation::put):
2965        * runtime/JSArray.cpp:
2966        (JSC::JSArray::JSArray):
2967        (JSC::JSArray::getOwnPropertySlot):
2968        (JSC::JSArray::getOwnPropertyDescriptor):
2969        (JSC::JSArray::put):
2970        (JSC::JSArray::putSlowCase):
2971        (JSC::JSArray::deleteProperty):
2972        (JSC::JSArray::increaseVectorLength):
2973        (JSC::JSArray::setLength):
2974        (JSC::JSArray::pop):
2975        (JSC::JSArray::push):
2976        (JSC::JSArray::unshiftCount):
2977        (JSC::JSArray::sort):
2978        (JSC::JSArray::fillArgList):
2979        (JSC::JSArray::copyToRegisters):
2980        (JSC::JSArray::compactForSorting):
2981        * runtime/JSArray.h:
2982        (JSC::JSArray::getIndex):
2983        (JSC::JSArray::setIndex):
2984        (JSC::JSArray::uncheckedSetIndex):
2985        (JSC::JSArray::markChildrenDirect):
2986        * runtime/JSByteArray.cpp:
2987        (JSC::JSByteArray::JSByteArray):
2988        * runtime/JSCell.h:
2989        (JSC::JSCell::MarkStack::append):
2990        (JSC::JSCell::MarkStack::internalAppend):
2991        (JSC::JSCell::MarkStack::deprecatedAppend):
2992        * runtime/JSFunction.cpp:
2993        (JSC::JSFunction::JSFunction):
2994        (JSC::JSFunction::getOwnPropertySlot):
2995        * runtime/JSGlobalData.h:
2996        * runtime/JSGlobalObject.cpp:
2997        (JSC::markIfNeeded):
2998        (JSC::JSGlobalObject::reset):
2999        (JSC::JSGlobalObject::resetPrototype):
3000        (JSC::JSGlobalObject::markChildren):
3001        * runtime/JSGlobalObject.h:
3002        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3003        (JSC::JSGlobalObject::regExpConstructor):
3004        (JSC::JSGlobalObject::errorConstructor):
3005        (JSC::JSGlobalObject::evalErrorConstructor):
3006        (JSC::JSGlobalObject::rangeErrorConstructor):
3007        (JSC::JSGlobalObject::referenceErrorConstructor):
3008        (JSC::JSGlobalObject::syntaxErrorConstructor):
3009        (JSC::JSGlobalObject::typeErrorConstructor):
3010        (JSC::JSGlobalObject::URIErrorConstructor):
3011        (JSC::JSGlobalObject::evalFunction):
3012        (JSC::JSGlobalObject::objectPrototype):
3013        (JSC::JSGlobalObject::functionPrototype):
3014        (JSC::JSGlobalObject::arrayPrototype):
3015        (JSC::JSGlobalObject::booleanPrototype):
3016        (JSC::JSGlobalObject::stringPrototype):
3017        (JSC::JSGlobalObject::numberPrototype):
3018        (JSC::JSGlobalObject::datePrototype):
3019        (JSC::JSGlobalObject::regExpPrototype):
3020        (JSC::JSGlobalObject::methodCallDummy):
3021        (JSC::Structure::prototypeForLookup):
3022        (JSC::constructArray):
3023        * runtime/JSONObject.cpp:
3024        (JSC::Stringifier::Holder::object):
3025        (JSC::Stringifier::Holder::objectSlot):
3026        (JSC::Stringifier::markAggregate):
3027        (JSC::Stringifier::stringify):
3028        (JSC::Stringifier::Holder::appendNextProperty):
3029        (JSC::Walker::callReviver):
3030        (JSC::Walker::walk):
3031        * runtime/JSObject.cpp:
3032        (JSC::JSObject::defineGetter):
3033        (JSC::JSObject::defineSetter):
3034        (JSC::JSObject::removeDirect):
3035        (JSC::JSObject::putDirectFunction):
3036        (JSC::JSObject::putDirectFunctionWithoutTransition):
3037        (JSC::putDescriptor):
3038        (JSC::JSObject::defineOwnProperty):
3039        * runtime/JSObject.h:
3040        (JSC::JSObject::getDirectOffset):
3041        (JSC::JSObject::putDirectOffset):
3042        (JSC::JSObject::putUndefinedAtDirectOffset):
3043        (JSC::JSObject::flattenDictionaryObject):
3044        (JSC::JSObject::putDirectInternal):
3045        (JSC::JSObject::putDirect):
3046        (JSC::JSObject::putDirectFunction):
3047        (JSC::JSObject::putDirectWithoutTransition):
3048        (JSC::JSObject::putDirectFunctionWithoutTransition):
3049        (JSC::JSValue::putDirect):
3050        (JSC::JSObject::allocatePropertyStorageInline):
3051        (JSC::JSObject::markChildrenDirect):
3052        * runtime/JSPropertyNameIterator.cpp:
3053        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
3054        (JSC::JSPropertyNameIterator::get):
3055        * runtime/JSPropertyNameIterator.h:
3056        * runtime/JSStaticScopeObject.cpp:
3057        (JSC::JSStaticScopeObject::markChildren):
3058        * runtime/JSString.cpp:
3059        (JSC::StringObject::create):
3060        * runtime/JSValue.h:
3061        * runtime/JSWrapperObject.cpp:
3062        (JSC::JSWrapperObject::markChildren):
3063        * runtime/JSWrapperObject.h:
3064        (JSC::JSWrapperObject::internalValue):
3065        (JSC::JSWrapperObject::setInternalValue):
3066        * runtime/LiteralParser.cpp:
3067        (JSC::LiteralParser::parse):
3068        * runtime/Lookup.cpp:
3069        (JSC::setUpStaticFunctionSlot):
3070        * runtime/Lookup.h:
3071        (JSC::lookupPut):
3072        * runtime/MarkStack.h:
3073        (JSC::MarkStack::MarkStack):
3074        (JSC::MarkStack::deprecatedAppendValues):
3075        (JSC::MarkStack::appendValues):
3076        * runtime/MathObject.cpp:
3077        (JSC::MathObject::MathObject):
3078        * runtime/NativeErrorConstructor.cpp:
3079        (JSC::NativeErrorConstructor::NativeErrorConstructor):
3080        * runtime/NativeErrorPrototype.cpp:
3081        (JSC::NativeErrorPrototype::NativeErrorPrototype):
3082        * runtime/NumberConstructor.cpp:
3083        (JSC::NumberConstructor::NumberConstructor):
3084        (JSC::constructWithNumberConstructor):
3085        * runtime/NumberObject.cpp:
3086        (JSC::constructNumber):
3087        * runtime/NumberPrototype.cpp:
3088        (JSC::NumberPrototype::NumberPrototype):
3089        * runtime/ObjectConstructor.cpp:
3090        (JSC::ObjectConstructor::ObjectConstructor):
3091        (JSC::objectConstructorGetOwnPropertyDescriptor):
3092        * runtime/Operations.h:
3093        (JSC::normalizePrototypeChain):
3094        (JSC::resolveBase):
3095        * runtime/PrototypeFunction.cpp:
3096        (JSC::PrototypeFunction::PrototypeFunction):
3097        * runtime/PutPropertySlot.h:
3098        (JSC::PutPropertySlot::setExistingProperty):
3099        (JSC::PutPropertySlot::setNewProperty):
3100        (JSC::PutPropertySlot::base):
3101        * runtime/RegExpConstructor.cpp:
3102        (JSC::RegExpConstructor::RegExpConstructor):
3103        * runtime/ScopeChain.cpp:
3104        (JSC::ScopeChainNode::print):
3105        * runtime/ScopeChain.h:
3106        (JSC::ScopeChainNode::~ScopeChainNode):
3107        (JSC::ScopeChainIterator::operator*):
3108        (JSC::ScopeChainIterator::operator->):
3109        (JSC::ScopeChain::top):
3110        * runtime/ScopeChainMark.h:
3111        (JSC::ScopeChain::markAggregate):
3112        * runtime/SmallStrings.cpp:
3113        (JSC::isMarked):
3114        (JSC::SmallStrings::markChildren):
3115        * runtime/SmallStrings.h:
3116        (JSC::SmallStrings::emptyString):
3117        (JSC::SmallStrings::singleCharacterString):
3118        (JSC::SmallStrings::singleCharacterStrings):
3119        * runtime/StringConstructor.cpp:
3120        (JSC::StringConstructor::StringConstructor):
3121        * runtime/StringObject.cpp:
3122        (JSC::StringObject::StringObject):
3123        * runtime/StringObject.h:
3124        * runtime/StringPrototype.cpp:
3125        (JSC::StringPrototype::StringPrototype):
3126        * runtime/Structure.cpp:
3127        (JSC::Structure::Structure):
3128        (JSC::Structure::addPropertyTransition):
3129        (JSC::Structure::toDictionaryTransition):
3130        (JSC::Structure::flattenDictionaryStructure):
3131        * runtime/Structure.h:
3132        (JSC::Structure::storedPrototype):
3133        (JSC::Structure::storedPrototypeSlot):
3134        * runtime/WeakGCMap.h:
3135        (JSC::WeakGCMap::uncheckedGet):
3136        (JSC::WeakGCMap::uncheckedGetSlot):
3137        (JSC::WeakGCMap::isValid):
3138        (JSC::::get):
3139        (JSC::::take):
3140        (JSC::::set):
3141        (JSC::::uncheckedRemove):
3142        * runtime/WriteBarrier.h: Added.
3143        (JSC::DeprecatedPtr::DeprecatedPtr):
3144        (JSC::DeprecatedPtr::get):
3145        (JSC::DeprecatedPtr::operator*):
3146        (JSC::DeprecatedPtr::operator->):
3147        (JSC::DeprecatedPtr::slot):
3148        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
3149        (JSC::DeprecatedPtr::operator!):
3150        (JSC::WriteBarrierBase::set):
3151        (JSC::WriteBarrierBase::get):
3152        (JSC::WriteBarrierBase::operator*):
3153        (JSC::WriteBarrierBase::operator->):
3154        (JSC::WriteBarrierBase::slot):
3155        (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
3156        (JSC::WriteBarrierBase::operator!):
3157        (JSC::WriteBarrier::WriteBarrier):
3158        (JSC::operator==):
3159
31602011-01-30  Geoffrey Garen  <ggaren@apple.com>
3161
3162        Reviewed by Oliver Hunt.
3163
3164        Filter all Heap collection through a common reset function, in
3165        preparation for adding features triggered by collection.
3166        https://bugs.webkit.org/show_bug.cgi?id=53396
3167        
3168        SunSpider reports no change.
3169
3170        * runtime/Heap.cpp:
3171        (JSC::Heap::reportExtraMemoryCostSlowCase): When we're over the extraCost
3172        limit, just call collectAllGarbage() instead of rolling our own special
3173        way of resetting the heap. In theory, this may be slower in some cases,
3174        but it also fixes cases of pathological heap growth that we've seen,
3175        where the only objects being allocated are temporary and huge
3176        (<rdar://problem/8885843>).
3177
3178        (JSC::Heap::allocate):
3179        (JSC::Heap::collectAllGarbage): Use the shared reset function.
3180
3181        (JSC::Heap::reset):
3182        * runtime/Heap.h: Carved a new shared reset function out of the old
3183        collectAllGarbage.
3184
31852011-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3186
3187        Unreviewed, rolling out r77025.
3188        http://trac.webkit.org/changeset/77025
3189        https://bugs.webkit.org/show_bug.cgi?id=53401
3190
3191        It made js1_5/Regress/regress-159334.js fail on 64 bit Linux
3192        (Requested by Ossy on #webkit).
3193
3194        * jit/ExecutableAllocatorFixedVMPool.cpp:
3195        (JSC::FreeListEntry::FreeListEntry):
3196        (JSC::AVLTreeAbstractorForFreeList::get_less):
3197        (JSC::AVLTreeAbstractorForFreeList::set_less):
3198        (JSC::AVLTreeAbstractorForFreeList::get_greater):
3199        (JSC::AVLTreeAbstractorForFreeList::set_greater):
3200        (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
3201        (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
3202        (JSC::AVLTreeAbstractorForFreeList::null):
3203        (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
3204        (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
3205        (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
3206        (JSC::reverseSortFreeListEntriesByPointer):
3207        (JSC::reverseSortCommonSizedAllocations):
3208        (JSC::FixedVMPoolAllocator::release):
3209        (JSC::FixedVMPoolAllocator::reuse):
3210        (JSC::FixedVMPoolAllocator::addToFreeList):
3211        (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
3212        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3213        (JSC::FixedVMPoolAllocator::alloc):
3214        (JSC::FixedVMPoolAllocator::free):
3215        (JSC::FixedVMPoolAllocator::isValid):
3216        (JSC::FixedVMPoolAllocator::allocInternal):
3217        (JSC::FixedVMPoolAllocator::isWithinVMPool):
3218        (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
3219        (JSC::ExecutableAllocator::committedByteCount):
3220        (JSC::maybeModifyVMPoolSize):
3221        (JSC::ExecutableAllocator::isValid):
3222        (JSC::ExecutableAllocator::underMemoryPressure):
3223        (JSC::ExecutablePool::systemAlloc):
3224        (JSC::ExecutablePool::systemRelease):
3225        * wtf/PageReservation.h:
3226        (WTF::PageReservation::PageReservation):
3227        (WTF::PageReservation::commit):
3228        (WTF::PageReservation::decommit):
3229
32302011-01-30  Leo Yang  <leo.yang@torchmobile.com.cn>
3231
3232        Reviewed by Daniel Bates.
3233
3234        Code style issue in JavaScriptCore/wtf/CurrentTime.h
3235        https://bugs.webkit.org/show_bug.cgi?id=53394
3236
3237        According to rule #3 at http://webkit.org/coding/coding-style.html,
3238        This patch fix style issue in CurrentTime.h.
3239
3240        No functionality change, no new tests.
3241
3242        * wtf/CurrentTime.h:
3243        (WTF::currentTimeMS):
3244        (WTF::getLocalTime):
3245
32462011-01-30  Benjamin Poulain  <ikipou@gmail.com>
3247
3248        Reviewed by Kenneth Rohde Christiansen.
3249
3250        [Qt] JavaScriptCore does not link on Mac if building WebKit 2
3251        https://bugs.webkit.org/show_bug.cgi?id=53377
3252
3253        The option "-whole-archive" is not availabe with the libtool of Mac OS X,
3254        instead, we can use "-all_load" on Mac.
3255
3256        * JavaScriptCore.pri:
3257
32582011-01-29  Geoffrey Garen  <ggaren@apple.com>
3259
3260        Sorry Leopard bot -- I committed a change by accident.
3261
3262        * JavaScriptCore.exp: You may have your symbols back now.
3263
32642011-01-29  Geoffrey Garen  <ggaren@apple.com>
3265
3266        Reviewed by Cameron Zwarich.
3267
3268        Simplified Heap iteration
3269        https://bugs.webkit.org/show_bug.cgi?id=53393
3270
3271        * runtime/CollectorHeapIterator.h:
3272        (JSC::CollectorHeapIterator::isValid):
3273        (JSC::CollectorHeapIterator::isLive):
3274        (JSC::CollectorHeapIterator::advance): Removed "max" argument to
3275        advance because it's a constant.
3276        (JSC::LiveObjectIterator::LiveObjectIterator):
3277        (JSC::LiveObjectIterator::operator++):
3278        (JSC::DeadObjectIterator::DeadObjectIterator):
3279        (JSC::DeadObjectIterator::operator++):
3280        (JSC::ObjectIterator::ObjectIterator):
3281        (JSC::ObjectIterator::operator++): Factored out common checks into
3282        two helper functions -- isValid() for "Am I past the end?" and isLive()
3283        for "Is the cell I'm pointing to live?".
3284
3285        * runtime/MarkedSpace.cpp:
3286        (JSC::MarkedSpace::freeBlock):
3287        (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
3288        to the end, to avoid making sweep subtly reliant on internal Heap state.
3289        (JSC::MarkedSpace::primaryHeapBegin):
3290        (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
3291        iteration begins.
3292
32932011-01-29  Geoffrey Garen  <ggaren@apple.com>
3294
3295        Reviewed by Cameron Zwarich.
3296
3297        Simplified heap destruction
3298        https://bugs.webkit.org/show_bug.cgi?id=53392
3299
3300        * JavaScriptCore.exp:
3301        * runtime/Heap.cpp:
3302        (JSC::Heap::destroy):
3303        * runtime/Heap.h:
3304        * runtime/MarkedSpace.cpp:
3305        (JSC::MarkedSpace::destroy):
3306        * runtime/MarkedSpace.h: Don't go out of our way to destroy GC-protected
3307        cells last -- the difficult contortions required to do so just don't seem
3308        justified. We make no guarantees about GC protection after the client
3309        throws away JSGlobalData, and it doesn't seem like any meaningful
3310        guarantee is even possible.
3311
33122011-01-29  Geoffrey Garen  <ggaren@apple.com>
3313
3314        Reviewed by Maciej Stachowiak.
3315
3316        Switched heap to use the Bitmap class and removed CollectorBitmap
3317        https://bugs.webkit.org/show_bug.cgi?id=53391
3318        
3319        SunSpider says 1.005x as fast. Seems like a fluke.
3320
3321        * runtime/MarkedSpace.cpp:
3322        (JSC::MarkedSpace::allocate): Updated for rename and returning a value
3323        rather than taking a value by reference.
3324
3325        * runtime/MarkedSpace.h: Code reuse is good.
3326
3327        * wtf/Bitmap.h:
3328        (WTF::::testAndSet): Added, since this is the one thing Bitmap was missing
3329        which CollectorBitmap had. (Renamed from the less conventional "getset".)
3330
3331        (WTF::::nextPossiblyUnset): Renamed and changed to return a value for
3332        clarity. It's all the same with inlining.
3333
33342011-01-28  Geoffrey Garen  <ggaren@apple.com>
3335
3336        Reviewed by Maciej Stachowiak.
3337
3338        Some more Heap cleanup.
3339        https://bugs.webkit.org/show_bug.cgi?id=53357
3340        
3341        * JavaScriptCore.exp:
3342        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated exported symbols.
3343
3344        * runtime/Heap.cpp:
3345        (JSC::Heap::reportExtraMemoryCostSlowCase): Renamed recordExtraCost to 
3346        reportExtraMemoryCostSlowCase to match our naming conventions.
3347
3348        (JSC::Heap::capacity): Renamed size to capacity because this function
3349        returns the capacity of the heap, including unused portions.
3350
3351        * runtime/Heap.h:
3352        (JSC::Heap::globalData):
3353        (JSC::Heap::markedSpace):
3354        (JSC::Heap::machineStackMarker):
3355        (JSC::Heap::reportExtraMemoryCost): Moved statics to the top of the file.
3356        Moved ctor and dtor to the beginning of the class definition. Grouped
3357        functions by purpose.
3358
3359        * runtime/MarkedSpace.cpp:
3360        (JSC::MarkedSpace::capacity): Renamed size to capacity because this
3361        function returns the capacity of the heap, including unused portions.
3362
3363        * runtime/MarkedSpace.h: Removed statistics and the Statistics class because
3364        the same information can be gotten just by calling size() and capacity().
3365
3366        * runtime/MemoryStatistics.cpp:
3367        * runtime/MemoryStatistics.h: Ditto.
3368
33692011-01-29  Daniel Bates  <dbates@rim.com>
3370
3371        Reviewed by Eric Seidel.
3372
3373        Move wince/mt19937ar.c to ThirdParty and make it a policy choice
3374        https://bugs.webkit.org/show_bug.cgi?id=53253
3375
3376        Make inclusion of MT19937 a policy decision.
3377
3378        Currently, we hardcoded to  use MT19937 when building for
3379        Windows CE. Instead, we should make this a policy decision
3380        with the Windows CE port using this by default.
3381
3382        * JavaScriptCore.pri: Append Source/ThirdParty to the end
3383        of the list include directories.
3384        * wtf/CMakeLists.txt: Ditto.
3385        * wtf/Platform.h: Defined WTF_USE_MERSENNE_TWISTER_19937 when
3386        building for Windows CE.
3387        * wtf/RandomNumber.cpp:
3388        (WTF::randomNumber): Substituted USE(MERSENNE_TWISTER_19937) for OS(WINCE).
3389
33902011-01-29  Cameron Zwarich  <zwarich@apple.com>
3391
3392        Reviewed by David Kilzer.
3393
3394        Bug 53374 - Remove uses of unsafe string functions in debugging code
3395        https://bugs.webkit.org/show_bug.cgi?id=53374
3396
3397        * runtime/RegExp.cpp:
3398        (JSC::RegExp::printTraceData):
3399
34002011-01-29  Cameron Zwarich  <zwarich@apple.com>
3401
3402        Reviewed by Oliver Hunt.
3403
3404        JavaScriptCoreUseJIT environment variable broken
3405        https://bugs.webkit.org/show_bug.cgi?id=53372
3406
3407        * runtime/JSGlobalData.cpp:
3408        (JSC::JSGlobalData::JSGlobalData): Check the actual value in the string returned
3409        by getenv() rather than just doing a NULL check on the return value.
3410
34112011-01-29  Patrick Gansterer  <paroga@webkit.org>
3412
3413        Reviewed by David Kilzer.
3414
3415        Move CharacterNames.h into WTF directory
3416        https://bugs.webkit.org/show_bug.cgi?id=49618
3417
3418        * GNUmakefile.am:
3419        * JavaScriptCore.gypi:
3420        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3421        * JavaScriptCore.xcodeproj/project.pbxproj:
3422        * wtf/CMakeLists.txt:
3423        * wtf/unicode/CharacterNames.h: Renamed from WebCore/platform/text/CharacterNames.h.
3424        * wtf/unicode/UTF8.cpp:
3425
34262011-01-28  Simon Fraser  <simon.fraser@apple.com>
3427
3428        Reviewed by Gavin Barraclough.
3429
3430        Add various clampToInt() methods to MathExtras.h
3431        https://bugs.webkit.org/show_bug.cgi?id=52910
3432        
3433        Add functions for clamping doubles and floats to valid int
3434        ranges, for signed and positive integers.
3435
3436        * wtf/MathExtras.h:
3437        (clampToInteger):
3438        (clampToPositiveInteger):
3439
34402011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
3441
3442        Unreviewed, rolling out r77006 and r77020.
3443        http://trac.webkit.org/changeset/77006
3444        http://trac.webkit.org/changeset/77020
3445        https://bugs.webkit.org/show_bug.cgi?id=53360
3446
3447        "Broke Windows tests" (Requested by rniwa on #webkit).
3448
3449        * API/JSCallbackObject.h:
3450        (JSC::JSCallbackObjectData::setPrivateProperty):
3451        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
3452        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
3453        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
3454        (JSC::JSCallbackObject::setPrivateProperty):
3455        * API/JSCallbackObjectFunctions.h:
3456        (JSC::::put):
3457        (JSC::::staticFunctionGetter):
3458        * API/JSObjectRef.cpp:
3459        (JSObjectMakeConstructor):
3460        (JSObjectSetPrivateProperty):
3461        * API/JSWeakObjectMapRefInternal.h:
3462        * JavaScriptCore.exp:
3463        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3464        * JavaScriptCore.xcodeproj/project.pbxproj:
3465        * bytecode/CodeBlock.cpp:
3466        (JSC::CodeBlock::markAggregate):
3467        * bytecode/CodeBlock.h:
3468        (JSC::CodeBlock::globalObject):
3469        * bytecompiler/BytecodeGenerator.cpp:
3470        (JSC::BytecodeGenerator::BytecodeGenerator):
3471        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
3472        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
3473        (JSC::BytecodeGenerator::findScopedProperty):
3474        * debugger/Debugger.cpp:
3475        (JSC::evaluateInGlobalCallFrame):
3476        * debugger/DebuggerActivation.cpp:
3477        (JSC::DebuggerActivation::DebuggerActivation):
3478        (JSC::DebuggerActivation::markChildren):
3479        * debugger/DebuggerActivation.h:
3480        * debugger/DebuggerCallFrame.cpp:
3481        (JSC::DebuggerCallFrame::evaluate):
3482        * interpreter/CallFrame.h:
3483        (JSC::ExecState::exception):
3484        * interpreter/Interpreter.cpp:
3485        (JSC::Interpreter::resolve):
3486        (JSC::Interpreter::resolveSkip):
3487        (JSC::Interpreter::resolveGlobal):
3488        (JSC::Interpreter::resolveGlobalDynamic):
3489        (JSC::Interpreter::resolveBaseAndProperty):
3490        (JSC::Interpreter::unwindCallFrame):
3491        (JSC::appendSourceToError):
3492        (JSC::Interpreter::execute):
3493        (JSC::Interpreter::tryCacheGetByID):
3494        (JSC::Interpreter::privateExecute):
3495        * jit/JITStubs.cpp:
3496        (JSC::JITThunks::tryCacheGetByID):
3497        (JSC::DEFINE_STUB_FUNCTION):
3498        * jsc.cpp:
3499        (GlobalObject::GlobalObject):
3500        * runtime/ArgList.cpp:
3501        (JSC::MarkedArgumentBuffer::markLists):
3502        * runtime/Arguments.cpp:
3503        (JSC::Arguments::markChildren):
3504        (JSC::Arguments::getOwnPropertySlot):
3505        (JSC::Arguments::getOwnPropertyDescriptor):
3506        (JSC::Arguments::put):
3507        * runtime/Arguments.h:
3508        (JSC::Arguments::setActivation):
3509        (JSC::Arguments::Arguments):
3510        * runtime/ArrayConstructor.cpp:
3511        (JSC::ArrayConstructor::ArrayConstructor):
3512        (JSC::constructArrayWithSizeQuirk):
3513        * runtime/ArrayPrototype.cpp:
3514        (JSC::arrayProtoFuncSplice):
3515        * runtime/BatchedTransitionOptimizer.h:
3516        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3517        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
3518        * runtime/BooleanConstructor.cpp:
3519        (JSC::BooleanConstructor::BooleanConstructor):
3520        (JSC::constructBoolean):
3521        (JSC::constructBooleanFromImmediateBoolean):
3522        * runtime/BooleanPrototype.cpp:
3523        (JSC::BooleanPrototype::BooleanPrototype):
3524        * runtime/ConservativeSet.cpp:
3525        (JSC::ConservativeSet::grow):
3526        * runtime/ConservativeSet.h:
3527        (JSC::ConservativeSet::~ConservativeSet):
3528        (JSC::ConservativeSet::mark):
3529        * runtime/DateConstructor.cpp:
3530        (JSC::DateConstructor::DateConstructor):
3531        * runtime/DateInstance.cpp:
3532        (JSC::DateInstance::DateInstance):
3533        * runtime/DatePrototype.cpp:
3534        (JSC::dateProtoFuncSetTime):
3535        (JSC::setNewValueFromTimeArgs):
3536        (JSC::setNewValueFromDateArgs):
3537        (JSC::dateProtoFuncSetYear):
3538        * runtime/ErrorConstructor.cpp:
3539        (JSC::ErrorConstructor::ErrorConstructor):
3540        * runtime/ErrorInstance.cpp:
3541        (JSC::ErrorInstance::ErrorInstance):
3542        * runtime/ErrorPrototype.cpp:
3543        (JSC::ErrorPrototype::ErrorPrototype):
3544        * runtime/FunctionConstructor.cpp:
3545        (JSC::FunctionConstructor::FunctionConstructor):
3546        * runtime/FunctionPrototype.cpp:
3547        (JSC::FunctionPrototype::FunctionPrototype):
3548        * runtime/GetterSetter.cpp:
3549        (JSC::GetterSetter::markChildren):
3550        * runtime/GetterSetter.h:
3551        (JSC::GetterSetter::GetterSetter):
3552        (JSC::GetterSetter::getter):
3553        (JSC::GetterSetter::setGetter):
3554        (JSC::GetterSetter::setter):
3555        (JSC::GetterSetter::setSetter):
3556        * runtime/GlobalEvalFunction.cpp:
3557        (JSC::GlobalEvalFunction::GlobalEvalFunction):
3558        (JSC::GlobalEvalFunction::markChildren):
3559        * runtime/GlobalEvalFunction.h:
3560        (JSC::GlobalEvalFunction::cachedGlobalObject):
3561        * runtime/Heap.cpp:
3562        (JSC::Heap::markProtectedObjects):
3563        (JSC::Heap::markTempSortVectors):
3564        (JSC::Heap::markRoots):
3565        * runtime/InternalFunction.cpp:
3566        (JSC::InternalFunction::InternalFunction):
3567        * runtime/JSAPIValueWrapper.h:
3568        (JSC::JSAPIValueWrapper::value):
3569        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3570        * runtime/JSActivation.cpp:
3571        (JSC::JSActivation::markChildren):
3572        (JSC::JSActivation::put):
3573        * runtime/JSArray.cpp:
3574        (JSC::JSArray::JSArray):
3575        (JSC::JSArray::getOwnPropertySlot):
3576        (JSC::JSArray::getOwnPropertyDescriptor):
3577        (JSC::JSArray::put):
3578        (JSC::JSArray::putSlowCase):
3579        (JSC::JSArray::deleteProperty):
3580        (JSC::JSArray::increaseVectorLength):
3581        (JSC::JSArray::setLength):
3582        (JSC::JSArray::pop):
3583        (JSC::JSArray::push):
3584        (JSC::JSArray::unshiftCount):
3585        (JSC::JSArray::sort):
3586        (JSC::JSArray::fillArgList):
3587        (JSC::JSArray::copyToRegisters):
3588        (JSC::JSArray::compactForSorting):
3589        * runtime/JSArray.h:
3590        (JSC::JSArray::getIndex):
3591        (JSC::JSArray::setIndex):
3592        (JSC::JSArray::uncheckedSetIndex):
3593        (JSC::JSArray::markChildrenDirect):
3594        * runtime/JSByteArray.cpp:
3595        (JSC::JSByteArray::JSByteArray):
3596        * runtime/JSCell.h:
3597        (JSC::JSCell::JSValue::toThisObject):
3598        (JSC::JSCell::MarkStack::append):
3599        * runtime/JSFunction.cpp:
3600        (JSC::JSFunction::JSFunction):
3601        (JSC::JSFunction::getOwnPropertySlot):
3602        * runtime/JSGlobalData.h:
3603        * runtime/JSGlobalObject.cpp:
3604        (JSC::markIfNeeded):
3605        (JSC::JSGlobalObject::reset):
3606        (JSC::JSGlobalObject::resetPrototype):
3607        (JSC::JSGlobalObject::markChildren):
3608        * runtime/JSGlobalObject.h:
3609        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3610        (JSC::JSGlobalObject::regExpConstructor):
3611        (JSC::JSGlobalObject::errorConstructor):
3612        (JSC::JSGlobalObject::evalErrorConstructor):
3613        (JSC::JSGlobalObject::rangeErrorConstructor):
3614        (JSC::JSGlobalObject::referenceErrorConstructor):
3615        (JSC::JSGlobalObject::syntaxErrorConstructor):
3616        (JSC::JSGlobalObject::typeErrorConstructor):
3617        (JSC::JSGlobalObject::URIErrorConstructor):
3618        (JSC::JSGlobalObject::evalFunction):
3619        (JSC::JSGlobalObject::objectPrototype):
3620        (JSC::JSGlobalObject::functionPrototype):
3621        (JSC::JSGlobalObject::arrayPrototype):
3622        (JSC::JSGlobalObject::booleanPrototype):
3623        (JSC::JSGlobalObject::stringPrototype):
3624        (JSC::JSGlobalObject::numberPrototype):
3625        (JSC::JSGlobalObject::datePrototype):
3626        (JSC::JSGlobalObject::regExpPrototype):
3627        (JSC::JSGlobalObject::methodCallDummy):
3628        (JSC::Structure::prototypeForLookup):
3629        (JSC::constructArray):
3630        * runtime/JSONObject.cpp:
3631        (JSC::Stringifier::Holder::object):
3632        (JSC::Stringifier::markAggregate):
3633        (JSC::Stringifier::stringify):
3634        (JSC::Stringifier::Holder::appendNextProperty):
3635        (JSC::Walker::callReviver):
3636        (JSC::Walker::walk):
3637        * runtime/JSObject.cpp:
3638        (JSC::JSObject::defineGetter):
3639        (JSC::JSObject::defineSetter):
3640        (JSC::JSObject::removeDirect):
3641        (JSC::JSObject::putDirectFunction):
3642        (JSC::JSObject::putDirectFunctionWithoutTransition):
3643        (JSC::putDescriptor):
3644        (JSC::JSObject::defineOwnProperty):
3645        * runtime/JSObject.h:
3646        (JSC::JSObject::getDirectOffset):
3647        (JSC::JSObject::putDirectOffset):
3648        (JSC::JSObject::flattenDictionaryObject):
3649        (JSC::JSObject::putDirectInternal):
3650        (JSC::JSObject::putDirect):
3651        (JSC::JSObject::putDirectFunction):
3652        (JSC::JSObject::putDirectWithoutTransition):
3653        (JSC::JSObject::putDirectFunctionWithoutTransition):
3654        (JSC::JSValue::putDirect):
3655        (JSC::JSObject::allocatePropertyStorageInline):
3656        (JSC::JSObject::markChildrenDirect):
3657        * runtime/JSPropertyNameIterator.cpp:
3658        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
3659        (JSC::JSPropertyNameIterator::get):
3660        * runtime/JSPropertyNameIterator.h:
3661        * runtime/JSStaticScopeObject.cpp:
3662        (JSC::JSStaticScopeObject::markChildren):
3663        * runtime/JSString.cpp:
3664        (JSC::StringObject::create):
3665        * runtime/JSValue.h:
3666        * runtime/JSWrapperObject.cpp:
3667        (JSC::JSWrapperObject::markChildren):
3668        * runtime/JSWrapperObject.h:
3669        (JSC::JSWrapperObject::internalValue):
3670        (JSC::JSWrapperObject::setInternalValue):
3671        * runtime/LiteralParser.cpp:
3672        (JSC::LiteralParser::parse):
3673        * runtime/Lookup.cpp:
3674        (JSC::setUpStaticFunctionSlot):
3675        * runtime/Lookup.h:
3676        (JSC::lookupPut):
3677        * runtime/MarkStack.h:
3678        (JSC::MarkStack::appendValues):
3679        * runtime/MathObject.cpp:
3680        (JSC::MathObject::MathObject):
3681        * runtime/NativeErrorConstructor.cpp:
3682        (JSC::NativeErrorConstructor::NativeErrorConstructor):
3683        * runtime/NativeErrorPrototype.cpp:
3684        (JSC::NativeErrorPrototype::NativeErrorPrototype):
3685        * runtime/NumberConstructor.cpp:
3686        (JSC::NumberConstructor::NumberConstructor):
3687        (JSC::constructWithNumberConstructor):
3688        * runtime/NumberObject.cpp:
3689        (JSC::constructNumber):
3690        * runtime/NumberPrototype.cpp:
3691        (JSC::NumberPrototype::NumberPrototype):
3692        * runtime/ObjectConstructor.cpp:
3693        (JSC::ObjectConstructor::ObjectConstructor):
3694        (JSC::objectConstructorGetOwnPropertyDescriptor):
3695        * runtime/Operations.h:
3696        (JSC::normalizePrototypeChain):
3697        (JSC::resolveBase):
3698        * runtime/PrototypeFunction.cpp:
3699        (JSC::PrototypeFunction::PrototypeFunction):
3700        * runtime/PutPropertySlot.h:
3701        (JSC::PutPropertySlot::setExistingProperty):
3702        (JSC::PutPropertySlot::setNewProperty):
3703        (JSC::PutPropertySlot::base):
3704        * runtime/RegExpConstructor.cpp:
3705        (JSC::RegExpConstructor::RegExpConstructor):
3706        * runtime/ScopeChain.cpp:
3707        (JSC::ScopeChainNode::print):
3708        * runtime/ScopeChain.h:
3709        (JSC::ScopeChainNode::~ScopeChainNode):
3710        (JSC::ScopeChainIterator::operator*):
3711        (JSC::ScopeChainIterator::operator->):
3712        (JSC::ScopeChain::top):
3713        * runtime/ScopeChainMark.h:
3714        (JSC::ScopeChain::markAggregate):
3715        * runtime/SmallStrings.cpp:
3716        (JSC::isMarked):
3717        (JSC::SmallStrings::markChildren):
3718        * runtime/SmallStrings.h:
3719        (JSC::SmallStrings::emptyString):
3720        (JSC::SmallStrings::singleCharacterString):
3721        (JSC::SmallStrings::singleCharacterStrings):
3722        * runtime/StringConstructor.cpp:
3723        (JSC::StringConstructor::StringConstructor):
3724        * runtime/StringObject.cpp:
3725        (JSC::StringObject::StringObject):
3726        * runtime/StringObject.h:
3727        * runtime/StringPrototype.cpp:
3728        (JSC::StringPrototype::StringPrototype):
3729        * runtime/Structure.cpp:
3730        (JSC::Structure::Structure):
3731        (JSC::Structure::addPropertyTransition):
3732        (JSC::Structure::toDictionaryTransition):
3733        (JSC::Structure::flattenDictionaryStructure):
3734        * runtime/Structure.h:
3735        (JSC::Structure::storedPrototype):
3736        * runtime/WeakGCMap.h:
3737        (JSC::WeakGCMap::uncheckedGet):
3738        (JSC::WeakGCMap::isValid):
3739        (JSC::::get):
3740        (JSC::::take):
3741        (JSC::::set):
3742        (JSC::::uncheckedRemove):
3743        * runtime/WriteBarrier.h: Removed.
3744
37452011-01-28  Gavin Barraclough  <barraclough@apple.com>
3746
3747        Reviewed by Geoff Garen.
3748
3749        https://bugs.webkit.org/show_bug.cgi?id=53352
3750        Heavy external fragmentation in FixedVMPoolAllocator can lead to a CRASH().
3751
3752        The FixedVMPoolAllocator currently uses a best fix policy -
3753        switch to first fit, this is less prone to external fragmentation.
3754
3755        * jit/ExecutableAllocatorFixedVMPool.cpp:
3756        (JSC::AllocationTableSizeClass::AllocationTableSizeClass):
3757        (JSC::AllocationTableSizeClass::blockSize):
3758        (JSC::AllocationTableSizeClass::blockCount):
3759        (JSC::AllocationTableSizeClass::blockAlignment):
3760        (JSC::AllocationTableSizeClass::size):
3761        (JSC::AllocationTableLeaf::AllocationTableLeaf):
3762        (JSC::AllocationTableLeaf::~AllocationTableLeaf):
3763        (JSC::AllocationTableLeaf::allocate):
3764        (JSC::AllocationTableLeaf::free):
3765        (JSC::AllocationTableLeaf::isEmpty):
3766        (JSC::AllocationTableLeaf::isFull):
3767        (JSC::AllocationTableLeaf::size):
3768        (JSC::AllocationTableLeaf::classForSize):
3769        (JSC::AllocationTableLeaf::dump):
3770        (JSC::LazyAllocationTable::LazyAllocationTable):
3771        (JSC::LazyAllocationTable::~LazyAllocationTable):
3772        (JSC::LazyAllocationTable::allocate):
3773        (JSC::LazyAllocationTable::free):
3774        (JSC::LazyAllocationTable::isEmpty):
3775        (JSC::LazyAllocationTable::isFull):
3776        (JSC::LazyAllocationTable::size):
3777        (JSC::LazyAllocationTable::dump):
3778        (JSC::LazyAllocationTable::classForSize):
3779        (JSC::AllocationTableDirectory::AllocationTableDirectory):
3780        (JSC::AllocationTableDirectory::~AllocationTableDirectory):
3781        (JSC::AllocationTableDirectory::allocate):
3782        (JSC::AllocationTableDirectory::free):
3783        (JSC::AllocationTableDirectory::isEmpty):
3784        (JSC::AllocationTableDirectory::isFull):
3785        (JSC::AllocationTableDirectory::size):
3786        (JSC::AllocationTableDirectory::classForSize):
3787        (JSC::AllocationTableDirectory::dump):
3788        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3789        (JSC::FixedVMPoolAllocator::alloc):
3790        (JSC::FixedVMPoolAllocator::free):
3791        (JSC::FixedVMPoolAllocator::allocated):
3792        (JSC::FixedVMPoolAllocator::isValid):
3793        (JSC::FixedVMPoolAllocator::classForSize):
3794        (JSC::FixedVMPoolAllocator::offsetToPointer):
3795        (JSC::FixedVMPoolAllocator::pointerToOffset):
3796        (JSC::ExecutableAllocator::committedByteCount):
3797        (JSC::ExecutableAllocator::isValid):
3798        (JSC::ExecutableAllocator::underMemoryPressure):
3799        (JSC::ExecutablePool::systemAlloc):
3800        (JSC::ExecutablePool::systemRelease):
3801        * wtf/PageReservation.h:
3802        (WTF::PageReservation::PageReservation):
3803        (WTF::PageReservation::commit):
3804        (WTF::PageReservation::decommit):
3805        (WTF::PageReservation::committed):
3806
38072011-01-27  Oliver Hunt  <oliver@apple.com>
3808
3809        Reviewed by Geoffrey Garen.
3810
3811        Convert markstack to a slot visitor API
3812        https://bugs.webkit.org/show_bug.cgi?id=53219
3813
3814        Move the MarkStack over to a slot based marking API.
3815
3816        In order to avoiding aliasing concerns there are two new types
3817        that need to be used when holding on to JSValues and JSCell that
3818        need to be marked: WriteBarrier and DeprecatedPtr.  WriteBarrier
3819        is expected to be used for any JSValue or Cell that's lifetime and
3820        marking is controlled by another GC object.  DeprecatedPtr is used
3821        for any value that we need to rework ownership for.
3822
3823        The change over to this model has produced a large amount of
3824        code changes, but they are mostly mechanical (forwarding JSGlobalData,
3825        etc).
3826
3827        * API/JSCallbackObject.h:
3828        (JSC::JSCallbackObjectData::setPrivateProperty):
3829        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
3830        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
3831        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
3832        (JSC::JSCallbackObject::setPrivateProperty):
3833        * API/JSCallbackObjectFunctions.h:
3834        (JSC::::put):
3835        (JSC::::staticFunctionGetter):
3836        * API/JSObjectRef.cpp:
3837        (JSObjectMakeConstructor):
3838        (JSObjectSetPrivateProperty):
3839        * API/JSWeakObjectMapRefInternal.h:
3840        * JavaScriptCore.exp:
3841        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3842        * JavaScriptCore.xcodeproj/project.pbxproj:
3843        * bytecode/CodeBlock.cpp:
3844        (JSC::CodeBlock::markAggregate):
3845        * bytecode/CodeBlock.h:
3846        (JSC::CodeBlock::globalObject):
3847        * bytecompiler/BytecodeGenerator.cpp:
3848        (JSC::BytecodeGenerator::BytecodeGenerator):
3849        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
3850        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
3851        (JSC::BytecodeGenerator::findScopedProperty):
3852        * debugger/DebuggerActivation.cpp:
3853        (JSC::DebuggerActivation::DebuggerActivation):
3854        (JSC::DebuggerActivation::markChildren):
3855        * debugger/DebuggerActivation.h:
3856        * interpreter/Interpreter.cpp:
3857        (JSC::Interpreter::resolve):
3858        (JSC::Interpreter::resolveSkip):
3859        (JSC::Interpreter::resolveGlobalDynamic):
3860        (JSC::Interpreter::resolveBaseAndProperty):
3861        (JSC::Interpreter::unwindCallFrame):
3862        (JSC::appendSourceToError):
3863        (JSC::Interpreter::execute):
3864        (JSC::Interpreter::privateExecute):
3865        * interpreter/Register.h:
3866        (JSC::Register::jsValueSlot):
3867        * jit/JITStubs.cpp:
3868        (JSC::JITThunks::tryCacheGetByID):
3869        (JSC::DEFINE_STUB_FUNCTION):
3870        * jsc.cpp:
3871        (GlobalObject::GlobalObject):
3872        * runtime/Arguments.cpp:
3873        (JSC::Arguments::markChildren):
3874        (JSC::Arguments::getOwnPropertySlot):
3875        (JSC::Arguments::getOwnPropertyDescriptor):
3876        (JSC::Arguments::put):
3877        * runtime/Arguments.h:
3878        (JSC::Arguments::setActivation):
3879        (JSC::Arguments::Arguments):
3880        * runtime/ArrayConstructor.cpp:
3881        (JSC::ArrayConstructor::ArrayConstructor):
3882        (JSC::constructArrayWithSizeQuirk):
3883        * runtime/ArrayPrototype.cpp:
3884        (JSC::arrayProtoFuncSplice):
3885        * runtime/BatchedTransitionOptimizer.h:
3886        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
3887        (JSC::BatchedTransitionOptimizer::~BatchedTransitionOptimizer):
3888        * runtime/BooleanConstructor.cpp:
3889        (JSC::BooleanConstructor::BooleanConstructor):
3890        (JSC::constructBoolean):
3891        (JSC::constructBooleanFromImmediateBoolean):
3892        * runtime/BooleanPrototype.cpp:
3893        (JSC::BooleanPrototype::BooleanPrototype):
3894        * runtime/ConservativeSet.h:
3895        (JSC::ConservativeSet::mark):
3896        * runtime/DateConstructor.cpp:
3897        (JSC::DateConstructor::DateConstructor):
3898        * runtime/DateInstance.cpp:
3899        (JSC::DateInstance::DateInstance):
3900        * runtime/DatePrototype.cpp:
3901        (JSC::dateProtoFuncSetTime):
3902        (JSC::setNewValueFromTimeArgs):
3903        (JSC::setNewValueFromDateArgs):
3904        (JSC::dateProtoFuncSetYear):
3905        * runtime/ErrorConstructor.cpp:
3906        (JSC::ErrorConstructor::ErrorConstructor):
3907        * runtime/ErrorInstance.cpp:
3908        (JSC::ErrorInstance::ErrorInstance):
3909        * runtime/ErrorPrototype.cpp:
3910        (JSC::ErrorPrototype::ErrorPrototype):
3911        * runtime/FunctionConstructor.cpp:
3912        (JSC::FunctionConstructor::FunctionConstructor):
3913        * runtime/FunctionPrototype.cpp:
3914        (JSC::FunctionPrototype::FunctionPrototype):
3915        * runtime/GetterSetter.cpp:
3916        (JSC::GetterSetter::markChildren):
3917        * runtime/GetterSetter.h:
3918        (JSC::GetterSetter::GetterSetter):
3919        (JSC::GetterSetter::getter):
3920        (JSC::GetterSetter::setGetter):
3921        (JSC::GetterSetter::setter):
3922        (JSC::GetterSetter::setSetter):
3923        * runtime/GlobalEvalFunction.cpp:
3924        (JSC::GlobalEvalFunction::GlobalEvalFunction):
3925        (JSC::GlobalEvalFunction::markChildren):
3926        * runtime/GlobalEvalFunction.h:
3927        (JSC::GlobalEvalFunction::cachedGlobalObject):
3928        * runtime/Heap.cpp:
3929        (JSC::Heap::markProtectedObjects):
3930        (JSC::Heap::markTempSortVectors):
3931        (JSC::Heap::markRoots):
3932        * runtime/InternalFunction.cpp:
3933        (JSC::InternalFunction::InternalFunction):
3934        * runtime/JSAPIValueWrapper.h:
3935        (JSC::JSAPIValueWrapper::value):
3936        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
3937        * runtime/JSActivation.cpp:
3938        (JSC::JSActivation::put):
3939        * runtime/JSArray.cpp:
3940        (JSC::JSArray::JSArray):
3941        (JSC::JSArray::getOwnPropertySlot):
3942        (JSC::JSArray::getOwnPropertyDescriptor):
3943        (JSC::JSArray::put):
3944        (JSC::JSArray::putSlowCase):
3945        (JSC::JSArray::deleteProperty):
3946        (JSC::JSArray::increaseVectorLength):
3947        (JSC::JSArray::setLength):
3948        (JSC::JSArray::pop):
3949        (JSC::JSArray::push):
3950        (JSC::JSArray::unshiftCount):
3951        (JSC::JSArray::sort):
3952        (JSC::JSArray::fillArgList):
3953        (JSC::JSArray::copyToRegisters):
3954        (JSC::JSArray::compactForSorting):
3955        * runtime/JSArray.h:
3956        (JSC::JSArray::getIndex):
3957        (JSC::JSArray::setIndex):
3958        (JSC::JSArray::uncheckedSetIndex):
3959        (JSC::JSArray::markChildrenDirect):
3960        * runtime/JSByteArray.cpp:
3961        (JSC::JSByteArray::JSByteArray):
3962        * runtime/JSCell.h:
3963        (JSC::JSCell::MarkStack::append):
3964        (JSC::JSCell::MarkStack::appendCell):
3965        * runtime/JSFunction.cpp:
3966        (JSC::JSFunction::JSFunction):
3967        (JSC::JSFunction::getOwnPropertySlot):
3968        * runtime/JSGlobalObject.cpp:
3969        (JSC::markIfNeeded):
3970        (JSC::JSGlobalObject::reset):
3971        (JSC::JSGlobalObject::resetPrototype):
3972        (JSC::JSGlobalObject::markChildren):
3973        * runtime/JSGlobalObject.h:
3974        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
3975        (JSC::JSGlobalObject::regExpConstructor):
3976        (JSC::JSGlobalObject::errorConstructor):
3977        (JSC::JSGlobalObject::evalErrorConstructor):
3978        (JSC::JSGlobalObject::rangeErrorConstructor):
3979        (JSC::JSGlobalObject::referenceErrorConstructor):
3980        (JSC::JSGlobalObject::syntaxErrorConstructor):
3981        (JSC::JSGlobalObject::typeErrorConstructor):
3982        (JSC::JSGlobalObject::URIErrorConstructor):
3983        (JSC::JSGlobalObject::evalFunction):
3984        (JSC::JSGlobalObject::objectPrototype):
3985        (JSC::JSGlobalObject::functionPrototype):
3986        (JSC::JSGlobalObject::arrayPrototype):
3987        (JSC::JSGlobalObject::booleanPrototype):
3988        (JSC::JSGlobalObject::stringPrototype):
3989        (JSC::JSGlobalObject::numberPrototype):
3990        (JSC::JSGlobalObject::datePrototype):
3991        (JSC::JSGlobalObject::regExpPrototype):
3992        (JSC::JSGlobalObject::methodCallDummy):
3993        (JSC::constructArray):
3994        * runtime/JSONObject.cpp:
3995        (JSC::Stringifier::Holder::object):
3996        (JSC::Stringifier::Holder::objectSlot):
3997        (JSC::Stringifier::markAggregate):
3998        (JSC::Stringifier::stringify):
3999        (JSC::Stringifier::Holder::appendNextProperty):
4000        (JSC::Walker::callReviver):
4001        (JSC::Walker::walk):
4002        * runtime/JSObject.cpp:
4003        (JSC::JSObject::defineGetter):
4004        (JSC::JSObject::defineSetter):
4005        (JSC::JSObject::removeDirect):
4006        (JSC::JSObject::putDirectFunction):
4007        (JSC::JSObject::putDirectFunctionWithoutTransition):
4008        (JSC::putDescriptor):
4009        (JSC::JSObject::defineOwnProperty):
4010        * runtime/JSObject.h:
4011        (JSC::JSObject::putDirectOffset):
4012        (JSC::JSObject::putUndefinedAtDirectOffset):
4013        (JSC::JSObject::flattenDictionaryObject):
4014        (JSC::JSObject::putDirectInternal):
4015        (JSC::JSObject::putDirect):
4016        (JSC::JSObject::putDirectFunction):
4017        (JSC::JSObject::putDirectWithoutTransition):
4018        (JSC::JSObject::putDirectFunctionWithoutTransition):
4019        (JSC::JSValue::putDirect):
4020        (JSC::JSObject::allocatePropertyStorageInline):
4021        (JSC::JSObject::markChildrenDirect):
4022        * runtime/JSStaticScopeObject.cpp:
4023        (JSC::JSStaticScopeObject::markChildren):
4024        * runtime/JSString.cpp:
4025        (JSC::StringObject::create):
4026        * runtime/JSValue.h:
4027        * runtime/JSWrapperObject.cpp:
4028        (JSC::JSWrapperObject::markChildren):
4029        * runtime/JSWrapperObject.h:
4030        (JSC::JSWrapperObject::internalValue):
4031        (JSC::JSWrapperObject::setInternalValue):
4032        * runtime/LiteralParser.cpp:
4033        (JSC::LiteralParser::parse):
4034        * runtime/Lookup.cpp:
4035        (JSC::setUpStaticFunctionSlot):
4036        * runtime/Lookup.h:
4037        (JSC::lookupPut):
4038        * runtime/MarkStack.h:
4039        * runtime/MathObject.cpp:
4040        (JSC::MathObject::MathObject):
4041        * runtime/NativeErrorConstructor.cpp:
4042        (JSC::NativeErrorConstructor::NativeErrorConstructor):
4043        * runtime/NativeErrorPrototype.cpp:
4044        (JSC::NativeErrorPrototype::NativeErrorPrototype):
4045        * runtime/NumberConstructor.cpp:
4046        (JSC::NumberConstructor::NumberConstructor):
4047        (JSC::constructWithNumberConstructor):
4048        * runtime/NumberObject.cpp:
4049        (JSC::constructNumber):
4050        * runtime/NumberPrototype.cpp:
4051        (JSC::NumberPrototype::NumberPrototype):
4052        * runtime/ObjectConstructor.cpp:
4053        (JSC::ObjectConstructor::ObjectConstructor):
4054        (JSC::objectConstructorGetOwnPropertyDescriptor):
4055        * runtime/Operations.h:
4056        (JSC::normalizePrototypeChain):
4057        (JSC::resolveBase):
4058        * runtime/PrototypeFunction.cpp:
4059        (JSC::PrototypeFunction::PrototypeFunction):
4060        * runtime/PutPropertySlot.h:
4061        (JSC::PutPropertySlot::setExistingProperty):
4062        (JSC::PutPropertySlot::setNewProperty):
4063        (JSC::PutPropertySlot::base):
4064        * runtime/RegExpConstructor.cpp:
4065        (JSC::RegExpConstructor::RegExpConstructor):
4066        * runtime/ScopeChain.cpp:
4067        (JSC::ScopeChainNode::print):
4068        * runtime/ScopeChain.h:
4069        (JSC::ScopeChainNode::~ScopeChainNode):
4070        (JSC::ScopeChainIterator::operator*):
4071        (JSC::ScopeChainIterator::operator->):
4072        (JSC::ScopeChain::top):
4073        * runtime/ScopeChainMark.h:
4074        (JSC::ScopeChain::markAggregate):
4075        * runtime/SmallStrings.cpp:
4076        (JSC::isMarked):
4077        (JSC::SmallStrings::markChildren):
4078        * runtime/SmallStrings.h:
4079        (JSC::SmallStrings::emptyString):
4080        (JSC::SmallStrings::singleCharacterString):
4081        (JSC::SmallStrings::singleCharacterStrings):
4082        * runtime/StringConstructor.cpp:
4083        (JSC::StringConstructor::StringConstructor):
4084        * runtime/StringObject.cpp:
4085        (JSC::StringObject::StringObject):
4086        * runtime/StringObject.h:
4087        * runtime/StringPrototype.cpp:
4088        (JSC::StringPrototype::StringPrototype):
4089        * runtime/Structure.cpp:
4090        (JSC::Structure::flattenDictionaryStructure):
4091        * runtime/Structure.h:
4092        (JSC::Structure::storedPrototypeSlot):
4093        * runtime/WeakGCMap.h:
4094        (JSC::WeakGCMap::uncheckedGet):
4095        (JSC::WeakGCMap::uncheckedGetSlot):
4096        (JSC::::get):
4097        (JSC::::take):
4098        (JSC::::set):
4099        (JSC::::uncheckedRemove):
4100        * runtime/WriteBarrier.h: Added.
4101        (JSC::DeprecatedPtr::DeprecatedPtr):
4102        (JSC::DeprecatedPtr::get):
4103        (JSC::DeprecatedPtr::operator*):
4104        (JSC::DeprecatedPtr::operator->):
4105        (JSC::DeprecatedPtr::slot):
4106        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
4107        (JSC::DeprecatedPtr::operator!):
4108        (JSC::WriteBarrierBase::set):
4109        (JSC::WriteBarrierBase::get):
4110        (JSC::WriteBarrierBase::operator*):
4111        (JSC::WriteBarrierBase::operator->):
4112        (JSC::WriteBarrierBase::slot):
4113        (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
4114        (JSC::WriteBarrierBase::operator!):
4115        (JSC::WriteBarrier::WriteBarrier):
4116        (JSC::operator==):
4117
41182011-01-28  Adam Roben  <aroben@apple.com>
4119
4120        Chromium build fix after r76967
4121
4122        * wtf/ThreadingPrimitives.h: Use OS(WINDOWS) instead of PLATFORM(WIN), to match other
4123        similar macros in this file.
4124
41252011-01-28  Michael Saboff  <msaboff@apple.com>
4126
4127        Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
4128        https://bugs.webkit.org/show_bug.cgi?id=53271
4129
4130        Reapplying this this change.  No change from prior patch in
4131        JavaScriptCore.
4132
4133        Added new isValid() methods to check if a contained object in
4134        a WeakGCMap is valid when using an unchecked iterator.
4135
4136        * runtime/WeakGCMap.h:
4137        (JSC::WeakGCMap::isValid):
4138
41392011-01-27  Adam Roben  <aroben@apple.com>
4140
4141        Extract code to convert a WTF absolute time to a Win32 wait interval into a separate
4142        function
4143
4144        Fixes <http://webkit.org/b/53208> <rdar://problem/8922490> BinarySemaphore should wrap a
4145        Win32 event
4146
4147        Reviewed by Dave Hyatt.
4148
4149        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export the new function.
4150
4151        * wtf/ThreadingPrimitives.h: Declare the new function.
4152
4153        * wtf/ThreadingWin.cpp:
4154        (WTF::ThreadCondition::timedWait): Moved code to convert the absolute time to a wait
4155        interval from here...
4156        (WTF::absoluteTimeToWaitTimeoutInterval): ...to here.
4157
41582011-01-28  Sam Weinig  <sam@webkit.org>
4159
4160        Reviewed by Maciej Stachowiak.
4161
4162        Add basic rubber banding support
4163        <rdar://problem/8219429>
4164        https://bugs.webkit.org/show_bug.cgi?id=53277
4165
4166        * wtf/Platform.h: Add ENABLE for rubber banding.
4167
41682011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
4169
4170        Unreviewed, rolling out r76893.
4171        http://trac.webkit.org/changeset/76893
4172        https://bugs.webkit.org/show_bug.cgi?id=53287
4173
4174        It made some tests crash on GTK and Qt debug bots (Requested
4175        by Ossy on #webkit).
4176
4177        * runtime/WeakGCMap.h:
4178
41792011-01-27  Adam Barth  <abarth@webkit.org>
4180
4181        Reviewed by Eric Seidel.
4182
4183        Add WTFString method to compare equality with Vector<UChar>
4184        https://bugs.webkit.org/show_bug.cgi?id=53266
4185
4186        I'm planning to use this method in the new XSS filter implementation,
4187        but it seems generally useful.
4188
4189        * wtf/text/StringImpl.h:
4190        (WTF::equalIgnoringNullity):
4191        * wtf/text/WTFString.h:
4192        (WTF::equalIgnoringNullity):
4193
41942011-01-27  Michael Saboff  <msaboff@apple.com>
4195
4196        Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
4197        https://bugs.webkit.org/show_bug.cgi?id=53271
4198
4199        Added new isValid() methods to check if a contained object in
4200        a WeakGCMap is valid when using an unchecked iterator.
4201
4202        * runtime/WeakGCMap.h:
4203        (JSC::WeakGCMap::isValid):
4204
42052011-01-26  Sam Weinig  <sam@webkit.org>
4206
4207        Reviewed by Maciej Stachowiak.
4208
4209        Add events to represent the start/end of a gesture scroll
4210        https://bugs.webkit.org/show_bug.cgi?id=53215
4211
4212        * wtf/Platform.h: Add ENABLE for gesture events. 
4213
42142011-01-26  Yael Aharon  <yael.aharon@nokia.com>
4215
4216        Reviewed by Laszlo Gombos.
4217
4218        [Qt][Symbian] Fix --minimal build
4219        https://bugs.webkit.org/show_bug.cgi?id=52839
4220
4221        Move definition of USE_SYSTEM_MALLOC out of pri file.
4222        Put it in platform.h instead.
4223
4224        * wtf/Platform.h:
4225        * wtf/TCSystemAlloc.cpp:
4226        * wtf/wtf.pri:
4227
42282011-01-26  Patrick Gansterer  <paroga@webkit.org>
4229
4230        Reviewed by Andreas Kling.
4231
4232        [WINCE] Add JIT support to build system
4233        https://bugs.webkit.org/show_bug.cgi?id=53079
4234
4235        * CMakeListsWinCE.txt:
4236
42372011-01-25  Adam Roben  <aroben@apple.com>
4238
4239        Windows Production build fix
4240
4241        Reviewed by Steve Falkenburg.
4242
4243        * JavaScriptCore.vcproj/JavaScriptCore.make: Set BUILDSTYLE to Release_PGO at the very start
4244        of the file so that ConfigurationBuildDir takes that into account. Also set it the right way
4245        (by redefining the macro) rather than the wrong way (by modifying the environment variable).
4246
42472011-01-25  Steve Falkenburg  <sfalken@apple.com>
4248
4249        Rubber-stamped by Adam Roben.
4250
4251        Windows production build fix.
4252        Use correct environment variable escaping
4253
4254        * JavaScriptCore.vcproj/JavaScriptCore.make:
4255        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
4256
42572011-01-25  Oliver Hunt  <oliver@apple.com>
4258
4259        Reviewed by Gavin Barraclough.
4260
4261        JSON.stringify processing time exponentially grows with size of object
4262        https://bugs.webkit.org/show_bug.cgi?id=51922
4263
4264        Remove last use of reserveCapacity from JSON stringification, as it results
4265        in appalling append behaviour when there are a large number of property names
4266        and nothing else.
4267
4268        * runtime/JSONObject.cpp:
4269        (JSC::Stringifier::appendQuotedString):
4270
42712011-01-25  Antti Koivisto  <antti@apple.com>
4272
4273        Not reviewed.
4274        
4275        Try to fix windows build.
4276
4277        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4278
42792011-01-25  Antti Koivisto  <antti@apple.com>
4280
4281        Reviewed by Oliver Hunt.
4282
4283        REGRESSION: Leak in JSParser::Scope::copyCapturedVariablesToVector()
4284        https://bugs.webkit.org/show_bug.cgi?id=53061
4285         
4286        Cache did not know about the subclass so failed to fully delete the items. 
4287        Got rid of the subclass and moved the classes to separate files.
4288
4289        * CMakeLists.txt:
4290        * GNUmakefile.am:
4291        * JavaScriptCore.exp:
4292        * JavaScriptCore.gypi:
4293        * JavaScriptCore.pro:
4294        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4295        * JavaScriptCore.xcodeproj/project.pbxproj:
4296        * parser/JSParser.cpp:
4297        (JSC::JSParser::Scope::saveFunctionInfo):
4298        (JSC::JSParser::Scope::restoreFunctionInfo):
4299        (JSC::JSParser::findCachedFunctionInfo):
4300        (JSC::JSParser::parseFunctionInfo):
4301        * parser/SourceProvider.h:
4302        * parser/SourceProviderCache.cpp: Added.
4303        (JSC::SourceProviderCache::~SourceProviderCache):
4304        (JSC::SourceProviderCache::byteSize):
4305        * parser/SourceProviderCache.h: Added.
4306        (JSC::SourceProviderCache::SourceProviderCache):
4307        (JSC::SourceProviderCache::add):
4308        (JSC::SourceProviderCache::get):
4309        * parser/SourceProviderCacheItem.h: Added.
4310        (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
4311        (JSC::SourceProviderCacheItem::approximateByteSize):
4312        (JSC::SourceProviderCacheItem::closeBraceToken):
4313
43142011-01-25  Marcilio Mendonca  <mamendonca@rim.com>
4315
4316        Reviewed by Darin Adler.
4317
4318        Bug 53087: Refactoring: replaced a hanging "else" with a "return"
4319        statement
4320        https://bugs.webkit.org/show_bug.cgi?id=53087.
4321
4322        Refactoring work: Replaced a hanging "else" within an #if PLATFORM(M
4323        with a "return" so that the code is more readable and less error pro
4324        (e.g., "else" doesn't use braces so adding extra lines to the else
4325        block won't have any effect; even worse, code still compiles
4326        successfully.
4327
4328        * wtf/Assertions.cpp:
4329
43302011-01-24  Chris Marrin  <cmarrin@apple.com>
4331
4332        Reviewed by Eric Seidel.
4333
4334        Change ENABLE_3D_CANVAS to ENABLE_WEBGL
4335        https://bugs.webkit.org/show_bug.cgi?id=53041
4336
4337        * Configurations/FeatureDefines.xcconfig:
4338
43392011-01-25  Adam Roben  <aroben@apple.com>
4340
4341        Windows Production build fix
4342
4343        * JavaScriptCore.vcproj/JavaScriptCore.make: Added a missing "set".
4344
43452011-01-25  Patrick Gansterer  <paroga@webkit.org>
4346
4347        Reviewed by Eric Seidel.
4348
4349        Add missing defines for COMPILER(RVCT) && CPU(ARM_THUMB2)
4350        https://bugs.webkit.org/show_bug.cgi?id=52949
4351
4352        * jit/JITStubs.cpp:
4353
43542011-01-24  Adam Roben  <aroben@apple.com>
4355
4356        Windows Production build fix
4357
4358        * JavaScriptCore.vcproj/JavaScriptCore.make: Update for move of JavaScriptCore into Source.
4359
43602011-01-24  Peter Varga  <pvarga@webkit.org>
4361
4362        Reviewed by Oliver Hunt.
4363
4364        Optimize regex patterns which contain empty alternatives
4365        https://bugs.webkit.org/show_bug.cgi?id=51395
4366
4367        Eliminate the empty alternatives from the regex pattern and convert it to do
4368        the matching in an easier way.
4369
4370        * yarr/YarrPattern.cpp:
4371        (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
4372
43732011-01-24  Andras Becsi  <abecsi@webkit.org>
4374
4375        Reviewed by Csaba Osztrogonác.
4376
4377        [Qt] Move project files into Source
4378        https://bugs.webkit.org/show_bug.cgi?id=52891
4379
4380        * JavaScriptCore.pri:
4381        * JavaScriptCore.pro:
4382        * jsc.pro:
4383
43842011-01-23  Mark Rowe  <mrowe@apple.com>
4385
4386        Follow-up to r76477.
4387
4388        Fix the scripts that detect problematic code such as static initializers
4389        and destructors, weak vtables, inappropriate files in the framework wrappers,
4390        and public headers including private headers. These had all been broken
4391        since the projects were moved in to the Source directory as the paths to the
4392        scripts were not updated at that time.
4393
4394        * JavaScriptCore.xcodeproj/project.pbxproj:
4395
43962011-01-23  Patrick Gansterer  <paroga@webkit.org>
4397
4398        Reviewed by Darin Adler.
4399
4400        Use WTF::StringHasher in WebCore
4401        https://bugs.webkit.org/show_bug.cgi?id=52934
4402
4403        Add an additional function to calculate the hash
4404        of data with a runtimedependent size.
4405
4406        * wtf/StringHasher.h:
4407        (WTF::StringHasher::createBlobHash):
4408
44092011-01-23  Patrick Gansterer  <paroga@webkit.org>
4410
4411        Reviewed by David Kilzer.
4412
4413        Fix comment in String::ascii()
4414        https://bugs.webkit.org/show_bug.cgi?id=52980
4415
4416        * wtf/text/WTFString.cpp:
4417        (WTF::String::ascii):
4418
44192011-01-23  Patrick Gansterer  <paroga@webkit.org>
4420
4421        Reviewed by David Kilzer.
4422
4423        Add String::containsOnlyLatin1()
4424        https://bugs.webkit.org/show_bug.cgi?id=52979
4425
4426        * wtf/text/WTFString.h:
4427        (WTF::String::containsOnlyLatin1):
4428        (WTF::charactersAreAllLatin1):
4429
44302011-01-23  Patrick Gansterer  <paroga@webkit.org>
4431
4432        Reviewed by Oliver Hunt.
4433
4434        Remove obsolete JSVALUE32 code
4435        https://bugs.webkit.org/show_bug.cgi?id=52948
4436
4437        r70111 removed support for JSVALUE32.
4438        ARM, MIPS and X86 support JSVALUE32_64 only.
4439
4440        * jit/JITStubs.cpp:
4441
44422011-01-22  Geoffrey Garen  <ggaren@apple.com>
4443
4444        Reviewed by Dan Bernstein.
4445
4446        ASSERT running run-webkit-tests --threaded.
4447        https://bugs.webkit.org/show_bug.cgi?id=52971
4448        
4449        SunSpider and v8 report no change.
4450
4451        * runtime/ConservativeSet.cpp:
4452        (JSC::ConservativeSet::grow):
4453        (JSC::ConservativeSet::add):
4454        * runtime/ConservativeSet.h: Tweaked the inline capacity to 128, and
4455        the growth policy to 2X, to make SunSpider and v8 happy.
4456        (JSC::ConservativeSet::ConservativeSet):
4457        (JSC::ConservativeSet::~ConservativeSet):
4458        (JSC::ConservativeSet::mark): Use OSAllocator directly, instead of malloc.
4459        Malloc is forbidden during a multi-threaded mark phase because it can
4460        cause deadlock.
4461
44622011-01-22  Geoffrey Garen  <ggaren@apple.com>
4463
4464        Reviewed by Geoffrey Garen.
4465
4466        Rubber-stamped by Maciej Stachowiak.
4467
4468        A few of Maciej's review suggestions for my last patch.
4469        https://bugs.webkit.org/show_bug.cgi?id=52946        
4470
4471        SunSpider reports no change.
4472
4473        * Android.mk:
4474        * CMakeLists.txt:
4475        * GNUmakefile.am:
4476        * JavaScriptCore.gypi:
4477        * JavaScriptCore.pro:
4478        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4479        * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
4480
4481        * runtime/ConservativeSet.cpp: Added.
4482        (JSC::isPointerAligned):
4483        (JSC::ConservativeSet::add):
4484        * runtime/ConservativeSet.h: Added.
4485        (JSC::ConservativeSet::ConservativeSet):
4486        (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
4487        file, and moved the conservative check into ConservativeSet::add, making
4488        ConservativeSet's responsibility clearer.
4489
4490        * runtime/Heap.cpp:
4491        (JSC::Heap::markRoots):
4492        * runtime/MachineStackMarker.cpp:
4493        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
4494        (JSC::MachineStackMarker::markOtherThreadConservatively):
4495        * runtime/MachineStackMarker.h:
4496        * runtime/MarkStack.h: Updated for changes above.
4497
44982011-01-22  Patrick Gansterer  <paroga@webkit.org>
4499
4500        Unreviewed WinCE build fix for r76430.
4501
4502        * runtime/MachineStackMarker.cpp:
4503        (JSC::swapIfBackwards):
4504
45052011-01-21  Geoffrey Garen  <ggaren@apple.com>
4506
4507        Reviewed by Beth Dakin.
4508
4509        Reorganized MarkedSpace, making many of its functions private.
4510
4511        * runtime/JSCell.h:
4512        (JSC::JSCell::Heap::heap):
4513        * runtime/MarkedSpace.h:
4514        (JSC::MarkedSpace::globalData):
4515        (JSC::MarkedSpace::heap):
4516
45172011-01-21  Geoffrey Garen  <ggaren@apple.com>
4518
4519        Try to fix build: moved helper function out of #ifdef.
4520
4521        * runtime/MachineStackMarker.cpp:
4522        (JSC::swapIfBackwards):
4523
45242011-01-21  Geoffrey Garen  <ggaren@apple.com>
4525
4526        Rubber-stamped by Maciej Stachowiak.
4527
4528        A few of Maciej's review suggestions for my last patch.
4529        https://bugs.webkit.org/show_bug.cgi?id=52946        
4530
4531        SunSpider reports no change.
4532
4533        * runtime/MachineStackMarker.cpp:
4534        (JSC::swapIfBackwards): Added a helper function for handling platforms
4535        where the stack can grow in any direction.
4536
4537        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
4538        (JSC::MachineStackMarker::markOtherThreadConservatively): Use the helper
4539        function.
4540
4541        (JSC::isPointerAligned): Use "!" instead of "==0" because a robot told me to.
4542
4543        (JSC::MachineStackMarker::markConservatively): Changed to use a more
4544        standard looping idiom, and to use the helper function above.
4545
4546        * runtime/MarkedSpace.h:
4547        (JSC::MarkedSpace::isCellAligned): Use "!" instead of "==0" because a robot told me to.
4548
45492011-01-21  Geoffrey Garen  <ggaren@apple.com>
4550
4551        Reviewed by Maciej Stachowiak.
4552
4553        Cleaned up some conservative marking code.
4554        https://bugs.webkit.org/show_bug.cgi?id=52946
4555        
4556        SunSpider reports no change.
4557
4558        * interpreter/RegisterFile.h: No need for a special marking function,
4559        since we already expose a start() and end().
4560
4561        * runtime/Heap.cpp:
4562        (JSC::Heap::registerFile):
4563        (JSC::Heap::markRoots):
4564        * runtime/Heap.h:
4565        (JSC::Heap::contains): Migrated markConservatively() to the machine stack
4566        marker class. Now, Heap just provides a contains() function, which the
4567        machine stack marker uses for checking whether a pointer points into the heap.
4568
4569        * runtime/MachineStackMarker.cpp:
4570        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
4571        (JSC::MachineStackMarker::markOtherThreadConservatively):
4572        (JSC::isPointerAligned):
4573        (JSC::MachineStackMarker::markConservatively):
4574        * runtime/MachineStackMarker.h: Move the conservative marking code here.
4575
4576        * runtime/MarkStack.h:
4577        (JSC::ConservativeSet::add):
4578        (JSC::ConservativeSet::mark): Changed to using a vector instead of hash
4579        set. Vector seems to be a bit faster, and it generates smaller code.
4580
4581        * runtime/MarkedSpace.cpp:
4582        (JSC::MarkedSpace::containsSlowCase):
4583        * runtime/MarkedSpace.h:
4584        (JSC::MarkedSpace::isCellAligned):
4585        (JSC::MarkedSpace::isPossibleCell):
4586        (JSC::MarkedSpace::contains): Kept the code for determining whether a
4587        pointer pointed into marked space, and moved the code for marking
4588        a set of conservative pointers into the machine stack marker.
4589
4590        * wtf/HashSet.h:
4591        (WTF::::add): Added two missing inlines that I noticed while testing
4592        vector vs hash set.
4593
45942011-01-21  Mark Rowe  <mrowe@apple.com>
4595
4596        Reviewed by Sam Weinig.
4597
4598        Work around a Clang bug <rdar://problem/8876150> that leads to it incorrectly emitting an access
4599        control warning when a client tries to use operator bool exposed above via "using PageBlock::operator bool".
4600
4601        * wtf/PageAllocation.h:
4602        (WTF::PageAllocation::operator bool):
4603        * wtf/PageReservation.h:
4604        (WTF::PageReservation::operator bool):
4605
46062011-01-21  Michael Saboff  <msaboff@apple.com>
4607
4608        Reviewed by Oliver Hunt.
4609
4610        [RegexFuzz] Hang with forward assertion
4611        https://bugs.webkit.org/show_bug.cgi?id=52825
4612        <rdar://problem/8894332>
4613
4614        The backtrackTo label from the first term in a list of terms is
4615        being overwritten by processing of subsequent terms.  Changed
4616        copyBacktrackToLabel() to check for an existing bcaktrackTo label
4617        before copying and renamed it to propagateBacktrackToLabel() since
4618        it no longer copies.
4619
4620        * yarr/YarrJIT.cpp:
4621        (JSC::Yarr::YarrGenerator::BacktrackDestination::propagateBacktrackToLabel):
4622        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
4623
46242011-01-21  Geoffrey Garen  <ggaren@apple.com>
4625
4626        Reviewed by Sam Weinig.
4627
4628        Moved the mark stack from global data to the heap, since it pertains
4629        to the heap, and not the virtual machine as a whole.
4630        https://bugs.webkit.org/show_bug.cgi?id=52930
4631        
4632        SunSpider reports no change.
4633
4634        * runtime/Heap.cpp:
4635        (JSC::Heap::Heap):
4636        (JSC::Heap::markRoots):
4637        * runtime/Heap.h:
4638        * runtime/JSGlobalData.cpp:
4639        (JSC::JSGlobalData::JSGlobalData):
4640        * runtime/JSGlobalData.h:
4641
46422011-01-21  Peter Gal  <galpeter@inf.u-szeged.hu>
4643
4644        Reviewed by Darin Adler.
4645
4646        REGRESSION(r76177): All JavaScriptCore tests fail on ARM
4647        https://bugs.webkit.org/show_bug.cgi?id=52814
4648
4649        Get the approximateByteSize value before releasing the OwnPtr.
4650
4651        * parser/JSParser.cpp:
4652        (JSC::JSParser::parseFunctionInfo):
4653
46542011-01-21  Xan Lopez  <xlopez@igalia.com>
4655
4656        Reviewed by Martin Robinson.
4657
4658        Remove unnecessary <stdio.h> include
4659        https://bugs.webkit.org/show_bug.cgi?id=52884
4660
4661        * jit/JIT.cpp: remove unnecessary include.
4662
46632011-01-20  Ryosuke Niwa  <rniwa@webkit.org>
4664
4665        Reviewed by Maciej Stachowiak.
4666
4667        Added OwnPtrCommon.h because OwnArrayPtr::set calls deleteOwnedPtr.
4668
4669        * wtf/OwnArrayPtr.h:
4670
46712011-01-20  Patrick Gansterer  <paroga@webkit.org>
4672
4673        Reviewed by Oliver Hunt.
4674
4675        [WINCE] Remove obsolete JSVALUE32 code
4676        https://bugs.webkit.org/show_bug.cgi?id=52450
4677
4678        Remove the "offset hack" in create_jit_stubs, since we
4679        only support JSVALUE32_64 in the meantime.
4680
4681        * create_jit_stubs: Removed offset argument
4682        * jit/JITStubs.cpp:
4683
46842011-01-20  Geoffrey Garen  <ggaren@apple.com>
4685
4686        Reviewed by Oliver Hunt.
4687
4688        When marking conservatively, guard against reviving dead objects.
4689        https://bugs.webkit.org/show_bug.cgi?id=52840
4690        
4691        SunSpider and v8 say no change.
4692
4693        * interpreter/RegisterFile.h:
4694        (JSC::RegisterFile::markCallFrames): Updated to use the ConservativeSet API.
4695
4696        * runtime/Heap.cpp:
4697        (JSC::Heap::recordExtraCost): No need to guard against conservative
4698        marking reviving dead objects anymore, since the conservative marking
4699        mechanism guards against this now.
4700
4701        (JSC::Heap::markConservatively):
4702        (JSC::Heap::markProtectedObjects):
4703        (JSC::Heap::markTempSortVectors): Don't drain the mark stack inside a
4704        marking function. We want to establish a separation of concerns between
4705        visiting roots and draining the mark stack.
4706
4707        (JSC::Heap::markRoots): Gather the set of conservative references before
4708        clearning mark bits, because conservative marking now uses the mark bits
4709        to determine if a reference is valid, and avoid reviving dead objects.
4710
4711        (JSC::Heap::collectAllGarbage): No need to guard against conservative
4712        marking reviving dead objects anymore, since the conservative marking
4713        mechanism guards against this now.
4714
4715        * runtime/Heap.h: Updated to use the ConservativeSet API.
4716
4717        * runtime/MachineStackMarker.cpp:
4718        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
4719        (JSC::MachineStackMarker::markCurrentThreadConservatively):
4720        (JSC::MachineStackMarker::markOtherThreadConservatively):
4721        (JSC::MachineStackMarker::markMachineStackConservatively):
4722        * runtime/MachineStackMarker.h: Ditto.
4723
4724        * runtime/MarkStack.h:
4725        (JSC::ConservativeSet::add):
4726        (JSC::ConservativeSet::mark): Added ConservativeSet, for gathering the
4727        set of conservative references. This is different from MarkStack, since
4728        we don't mark the set until it is completely gathered.
4729
4730        * runtime/MarkedSpace.cpp:
4731        (JSC::MarkedSpace::freeBlock):
4732        (JSC::MarkedSpace::resizeBlocks):
4733        (JSC::MarkedSpace::markConservatively):
4734        * runtime/MarkedSpace.h: When marking conservatively, guard against
4735        reviving dead objects.
4736
47372011-01-20  Siddharth Mathur  <siddharth.mathur@nokia.com>
4738
4739        Reviewed by Geoffrey Garen.
4740
4741        [Symbian] Fix StackBounds::initialize()
4742        https://bugs.webkit.org/show_bug.cgi?id=52842
4743
4744        * wtf/StackBounds.cpp:
4745        (WTF::StackBounds::initialize): Use TThreadStackInfo.iLimit for stack limit
4746
47472011-01-20  Michael Saboff  <msaboff@apple.com>
4748
4749        Reviewed by Oliver Hunt.
4750
4751        <rdar://problem/8890203> [RegexFuzz] Crash in generated code (52773)
4752        https://bugs.webkit.org/show_bug.cgi?id=52773
4753
4754        Fixed case where an existing DataLabelPtr is overwritten.  The
4755        replacing DataLabelPtr is now resolved immediately in
4756        linkDataLabelToBacktrackIfExists().  Cleanup - eliminated bool
4757        return value for the routine as it was never used.
4758
4759        * yarr/YarrJIT.cpp:
4760        (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
4761
47622011-01-20  Andras Becsi  <abecsi@webkit.org>
4763
4764        Reviewed by Csaba Osztrogonác.
4765
4766        [Qt][WK2] WebKit2 enabled build fails to link
4767
4768        Work around undefined reference linking issues until the buildsystem gets redesigned.
4769        These issues first occured in minimal builds (see BUG 50519).
4770
4771        * JavaScriptCore.pri: link as whole-archive for WebKit2 builds
4772
47732011-01-20  Zoltan Horvath  <zoltan@webkit.org>
4774
4775        Reviewed by Csaba Osztrogonác.
4776
4777        Refactoring of the custom allocation framework
4778        https://bugs.webkit.org/show_bug.cgi?id=49897
4779
4780        Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
4781        The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
4782        equivalent macro implementation at the necessary places.
4783
4784        * wtf/FastAllocBase.h: Turn FastAllocBase's implementation into a macro.
4785
47862011-01-20  Mark Rowe  <mrowe@apple.com>
4787
4788        Reviewed by Maciej Stachowiak.
4789
4790        Follow-up to r75766 / <rdar://problem/5469576>.
4791
4792        We were failing to initialize the key, causing all sorts of unexpected behavior.
4793
4794        * wtf/FastMalloc.cpp:
4795        (WTF::setThreadHeap):
4796        (WTF::TCMalloc_ThreadCache::GetThreadHeap):
4797        (WTF::TCMalloc_ThreadCache::InitTSD): Ensure that the key is initialized.
4798
47992011-01-18  Geoffrey Garen  <ggaren@apple.com>
4800
4801        Reviewed by Darin Adler.
4802
4803        Rolled back in r76078, with crash fixed.
4804        https://bugs.webkit.org/show_bug.cgi?id=52668
4805        
4806        * runtime/JSGlobalObject.cpp:
4807        (JSC::JSGlobalObject::markChildren): Account for the fact that the global
4808        object moves its variables into and out of the register file. While out
4809        of the register file, the symbol table's size is not an accurate count
4810        for the size of the register array, since the BytecodeGenerator might
4811        be compiling, adding items to the symbol table.
4812        
48132011-01-18  Darin Adler  <darin@apple.com>
4814
4815        Reviewed by Geoffrey Garen.
4816
4817        Stack overflow when converting an Error object to string
4818        https://bugs.webkit.org/show_bug.cgi?id=46410
4819
4820        * Android.mk: Added StringRecursionChecker.cpp and
4821        StringRecursionChecker.h.
4822        * CMakeLists.txt: Ditto.
4823        * GNUmakefile.am: Ditto.
4824        * JavaScriptCore.gypi: Ditto.
4825        * JavaScriptCore.pro: Ditto.
4826        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
4827        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
4828
4829        * runtime/ArrayPrototype.cpp:
4830        (JSC::arrayProtoFuncToString): Use StringRecursionChecker instead
4831        of the older hand-written code to do the same thing.
4832        (JSC::arrayProtoFuncToLocaleString): Ditto.
4833        (JSC::arrayProtoFuncJoin): Ditto.
4834
4835        * runtime/ErrorPrototype.cpp:
4836        (JSC::errorProtoFuncToString): Use StringRecursionChecker.
4837
4838        * runtime/JSGlobalData.h: Renamed arrayVisitedElements to
4839        stringRecursionCheckVisitedObjects.
4840
4841        * runtime/RegExpPrototype.cpp:
4842        (JSC::regExpProtoFuncToString): Use StringRecursionChecker.
4843
4844        * runtime/StringRecursionChecker.cpp: Added.
4845        * runtime/StringRecursionChecker.h: Added.
4846
48472011-01-19  Oliver Hunt  <oliver@apple.com>
4848
4849        Reviewed by Gavin Barraclough.
4850
4851        Remove non-spec support for callable RegExp
4852        https://bugs.webkit.org/show_bug.cgi?id=28285
4853
4854        Remove support for callable regexps.  If it breaks sites we can
4855        just roll this out.
4856
4857        * runtime/RegExpObject.cpp:
4858        * runtime/RegExpObject.h:
4859        * tests/mozilla/expected.html: update results.
4860
48612011-01-19  Antti Koivisto  <antti@apple.com>
4862
4863        Reviewed by Oliver Hunt.
4864
4865        Cache function offsets to speed up javascript parsing
4866        https://bugs.webkit.org/show_bug.cgi?id=52622
4867        
4868        Use cache to save function offsets and some other info.
4869        This avoids quite a bit of work when reparsing the source.
4870
4871        * parser/ASTBuilder.h:
4872        * parser/JSParser.cpp:
4873        (JSC::JSParser::CachedFunctionInfo::CachedFunctionInfo):
4874        (JSC::JSParser::CachedFunctionInfo::approximateByteSize):
4875        (JSC::JSParser::CachedFunctionInfo::closeBraceToken):
4876        (JSC::JSParser::Scope::copyCapturedVariablesToVector):
4877        (JSC::JSParser::Scope::saveFunctionInfo):
4878        (JSC::JSParser::Scope::restoreFunctionInfo):
4879        (JSC::JSParser::findCachedFunctionInfo):
4880        (JSC::JSParser::JSParser):
4881        (JSC::JSParser::parseProgram):
4882        (JSC::JSParser::parseFunctionInfo):
4883        * parser/Lexer.h:
4884        (JSC::Lexer::setOffset):
4885        (JSC::Lexer::setLineNumber):
4886        (JSC::Lexer::sourceProvider):
4887        * parser/SourceProvider.h:
4888        (JSC::SourceProviderCache::SourceProviderCache):
4889        (JSC::SourceProviderCache::~SourceProviderCache):
4890        (JSC::SourceProviderCache::byteSize):
4891        (JSC::SourceProviderCache::add):
4892        (JSC::SourceProviderCache::get):
4893        (JSC::SourceProvider::SourceProvider):
4894        (JSC::SourceProvider::~SourceProvider):
4895        (JSC::SourceProvider::cache):
4896        (JSC::SourceProvider::notifyCacheSizeChanged):
4897        (JSC::SourceProvider::cacheSizeChanged):
4898        * parser/SyntaxChecker.h:
4899
49002011-01-19  Mark Rowe  <mrowe@apple.com>
4901
4902        Reviewed by Darin Adler.
4903
4904        Follow-up to r75766 / <rdar://problem/5469576>.
4905
4906        * DerivedSources.make: Evaluate the SDKROOT variable correctly.
4907
49082011-01-19  Oliver Hunt  <oliver@apple.com>
4909
4910        Reviewed by Gavin Barraclough.
4911
4912        [jsfunfuzz] Defining a function called __proto__ inside an eval triggers an assertion
4913        https://bugs.webkit.org/show_bug.cgi?id=52672
4914
4915        Rather than coming up with a somewhat convoluted mechanism to ensure that
4916        developers can override the global objects prototype with a function named
4917        __proto__ and expect it to work, we just disallow it at the syntax level.
4918
4919        * parser/JSParser.cpp:
4920        (JSC::JSParser::parseFunctionInfo):
4921
49222011-01-19  Michael Saboff  <msaboff@apple.com>
4923
4924        Reviewed by Darin Adler.
4925
4926        <rdar://problem/8882994> Regression: Simple nested backtrack hangs
4927        https://bugs.webkit.org/show_bug.cgi?id=52675
4928
4929        The changeset (r76076) for https://bugs.webkit.org/show_bug.cgi?id=52540
4930        broke simple backtracking in some cases.  Reworked that change to 
4931        link both jumps and labels.
4932
4933        * yarr/YarrJIT.cpp:
4934        (JSC::Yarr::YarrGenerator::BacktrackDestination::hasBacktrackToLabel):
4935        (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
4936        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
4937
49382011-01-19  Pavel Podivilov  <podivilov@chromium.org>
4939
4940        Reviewed by Yury Semikhatsky.
4941
4942        Web Inspector: [JSC] scripts have incorrect starting line (always 1).
4943        https://bugs.webkit.org/show_bug.cgi?id=52721
4944
4945        * debugger/Debugger.cpp:
4946        (JSC::Debugger::recompileAllJSFunctions):
4947        * debugger/Debugger.h:
4948        * parser/Parser.h:
4949        (JSC::Parser::parse):
4950        * parser/SourceCode.h:
4951        (JSC::SourceCode::SourceCode):
4952        * parser/SourceProvider.h:
4953        (JSC::SourceProvider::startPosition):
4954
49552011-01-19  Csaba Osztrogonác  <ossy@webkit.org>
4956
4957        Reviewed by Laszlo Gombos and Tor Arne Vestbø.
4958
4959        [Qt] Remove unnecessary "../Source" from paths
4960        after moving source files into Source is finished.
4961
4962        * JavaScriptCore.pri:
4963
49642011-01-19  Benjamin Kalman  <kalman@chromium.org>
4965
4966        Reviewed by Darin Adler.
4967
4968        Don't return void from void function String::split
4969        https://bugs.webkit.org/show_bug.cgi?id=52684
4970
4971        * wtf/text/WTFString.cpp:
4972        (WTF::String::split):
4973
49742011-01-18  Kenneth Russell  <kbr@google.com>
4975
4976        Unreviewed, rolling out r76078.
4977        http://trac.webkit.org/changeset/76078
4978        https://bugs.webkit.org/show_bug.cgi?id=52668
4979
4980        Caused crashes of fast/canvas/webgl/constants.html,
4981        fast/canvas/webgl/gl-enum-tests.html, and possibly other layout
4982        test crashes in Release mode. WebGL crashes were observed with
4983        "run-webkit-tests fast/canvas/webgl". It was necessary to run
4984        multiple tests to provoke the crash.
4985
4986        * interpreter/RegisterFile.h:
4987        (JSC::RegisterFile::markGlobals):
4988        * runtime/JSActivation.cpp:
4989        (JSC::JSActivation::markChildren):
4990        * runtime/JSGlobalObject.cpp:
4991        (JSC::JSGlobalObject::markChildren):
4992
49932011-01-18  Oliver Hunt  <oliver@apple.com>
4994
4995        Reviewed by Gavin Barraclough.
4996
4997        [jsfunfuzz] Assertion asking activation for arguments when arguments is overridden
4998        https://bugs.webkit.org/show_bug.cgi?id=52690
4999
5000        Clean up code to retrieve arguments from activation and function objects.
5001        Remove the incorrect assertion from JSActivation's argumentsGetter.
5002
5003        * interpreter/Interpreter.cpp:
5004        (JSC::Interpreter::retrieveArguments):
5005        * runtime/JSActivation.cpp:
5006        (JSC::JSActivation::argumentsGetter):
5007
50082011-01-18  Geoffrey Garen  <ggaren@apple.com>
5009
5010        Reviewed by Darin Adler.
5011
5012        Removed RegisterFile::markGlobals because it was obtuse, and it
5013        unnecessarily relied on conservative marking.
5014        https://bugs.webkit.org/show_bug.cgi?id=52668
5015
5016        * interpreter/RegisterFile.h: Removed markGlobals.
5017
5018        * runtime/JSActivation.cpp:
5019        (JSC::JSActivation::markChildren): Added a comment explaning why some
5020        JSActivations don't always mark their registers arrays.
5021
5022        * runtime/JSGlobalObject.cpp:
5023        (JSC::JSGlobalObject::markChildren): Instead of calling markGlobals, mark
5024        the registers array directly.
5025
50262011-01-18  Michael Saboff  <msaboff@apple.com>
5027
5028        Reviewed by Oliver Hunt.
5029
5030        <rdar://problem/8875432> Regression: Some text-only e-mails cause hang beneath RegExp::match (52540)
5031        https://bugs.webkit.org/show_bug.cgi?id=52540
5032        https://bugs.webkit.org/show_bug.cgi?id=52662
5033
5034        Directly use backtrack label with parentheses nested under a
5035        non-capturing parentheses.  Also linked current parentheses
5036        tail code object for possible parens nested within a non-capturing
5037        parentheses.
5038
5039        * yarr/YarrJIT.cpp:
5040        (JSC::Yarr::YarrGenerator::BacktrackDestination::linkBacktrackToLabel):
5041        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
5042
50432011-01-18  Daniel Bates  <dbates@rim.com>
5044
5045        Reviewed by Gavin Barraclough.
5046
5047        Only use moving memory model assumption in ExecutableAllocator::intializePageSize() for Symbian OS
5048        https://bugs.webkit.org/show_bug.cgi?id=52517
5049
5050        Patch by David Tapuska
5051
5052        Currently, we compile code with respect to the Symbian-specific moving memory model
5053        assumption for all ARMv5 or lower architectures. Instead, we should only compile
5054        such code when building for Symbian OS on those architectures because this model
5055        is Symbian-specific.
5056
5057        * jit/ExecutableAllocator.cpp:
5058        (JSC::ExecutableAllocator::intializePageSize):
5059
50602011-01-18  Dimitry Andric  <dim@freebsd.org>
5061
5062        Reviewed by Andreas Kling.
5063
5064        Fix linking JavaScriptCore on FreeBSD/amd64
5065        https://bugs.webkit.org/show_bug.cgi?id=52591
5066
5067        Linking of JavaScriptCore on FreeBSD/amd64 fails, for the same reason as
5068        in bug 28422: cti_vm_throw needs a "@plt" suffix, otherwise the linker
5069        complains about the relocation type.
5070
5071        * jit/JITStubs.cpp: use @plt suffix on x86_64 platforms, for both Linux
5072        and FreeBSD.
5073
50742011-01-18  Oliver Hunt  <oliver@apple.com>
5075
5076        Reviewed by Antti Koivisto.
5077
5078        [jsfunfuzz] Assertion in codegen for array of NaN constants
5079        https://bugs.webkit.org/show_bug.cgi?id=52643
5080
5081        Don't cache NaN literals in the code generator, as NaN doesn't compare
5082        as equal to itself it causes problems when rehashing the number cache.
5083
5084        * bytecompiler/BytecodeGenerator.cpp:
5085        (JSC::BytecodeGenerator::emitLoad):
5086
50872011-01-17  Jarred Nicholls  <jarred@sencha.com>
5088
5089        Reviewed by Csaba Osztrogonác.
5090
5091        REGRESSION(r75709): Return value of fscanf() shouldn't be ignored.
5092        https://bugs.webkit.org/show_bug.cgi?id=52585
5093        
5094        gcc 4.4.4+ has warn_unused_value attribute on fscanf, so we should check
5095        the return value to get around the gcc warning
5096
5097        * jit/ExecutableAllocatorFixedVMPool.cpp:
5098        (JSC::maybeModifyVMPoolSize):
5099
51002011-01-17  Michael Saboff  <msaboff@apple.com>
5101
5102        Reviewed by Oliver Hunt.
5103
5104        [regexfuzz] Crash running regex with lookahead
5105        https://bugs.webkit.org/show_bug.cgi?id=52548
5106
5107        Eliminated agressive chaining of backtracks.  This code was overwriting
5108        already valid backtrack information.
5109
5110        * yarr/YarrJIT.cpp:
5111        (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
5112
51132011-01-17  Tony Gentilcore  <tonyg@chromium.org>
5114
5115        Reviewed by Alexey Proskuryakov.
5116
5117        Fix some headers with missing or misspelled #ifndef guards
5118        https://bugs.webkit.org/show_bug.cgi?id=52545
5119
5120        * wtf/RefPtrHashMap.h:
5121
51222011-01-17  Dan Bernstein  <mitz@apple.com>
5123
5124        Rubber-stamped by Mark Rowe.
5125
5126        Update xcodeproj svn:ignore to include xcuserdata.
5127
5128        * JavaScriptCore.xcodeproj: Modified property svn:ignore.
5129
51302011-01-16  Adam Barth  <abarth@webkit.org>
5131
5132        Rubber-stamped by Eric Seidel.
5133
5134        Move WebKit into Source
5135        https://bugs.webkit.org/show_bug.cgi?id=52530
5136
5137        * JavaScriptCore.gyp/JavaScriptCore.gyp:
5138
51392011-01-16  Oliver Hunt  <oliver@apple.com>
5140
5141        Reviewed by Sam Weinig.
5142
5143        [jsfunfuzz] Parser doesn't correctly validate for-loop syntax
5144        https://bugs.webkit.org/show_bug.cgi?id=52516
5145
5146        Ensure that we always check for a semicolon after encountering
5147        multiple declarations in the initialiser portion of a for-loop.
5148
5149        * parser/JSParser.cpp:
5150        (JSC::JSParser::parseForStatement):
5151
51522011-01-16  Oliver Hunt  <oliver@apple.com>
5153
5154        Reviewed by Geoffrey Garen.
5155
5156        Strict mode restrictions on arguments and eval usage aren't complete
5157        https://bugs.webkit.org/show_bug.cgi?id=52528
5158
5159        Fix a few bugs in strict mode where we incorrect allow mutation of
5160        arguments and eval in the parser.
5161
5162        Alas the "optimisation" used by the syntax checker for validating
5163        binary and unary expressions was too aggressive: we do actually need
5164        a stack for operations and operands although it needn't be as complete
5165        as that used for the full AST builder.
5166
5167        Also disallow assignment to arguments in all cases as allowing arguments
5168        to be assignable is always an error in strict mode, regardless of context.
5169
5170        * parser/ASTBuilder.h:
5171        (JSC::ASTBuilder::BinaryExprContext::BinaryExprContext):
5172        (JSC::ASTBuilder::UnaryExprContext::UnaryExprContext):
5173        * parser/JSParser.cpp:
5174        (JSC::JSParser::parseAssignmentExpression):
5175        (JSC::JSParser::parseBinaryExpression):
5176        (JSC::JSParser::parseUnaryExpression):
5177        * parser/SyntaxChecker.h:
5178        (JSC::SyntaxChecker::BinaryExprContext::BinaryExprContext):
5179        (JSC::SyntaxChecker::BinaryExprContext::~BinaryExprContext):
5180        (JSC::SyntaxChecker::UnaryExprContext::UnaryExprContext):
5181        (JSC::SyntaxChecker::UnaryExprContext::~UnaryExprContext):
5182        (JSC::SyntaxChecker::appendBinaryExpressionInfo):
5183        (JSC::SyntaxChecker::operatorStackPop):
5184
51852011-01-15  Geoffrey Garen  <ggaren@apple.com>
5186
5187        Reviewed by Oliver Hunt.
5188
5189        Rolled back in r75886.
5190        https://bugs.webkit.org/show_bug.cgi?id=52527
5191        
5192        r75886 broke the GTK Linux bot because Linux was -- quite surprisingly --
5193        set up to use the constants for embedded devices.
5194
5195        * jit/ExecutableAllocatorFixedVMPool.cpp:
5196        (JSC::maybeModifyVMPoolSize): Separated Linux constants from embedded
5197        constants.
5198
51992011-01-15  Sheriff Bot  <webkit.review.bot@gmail.com>
5200
5201        Unreviewed, rolling out r75886.
5202        http://trac.webkit.org/changeset/75886
5203        https://bugs.webkit.org/show_bug.cgi?id=52526
5204
5205        "Broke GTK+ 64bit" (Requested by xan_ on #webkit).
5206
5207        * jit/ExecutableAllocatorFixedVMPool.cpp:
5208
52092011-01-15  Geoffrey Garen  <ggaren@apple.com>
5210
5211        Reviewed by Sam Weinig.
5212
5213        <rdar://problem/8870429> Shrink the executable pool on embedded devices
5214
5215        * jit/ExecutableAllocatorFixedVMPool.cpp: Dropped the pool size from 32MB
5216        to 16MB.
5217
52182011-01-15  Oliver Hunt  <oliver@apple.com>
5219
5220        Reviewed by Maciej Stachowiak.
5221
5222        Incorrect behavior changing attributes of an accessor
5223        https://bugs.webkit.org/show_bug.cgi?id=52515
5224
5225        defineProperty doesn't correctly handle changing attributes of an accessor
5226        property.  This is because we don't pass the full descriptor to the 
5227        putDescriptor helper function, which means we have insufficient information
5228        to do the right thing. Once that's passed the correct behavior is relatively
5229        simple to implement.
5230
5231        * runtime/JSObject.cpp:
5232        (JSC::putDescriptor):
5233        (JSC::JSObject::defineOwnProperty):
5234
52352011-01-14  Oliver Hunt  <oliver@apple.com>
5236
5237        Reviewed by Maciej Stachowiak.
5238
5239        [jsfunfuzz] Incorrect handling of consecutive duplicate labels
5240        https://bugs.webkit.org/show_bug.cgi?id=52505
5241
5242        Compare StringImpl*'s instead of Identifier*'s when looking for duplicate
5243        labels.
5244
5245        * parser/JSParser.cpp:
5246        (JSC::JSParser::parseExpressionOrLabelStatement):
5247
52482011-01-14  Simon Fraser  <simon.fraser@apple.com>
5249
5250        No review.
5251        
5252        Initialize m_operationInProgress after r75855.
5253
5254        * runtime/Heap.cpp:
5255        (JSC::Heap::Heap):
5256
52572011-01-14  Geoffrey Garen  <ggaren@apple.com>
5258
5259        Reverted accidentally committed code from my last checkin.
5260
5261        * runtime/Heap.cpp:
5262        (JSC::Heap::markRoots):
5263
52642011-01-14  Geoffrey Garen  <ggaren@apple.com>
5265
5266        Reviewed by Sam Weinig.
5267        
5268        Try to fix the GTK bot.
5269
5270        * runtime/Heap.cpp:
5271        (JSC::Heap::Heap):
5272        (JSC::Heap::markRoots): Kids, remember to initialize your data members.
5273        Knowing is half the battle.
5274
52752011-01-14  Oliver Hunt  <oliver@apple.com>
5276
5277        Reviewed by Stephanie Lewis.
5278
5279        [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
5280        https://bugs.webkit.org/show_bug.cgi?id=52501
5281
5282        Clear the temporary character buffers used for reading escaped characters and
5283        numbers.
5284
5285        * parser/Lexer.h:
5286        (JSC::Lexer::setOffset):
5287
52882011-01-14  Geoffrey Garen  <ggaren@apple.com>
5289
5290        Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
5291
5292        * runtime/Heap.cpp:
5293
52942011-01-13  Geoffrey Garen  <ggaren@apple.com>
5295
5296        Reviewed by Oliver Hunt.
5297
5298        Split out a MarkedSpace strategy object from Heap.
5299        https://bugs.webkit.org/show_bug.cgi?id=52421
5300        
5301        SunSpider reports no change.
5302
5303        * Android.mk:
5304        * CMakeLists.txt:
5305        * GNUmakefile.am:
5306        * JavaScriptCore.gypi:
5307        * JavaScriptCore.pro:
5308        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5309        * JavaScriptCore.xcodeproj/project.pbxproj: Updated our 7 build systems. Which is cool.
5310
5311        * runtime/Heap.cpp:
5312        (JSC::Heap::Heap):
5313        (JSC::Heap::destroy):
5314        (JSC::Heap::recordExtraCost):
5315        (JSC::Heap::allocate):
5316        (JSC::Heap::markConservatively):
5317        (JSC::Heap::markRoots):
5318        (JSC::Heap::objectCount):
5319        (JSC::Heap::statistics):
5320        (JSC::Heap::size):
5321        (JSC::Heap::isBusy):
5322        (JSC::Heap::collectAllGarbage):
5323        (JSC::Heap::primaryHeapBegin):
5324        (JSC::Heap::primaryHeapEnd):
5325        * runtime/Heap.h:
5326        (JSC::Heap::globalData):
5327        (JSC::Heap::markedSpace):
5328        (JSC::Heap::isCellMarked):
5329        (JSC::Heap::checkMarkCell):
5330        (JSC::Heap::markCell): Moved all code pertaining to managing chunks of
5331        collector memory out of this class. Heap now just delegates to MarkedSpace.
5332
5333        * runtime/JSCell.h:
5334        (JSC::JSCell::Heap::heap): Updated for MarkedSpace delegation.
5335
5336        * runtime/JSValue.h: Moved the ValueStringPair typedef to help with #includes.
5337
5338        * runtime/MarkedSpace.cpp: Copied from runtime/Heap.cpp.
5339        (JSC::MarkedSpace::MarkedSpace):
5340        (JSC::MarkedSpace::destroy):
5341        (JSC::MarkedSpace::allocateBlock):
5342        (JSC::MarkedSpace::freeBlock):
5343        (JSC::MarkedSpace::allocate):
5344        (JSC::MarkedSpace::resizeBlocks):
5345        (JSC::MarkedSpace::growBlocks):
5346        (JSC::MarkedSpace::shrinkBlocks):
5347        (JSC::MarkedSpace::markConservatively):
5348        (JSC::MarkedSpace::clearMarkBits):
5349        (JSC::MarkedSpace::markedCells):
5350        (JSC::MarkedSpace::sweep):
5351        (JSC::MarkedSpace::objectCount):
5352        (JSC::MarkedSpace::addToStatistics):
5353        (JSC::MarkedSpace::statistics):
5354        (JSC::MarkedSpace::size):
5355        (JSC::MarkedSpace::reset):
5356        (JSC::MarkedSpace::primaryHeapBegin):
5357        (JSC::MarkedSpace::primaryHeapEnd):
5358        * runtime/MarkedSpace.h: Copied from runtime/Heap.h.
5359        (JSC::MarkedSpace::globalData):
5360        (JSC::MarkedSpace::didShrink):
5361        (JSC::MarkedSpace::cellBlock):
5362        (JSC::MarkedSpace::cellOffset):
5363        (JSC::MarkedSpace::isCellMarked):
5364        (JSC::MarkedSpace::checkMarkCell):
5365        (JSC::MarkedSpace::markCell): Moved all code pertaining to managing chunks of
5366        collector memory into this class.
5367
5368        * runtime/MemoryStatistics.cpp:
5369        (JSC::heapStatistics):
5370        * runtime/MemoryStatistics.h: Updated for MarkedSpace delegation.
5371
53722011-01-14  Oliver Hunt  <oliver@apple.com>
5373
5374        Reviewed by Gavin Barraclough.
5375
5376        [jsfunfuzz] parser doesn't enforce continue restrictions correctly.
5377        https://bugs.webkit.org/show_bug.cgi?id=52493
5378
5379        This patch reworks handling of break, continue and label statements
5380        to correctly handle all the valid and invalid cases.  Previously certain
5381        errors would be missed by the parser in strict mode, but the bytecode 
5382        generator needed to handle those cases for non-strict code so nothing
5383        failed, it simply became non-standard behaviour.
5384
5385        Now that we treat break and continue errors as early faults in non-strict
5386        mode as well that safety net has been removed so the parser bugs result in
5387        crashes at codegen time.
5388
5389        * parser/JSParser.cpp:
5390        (JSC::JSParser::ScopeLabelInfo::ScopeLabelInfo):
5391        (JSC::JSParser::next):
5392        (JSC::JSParser::nextTokenIsColon):
5393        (JSC::JSParser::continueIsValid):
5394            Continue is only valid in loops so we can't use breakIsValid()
5395        (JSC::JSParser::pushLabel):
5396            We now track whether the label is for a loop (and is therefore a
5397            valid target for continue.
5398        (JSC::JSParser::popLabel):
5399        (JSC::JSParser::getLabel):
5400            Replace hasLabel with getLabel so that we can validate the target
5401            when parsing continue statements.
5402        (JSC::JSParser::Scope::continueIsValid):
5403        (JSC::JSParser::Scope::pushLabel):
5404        (JSC::JSParser::Scope::getLabel):
5405        (JSC::JSParser::JSParser):
5406        (JSC::JSParser::parseBreakStatement):
5407        (JSC::JSParser::parseContinueStatement):
5408        (JSC::LabelInfo::LabelInfo):
5409        (JSC::JSParser::parseExpressionOrLabelStatement):
5410            Consecutive labels now get handled iteratively so that we can determine
5411            whether they're valid targets for continue.
5412        * parser/Lexer.cpp:
5413        (JSC::Lexer::nextTokenIsColon):
5414        * parser/Lexer.h:
5415        (JSC::Lexer::setOffset):
5416
54172011-01-14  Patrick Gansterer  <paroga@webkit.org>
5418
5419        Reviewed by Adam Roben.
5420
5421        Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
5422        https://bugs.webkit.org/show_bug.cgi?id=45186
5423
5424        * wtf/FastMalloc.cpp:
5425        (WTF::TCMalloc_PageHeap::scheduleScavenger): Added missing this pointer to CreateTimerQueueTimer().
5426
54272011-01-14  Patrick Gansterer  <paroga@webkit.org>
5428
5429        Reviewed by Adam Roben.
5430
5431        Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
5432        https://bugs.webkit.org/show_bug.cgi?id=45186
5433
5434        r75819 accidentally changed the initial state of the scavenge timer.
5435
5436        * wtf/FastMalloc.cpp:
5437        (WTF::TCMalloc_PageHeap::initializeScavenger): Changed initial state of m_scavengingSuspended to true.
5438
54392011-01-14  Patrick Gansterer  <paroga@webkit.org>
5440
5441        Unreviewed Windows Release build fix.
5442
5443        * wtf/FastMalloc.cpp:
5444        (WTF::TCMalloc_PageHeap::scavengerTimerFired):
5445
54462011-01-14  Patrick Gansterer  <paroga@webkit.org>
5447
5448        Unreviewed Windows Release build fix.
5449
5450        * wtf/FastMalloc.cpp:
5451        (WTF::TCMalloc_PageHeap::scavengerTimerFired):
5452
54532011-01-14  Patrick Gansterer  <paroga@webkit.org>
5454
5455        Reviewed by Adam Roben.
5456
5457        Use the Windows thread pool instead of an extra thread for FastMalloc scavenging
5458        https://bugs.webkit.org/show_bug.cgi?id=45186
5459
5460        Use CreateTimerQueueTimer() to start periodicScavenge() and stop it with DeleteTimerQueueTimer().
5461
5462        * wtf/FastMalloc.cpp:
5463        (WTF::TCMalloc_PageHeap::initializeScavenger):
5464        (WTF::TCMalloc_PageHeap::isScavengerSuspended):
5465        (WTF::TCMalloc_PageHeap::scheduleScavenger):
5466        (WTF::TCMalloc_PageHeap::rescheduleScavenger):
5467        (WTF::TCMalloc_PageHeap::suspendScavenger):
5468        (WTF::scavengerTimerFired):
5469        (WTF::TCMalloc_PageHeap::periodicScavenge):
5470        (WTF::TCMalloc_PageHeap::signalScavenger):
5471
54722011-01-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5473
5474        Reviewed by Kenneth Rohde Christiansen.
5475
5476        Align import/export directives
5477        https://bugs.webkit.org/show_bug.cgi?id=52208
5478
5479        * API/JSBase.h: Align import/export directives with
5480        WebKit2/Shared/API/c/WKBase.h
5481
54822011-01-14  Michael Saboff  <msaboff@apple.com>
5483
5484        Reviewed by Oliver Hunt.
5485
5486        Incorrect backtracking for nested alternatives
5487        https://bugs.webkit.org/show_bug.cgi?id=52387
5488
5489        In the process of propigating a datalabel it wasn't getting connected
5490        to a destination when the destination was an indirect jump.  Added
5491        code to recognize a direct backtrack destination that was an indirect
5492        jump and added mechanism to associate DataLabelPtrs with indirect
5493        jump entries.
5494        Removed dead method
5495        BacktrackDestination::linkDataLabelToHereIfExists()
5496
5497        * yarr/YarrJIT.cpp:
5498        (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
5499        (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addDataLabel):
5500        (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
5501        (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
5502        Changes to link indirect jumps with DataLabelPtr's.
5503        (JSC::Yarr::YarrGenerator::BacktrackDestination::clearSubDataLabelPtr):
5504        (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists): 
5505        Updated to handle immediate linking of indirect jumps to
5506        DataLabelPtr.
5507        (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction): Changed to
5508        reflect updated linkDataLabelToBacktrackIfExists().
5509
55102011-01-14  Pavel Podivilov  <podivilov@chromium.org>
5511
5512        Reviewed by Yury Semikhatsky.
5513
5514        Web Inspector: provide script column offset to frontend.
5515        https://bugs.webkit.org/show_bug.cgi?id=52377
5516
5517        * parser/SourceCode.h:
5518        (JSC::SourceCode::SourceCode):
5519        (JSC::SourceCode::firstColumn):
5520
55212011-01-13  Darin Adler  <darin@apple.com>
5522
5523        Reviewed by Geoff Garen.
5524
5525        <rdar://problem/5469576> Use __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 if available.
5526
5527        * DerivedSources.make: Create a header file, HeaderDetection.h, that tells
5528        us whether pthread_machdep.h is available.
5529        * wtf/FastMalloc.cpp: If __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is available, then
5530        don't do the pthread_getspecific_function_pointer trick.
5531        (WTF::setThreadHeap): Ditto, but set thread-specific data.
5532        (WTF::TCMalloc_ThreadCache::GetThreadHeap): Ditto, but get rather than set.
5533
55342011-01-13  Xan Lopez  <xlopez@igalia.com>
5535
5536        Reviewed by Gavin Barraclough.
5537
5538        JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
5539        https://bugs.webkit.org/show_bug.cgi?id=42756
5540
5541        The FixedVMPool Allocator does not work well on systems where
5542        allocating very large amounts of memory upfront is not reasonable,
5543        like Linux without overcommit enabled. As a workaround, on Linux,
5544        default to the values used in embedded environments (in the MB
5545        range), and only jump to the GB range if we detect at runtime that
5546        overcommit is enabled. Should fix crashes on Linux/x86_64 with
5547        less than 3 or 4GB of RAM.
5548
5549        * jit/ExecutableAllocatorFixedVMPool.cpp:
5550        (JSC::FixedVMPoolAllocator::free): use new variables for VM pool
5551        size and coalesce limit.
5552        (JSC::ExecutableAllocator::isValid): swap the variables from
5553        embedded to generic values at runtime, on linux, if overcommit is
5554        enabled.
5555        (JSC::ExecutableAllocator::underMemoryPressure): use new variables
5556        for VM pool size and coalesce limit.
5557
55582011-01-12  Xan Lopez  <xlopez@igalia.com>
5559
5560        Reviewed by Martin Robinson.
5561
5562        Add new Yarr.h header to the list file.
5563
5564        * GNUmakefile.am: ditto.
5565
55662011-01-12  Martin Robinson  <mrobinson@igalia.com>
5567
5568        Missing Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h in WebKitGtk tarball
5569        https://bugs.webkit.org/show_bug.cgi?id=52299
5570
5571        * GNUmakefile.am: Fix the GTK+ build on ARMv7 by including missing source
5572        files in the source list.
5573
55742011-01-12  Peter Varga  <pvarga@webkit.org>
5575
5576        Reviewed by Gavin Barraclough.
5577
5578        Add Yarr.h to YARR
5579        https://bugs.webkit.org/show_bug.cgi?id=51021
5580
5581        Move other common constants and functions from YARR's different files
5582        to Yarr.h.
5583        Use Yarr.h header instead of including other YARR headers where it
5584        is possible.
5585
5586        * JavaScriptCore.gypi:
5587        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5588        * JavaScriptCore.xcodeproj/project.pbxproj:
5589        * runtime/RegExp.cpp:
5590        * yarr/Yarr.h: Added.
5591        * yarr/YarrInterpreter.cpp:
5592        * yarr/YarrInterpreter.h:
5593        * yarr/YarrJIT.cpp:
5594        (JSC::Yarr::jitCompile):
5595        (JSC::Yarr::execute):
5596        * yarr/YarrJIT.h:
5597        * yarr/YarrParser.h:
5598        * yarr/YarrPattern.cpp:
5599        (JSC::Yarr::YarrPattern::compile):
5600        (JSC::Yarr::YarrPattern::YarrPattern):
5601        * yarr/YarrPattern.h:
5602
56032011-01-12  Sheriff Bot  <webkit.review.bot@gmail.com>
5604
5605        Unreviewed, rolling out r75595.
5606        http://trac.webkit.org/changeset/75595
5607        https://bugs.webkit.org/show_bug.cgi?id=52286
5608
5609        It broke fast/regex/pcre-test-1.html (Requested by Ossy on
5610        #webkit).
5611
5612        * JavaScriptCore.gypi:
5613        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5614        * JavaScriptCore.xcodeproj/project.pbxproj:
5615        * runtime/RegExp.cpp:
5616        * yarr/Yarr.h: Removed.
5617        * yarr/YarrInterpreter.cpp:
5618        * yarr/YarrInterpreter.h:
5619        * yarr/YarrJIT.cpp:
5620        (JSC::Yarr::jitCompile):
5621        * yarr/YarrJIT.h:
5622        (JSC::Yarr::execute):
5623        * yarr/YarrParser.h:
5624        * yarr/YarrPattern.cpp:
5625        (JSC::Yarr::compile):
5626        (JSC::Yarr::YarrPattern::YarrPattern):
5627        * yarr/YarrPattern.h:
5628
56292011-01-12  Peter Varga  <pvarga@webkit.org>
5630
5631        Reviewed by Gavin Barraclough.
5632
5633        Add Yarr.h to YARR
5634        https://bugs.webkit.org/show_bug.cgi?id=51021
5635
5636        Move other common constants and functions from YARR's different files
5637        to Yarr.h.
5638        Use Yarr.h header instead of including other YARR headers where it
5639        is possible.
5640
5641        * JavaScriptCore.gypi:
5642        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5643        * JavaScriptCore.xcodeproj/project.pbxproj:
5644        * runtime/RegExp.cpp:
5645        * yarr/Yarr.h: Added.
5646        * yarr/YarrInterpreter.cpp:
5647        * yarr/YarrInterpreter.h:
5648        * yarr/YarrJIT.cpp:
5649        (JSC::Yarr::jitCompile):
5650        (JSC::Yarr::execute):
5651        * yarr/YarrJIT.h:
5652        * yarr/YarrParser.h:
5653        * yarr/YarrPattern.cpp:
5654        (JSC::Yarr::YarrPattern::compile):
5655        (JSC::Yarr::YarrPattern::YarrPattern):
5656        * yarr/YarrPattern.h:
5657
56582011-01-11  Michael Saboff  <msaboff@apple.com>
5659
5660        Reviewed by Geoffrey Garen.
5661
5662        Missing call to popTempSortVector() for exception case in JSArray::sort.
5663        https://bugs.webkit.org/show_bug.cgi?id=50718
5664
5665        Fix to patch of 50718 that added pushTempSortVector() and 
5666        popTempSortVector() to JSArray::sort() to mark elements during sort.
5667        Need to add popTempSortVector() for the return case if toString()
5668        had an exception.
5669
5670        * runtime/JSArray.cpp:
5671        (JSC::JSArray::sort): Added popTempSortVector()
5672
56732011-01-11  Xan Lopez  <xlopez@igalia.com>
5674
5675        Reviewed by Darin Adler.
5676
5677        Microoptimization in ~JSString
5678        https://bugs.webkit.org/show_bug.cgi?id=52222
5679
5680        The case where m_fibers is 0 seems to be the most common one
5681        (almost 1/2 of the time, followed at some distance by m_fibers = 1
5682        in 1/4 of the cases in a typical SunSpider execution). We can save
5683        one comparison in this common case by doing a bit of refactoring
5684        in the JSString destructor; overall a 0.3% progression, but only
5685        the string tests show improvement.
5686
5687        * runtime/JSString.h:
5688        (JSC::RopeBuilder::~JSString):
5689
56902011-01-10  Michael Saboff  <msaboff@apple.com>
5691
5692        Reviewed by Geoffrey Garen.
5693
5694        ASSERTION Failure in JSC::binaryChop
5695        https://bugs.webkit.org/show_bug.cgi?id=25614
5696
5697        Changed JITStubs::cti_register_file_check() to use the current stack's
5698        return PC to find the bytecode for handling the exception in the prior
5699        frame.  Also added the appropriate arrity check routine call to the
5700        JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
5701
5702        * jit/JIT.cpp:
5703        (JSC::JIT::privateCompile): Changed the arrity check call location
5704        so that it gets added to the m_calls list so that it's included in
5705        CodeBlock::m_callReturnIndexVector.
5706        * jit/JITStubs.cpp:
5707        (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
5708
57092011-01-10  Daniel Bates  <dbates@rim.com>
5710
5711        Reviewed by Martin Robinson.
5712
5713        Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
5714        https://bugs.webkit.org/show_bug.cgi?id=52178
5715
5716        It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
5717        GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
5718        are not compiling with GCC.
5719
5720        Fixes style issues at the callsites (i.e. replace comma with comma-space in
5721        macro function argument list). Also, makes a spelling correction in a comment.
5722
5723        * jit/ExecutableAllocator.h:
5724        (JSC::ExecutableAllocator::cacheFlush):
5725        * wtf/Platform.h:
5726
57272011-01-10  Geoffrey Garen  <ggaren@apple.com>
5728
5729        Build fix: removed some uses of nextNumber that I missed last time.
5730
5731        * runtime/Heap.cpp:
5732        (JSC::Heap::reset):
5733        (JSC::Heap::collectAllGarbage):
5734
57352011-01-10  Daniel Bates  <dbates@rim.com>
5736
5737        Reviewed by Darin Adler.
5738
5739        Use __builtin_expect when compiling using RVCT in GNU mode
5740        https://bugs.webkit.org/show_bug.cgi?id=51866
5741
5742        We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
5743        as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
5744
5745        * wtf/AlwaysInline.h:
5746        * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
5747        function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
5748        version.
5749
57502011-01-10  Geoffrey Garen  <ggaren@apple.com>
5751
5752        Reviewed by Oliver Hunt.
5753
5754        Moved Collector.* => Heap.*, since the file contains a class named "Heap".
5755
5756        * API/JSCallbackObject.cpp:
5757        * Android.mk:
5758        * CMakeLists.txt:
5759        * GNUmakefile.am:
5760        * JavaScriptCore.gypi:
5761        * JavaScriptCore.pro:
5762        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
5763        * JavaScriptCore.xcodeproj/project.pbxproj:
5764        * interpreter/Interpreter.cpp:
5765        * interpreter/RegisterFile.h:
5766        * jit/JITStubs.cpp:
5767        * runtime/Collector.cpp: Removed.
5768        * runtime/Collector.h: Removed.
5769        * runtime/CollectorHeapIterator.h:
5770        * runtime/GCActivityCallbackCF.cpp:
5771        * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
5772        * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
5773        * runtime/InitializeThreading.cpp:
5774        * runtime/JSCell.h:
5775        * runtime/JSGlobalData.cpp:
5776        * runtime/JSGlobalData.h:
5777        * runtime/JSLock.cpp:
5778        * runtime/JSNumberCell.h:
5779        * runtime/MachineStackMarker.cpp:
5780        * runtime/MemoryStatistics.h:
5781        * runtime/Protect.h:
5782        * runtime/UString.cpp:
5783        * runtime/WeakGCMap.h:
5784        * runtime/WeakGCPtr.h:
5785
57862011-01-10  Xan Lopez  <xlopez@igalia.com>
5787
5788        Reviewed by Gavin Barraclough.
5789
5790        Remove unused isString() case in JSString::toPrimitiveString()
5791        https://bugs.webkit.org/show_bug.cgi?id=52167
5792
5793        We never call toPrimitiveString() with strings, so remove the
5794        check and add an ASSERT ensuring this never happens. 0.7% overall
5795        progression in sunspider, since one of the call sites is very hot.
5796
5797        * runtime/JSString.h:
5798        (JSC::JSValue::toPrimitiveString):
5799
58002011-01-10  Peter Varga  <pvarga@inf.u-szeged.hu>
5801
5802        Reviewed by Gavin Barraclough.
5803
5804        Rename the existing YARR files and classes
5805        https://bugs.webkit.org/show_bug.cgi?id=51872
5806
5807        Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
5808
5809        * Android.mk:
5810        * CMakeLists.txt:
5811        * GNUmakefile.am:
5812        * JavaScriptCore.gypi:
5813        * JavaScriptCore.pro:
5814        * JavaScriptCore.xcodeproj/project.pbxproj:
5815        * runtime/RegExp.cpp:
5816        (JSC::RegExp::compile):
5817        (JSC::RegExp::match):
5818        (JSC::RegExp::printTraceData):
5819        * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
5820        (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
5821        (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
5822        (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
5823        (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
5824        (JSC::Yarr::Interpreter::allocDisjunctionContext):
5825        (JSC::Yarr::Interpreter::freeDisjunctionContext):
5826        (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
5827        (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
5828        (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
5829        (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
5830        (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
5831        (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
5832        (JSC::Yarr::Interpreter::InputStream::InputStream):
5833        (JSC::Yarr::Interpreter::InputStream::next):
5834        (JSC::Yarr::Interpreter::InputStream::rewind):
5835        (JSC::Yarr::Interpreter::InputStream::read):
5836        (JSC::Yarr::Interpreter::InputStream::readPair):
5837        (JSC::Yarr::Interpreter::InputStream::readChecked):
5838        (JSC::Yarr::Interpreter::InputStream::reread):
5839        (JSC::Yarr::Interpreter::InputStream::prev):
5840        (JSC::Yarr::Interpreter::InputStream::getPos):
5841        (JSC::Yarr::Interpreter::InputStream::setPos):
5842        (JSC::Yarr::Interpreter::InputStream::atStart):
5843        (JSC::Yarr::Interpreter::InputStream::atEnd):
5844        (JSC::Yarr::Interpreter::InputStream::checkInput):
5845        (JSC::Yarr::Interpreter::InputStream::uncheckInput):
5846        (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
5847        (JSC::Yarr::Interpreter::testCharacterClass):
5848        (JSC::Yarr::Interpreter::checkCharacter):
5849        (JSC::Yarr::Interpreter::checkCasedCharacter):
5850        (JSC::Yarr::Interpreter::checkCharacterClass):
5851        (JSC::Yarr::Interpreter::tryConsumeBackReference):
5852        (JSC::Yarr::Interpreter::matchAssertionBOL):
5853        (JSC::Yarr::Interpreter::matchAssertionEOL):
5854        (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
5855        (JSC::Yarr::Interpreter::backtrackPatternCharacter):
5856        (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
5857        (JSC::Yarr::Interpreter::matchCharacterClass):
5858        (JSC::Yarr::Interpreter::backtrackCharacterClass):
5859        (JSC::Yarr::Interpreter::matchBackReference):
5860        (JSC::Yarr::Interpreter::backtrackBackReference):
5861        (JSC::Yarr::Interpreter::recordParenthesesMatch):
5862        (JSC::Yarr::Interpreter::resetMatches):
5863        (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
5864        (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
5865        (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
5866        (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
5867        (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
5868        (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
5869        (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
5870        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
5871        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
5872        (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
5873        (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
5874        (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
5875        (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
5876        (JSC::Yarr::Interpreter::matchParentheses):
5877        (JSC::Yarr::Interpreter::backtrackParentheses):
5878        (JSC::Yarr::Interpreter::lookupForBeginChars):
5879        (JSC::Yarr::Interpreter::matchDisjunction):
5880        (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
5881        (JSC::Yarr::Interpreter::interpret):
5882        (JSC::Yarr::Interpreter::Interpreter):
5883        (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
5884        (JSC::Yarr::ByteCompiler::ByteCompiler):
5885        (JSC::Yarr::ByteCompiler::compile):
5886        (JSC::Yarr::ByteCompiler::checkInput):
5887        (JSC::Yarr::ByteCompiler::assertionBOL):
5888        (JSC::Yarr::ByteCompiler::assertionEOL):
5889        (JSC::Yarr::ByteCompiler::assertionWordBoundary):
5890        (JSC::Yarr::ByteCompiler::atomPatternCharacter):
5891        (JSC::Yarr::ByteCompiler::atomCharacterClass):
5892        (JSC::Yarr::ByteCompiler::atomBackReference):
5893        (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
5894        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
5895        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
5896        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
5897        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
5898        (JSC::Yarr::ByteCompiler::popParenthesesStack):
5899        (JSC::Yarr::ByteCompiler::dumpDisjunction):
5900        (JSC::Yarr::ByteCompiler::closeAlternative):
5901        (JSC::Yarr::ByteCompiler::closeBodyAlternative):
5902        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
5903        (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
5904        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
5905        (JSC::Yarr::ByteCompiler::regexBegin):
5906        (JSC::Yarr::ByteCompiler::regexEnd):
5907        (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
5908        (JSC::Yarr::ByteCompiler::alternativeDisjunction):
5909        (JSC::Yarr::ByteCompiler::emitDisjunction):
5910        (JSC::Yarr::byteCompile):
5911        (JSC::Yarr::interpret):
5912        * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
5913        (JSC::Yarr::ByteTerm::ByteTerm):
5914        (JSC::Yarr::ByteTerm::BOL):
5915        (JSC::Yarr::ByteTerm::CheckInput):
5916        (JSC::Yarr::ByteTerm::EOL):
5917        (JSC::Yarr::ByteTerm::WordBoundary):
5918        (JSC::Yarr::ByteTerm::BackReference):
5919        (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
5920        (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
5921        (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
5922        (JSC::Yarr::ByteTerm::AlternativeBegin):
5923        (JSC::Yarr::ByteTerm::AlternativeDisjunction):
5924        (JSC::Yarr::ByteTerm::AlternativeEnd):
5925        (JSC::Yarr::ByteTerm::SubpatternBegin):
5926        (JSC::Yarr::ByteTerm::SubpatternEnd):
5927        (JSC::Yarr::ByteTerm::invert):
5928        (JSC::Yarr::ByteTerm::capture):
5929        (JSC::Yarr::ByteDisjunction::ByteDisjunction):
5930        (JSC::Yarr::BytecodePattern::BytecodePattern):
5931        (JSC::Yarr::BytecodePattern::~BytecodePattern):
5932        * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
5933        (JSC::Yarr::YarrGenerator::optimizeAlternative):
5934        (JSC::Yarr::YarrGenerator::matchCharacterClassRange):
5935        (JSC::Yarr::YarrGenerator::matchCharacterClass):
5936        (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
5937        (JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
5938        (JSC::Yarr::YarrGenerator::checkInput):
5939        (JSC::Yarr::YarrGenerator::atEndOfInput):
5940        (JSC::Yarr::YarrGenerator::notAtEndOfInput):
5941        (JSC::Yarr::YarrGenerator::jumpIfCharEquals):
5942        (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
5943        (JSC::Yarr::YarrGenerator::readCharacter):
5944        (JSC::Yarr::YarrGenerator::storeToFrame):
5945        (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
5946        (JSC::Yarr::YarrGenerator::loadFromFrame):
5947        (JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
5948        (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
5949        (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
5950        (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
5951        (JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
5952        (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
5953        (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
5954        (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
5955        (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
5956        (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
5957        (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
5958        (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
5959        (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
5960        (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
5961        (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
5962        (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
5963        (JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
5964        (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
5965        (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
5966        (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
5967        (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
5968        (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
5969        (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
5970        (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
5971        (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
5972        (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
5973        (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
5974        (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
5975        (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
5976        (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
5977        (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
5978        (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
5979        (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
5980        (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
5981        (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
5982        (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
5983        (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
5984        (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
5985        (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
5986        (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
5987        (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
5988        (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
5989        (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
5990        (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
5991        (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
5992        (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
5993        (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
5994        (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
5995        (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
5996        (JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
5997        (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
5998        (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
5999        (JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
6000        (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
6001        (JSC::Yarr::YarrGenerator::TermGenerationState::term):
6002        (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
6003        (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
6004        (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
6005        (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
6006        (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
6007        (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
6008        (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
6009        (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
6010        (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
6011        (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
6012        (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
6013        (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
6014        (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
6015        (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
6016        (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
6017        (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
6018        (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
6019        (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
6020        (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
6021        (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
6022        (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
6023        (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
6024        (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
6025        (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
6026        (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
6027        (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
6028        (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
6029        (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
6030        (JSC::Yarr::YarrGenerator::generateAssertionBOL):
6031        (JSC::Yarr::YarrGenerator::generateAssertionEOL):
6032        (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
6033        (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
6034        (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
6035        (JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
6036        (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
6037        (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
6038        (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
6039        (JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
6040        (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
6041        (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
6042        (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
6043        (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
6044        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
6045        (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
6046        (JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
6047        (JSC::Yarr::YarrGenerator::generateTerm):
6048        (JSC::Yarr::YarrGenerator::generateDisjunction):
6049        (JSC::Yarr::YarrGenerator::generateEnter):
6050        (JSC::Yarr::YarrGenerator::generateReturn):
6051        (JSC::Yarr::YarrGenerator::YarrGenerator):
6052        (JSC::Yarr::YarrGenerator::generate):
6053        (JSC::Yarr::YarrGenerator::compile):
6054        (JSC::Yarr::jitCompile):
6055        * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
6056        (JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
6057        (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
6058        (JSC::Yarr::YarrCodeBlock::setFallBack):
6059        (JSC::Yarr::YarrCodeBlock::isFallBack):
6060        (JSC::Yarr::YarrCodeBlock::set):
6061        (JSC::Yarr::YarrCodeBlock::execute):
6062        (JSC::Yarr::YarrCodeBlock::getAddr):
6063        (JSC::Yarr::execute):
6064        * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
6065        (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
6066        (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
6067        (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
6068        (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
6069        (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
6070        (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
6071        (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
6072        (JSC::Yarr::Parser::Parser):
6073        (JSC::Yarr::Parser::parseEscape):
6074        (JSC::Yarr::Parser::parseAtomEscape):
6075        (JSC::Yarr::Parser::parseCharacterClassEscape):
6076        (JSC::Yarr::Parser::parseCharacterClass):
6077        (JSC::Yarr::Parser::parseParenthesesBegin):
6078        (JSC::Yarr::Parser::parseParenthesesEnd):
6079        (JSC::Yarr::Parser::parseQuantifier):
6080        (JSC::Yarr::Parser::parseTokens):
6081        (JSC::Yarr::Parser::parse):
6082        (JSC::Yarr::Parser::saveState):
6083        (JSC::Yarr::Parser::restoreState):
6084        (JSC::Yarr::Parser::atEndOfPattern):
6085        (JSC::Yarr::Parser::peek):
6086        (JSC::Yarr::Parser::peekIsDigit):
6087        (JSC::Yarr::Parser::peekDigit):
6088        (JSC::Yarr::Parser::consume):
6089        (JSC::Yarr::Parser::consumeDigit):
6090        (JSC::Yarr::Parser::consumeNumber):
6091        (JSC::Yarr::Parser::consumeOctal):
6092        (JSC::Yarr::Parser::tryConsume):
6093        (JSC::Yarr::Parser::tryConsumeHex):
6094        (JSC::Yarr::parse):
6095        * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
6096        (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
6097        (JSC::Yarr::CharacterClassConstructor::reset):
6098        (JSC::Yarr::CharacterClassConstructor::append):
6099        (JSC::Yarr::CharacterClassConstructor::putChar):
6100        (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
6101        (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
6102        (JSC::Yarr::CharacterClassConstructor::putRange):
6103        (JSC::Yarr::CharacterClassConstructor::charClass):
6104        (JSC::Yarr::CharacterClassConstructor::addSorted):
6105        (JSC::Yarr::CharacterClassConstructor::addSortedRange):
6106        (JSC::Yarr::BeginCharHelper::BeginCharHelper):
6107        (JSC::Yarr::BeginCharHelper::addBeginChar):
6108        (JSC::Yarr::BeginCharHelper::merge):
6109        (JSC::Yarr::BeginCharHelper::addCharacter):
6110        (JSC::Yarr::BeginCharHelper::linkHotTerms):
6111        (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
6112        (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
6113        (JSC::Yarr::YarrPatternConstructor::reset):
6114        (JSC::Yarr::YarrPatternConstructor::assertionBOL):
6115        (JSC::Yarr::YarrPatternConstructor::assertionEOL):
6116        (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
6117        (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
6118        (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
6119        (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
6120        (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
6121        (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
6122        (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
6123        (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
6124        (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
6125        (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
6126        (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
6127        (JSC::Yarr::YarrPatternConstructor::atomBackReference):
6128        (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
6129        (JSC::Yarr::YarrPatternConstructor::copyTerm):
6130        (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
6131        (JSC::Yarr::YarrPatternConstructor::disjunction):
6132        (JSC::Yarr::YarrPatternConstructor::regexBegin):
6133        (JSC::Yarr::YarrPatternConstructor::regexEnd):
6134        (JSC::Yarr::YarrPatternConstructor::regexError):
6135        (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
6136        (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
6137        (JSC::Yarr::YarrPatternConstructor::setupOffsets):
6138        (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
6139        (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
6140        (JSC::Yarr::YarrPatternConstructor::addBeginTerm):
6141        (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
6142        (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
6143        (JSC::Yarr::YarrPatternConstructor::setupBeginChars):
6144        (JSC::Yarr::compile):
6145        (JSC::Yarr::YarrPattern::YarrPattern):
6146        * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
6147        (JSC::Yarr::CharacterRange::CharacterRange):
6148        (JSC::Yarr::CharacterClassTable::create):
6149        (JSC::Yarr::CharacterClassTable::CharacterClassTable):
6150        (JSC::Yarr::CharacterClass::CharacterClass):
6151        (JSC::Yarr::PatternTerm::PatternTerm):
6152        (JSC::Yarr::PatternTerm::ForwardReference):
6153        (JSC::Yarr::PatternTerm::BOL):
6154        (JSC::Yarr::PatternTerm::EOL):
6155        (JSC::Yarr::PatternTerm::WordBoundary):
6156        (JSC::Yarr::PatternTerm::invert):
6157        (JSC::Yarr::PatternTerm::capture):
6158        (JSC::Yarr::PatternTerm::quantify):
6159        (JSC::Yarr::PatternAlternative::PatternAlternative):
6160        (JSC::Yarr::PatternAlternative::lastTerm):
6161        (JSC::Yarr::PatternAlternative::removeLastTerm):
6162        (JSC::Yarr::PatternAlternative::setOnceThrough):
6163        (JSC::Yarr::PatternAlternative::onceThrough):
6164        (JSC::Yarr::PatternDisjunction::PatternDisjunction):
6165        (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
6166        (JSC::Yarr::PatternDisjunction::addNewAlternative):
6167        (JSC::Yarr::TermChain::TermChain):
6168        (JSC::Yarr::BeginChar::BeginChar):
6169        (JSC::Yarr::YarrPattern::~YarrPattern):
6170        (JSC::Yarr::YarrPattern::reset):
6171        (JSC::Yarr::YarrPattern::containsIllegalBackReference):
6172        (JSC::Yarr::YarrPattern::newlineCharacterClass):
6173        (JSC::Yarr::YarrPattern::digitsCharacterClass):
6174        (JSC::Yarr::YarrPattern::spacesCharacterClass):
6175        (JSC::Yarr::YarrPattern::wordcharCharacterClass):
6176        (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
6177        (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
6178        (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
6179
61802011-01-10  Gavin Barraclough  <barraclough@apple.com>
6181
6182        Windows build fix.
6183
6184        * parser/SyntaxChecker.h:
6185
61862011-01-10  Dave Tapuska  <dtapuska@rim.com>
6187
6188        Reviewed by Gavin Barraclough.
6189
6190        Add CTI ASM versions for RVCT ARM THUMB2 mode.
6191
6192        https://bugs.webkit.org/show_bug.cgi?id=52154
6193
6194        * jit/JITStubs.cpp:
6195        (JSC::ctiTrampoline):
6196        (JSC::ctiVMThrowTrampoline):
6197        (JSC::ctiOpThrowNotCaught):
6198
61992011-01-10  Gavin Barraclough  <barraclough@apple.com>
6200
6201        Qt build fix.
6202
6203        * JavaScriptCore.pro:
6204
62052011-01-10  Gavin Barraclough  <barraclough@apple.com>
6206
6207        Reviewed by Oliver Hunt.
6208
6209        Bug 52079 - Syntax errors should be early errors.
6210
6211        From chapter 16 the spec:
6212            An implementation must report most errors at the time the relevant ECMAScript language construct is
6213            evaluated. An early error is an error that can be detected and reported prior to the evaluation of
6214            any construct in the Program containing the error. An implementation must report early errors in a
6215            Program prior to the first evaluation of that Program. Early errors in eval code are reported at
6216            the time eval is called but prior to evaluation of any construct within the eval code. All errors
6217            that are not early errors are runtime errors.
6218
6219            An implementation must treat any instance of the following kinds of errors as an early error:
6220                * Any syntax error."
6221
6222        * JavaScriptCore.xcodeproj/project.pbxproj:
6223            Added new files.
6224        * bytecode/CodeBlock.cpp:
6225            Removed op_throw_syntax_error.
6226        * bytecode/Opcode.h:
6227            Removed op_throw_syntax_error.
6228        * bytecompiler/BytecodeGenerator.cpp:
6229        (JSC::BytecodeGenerator::generate):
6230            If m_expressionTooDeep then throw a runtime error.
6231        (JSC::BytecodeGenerator::BytecodeGenerator):
6232            Initialize m_expressionTooDeep.
6233        (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
6234            Sets m_expressionTooDeep.
6235        * bytecompiler/BytecodeGenerator.h:
6236            Added m_expressionTooDeep, removed emitThrowSyntaxError.
6237        * bytecompiler/NodesCodegen.cpp:
6238        (JSC::RegExpNode::emitBytecode):
6239        (JSC::ContinueNode::emitBytecode):
6240        (JSC::BreakNode::emitBytecode):
6241        (JSC::ReturnNode::emitBytecode):
6242        (JSC::LabelNode::emitBytecode):
6243            Conditions that threw syntax error are now handled during parsing;
6244            during bytecompilation these are now just ASSERTs.
6245        * interpreter/Interpreter.cpp:
6246        (JSC::Interpreter::privateExecute):
6247        * jit/JIT.cpp:
6248        (JSC::JIT::privateCompileMainPass):
6249        * jit/JIT.h:
6250        * jit/JITOpcodes.cpp:
6251        * jit/JITOpcodes32_64.cpp:
6252        * jit/JITStubs.cpp:
6253        * jit/JITStubs.h:
6254            Removed op_throw_syntax_error.
6255        * parser/ASTBuilder.h:
6256        (JSC::ASTBuilder::createRegExp):
6257            Renamed; added syntax check.
6258        * parser/JSParser.cpp:
6259        (JSC::JSParser::breakIsValid):
6260        (JSC::JSParser::hasLabel):
6261        (JSC::JSParser::Scope::Scope):
6262        (JSC::JSParser::Scope::setIsFunction):
6263        (JSC::JSParser::Scope::isFunctionBoundary):
6264        (JSC::JSParser::ScopeRef::hasContainingScope):
6265        (JSC::JSParser::ScopeRef::containingScope):
6266        (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
6267        (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
6268        (JSC::JSParser::AutoPopScopeRef::setPopped):
6269        (JSC::JSParser::popScopeInternal):
6270        (JSC::JSParser::popScope):
6271        (JSC::jsParse):
6272        (JSC::JSParser::JSParser):
6273        (JSC::JSParser::parseProgram):
6274        (JSC::JSParser::parseBreakStatement):
6275        (JSC::JSParser::parseContinueStatement):
6276        (JSC::JSParser::parseReturnStatement):
6277        (JSC::JSParser::parseTryStatement):
6278        (JSC::JSParser::parseFunctionInfo):
6279        (JSC::JSParser::parseExpressionOrLabelStatement):
6280        (JSC::JSParser::parsePrimaryExpression):
6281        * parser/JSParser.h:
6282        * parser/Nodes.h:
6283        * parser/Parser.cpp:
6284        (JSC::Parser::parse):
6285        * parser/SyntaxChecker.h:
6286        (JSC::SyntaxChecker::createRegExp):
6287            Renamed; added syntax check.
6288        * runtime/ExceptionHelpers.cpp:
6289        (JSC::createOutOfMemoryError):
6290        (JSC::throwOutOfMemoryError):
6291        * runtime/ExceptionHelpers.h:
6292            Broke out createOutOfMemoryError.
6293        * runtime/Executable.cpp:
6294        (JSC::EvalExecutable::compileInternal):
6295        (JSC::ProgramExecutable::compileInternal):
6296        (JSC::FunctionExecutable::compileForCallInternal):
6297        (JSC::FunctionExecutable::compileForConstructInternal):
6298            Add check for exception after bytecode generation.
6299        * runtime/RegExpConstructor.cpp:
6300        (JSC::constructRegExp):
6301        * runtime/RegExpPrototype.cpp:
6302        (JSC::regExpProtoFuncCompile):
6303            RegExp error prefixes not included in error string.
6304        * yarr/RegexParser.h:
6305        (JSC::Yarr::Parser::parse):
6306            Removed regexBegin/regexEnd/regexError.
6307        * yarr/RegexPattern.cpp:
6308        (JSC::Yarr::RegexPatternConstructor::regexBegin):
6309            Removed regexEnd/regexError.
6310        (JSC::Yarr::compileRegex):
6311            Add call to regexBegin (no longer called from the parser).
6312        * yarr/YarrSyntaxChecker.cpp: Added.
6313        (JSC::Yarr::SyntaxChecker::assertionBOL):
6314        (JSC::Yarr::SyntaxChecker::assertionEOL):
6315        (JSC::Yarr::SyntaxChecker::assertionWordBoundary):
6316        (JSC::Yarr::SyntaxChecker::atomPatternCharacter):
6317        (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
6318        (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
6319        (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
6320        (JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
6321        (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
6322        (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
6323        (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
6324        (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
6325        (JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
6326        (JSC::Yarr::SyntaxChecker::atomBackReference):
6327        (JSC::Yarr::SyntaxChecker::quantifyAtom):
6328        (JSC::Yarr::SyntaxChecker::disjunction):
6329        (JSC::Yarr::checkSyntax):
6330        * yarr/YarrSyntaxChecker.h: Added.
6331            Check RegExp syntax.
6332
63332011-01-10  Adam Roben  <aroben@apple.com>
6334
6335        Roll out r75289
6336
6337        It was causing assertion failures. See <http://webkit.org/b/52156>.
6338
6339        * wtf/StackBounds.cpp:
6340        (WTF::StackBounds::initialize):
6341
63422011-01-08  Patrick Gansterer  <paroga@webkit.org>
6343
6344        Reviewed by Darin Adler.
6345
6346        Unify string table adding in AtomicString
6347        https://bugs.webkit.org/show_bug.cgi?id=51927
6348
6349        Move code for adding a string into a separate function.
6350        This removes multiple occurrence of the same logic.
6351
6352        * wtf/text/AtomicString.cpp:
6353        (WTF::addToStringTable): Added.
6354        (WTF::AtomicString::add): Use addToStringTable().
6355        (WTF::AtomicString::fromUTF8): Ditto.
6356
63572011-01-07  Geoffrey Garen  <ggaren@apple.com>
6358
6359        Reviewed by Gavin Barraclough.
6360
6361        Split machine stack marking functions into their own class (MachineStackMarker)
6362        https://bugs.webkit.org/show_bug.cgi?id=52088
6363
6364        * API/APIShims.h:
6365        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
6366        call behind an #ifdef because we shouldn't be registering threads at all
6367        if we don't support usage on multiple threads.
6368
6369        * Android.mk:
6370        * CMakeLists.txt:
6371        * GNUmakefile.am:
6372        * JavaScriptCore.gypi:
6373        * JavaScriptCore.pro:
6374        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
6375        * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
6376
6377        * runtime/Collector.cpp:
6378        (JSC::Heap::Heap):
6379        (JSC::Heap::destroy):
6380        (JSC::Heap::markRoots):
6381        * runtime/Collector.h:
6382        (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
6383
6384        * runtime/JSGlobalData.h:
6385        (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
6386        level of indirection, to make Heap less of a God class.
6387
6388        * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
6389        * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
6390        (JSC::MachineStackMarker::MachineStackMarker):
6391        (JSC::MachineStackMarker::~MachineStackMarker):
6392        (JSC::MachineStackMarker::makeUsableFromMultipleThreads):
6393        (JSC::MachineStackMarker::registerThread):
6394        (JSC::MachineStackMarker::unregisterThread):
6395        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
6396        (JSC::MachineStackMarker::markCurrentThreadConservatively):
6397        (JSC::MachineStackMarker::markOtherThreadConservatively):
6398        (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
6399
64002011-01-07  Gavin Barraclough  <barraclough@apple.com>
6401
6402        Reviewed by Geoff Garen.
6403
6404        Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
6405
6406        Fix for win32.  The base of the stack is stored in the "deallocation stack" field of the
6407        Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
6408        for more information!
6409
6410        * wtf/StackBounds.cpp:
6411        (WTF::StackBounds::initialize):
6412
64132011-01-07  Adam Roben  <aroben@apple.com>
6414
6415        Update react-to-vsprops-changes.py after r74855
6416
6417        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
6418
64192011-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>
6420
6421        Reviewed by Martin Robinson.
6422
6423        [GTK] Port scrollbar painting to GtkStyleContext
6424        https://bugs.webkit.org/show_bug.cgi?id=52051
6425
6426        * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
6427        declaration.
6428
64292011-01-07  Daniel Bates  <dbates@rim.com>
6430
6431        Reviewed by Martin Robinson.
6432
6433        Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
6434        https://bugs.webkit.org/show_bug.cgi?id=52034
6435
6436        Derived from a patch by Eli Fidler.
6437
6438        RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
6439        as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
6440
6441        * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
6442        of hardcoding the GCC compiler.
6443        * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
6444
64452011-01-06  Gavin Barraclough  <barraclough@apple.com>
6446
6447        Reviewed by Geoff Garen.
6448
6449        Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
6450
6451        The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
6452        destructor early, in order to release wrappers once we know we no longer intend to use them.
6453        Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
6454        lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
6455        A sequence of events that triggers the bug would look like this:
6456
6457        (1) Create a DOMWrapperWorld.
6458        (2) Register a timer in the world.
6459        (3) Call unregisterWorld() on the world.
6460        (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
6461        (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
6462            called forgetWorld() none exists.
6463        (6) Attempt to add a wrapper to a NULL map.
6464
6465        Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
6466
6467        * runtime/WeakGCMap.h:
6468        (JSC::WeakGCMap::clear):
6469
64702011-01-06  Gavin Barraclough  <barraclough@apple.com>
6471
6472        Reviewed by Darin Adler.
6473
6474        Bug 52021 - zeroDouble broken on ARMv7
6475
6476        The bug here is that zeroDouble was working incorrectly,
6477        leading to op_loop_if_true failing - specifically in the
6478        case where the value being checked is 0.0 encoded as a
6479        double (rather than an integer immediate).
6480
6481        Additionally this patch removes a redundant duplicate compare
6482        in some (many) case.
6483
6484        * assembler/ARMv7Assembler.h:
6485        (JSC::ARMv7Assembler::vcmp_F64):
6486        (JSC::ARMv7Assembler::vcmpz_F64):
6487        * assembler/MacroAssemblerARM.h:
6488        (JSC::MacroAssemblerARM::branchDoubleNonZero):
6489        (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
6490        * assembler/MacroAssemblerARMv7.h:
6491        (JSC::MacroAssemblerARMv7::branchDouble):
6492        (JSC::MacroAssemblerARMv7::branchDoubleNonZero):
6493        (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
6494        (JSC::MacroAssemblerARMv7::compare32):
6495        * assembler/MacroAssemblerMIPS.h:
6496        (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
6497        (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
6498        * assembler/MacroAssemblerX86Common.h:
6499        (JSC::MacroAssemblerX86Common::branchDoubleNonZero):
6500        (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
6501        * jit/JITOpcodes32_64.cpp:
6502        (JSC::JIT::emit_op_jfalse):
6503        (JSC::JIT::emit_op_jtrue):
6504
65052011-01-06  Michael Saboff  <msaboff@apple.com>
6506
6507        Reviewed by Gavin Barraclough.
6508
6509        Added debug code to compare the results of JIT regexp with 
6510        interpreted regexp and displays discrepencies.  This debug code is
6511        controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
6512        is only valid if ENABLE_YARR_JIT is enabled.
6513
6514        Fixed a discovered problem in RegExp::printTraceData, changing
6515        m_pattern to the getter pattern().
6516        Also deleted an extraneous semicolon.
6517
6518        Enhancement: Add Regexp Debug Compare between JIT and Interpreter
6519        https://bugs.webkit.org/show_bug.cgi?id=51834
6520
6521        * runtime/RegExp.cpp:
6522        (JSC::RegExp::compile):
6523        (JSC::RegExp::match):
6524        (JSC::RegExp::printTraceData):
6525        * wtf/Platform.h:
6526
65272011-01-06  Patrick Gansterer  <paroga@webkit.org>
6528
6529        Reviewed by Eric Seidel.
6530
6531        [WINCE] Remove JSC::g_stackBase
6532        https://bugs.webkit.org/show_bug.cgi?id=51779
6533
6534        * wtf/StackBounds.cpp:
6535
65362011-01-06  Joone Hur  <joone.hur@collabora.co.uk>
6537
6538        Reviewed by Eric Seidel.
6539
6540        WML Parser should treat line/column number in a consistent way
6541        https://bugs.webkit.org/show_bug.cgi?id=51601
6542
6543        Add the equality operators to TextPosition class.
6544
6545        * wtf/text/TextPosition.h:
6546        (WTF::TextPosition::operator==): Added.
6547        (WTF::TextPosition::operator!=): Added.
6548        (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
6549        (WTF::ZeroBasedNumber::operator==): Added.
6550        (WTF::ZeroBasedNumber::operator!=): Added.
6551        (WTF::OneBasedNumber::operator==): Added.
6552        (WTF::OneBasedNumber::operator!=): Added.
6553
65542011-01-06  Patrick Gansterer  <paroga@webkit.org>
6555
6556        Reviewed by Gavin Barraclough.
6557
6558        [WINCE] Determine stack extent
6559        https://bugs.webkit.org/show_bug.cgi?id=26276
6560
6561        Scan the stack for writeable pages and use the limits.
6562
6563        * wtf/StackBounds.cpp:
6564        (WTF::detectGrowingDownward):
6565        (WTF::isPageWritable):
6566        (WTF::getLowerStackBound):
6567        (WTF::getUpperStackBound):
6568        (WTF::StackBounds::initialize):
6569
65702011-01-05  Steve Falkenburg  <sfalken@apple.com>
6571
6572        Windows build fix.
6573
6574        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
6575
65762011-01-05  Steve Falkenburg  <sfalken@apple.com>
6577
6578        Reviewed by Darin Adler.
6579
6580        Debug and Release builds on Windows clobber each other
6581        https://bugs.webkit.org/show_bug.cgi?id=49185
6582        
6583        Changes the structure of WebKitBuild build products directory so we
6584        completely separate each build configuration into independent directories.
6585        
6586        Although we previously had per-configuration directories for obj, this change adds
6587        per-configuration directories for bin, lib, obj, and include. Each configuration's
6588        build products are stored within a directory inside of WebKitBuild.
6589        
6590        Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
6591        defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
6592        
6593        For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
6594        for proper operation of the instrumentation/optimization scripts.
6595
6596        * JavaScriptCore.vcproj/JavaScriptCore.make:
6597        * JavaScriptCore.vcproj/JavaScriptCore.sln:
6598        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
6599        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
6600        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
6601        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
6602        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
6603        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
6604        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
6605        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
6606        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
6607        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
6608        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
6609        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
6610        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
6611        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
6612        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
6613        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
6614        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
6615        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
6616        * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
6617        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
6618        * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
6619        * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
6620
66212011-01-05  Brent Fulgham  <bfulgham@webkit.org>
6622
6623        Unreviewed build fix.
6624
6625        * wtf/Encoder.h: Add <stdint.h> include for systems that
6626        do not natively know about uint8_t, etc.
6627
66282011-01-05  Patrick Gansterer  <paroga@webkit.org>
6629
6630        Reviewed by Andreas Kling.
6631
6632        [CMake] Fix the usage of SOURCE_GROUP
6633        https://bugs.webkit.org/show_bug.cgi?id=51739
6634
6635        * CMakeLists.txt:
6636
66372011-01-05  Andras Becsi  <abecsi@webkit.org>
6638
6639        Reviewed by Csaba Osztrogonác.
6640
6641        [Qt][V8] Fix the build after recent changes.
6642
6643        * pcre/pcre.pri: Correct the path after Source was introduced.
6644
66452011-01-04  Steve Falkenburg  <sfalken@apple.com>
6646
6647        Build fix. Update path to FindSafari after source code reorganization.
6648
6649        * JavaScriptCore.vcproj/JavaScriptCore.sln:
6650
66512011-01-04  Daniel Bates  <dbates@rim.com>
6652
6653        Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
6654        (https://bugs.webkit.org/show_bug.cgi?id=51855).
6655
6656        * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
6657        (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
6658
66592011-01-04  Martin Robinson  <mrobinson@igalia.com>
6660
6661        Try to fix the EFL build.
6662
6663        * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
6664
66652011-01-04  James Robinson  <jamesr@chromium.org>
6666
6667        Reviewed by Darin Adler.
6668
6669        StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
6670        https://bugs.webkit.org/show_bug.cgi?id=51881
6671
6672        The StackBounds class is only used by JavaScriptCore.
6673
6674        * wtf/WTFThreadData.cpp:
6675        (WTF::WTFThreadData::WTFThreadData):
6676        * wtf/WTFThreadData.h:
6677        (WTF::WTFThreadData::resetCurrentIdentifierTable):
6678
66792011-01-03  Martin Robinson  <mrobinson@igalia.com>
6680
6681        Reviewed by Darin Adler.
6682
6683        Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
6684        https://bugs.webkit.org/show_bug.cgi?id=51846
6685
6686        * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
6687        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
6688        * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
6689        (JSC::ExecutableAllocator::cacheFlush): Ditto.
6690        * wtf/PlatformRefPtr.h: Removed.
6691        * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
6692        (WTF::randomNumber): Ditto.
6693        * wtf/brew/RefPtrBrew.h: Ditto.
6694        (WTF::refIfNotNull): Added.
6695        (WTF::derefIfNotNull): Added.
6696        * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
6697        (WTF::createRefPtrInstance): Modified to return a RefPtr.
6698        * wtf/gobject/GRefPtr.cpp: 
6699        (WTF::refGPtr): Moved from PlatformRefPtr here.
6700        (WTF::derefGPtr): Ditto.
6701        * wtf/gobject/GRefPtr.h: Ditto.
6702        (WTF::GRefPtr::GRefPtr): Ditto.
6703        (WTF::GRefPtr::~GRefPtr): Ditto.
6704        (WTF::GRefPtr::clear): Ditto.
6705        (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
6706        (WTF::GRefPtr::get): Ditto.
6707        (WTF::GRefPtr::operator*): Ditto.
6708        (WTF::GRefPtr::operator->): Ditto.
6709        (WTF::GRefPtr::operator!): Ditto.
6710        (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
6711        (WTF::GRefPtr::hashTableDeletedValue): Ditto.
6712        (WTF::::operator): Ditto.
6713        (WTF::::swap): Ditto.
6714        (WTF::swap): Ditto.
6715        (WTF::operator==): Ditto.
6716        (WTF::operator!=): Ditto.
6717        (WTF::static_pointer_cast): Ditto.
6718        (WTF::const_pointer_cast): Ditto.
6719        (WTF::getPtr): Ditto.
6720        (WTF::adoptGRef): Ditto.
6721        (WTF::refGPtr): Ditto.
6722        (WTF::derefGPtr): Ditto.
6723
67242011-01-04  Daniel Bates  <dbates@rim.com>
6725
6726        Reviewed by Adam Roben.
6727
6728        LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
6729        https://bugs.webkit.org/show_bug.cgi?id=51860
6730
6731        * wtf/ThreadingWin.cpp:
6732        (WTF::createThreadInternal):
6733
67342011-01-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6735
6736        Reviewed by Ariya Hidayat.
6737
6738        [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
6739        https://bugs.webkit.org/show_bug.cgi?id=31273
6740
6741        On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
6742        are included before platform headers. On all other platforms continue to use
6743        INCLUDEPATH (as before). This is a continuation of r65877.
6744
6745        No new tests as there is no new functionality.
6746
6747        * JavaScriptCore.pri:
6748
67492011-01-04  Darin Adler  <darin@apple.com>
6750
6751        Try to fix Windows build.
6752
6753        * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
6754        of conditional includes.
6755        (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
6756        (WTF::createThreadInternal): Tweaked #if to not need separate macro.
6757
67582011-01-04  Daniel Bates  <dbates@rim.com>
6759
6760        Reviewed by Adam Roben.
6761
6762        Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
6763        https://bugs.webkit.org/show_bug.cgi?id=51855
6764
6765        Both the Apple Windows and Android ports implement a similar adapter structure,
6766        called ThreadFunctionInvocation and ThreadData respectively, as part of
6767        their thread creation process. Instead, we should share such an adapter
6768        structure and remove duplicate code.
6769
6770        * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
6771        * wtf/ThreadFunctionInvocation.h: Added.
6772        (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
6773        * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
6774        (WTF::runThreadWithRegistration):
6775        (WTF::createThreadInternal): 
6776        * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
6777        it can be shared with the Android implementation of createThreadInternal().
6778        (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
6779
67802011-01-04  Daniel Bates  <dbates@rim.com>
6781
6782        Reviewed by Darin Adler.
6783
6784        Use __builtin_expect when compiling using RVCT in GNU mode
6785        https://bugs.webkit.org/show_bug.cgi?id=51866
6786
6787        Derived from a patch by Dave Tapuska.
6788
6789        * wtf/AlwaysInline.h:
6790
67912011-01-03  Darin Adler  <darin@apple.com>
6792
6793        Reviewed by Brady Eidson.
6794
6795        * wtf/Forward.h: Added Decoder and Encoder.
6796
67972011-01-03  Brady Eidson  <beidson@apple.com>
6798
6799        Reviewed by Darin Adler.
6800
6801        Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
6802
6803        Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
6804
6805        * GNUmakefile.am:
6806        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
6807        * JavaScriptCore.xcodeproj/project.pbxproj:
6808        * wtf/CMakeLists.txt:
6809
6810        * wtf/Decoder.h: Added.
6811        * wtf/Encoder.h: Added.
6812
68132011-01-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
6814
6815        Unreviewed build fix.
6816
6817        [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
6818
6819        This fix is required for builds where HAVE(NULLPTR) is false
6820        (e.g. some MSVC and Symbian builds).
6821
6822        * wtf/wtf.pri:
6823
68242011-01-02  Dan Bernstein  <mitz@apple.com>
6825
6826        Rubber-stamped by Simon Fraser.
6827
6828        <rdar://problem/8812159> Update copyright strings
6829
6830        * Info.plist:
6831
68322011-01-02  Csaba Osztrogonác  <ossy@webkit.org>
6833
6834        Fix GTK+ build after r74855.
6835
6836        Reviewed by Xan Lopez.
6837
6838        * GNUmakefile.am: Fix include pathes.
6839
68402011-01-02  Adam Barth  <abarth@webkit.org>
6841
6842        One more .. missing in the Qt build.
6843
6844        * jsc.pro:
6845
68462011-01-02  Xan Lopez  <xlopez@igalia.com>
6847
6848        Fix GTK+ build.
6849
6850        * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
6851        that anyone can include its headers without adding the prefix
6852        'Source/'.
6853
68542011-01-02  Carl Lobo  <carllobo@gmail.com>
6855
6856        Reviewed by Adam Barth.
6857
6858        Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
6859        https://bugs.webkit.org/show_bug.cgi?id=51797
6860
6861        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
6862        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
6863        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
6864        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
6865        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
6866
68672011-01-01  Adam Barth  <abarth@webkit.org>
6868
6869        Fix relative include paths in an attempt to fix the Qt build.
6870
6871        * JavaScriptCore.pri:
6872        * JavaScriptCore.pro:
6873
68742011-01-01  Adam Barth  <abarth@webkit.org>
6875
6876        Another speculative build fix for GTK.
6877
6878        * GNUmakefile.am:
6879
68802011-01-01  Adam Barth  <abarth@webkit.org>
6881
6882        Speculative build fix for GTK.  Update the paths in GNUmakefile to
6883        include "Source".
6884
6885        * GNUmakefile.am:
6886
68872011-01-01  Adam Barth  <abarth@webkit.org>
6888
6889        Update relative paths in JavaScriptCore.gyp to account for the extra
6890        level of directories.
6891
6892        * JavaScriptCore.gyp/JavaScriptCore.gyp:
6893
68942010-12-31  Patrick Gansterer  <paroga@webkit.org>
6895
6896        Reviewed by Darin Adler.
6897
6898        Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
6899        https://bugs.webkit.org/show_bug.cgi?id=50517
6900
6901        This change shows about 2% performance win on the xml-parser benchmark.
6902
6903        * wtf/text/AtomicString.cpp:
6904        (WTF::HashAndUTF8CharactersTranslator::equal):
6905
69062010-12-30  Patrick Gansterer  <paroga@webkit.org>
6907
6908        Reviewed by Ariya Hidayat.
6909
6910        [CMake] Add WTF_HEADERS
6911        https://bugs.webkit.org/show_bug.cgi?id=51741
6912
6913        Add the WTF headers to show them in Visual Studio.
6914
6915        * wtf/CMakeLists.txt:
6916        * wtf/CMakeListsWinCE.txt:
6917
69182010-12-30  Konstantin Tokarev  <annulen@yandex.ru>
6919
6920        Reviewed by David Kilzer.
6921
6922        [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
6923        used
6924        https://bugs.webkit.org/show_bug.cgi?id=51672
6925
6926        * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
6927
69282010-12-30  Patrick Gansterer  <paroga@webkit.org>
6929
6930        Reviewed by Darin Adler.
6931
6932        Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
6933        https://bugs.webkit.org/show_bug.cgi?id=51743
6934
6935        Most of the ifdefs belong to windows and not to the MSVC compiler.
6936
6937        * wtf/FastMalloc.cpp:
6938
69392010-12-29  Gavin Barraclough  <barraclough@apple.com>
6940
6941        Reviewed by Sam Weinig.
6942
6943        Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
6944
6945        * parser/Lexer.cpp:
6946        (JSC::Lexer::parseString):
6947
69482010-12-29  Helder Correia  <helder@sencha.com>
6949
6950        Reviewed by Eric Seidel.
6951
6952        <VT> and <FF> are not valid JSON whitespace characters
6953        https://bugs.webkit.org/show_bug.cgi?id=51671
6954
6955        Vertical Tab and Form Feed are not allowed white spaces by the JSON
6956        RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
6957
6958        Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
6959               ietestcenter/Javascript/15.12.1.1-0-3.html
6960
6961        * runtime/LiteralParser.cpp:
6962        (JSC::isJSONWhiteSpace):
6963        (JSC::LiteralParser::Lexer::lex):
6964
69652010-12-28  Helder Correia  <helder@sencha.com>
6966
6967        Reviewed by Eric Seidel.
6968
6969        JSON.stringify must exist as a function taking 3 parameters
6970        https://bugs.webkit.org/show_bug.cgi?id=51667
6971
6972        The reported function length is 1 instead.
6973
6974        Test: ietestcenter/Javascript/15.12.3-0-2.html
6975
6976        * runtime/JSONObject.cpp:
6977
69782010-12-28  Helder Correia  <helder@sencha.com>
6979
6980        Reviewed by Sam Weinig.
6981
6982        JSON.parse must exist as a function taking 2 parameters
6983        https://bugs.webkit.org/show_bug.cgi?id=51666
6984
6985        Support for revivers was introduced in bug 26591, but the function
6986        length has since remained unchanged.
6987
6988        Test: ietestcenter/Javascript/15.12.2-0-2.html
6989
6990        * runtime/JSONObject.cpp:
6991
69922010-12-27  Jake Helfert  <jake@jakeonthenet.com>
6993
6994        Reviewed and reworked by Darin Adler.
6995
6996        Building WebKit with Visual Studio 2010 fails due
6997        to ambiguous assignment operator errors.
6998        https://bugs.webkit.org/show_bug.cgi?id=51116
6999
7000        * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
7001        Platform.h HAVE macro, and included the Visual Studio 2010 compiler
7002        as one of the ones that has nullptr.
7003        * wtf/NullPtr.cpp: Updated condition to match.
7004        
7005        * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
7006        overload if we are compiling in loose mode and the compiler has
7007        nullptr, because assignment of 0 will otherwise encounter
7008        ambiguitity with this overload and the overload for loose mode
7009        that takes a raw pointer. The conditional can be removed when we
7010        get rid of loose mode.
7011        * wtf/PassOwnPtr.h: Ditto.
7012
7013        * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
7014        if the compiler has nullptr, because assignment of 0 would be
7015        ambiguous with the overload that takes a raw pointer. The conditional
7016        can be removed if we ever decide we no longer need to support
7017        assigning 0, but might need a way to catch that usage on older compilers.
7018        * wtf/RefPtr.h: Ditto.
7019        * wtf/RetainPtr.h: Ditto
7020
7021        * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
7022        accidentally omitted when the file was first added.
7023
70242010-12-26  Xan Lopez  <xlopez@igalia.com>
7025
7026        Reviewed by Eric Seidel.
7027
7028        [GTK] Add standalone target for JSC
7029        https://bugs.webkit.org/show_bug.cgi?id=51607
7030
7031        * GNUmakefile.am: add convenience target to only build jsc and its
7032        dependencies.
7033
70342010-12-24  Patrick Gansterer  <paroga@webkit.org>
7035
7036        Reviewed by Eric Seidel.
7037
7038        [WINCE] Add CPU(MIPS) detection
7039        https://bugs.webkit.org/show_bug.cgi?id=51342
7040
7041        WinCE usually defines MIPS and _MIPS_.
7042
7043        * wtf/Platform.h:
7044
70452010-12-23  Gavin Barraclough  <barraclough@apple.com>
7046
7047        Reviewed by Sam Weinig.
7048
7049        Rename RegexCompiler.cpp to RegexPattern.cpp.
7050        Implicitly call compileRegex from RegexPattern's constructor.
7051
7052        * Android.mk:
7053        * CMakeLists.txt:
7054        * GNUmakefile.am:
7055        * JavaScriptCore.gypi:
7056        * JavaScriptCore.pro:
7057        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
7058        * JavaScriptCore.xcodeproj/project.pbxproj:
7059        * runtime/RegExp.cpp:
7060        (JSC::RegExp::compile):
7061        * yarr/RegexCompiler.cpp: Removed.
7062        * yarr/RegexCompiler.h: Removed.
7063        * yarr/RegexInterpreter.cpp:
7064        * yarr/RegexJIT.cpp:
7065        * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
7066        (JSC::Yarr::compileRegex):
7067        (JSC::Yarr::RegexPattern::RegexPattern):
7068        * yarr/RegexPattern.h:
7069
70702010-12-23  Patrick Gansterer  <paroga@webkit.org>
7071
7072        Unreviewed build fix for WinCE after r74360.
7073
7074        Move the OS(WINDOWS) section after the OS(WINCE) section
7075        and add missing argument to the getStackMax call.
7076
7077        * wtf/StackBounds.cpp:
7078        (WTF::StackBounds::initialize):
7079
70802010-12-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7081
7082        Unreviewed build fix.
7083
7084        [Symbian] Make sure OSAllocatorSymbian builds
7085
7086        This patch only addresses the build problem.
7087
7088        https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
7089        (re)implementation of the Symbian allocator.
7090
7091        * wtf/OSAllocatorSymbian.cpp:
7092        (WTF::OSAllocator::reserveUncommitted):
7093        (WTF::OSAllocator::reserveAndCommit):
7094        (WTF::OSAllocator::commit):
7095
70962010-12-22  Dan Bernstein  <mitz@apple.com>
7097
7098        Changed WebKitTools to Tools.
7099
7100        * JavaScriptCore.vcproj/JavaScriptCore.sln:
7101
71022010-12-22  Dan Bernstein  <mitz@apple.com>
7103
7104        Rubber-stamped by Mark Rowe.
7105
7106        Changed WebKitTools to Tools in script build phases.
7107
7108        * JavaScriptCore.xcodeproj/project.pbxproj:
7109
71102010-12-22  Andrei Popescu  <andreip@google.com>
7111
7112        Unreviewed build fix.
7113
7114        Fix Chromium Linux shared library build.
7115        [Chromium] r74431 broke the Chromium Linux shared library build
7116        https://bugs.webkit.org/show_bug.cgi?id=51462
7117
7118        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7119        * JavaScriptCore.gypi:
7120
71212010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
7122
7123        Unreviewed, rolling out r74462.
7124        http://trac.webkit.org/changeset/74462
7125        https://bugs.webkit.org/show_bug.cgi?id=51449
7126
7127        broke chromium win (Requested by tonyg-cr on #webkit).
7128
7129        * JavaScriptCore.gypi:
7130
71312010-12-21  Tony Gentilcore  <tonyg@chromium.org>
7132
7133        Unreviewed build fix.
7134
7135        [chromium] Build fix after r74431
7136        https://bugs.webkit.org/show_bug.cgi?id=51447
7137
7138        * JavaScriptCore.gypi:
7139
71402010-12-21  Gavin Barraclough  <barraclough@apple.com>
7141
7142        Windows build fix.
7143
7144        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7145
71462010-12-21  Gavin Barraclough  <barraclough@apple.com>
7147
7148        Windows build fix.
7149
7150        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7151
71522010-12-21  Gavin Barraclough  <barraclough@apple.com>
7153
7154        Speculative build fix.
7155
7156        * jit/ExecutableAllocator.cpp:
7157        (JSC::ExecutableAllocator::underMemoryPressure):
7158
71592010-12-21  Gavin Barraclough  <barraclough@apple.com>
7160
7161        Reviewed by Oliver Hunt.
7162
7163        Bug 26276 - Need a mechanism to determine stack extent
7164
7165        This patch adds accurate stack size calculation for:
7166            DARWIN, QNX, UNIX
7167        We still need to fix:
7168            WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
7169
7170        * wtf/StackBounds.cpp:
7171        (WTF::StackBounds::initialize):
7172
71732010-12-21  Gavin Barraclough  <barraclough@apple.com>
7174
7175         Reviewed by Geoff Garen.
7176 
7177        <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
7178        https://bugs.webkit.org/show_bug.cgi?id=51443
7179
7180        The problem here is that each page uses a reasonable amount of memory, (~4Mb),
7181        and that when miultiple pages are open we keep all JIT code for all functions
7182        in all pages alive.
7183
7184        Add a check to detect high memory pressure situations in the executable allocator
7185        (>50% of available memory allocated), and upon a top level entry into JSC (no code
7186        running on the stack) in this situation throw away all JIT code.
7187
7188        * JavaScriptCore.exp:
7189        * debugger/Debugger.cpp:
7190        (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
7191        * jit/ExecutableAllocator.h:
7192        * jit/ExecutableAllocatorFixedVMPool.cpp:
7193        (JSC::ExecutablePool::systemAlloc): Count allocations.
7194        (JSC::ExecutablePool::systemRelease): Count deallocations.
7195        (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
7196        * jit/ExecutableAllocatorPosix.cpp:
7197        (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
7198        * jit/ExecutableAllocatorWin.cpp:
7199        (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
7200        * runtime/Executable.cpp:
7201        (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
7202        * runtime/Executable.h:
7203        * runtime/JSGlobalData.cpp:
7204        (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
7205        * runtime/JSGlobalData.h:
7206        * runtime/JSGlobalObject.h:
7207        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
7208
72092010-12-21  Gavin Barraclough  <barraclough@apple.com>
7210
7211        Reviewed by Geoff Garen.
7212
7213        <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
7214        https://bugs.webkit.org/show_bug.cgi?id=51434
7215
7216        Reduce the amount of memory the RegExpCache can hold on to on iOS.
7217        Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
7218        ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
7219        memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
7220        entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
7221        from RegExp objects. This helps in two ways (1) it increases the probability that
7222        RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
7223        up holding on to a large ExecutablePool containing a translation of JS code.
7224        (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
7225        same pool, but large RegExp patterns are less common).
7226
7227        * runtime/JSGlobalData.h:
7228        * runtime/RegExpCache.h:
7229        * yarr/RegexJIT.cpp:
7230        (JSC::Yarr::RegexGenerator::compile):
7231
72322010-12-21  Gavin Barraclough  <barraclough@apple.com>
7233
7234        Windows build fix.
7235
7236        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7237
72382010-12-21  Gavin Barraclough  <barraclough@apple.com>
7239
7240        Eeeep! build fix!
7241
7242        * wtf/OSAllocator.h:
7243        (WTF::OSAllocator::decommitAndRelease):
7244
72452010-12-21  Gavin Barraclough  <barraclough@apple.com>
7246
7247        Ooops, fixed typo in comment.
7248
7249        * wtf/OSAllocator.h:
7250
72512010-12-21  Geoffrey Garen  <ggaren@apple.com>
7252
7253        Reviewed by Gavin Barraclough & Oliver Hunt.
7254
7255        Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
7256        https://bugs.webkit.org/show_bug.cgi?id=51359
7257        
7258        I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
7259        Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
7260
7261        * Android.mk:
7262        * CMakeLists.txt:
7263        * GNUmakefile.am:
7264        * JavaScriptCore.gypi:
7265        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
7266        * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
7267
7268        * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
7269        PageAllocationAligned.
7270
7271        * runtime/Collector.cpp:
7272        (JSC::Heap::destroy):
7273        (JSC::Heap::allocateBlock):
7274        (JSC::Heap::freeBlock):
7275        (JSC::Heap::addWeakGCHandle):
7276        * runtime/Collector.h: Switched from AlignedMemoryAllocator to
7277        PageAllocationAligned.
7278
7279        * runtime/GCHandle.cpp:
7280        * runtime/GCHandle.h: Ditto.
7281
7282        * wtf/PageAllocation.h:
7283        (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
7284        functions. Supplanted by PageAllocationAligned.
7285
7286        * wtf/PageAllocationAligned.cpp: Added.
7287        (WTF::PageAllocationAligned::allocate):
7288        (WTF::PageAllocationAligned::deallocate):
7289        * wtf/PageAllocationAligned.h: Added.
7290        (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
7291        class for doing aligned memory allocation. This class properly matches
7292        allocation and deallocation library calls, fixing a long-standing bug
7293        in PageAllocation.
7294
7295        * wtf/Platform.h: Removed some defunction VM platform defines.
7296
7297        * wtf/wtf.pri: Updated build files.
7298
72992010-12-21  Oliver Hunt  <oliver@apple.com>
7300
7301        Reviewed by Gavin Barraclough.
7302
7303        ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
7304        https://bugs.webkit.org/show_bug.cgi?id=49006
7305
7306        This problem was caused by having a parameter named 'arguments'.
7307        The fix is to treat parameters named 'arguments' as shadowing
7308        the actual arguments property, and so logically turn the function
7309        into one that doesn't "use" arguments.
7310
7311        This required a bit of fiddling in the parser to ensure we correctly
7312        propagate the 'feature' of shadowing is set correctly.
7313
7314        * bytecompiler/BytecodeGenerator.cpp:
7315        (JSC::BytecodeGenerator::createArgumentsIfNecessary):
7316          Change assertion to an early return as we may now reference
7317          a property named 'arguments' without being in a function that
7318          has the ArgumentsFeature
7319        * parser/JSParser.cpp:
7320        (JSC::JSParser::Scope::Scope):
7321        (JSC::JSParser::Scope::declareParameter):
7322        (JSC::JSParser::Scope::shadowsArguments):
7323        (JSC::JSParser::parseProgram):
7324        (JSC::JSParser::parseFormalParameters):
7325        (JSC::JSParser::parseFunctionInfo):
7326        * parser/Nodes.h:
7327        (JSC::ScopeNode::usesArguments):
7328
73292010-12-21  Daniel Bates  <dbates@rim.com>
7330
7331        Reviewed by Eric Seidel and Darin Adler.
7332
7333        Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
7334        https://bugs.webkit.org/show_bug.cgi?id=51367
7335
7336        Inspired by a patch by George Staikos.
7337
7338        * wtf/DateMath.cpp:
7339        (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
7340        of type OwnPtrArray<char>.
7341        * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
7342        (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
7343        (JSC::GregorianDateTime::operator tm): Ditto.
7344        (JSC::GregorianDateTime::copyFrom): Ditto.
7345
73462010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
7347
7348        Unreviewed, rolling out r74402.
7349        http://trac.webkit.org/changeset/74402
7350        https://bugs.webkit.org/show_bug.cgi?id=51402
7351
7352        This patch broke the Windows 7 Release Layout Tests (Requested
7353        by jessieberlin on #webkit).
7354
7355        * wtf/StackBounds.cpp:
7356        (WTF::estimateStackBound):
7357        (WTF::StackBounds::initialize):
7358
73592010-12-21  Peter Varga  <pvarga@inf.u-szeged.hu>
7360
7361        Reviewed by Csaba Osztrogonác.
7362
7363        Unify the name of parentheses in YARR: rename parenthesis to
7364        parentheses.
7365
7366        * yarr/RegexCompiler.cpp:
7367        (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
7368
73692010-12-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7370
7371        Reviewed by Andreas Kling.
7372
7373        [Qt] Set BUILDING_QT__ consistently
7374        https://bugs.webkit.org/show_bug.cgi?id=51341
7375
7376        * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
7377        is already defined in WebKit.pri.
7378
73792010-12-20  Gavin Barraclough  <barraclough@apple.com>
7380
7381        Reviewed by Oliver Hunt.
7382
7383        Bug 26276 - Need a mechanism to determine stack extent
7384
7385        This patch adds accurate stack size calculation for:
7386            DARWIN, WINDOWS, QNX, UNIX
7387        We still need to fix:
7388            SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
7389
7390        * wtf/StackBounds.cpp:
7391        (WTF::StackBounds::initialize):
7392
73932010-12-20  Gavin Barraclough  <barraclough@apple.com>
7394
7395        PPC build fix; stop using std::swap on PageAllocation/PageReservation,
7396        this was failing on some compilers since the lack of default construction
7397        for the m_executable/m_writable fields meant the value being swapped may
7398        not have been fully initialized.
7399
7400        * wtf/PageAllocation.h:
7401        (WTF::PageAllocation::deallocate):
7402        * wtf/PageBlock.h:
7403        * wtf/PageReservation.h:
7404        (WTF::PageReservation::deallocate):
7405
74062010-12-20  Oliver Hunt  <oliver@apple.com>
7407
7408        Reviewed by Geoffrey Garen.
7409
7410        |delete name| in strict mode code should be an early error
7411        https://bugs.webkit.org/show_bug.cgi?id=50431
7412
7413        Disallow the |delete IDENTIFIER| production in strict mode, and removed
7414        a bunch of now unnecessary code.
7415
7416        * parser/JSParser.cpp:
7417        (JSC::JSParser::Scope::collectFreeVariables):
7418        (JSC::jsParse):
7419        (JSC::JSParser::parseProgram):
7420        (JSC::JSParser::parseUnaryExpression):
7421        * parser/JSParser.h:
7422        * parser/Parser.cpp:
7423        (JSC::Parser::parse):
7424        * parser/Parser.h:
7425        (JSC::Parser::parse):
7426
74272010-12-20  Gavin Barraclough  <barraclough@apple.com>
7428
7429        Reviewed by Olver Hunt.
7430
7431        Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
7432
7433        The current implementation of recursion limit checking is not safe on smaller stacks.
7434        Switch to using a common mechanism, shared with the parser, to check recursion limits.
7435
7436        Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
7437        footprint on the stack, at just under 1k on x86-64.  Given this, the default recursion
7438        check (requiring 4k of available space to recurse) seems reasonable.
7439
7440        * bytecompiler/BytecodeGenerator.cpp:
7441        (JSC::BytecodeGenerator::BytecodeGenerator):
7442        * bytecompiler/BytecodeGenerator.h:
7443        (JSC::BytecodeGenerator::emitNode):
7444        (JSC::BytecodeGenerator::emitNodeInConditionContext):
7445        * bytecompiler/NodesCodegen.cpp:
7446        (JSC::BinaryOpNode::emitStrcat):
7447
74482010-12-20  Tony Gentilcore  <tonyg@chromium.org>
7449
7450        Unreviewed build fix.
7451
7452        Include pthread to fix chromium mac build (broken by r74360)
7453        https://bugs.webkit.org/show_bug.cgi?id=51356
7454
7455        * wtf/StackBounds.cpp:
7456
74572010-12-20  Xan Lopez  <xlopez@igalia.com>
7458
7459        Reviewed by Gustavo Noronha.
7460
7461        * GNUmakefile.am: add missing files.
7462
74632010-12-18  Gavin Barraclough  <barraclough@apple.com>
7464
7465        Reviewed by Oliver Hunt.
7466
7467        Bug 26276 - Need a mechanism to determine stack extent
7468
7469        This patch adds a class 'StackBounds', to hold information about the machine stack.
7470        The implementation of this class broadly adheres to the current implmentation of
7471        stack limit checking, and as such does not solve the problem of determining stack
7472        extent, but gives us a common place to do so.
7473
7474        Currently two mechanism are provided to determine the stack origin (the point the
7475        stack is growing away from). currentThreadStackBase() in Collector provides a
7476        more accurate determination of the stack origin, so use this to calculate
7477        StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
7478        as such can be removed.  Cache the StackBounds on WTFThreadData such that they
7479        need only be determined once per thread, and for non-API contexts cache this
7480        information in JSGlobalData, to save a thread-specific access.
7481
7482        For the time being retain the estimate of stack size used by JSC's parser
7483        (128 * sizeof(void*) * 1024), with a view to replacing this with something more
7484        accurate in the near future.
7485
7486        * parser/JSParser.cpp:
7487        (JSC::JSParser::canRecurse):
7488        (JSC::JSParser::JSParser):
7489            Change to use StackBounds.
7490        * runtime/Collector.cpp:
7491        (JSC::Heap::registerThread):
7492        (JSC::Heap::markCurrentThreadConservativelyInternal):
7493            Change to use StackBounds, cached on JSGlobalData.
7494        * runtime/JSGlobalData.cpp:
7495        (JSC::JSGlobalData::JSGlobalData):
7496        * runtime/JSGlobalData.h:
7497        (JSC::JSGlobalData::stack):
7498            Add a cached copy of StackBounds.
7499        * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
7500        (WTF::estimateStackBound):
7501        (WTF::StackBounds::initialize):
7502        (WTF::getStackMax):
7503            Copy code from Collector.cpp to determine stack origin.
7504        * wtf/StackBounds.h: Added.
7505        (WTF::StackBounds::StackBounds):
7506            No argument constructor; returns a null StackBounds.
7507        (WTF::StackBounds::currentThreadStackBounds):
7508            Returns a StackBounds object representing the stack limits
7509            of the current thread.
7510        (WTF::StackBounds::origin):
7511            Returns to stack origin (the point the stack is growing away
7512            from; the highest extent of the stack on machines where the
7513            stack grows downwards.
7514        (WTF::StackBounds::recursionLimit):
7515            Returns a limit value that is 'a comfortable distance from
7516            the end of the stack'. Our concept of this is currently 1 page
7517            away from the end, however the default value may be tuned in
7518            the future, and clients may override passing a larger delta;
7519            should only be called on StackBounds object representing the
7520            stack of the thread this method is called on (checked by
7521            checkConsistency).
7522        (WTF::StackBounds::recursionCheck):
7523            Checks whether we are currently 'a comfortable distance from
7524            the end of the stack'. Our concept of this is currently 1 page
7525            away from the end, however the default value may be tuned in
7526            the future, and clients may override passing a larger delta
7527            to apply when checking, if they wish to do so. This method
7528            should only be called on StackBounds object representing the
7529            stack of the thread this method is called on (checked by
7530            checkConsistency).
7531        (WTF::StackBounds::current):
7532            Approximate current stack position. On machines where the stack
7533            is growing downwards this is the lowest address that might need
7534            conservative collection.
7535        (WTF::StackBounds::isGrowingDownward):
7536            True for all platforms other than WINCE, which has to check.
7537        (WTF::StackBounds::checkConsistency):
7538            This is called in methods that shoulds only be operating on a
7539            valid set of bounds; as such we expect m_origin != m_bounds
7540            (i.e. stack size != zero) - we're really testing that this
7541            object is not null (the constructor initializes both fields
7542            to zero).  Also checks that current() is within the stack's
7543            bounds.
7544        * wtf/WTFThreadData.cpp:
7545        (WTF::WTFThreadData::WTFThreadData):
7546        * wtf/WTFThreadData.h:
7547        (WTF::WTFThreadData::stack):
7548            Add the StackBounds member variable.
7549
75502010-12-17  Geoffrey Garen  <ggaren@apple.com>
7551
7552        Reviewed by Sam Weinig.
7553
7554        Factored common page set management into a new PageBlock base class
7555        https://bugs.webkit.org/show_bug.cgi?id=51285
7556
7557        * Android.mk:
7558        * CMakeLists.txt:
7559        * GNUmakefile.am:
7560        * JavaScriptCore.gypi:
7561        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
7562        * JavaScriptCore.xcodeproj/project.pbxproj:
7563        * interpreter/RegisterFile.h:
7564        (JSC::RegisterFile::RegisterFile):
7565        * jit/ExecutableAllocator.cpp:
7566        (JSC::ExecutableAllocator::intializePageSize):
7567        * wtf/PageAllocation.cpp: Removed.
7568        * wtf/PageAllocation.h:
7569        (WTF::PageAllocation::deallocate):
7570        (WTF::PageAllocation::PageAllocation):
7571        * wtf/PageReservation.h:
7572        (WTF::PageReservation::commit):
7573        (WTF::PageReservation::decommit):
7574        (WTF::PageReservation::deallocate):
7575        (WTF::PageReservation::PageReservation):
7576        * wtf/wtf.pri:
7577
75782010-12-17  Michael Saboff  <msaboff@apple.com>
7579
7580        Reviewed by Oliver Hunt.
7581
7582        RegExp Jit'ed expression crashes clicking link on yelp.com
7583        https://bugs.webkit.org/show_bug.cgi?id=51284
7584
7585        When transitioning between an non-repeating beginning of line
7586        anchored expression and the remaining refactored repeating 
7587        expression, we should not clear any residual datalabel in 
7588        state's m_backtrack.  It will be resolved and cleared in subsequent
7589        code when linkAlternativeBacktracks() is called for the repeating
7590        alternative(s).
7591
7592        * yarr/RegexJIT.cpp:
7593        (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
7594        (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
7595
75962010-12-17  Dan Bernstein  <mitz@apple.com>
7597
7598        Rubber-stamped by Mark Rowe.
7599
7600        Updated for the renaming of WebKitTools to Tools
7601
7602        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
7603
76042010-12-17  Ariya Hidayat  <ariya@sencha.com>
7605
7606        Reviewed by Oliver Hunt.
7607
7608        [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
7609        https://bugs.webkit.org/show_bug.cgi?id=51268
7610
7611        * parser/JSParser.cpp:
7612        (JSC::JSParser::parseAssignmentExpression):
7613
76142010-12-17  Geoffrey Garen  <ggaren@apple.com>
7615
7616        Reviewed by Oliver Hunt.
7617
7618        Removed RChunk from PageAllocation/PageReservation, since it's now unused.
7619        https://bugs.webkit.org/show_bug.cgi?id=51276
7620
7621        * wtf/PageAllocation.h:
7622        (WTF::PageAllocation::PageAllocation):
7623        * wtf/PageReservation.h:
7624        (WTF::PageReservation::PageReservation):
7625
76262010-12-17  Oliver Hunt  <oliver@apple.com>
7627
7628        Reviewed by Gavin Barraclough.
7629
7630        Incorrect encoding of some constants in ARMv7 JIT
7631        https://bugs.webkit.org/show_bug.cgi?id=51273
7632        <rdar://problem/8650210>
7633
7634        When using immediate encoding 3 we need to write the byte
7635        that holds a duplicated value.
7636
7637        * assembler/ARMv7Assembler.h:
7638        (JSC::ARMThumbImmediate::makeEncodedImm):
7639
76402010-12-16  Evan Martin  <evan@chromium.org>
7641
7642        Reviewed by Darin Fisher.
7643
7644        [chromium] useless warnings when building on Windows
7645        https://bugs.webkit.org/show_bug.cgi?id=50985
7646
7647        Disable some compiler warnings that aren't indicative of real problems.
7648
7649        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7650
76512010-12-16  Pratik Solanki  <psolanki@apple.com>
7652
7653        Reviewed by Geoffrey Garen.
7654
7655        https://bugs.webkit.org/show_bug.cgi?id=51166
7656        ExecutableAllocator::cacheFlush should call sys_cache_control
7657
7658        * jit/ExecutableAllocator.h:
7659        (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
7660        sys_cache_control(kCacheFunctionPrepareForExecution,...).
7661
76622010-12-16  Ariya Hidayat  <ariya@sencha.com>
7663
7664        Reviewed by Andreas Kling.
7665
7666        [JSC] Const correctness in ASTBuilder and SyntaxChecker
7667        https://bugs.webkit.org/show_bug.cgi?id=51141
7668
7669        * parser/ASTBuilder.h:
7670        (JSC::ASTBuilder::getName):
7671        (JSC::ASTBuilder::getType):
7672        (JSC::ASTBuilder::isResolve):
7673        * parser/SyntaxChecker.h:
7674        (JSC::SyntaxChecker::operatorStackPop):
7675
76762010-12-15  Kenneth Russell  <kbr@google.com>
7677
7678        Reviewed by James Robinson.
7679
7680        Web Audio API: port FFTFrame to MKL
7681        https://bugs.webkit.org/show_bug.cgi?id=50986
7682
7683        Fixed bug in log2 emulation function provided for Windows port of
7684        Web Audio API.
7685
7686        * wtf/MathExtras.h:
7687        (log2):
7688
76892010-12-14  Mark Rowe  <mrowe@apple.com>
7690
7691        Reviewed by Sam Weinig.
7692
7693        <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
7694
7695        * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
7696        It was previously implicitly convertible to bool on Mac via operator NSString*,
7697        but since that always has a non-zero return value it would give unexpected results.
7698
76992010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
7700
7701        Reviewed by Eric Seidel.
7702
7703        [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
7704        https://bugs.webkit.org/show_bug.cgi?id=50231
7705
7706        Guard CONFIG+=link_pkgconfig with !symbian.
7707
7708        * jsc.pro:
7709
77102010-12-14  Cameron Zwarich  <zwarich@apple.com>
7711
7712        Not reviewed.
7713
7714        Revert accidental change disabling the JIT for most platforms.
7715
7716        * wtf/Platform.h:
7717
77182010-12-13  Cameron Zwarich  <zwarich@apple.com>
7719
7720        Reviewed by Eric Seidel.
7721
7722        Clang fails to build the JSC interpreter
7723        https://bugs.webkit.org/show_bug.cgi?id=51016
7724
7725        Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
7726        them, but it does not correctly generate the cleanup, causing a leak if the
7727        cleanup decrements a reference count.
7728
7729        * interpreter/Interpreter.cpp:
7730        (JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
7731
77322010-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
7733
7734        Reviewed by Martin Robinson.
7735
7736        [GTK] Simplify context-menu handling code
7737        https://bugs.webkit.org/show_bug.cgi?id=49658
7738
7739        * wtf/PlatformRefPtr.h: Add leakRef()
7740
77412010-12-13  Cameron Zwarich  <zwarich@apple.com>
7742
7743        Reviewed by Gavin Barraclough.
7744
7745        JavaScriptCore should not use "asm volatile" outside of a function
7746        https://bugs.webkit.org/show_bug.cgi?id=50991
7747
7748        * jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
7749
77502010-12-13  Steve Falkenburg  <sfalken@apple.com>
7751
7752        Windows production build fix.
7753        Try copying ICU 4.6 in addition to 4.4 and 4.2.
7754
7755        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
7756
77572010-12-13  Michael Saboff  <msaboff@apple.com>
7758
7759        Reviewed by Oliver Hunt.
7760
7761        REGRESSION: mobileme mail viewing is broken
7762        https://bugs.webkit.org/show_bug.cgi?id=50884
7763
7764        Fixed problem where simple parenthesis (those without capture and
7765        with a fixed count) where not propagating backtrack to labels for 
7766        nested parentheses.  Also added the nesting level for the parentheses 
7767        state created in that case as well.
7768
7769        * yarr/RegexJIT.cpp:
7770        (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
7771        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
7772        (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
7773        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
7774
77752010-12-13  Peter Varga  <pvarga@inf.u-szeged.hu>
7776
7777        Reviewed by Gavin Barraclough.
7778
7779        Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
7780        https://bugs.webkit.org/show_bug.cgi?id=49385
7781
7782        Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
7783
7784        * yarr/RegexInterpreter.cpp:
7785        (JSC::Yarr::Interpreter::matchParentheses):
7786        (JSC::Yarr::Interpreter::backtrackParentheses):
7787        * yarr/RegexPattern.h:
7788
77892010-12-10  Michael Saboff  <msaboff@apple.com>
7790
7791        Reviewed by Gavin Barraclough.
7792
7793        REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
7794        bugs.webkit.org
7795        https://bugs.webkit.org/show_bug.cgi?id=50816
7796
7797        First nested parentheses of the second or greater alternative
7798        where backtracking to the prior parentheses.  Changed the default
7799        handling of initial parentheses for all alternatives to go back
7800        to the immediate outer paren.
7801
7802        * yarr/RegexJIT.cpp:
7803        (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
7804        (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
7805        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
7806        (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
7807        (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
7808        (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
7809        (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
7810        (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
7811        (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
7812        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
7813
78142010-12-11  Patrick Gansterer  <paroga@webkit.org>
7815
7816        Reviewed by Darin Adler.
7817
7818        Add an overload to makeString for Vector<char>
7819        https://bugs.webkit.org/show_bug.cgi?id=50123
7820
7821        Also cleanup StringTypeAdapter.
7822
7823        * wtf/text/StringConcatenate.h:
7824
78252010-12-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
7826
7827        Reviewed by Eric Seidel.
7828
7829        [Qt] Build fix for Symbian: don't compile POSIX memory management implementation 
7830        https://bugs.webkit.org/show_bug.cgi?id=50707
7831
7832        * wtf/wtf.pri:
7833
78342010-12-10  Steve Falkenburg  <sfalken@apple.com>
7835
7836        Windows production build fix.
7837        
7838        Don't stop if react-to-vsprops-changes.py exits with an error,
7839        since this will occur in production builds.
7840
7841        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
7842
78432010-12-10  Brian Weinstein  <bweinstein@apple.com>
7844
7845        Reviewed by Adam Roben.
7846
7847        Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
7848
7849        * wtf/Platform.h:
7850
78512010-12-10  Martin Robinson  <mrobinson@igalia.com>
7852
7853        Unreviewed, rolling out r73703.
7854        http://trac.webkit.org/changeset/73703
7855        https://bugs.webkit.org/show_bug.cgi?id=49658
7856
7857        This patch is causing crashes on the GTK+ bots.
7858
7859        * wtf/PlatformRefPtr.h:
7860
78612010-12-10  Patrick Gansterer  <paroga@webkit.org>
7862
7863        Reviewed by Eric Seidel.
7864
7865        Cleanup StringWx.cpp
7866        https://bugs.webkit.org/show_bug.cgi?id=50525
7867
7868        Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
7869
7870        * wtf/wx/StringWx.cpp:
7871        (WTF::String::String):
7872
78732010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
7874
7875        Reviewed by Martin Robinson.
7876
7877        [GTK] Simplify context-menu handling code
7878        https://bugs.webkit.org/show_bug.cgi?id=49658
7879
7880        * wtf/PlatformRefPtr.h:
7881
78822010-12-09  Michael Saboff  <msaboff@apple.com>
7883
7884        Reviewed by Gavin Barraclough.
7885
7886        REGRESSION (r73065?): A regex no longer works 
7887        https://bugs.webkit.org/show_bug.cgi?id=50570
7888
7889        Changed the handling of adjacent parentheses backtracks in two ways.
7890        First, only outer most paren backtracks default to back tracking
7891        to the "next character" looping code.  Second, added a jump around 
7892        backtracks that fall through to the next backtrack where the
7893        second backtrack has some greedy processing before the backtracking
7894        from outside the parentheses code.
7895        Also cleaned up extraneous white spce, removing white space at the
7896        end of or that makes up a whole line.
7897
7898        * yarr/RegexJIT.cpp:
7899        (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
7900        (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
7901        (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
7902        (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
7903        (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
7904        (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
7905        (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
7906        (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
7907        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
7908
79092010-12-09  Michael Saboff  <msaboff@apple.com>
7910
7911        Reviewed by Geoffrey Garen.
7912
7913        Addressed the "FIXME" issues in array sort for toString() methods that
7914        mutate the array in either size or contents.  The change is to mark
7915        the temporary array contents so that they are not garbage collected
7916        and to make sure the array is large enough to hold the contents
7917        of the sorted temporary vector.
7918        https://bugs.webkit.org/show_bug.cgi?id=50718
7919
7920        * runtime/Collector.cpp:
7921        (JSC::Heap::addTempSortVector):
7922        (JSC::Heap::removeTempSortVector):
7923        (JSC::Heap::markTempSortVectors):
7924        (JSC::Heap::markRoots):
7925        * runtime/Collector.h:
7926        * runtime/JSArray.cpp:
7927        (JSC::JSArray::sort):
7928        * runtime/JSValue.h:
7929
79302010-12-09  Michael Saboff  <msaboff@apple.com>
7931
7932        Reviewed by Darin Adler.
7933
7934        Changed setting of backtrack labels to not overwrite a prior
7935        label.  Where losing prior labe which then reverted back to 
7936        next character label.
7937        https://bugs.webkit.org/show_bug.cgi?id=50579
7938
7939        * yarr/RegexJIT.cpp:
7940        (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
7941
79422010-12-08  Gavin Barraclough  <barraclough@apple.com>
7943
7944        Reviewed by Sam Weinig.
7945
7946        Permit Character Class Escape in CharacterRange in Character Class.
7947        https://bugs.webkit.org/show_bug.cgi?id=50483
7948        https://bugs.webkit.org/show_bug.cgi?id=50538
7949        https://bugs.webkit.org/show_bug.cgi?id=50654
7950        https://bugs.webkit.org/show_bug.cgi?id=50646
7951
7952        We recently tightened up our spec conformance in generating syntax
7953        error in these cases, however testing in the wild has shown this
7954        to be problematic. This reverts the previous change in allowing
7955        class escapes (e.g. \d) in ranges in character classes ([]), but
7956        does retain some closer conformance to the spec in only allowing
7957        ranges that would be permitted per the grammar rules in the spec
7958        (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
7959
7960        * yarr/RegexParser.h:
7961        (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
7962        (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
7963        (JSC::Yarr::Parser::parse):
7964
79652010-12-08  Geoffrey Garen  <ggaren@apple.com>
7966
7967        Reviewed by Sam Weinig.
7968
7969        Try to fix crash-on-launch seen on Windows builder.
7970
7971        * wtf/OSAllocatorWin.cpp:
7972        (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
7973        a bug that hasn't been fixed yet.
7974
79752010-12-08  Geoffrey Garen  <ggaren@apple.com>
7976
7977        Try to fix Windows build.
7978
7979        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
7980
79812010-12-08  Geoffrey Garen  <ggaren@apple.com>
7982
7983        Try to fix Windows build.
7984
7985        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
7986        file to remove a symbol -- the next build failure will say which symbol
7987        to add back.
7988
79892010-12-08  Geoffrey Garen  <ggaren@apple.com>
7990
7991        Try to fix Windows build.
7992
7993        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
7994
79952010-12-08  Geoffrey Garen  <ggaren@apple.com>
7996
7997        Try to fix GTK Linux build.
7998
7999        * jit/ExecutableAllocator.cpp:
8000        (JSC::ExecutablePool::systemAlloc):
8001        * runtime/AlignedMemoryAllocator.h:
8002        (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
8003
80042010-12-07  Geoffrey Garen  <ggaren@apple.com>
8005
8006        Reviewed by Sam Weinig.
8007
8008        Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
8009        https://bugs.webkit.org/show_bug.cgi?id=50653
8010
8011        * JavaScriptCore.exp: Updated for new function signature.
8012
8013        * interpreter/RegisterFile.h:
8014        (JSC::RegisterFile::RegisterFile):
8015        (JSC::RegisterFile::grow):
8016        * jit/ExecutableAllocatorFixedVMPool.cpp:
8017        (JSC::FixedVMPoolAllocator::reuse):
8018        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
8019        OSAllocator is now the central location for verifying that allocation succeeds.
8020        This allowed me to remove some complicating cross-platform cruft.
8021
8022        * runtime/AlignedMemoryAllocator.h:
8023        (JSC::::allocate): Updated for code motion.
8024
8025        * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
8026        support VM features required by clients of PageAllocation and PageReservation.
8027
8028        * wtf/OSAllocatorPosix.cpp:
8029        (WTF::OSAllocator::reserve):
8030        (WTF::OSAllocator::reserveAndCommit):
8031        (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
8032        executable memory here.
8033
8034        * wtf/OSAllocatorSymbian.cpp:
8035        (WTF::OSAllocator::reserve):
8036        (WTF::OSAllocator::reserveAndCommit):
8037        (WTF::OSAllocator::commit): Updated for new function signatures.
8038
8039        * wtf/OSAllocatorWin.cpp:
8040        (WTF::protection):
8041        (WTF::OSAllocator::reserve):
8042        (WTF::OSAllocator::reserveAndCommit):
8043        (WTF::OSAllocator::commit):
8044        (WTF::OSAllocator::release): Updated for new function signatures. Moved
8045        some protection-related and WINCE-related code from PageAllocation here.
8046
8047        * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
8048        it was only used by checkAllocatedOkay, which is now gone.
8049
8050        * wtf/PageAllocation.h:
8051        (WTF::PageAllocation::allocate):
8052        (WTF::PageAllocation::allocateAligned):
8053        (WTF::PageAllocation::deallocate):
8054        (WTF::PageAllocation::isPowerOfTwo):
8055        (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
8056        and replaced calls to them with calls to OSAllocator.
8057
8058        * wtf/PageReservation.h:
8059        (WTF::PageReservation::commit):
8060        (WTF::PageReservation::decommit):
8061        (WTF::PageReservation::reserve):
8062        (WTF::PageReservation::deallocate):
8063        (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
8064        m_executable because these flags are now required when committing memory.
8065
80662010-12-08  Chris Rogers  <crogers@google.com>
8067
8068        Reviewed by Kenneth Russell.
8069
8070        Add web audio files to mac port Xcode projects
8071        https://bugs.webkit.org/show_bug.cgi?id=50721
8072
8073        * JavaScriptCore.xcodeproj/project.pbxproj:
8074
80752010-12-08  Oliver Hunt  <oliver@apple.com>
8076
8077        Reviewed by Gavin Barraclough.
8078
8079        Marking the active global object re-enters through markConservatively
8080        https://bugs.webkit.org/show_bug.cgi?id=50711
8081
8082        draining of the MarkStack is not allowed to be re-entrant, we got away
8083        with this simply due to the logic in MarkStack::drain implicitly handling
8084        changes that could be triggered by the re-entry.
8085
8086        Just to be safe this patch removes the re-entry through markConservatively
8087        so we don't accidentally introduce such an issue in future.  I've also
8088        added an assertion to catch such errors.
8089
8090        * runtime/Collector.cpp:
8091        (JSC::Heap::markConservatively):
8092        (JSC::Heap::markCurrentThreadConservativelyInternal):
8093        (JSC::Heap::markOtherThreadConservatively):
8094        * runtime/JSArray.h:
8095        (JSC::MarkStack::drain):
8096        * runtime/MarkStack.h:
8097        (JSC::MarkStack::MarkStack):
8098
80992010-12-08  Chris Marrin  <cmarrin@apple.com>
8100
8101        Reviewed by Simon Fraser.
8102
8103        Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
8104        https://bugs.webkit.org/show_bug.cgi?id=49388
8105
8106        Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
8107        which was decided was the best way to identify a build with CoreAnimation
8108
8109        * wtf/Platform.h:
8110
81112010-12-07  Anders Carlsson  <andersca@apple.com>
8112
8113        Build fix follow up build fix.
8114
8115        * pcre/pcre_ucp_searchfuncs.cpp:
8116        (jsc_pcre_ucp_othercase):
8117
81182010-12-07  Anders Carlsson  <andersca@apple.com>
8119
8120        Reviewed by Darin Adler.
8121
8122        Fix clang++ build
8123        https://bugs.webkit.org/show_bug.cgi?id=50645
8124
8125        Explicitly cast offset to int.
8126
8127        * pcre/pcre_ucp_searchfuncs.cpp:
8128        (jsc_pcre_ucp_othercase):
8129
81302010-12-07  Kenneth Russell  <kbr@google.com>
8131
8132        Reviewed by David Levin.
8133
8134        Fix compilation of core web audio files on Windows
8135        https://bugs.webkit.org/show_bug.cgi?id=50603
8136
8137        Added log2 definition to MathExtras.h on Windows platform.
8138
8139        * wtf/MathExtras.h:
8140        (log2):
8141
81422010-12-07  Antti Koivisto  <antti@apple.com>
8143
8144        Reviewed by Gavin Barraclough.
8145
8146        https://bugs.webkit.org/show_bug.cgi?id=50412
8147        http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading 
8148        
8149        Creating a substring caused the original string be flattened if it was in the rope form. This could use
8150        significant amount of memory by reducing buffer sharing between strings.
8151        
8152        Add a rope specific substring function that constructs the substring by reusing the rope fibers
8153        instead of flattening the rope.
8154        
8155        No change observed in SunSpider.
8156
8157        * runtime/JSString.cpp:
8158        (JSC::JSString::substringFromRope):
8159        * runtime/JSString.h:
8160        (JSC::jsSubstring):
8161        * runtime/StringPrototype.cpp:
8162        (JSC::stringProtoFuncSubstr):
8163        (JSC::stringProtoFuncSubstring):
8164
81652010-12-06  Geoffrey Garen  <ggaren@apple.com>
8166
8167        Reviewed by Gavin Barraclough.
8168
8169        Simplified some ASLR-related code in PageAllocation/Reservation
8170        https://bugs.webkit.org/show_bug.cgi?id=50599
8171        
8172        Removed reserveAt, allocateAt, and friends, since they all existed to
8173        serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
8174        ASLR code down into systemAllocate -- now, any time you allocate
8175        executable memory on a supporting platform, the memory's location is
8176        randomized.
8177
8178        * jit/ExecutableAllocatorFixedVMPool.cpp:
8179        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
8180        to randomize anything.
8181
8182        * wtf/PageAllocation.h:
8183        (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
8184        beefed up executable allocation with randomization.
8185
8186        * wtf/PageReservation.h:
8187        (WTF::PageReservation::systemReserve): Removed some *At() functions.
8188
81892010-12-06  Geoffrey Garen  <ggaren@apple.com>
8190
8191        Reviewed by Maciej Stachowiak.
8192
8193        reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
8194        https://bugs.webkit.org/show_bug.cgi?id=50588
8195        
8196        * wtf/OSAllocatorPosix.cpp:
8197        (WTF::OSAllocator::reserve):
8198        (WTF::OSAllocator::reserveAndCommit):
8199        (WTF::OSAllocator::commit): Tightened up some comments. Changed
8200        reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
8201
82022010-12-06  Patrick Gansterer  <paroga@webkit.org>
8203
8204        Reviewed by Andreas Kling.
8205
8206        [WINCE] Add build system
8207        https://bugs.webkit.org/show_bug.cgi?id=50522
8208
8209        * CMakeListsWinCE.txt: Added.
8210        * shell/CMakeListsWinCE.txt: Added.
8211        * wtf/CMakeListsWinCE.txt: Added.
8212
82132010-12-06  John Tantalo  <john.tantalo@gmail.com>
8214
8215        Reviewed by Geoffrey Garen.
8216
8217        jsc does not ignore shebang
8218        https://bugs.webkit.org/show_bug.cgi?id=49576
8219
8220        * jsc.cpp:
8221        (fillBufferWithContentsOfFile):
8222          - translate shebang into a valid JavaScript comment so the lexer ignores it
8223
82242010-12-05  Adam Roben  <aroben@apple.com>
8225
8226        Windows production build fix
8227
8228        Put spaces after trailing backslashes when setting
8229        %WebKitVSPropsRedirectionDir%. According to MSDN
8230        <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
8231
8232           A backslash ( \ ) followed by a newline character is interpreted as
8233           a space in the command; use a backslash at the end of a line to
8234           continue a command onto the next line. NMAKE interprets the
8235           backslash literally if any other character, including a space or
8236           tab, follows the backslash.
8237
8238        * JavaScriptCore.vcproj/JavaScriptCore.make:
8239
82402010-12-04  Patrick Gansterer  <paroga@webkit.org>
8241
8242        Unreviewed, build fix after r69132.
8243
8244        * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
8245
82462010-12-04  Xan Lopez  <xlopez@igalia.com>
8247
8248        Reviewed by Martin Robinson.
8249
8250        [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
8251        https://bugs.webkit.org/show_bug.cgi?id=50451
8252
8253        * wtf/gobject/GTypedefs.h: add GdkWindow defines.
8254
82552010-12-03  Gavin Barraclough  <barraclough@apple.com>
8256
8257        Rubber stamped by Oliver Hunt.
8258
8259        Bug 50509 - set* methods on MacroAssembler are awfully named.
8260
8261        Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
8262        set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
8263        setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
8264
8265        Rename to clarify.
8266
8267        set32 -> set32Compare32
8268        setTest32 -> set32Test32
8269        set8 -> set8Compare32
8270        setTest8 -> set32Test8
8271
8272        * assembler/MacroAssembler.h:
8273        (JSC::MacroAssembler::setPtr):
8274        * assembler/MacroAssemblerARM.h:
8275        (JSC::MacroAssemblerARM::set32Compare32):
8276        (JSC::MacroAssemblerARM::set8Compare32):
8277        (JSC::MacroAssemblerARM::set32Test32):
8278        (JSC::MacroAssemblerARM::set32Test8):
8279        * assembler/MacroAssemblerARMv7.h:
8280        (JSC::MacroAssemblerARMv7::set32Compare32):
8281        (JSC::MacroAssemblerARMv7::set8Compare32):
8282        (JSC::MacroAssemblerARMv7::set32Test32):
8283        (JSC::MacroAssemblerARMv7::set32Test8):
8284        * assembler/MacroAssemblerMIPS.h:
8285        (JSC::MacroAssemblerMIPS::set8Compare32):
8286        (JSC::MacroAssemblerMIPS::set32Compare32):
8287        (JSC::MacroAssemblerMIPS::set32Test8):
8288        (JSC::MacroAssemblerMIPS::set32Test32):
8289        * assembler/MacroAssemblerX86Common.h:
8290        (JSC::MacroAssemblerX86Common::set8Compare32):
8291        (JSC::MacroAssemblerX86Common::set32Compare32):
8292        (JSC::MacroAssemblerX86Common::set32Test8):
8293        (JSC::MacroAssemblerX86Common::set32Test32):
8294        * jit/JITOpcodes.cpp:
8295        (JSC::JIT::emit_op_eq):
8296        (JSC::JIT::emit_op_neq):
8297        (JSC::JIT::compileOpStrictEq):
8298        (JSC::JIT::emit_op_eq_null):
8299        (JSC::JIT::emit_op_neq_null):
8300        * jit/JITOpcodes32_64.cpp:
8301        (JSC::JIT::emit_op_eq):
8302        (JSC::JIT::emit_op_neq):
8303        (JSC::JIT::compileOpStrictEq):
8304        (JSC::JIT::emit_op_eq_null):
8305        (JSC::JIT::emit_op_neq_null):
8306
83072010-12-03  Oliver Hunt  <oliver@apple.com>
8308
8309        Reviewed by Geoff Garen.
8310
8311        Incorrect logic for returning memory at the end of linking.
8312        Reviewed by Geoff Garen.
8313
8314        At the end of linking we return any space at the end of the
8315        allocated executable region that was saved due to branch
8316        compaction.  This is currently by done by subtracting the
8317        different from the m_freePtr in the allocation pool.  This
8318        can be incorrect if your allocation was made from a new
8319        page that was not selected for subsequent allocations.
8320
8321        This patch corrects this behaviour by verifying that the
8322        memory being returned actually comes from the current
8323        allocation pool.
8324
8325        * assembler/LinkBuffer.h:
8326        (JSC::LinkBuffer::linkCode):
8327        * jit/ExecutableAllocator.h:
8328        (JSC::ExecutablePool::tryShrink):
8329
83302010-12-03  Michael Saboff  <msaboff@apple.com>
8331
8332        Reviewed by Gavin Barraclough
8333
8334        Changes to significantly reduce branches to branches in JIT'ed
8335        parentheses backtrack processing.  The changes include the following:
8336        - Taking the backtracking processing out of line and adding it as
8337          code at the end of the JIT'ed routine.
8338        - Allow backtracks to be direct via an indirect branch for an address
8339          pushed onto the stack.  If the use of an indirect branch is from a
8340          conditional jump, then we emit a trampoline at the end of the 
8341          routine.
8342        - Propogate backtracks instead of adding trampolines.  Backtracks are
8343          propogated to where they are used.  This change also eliminated 
8344          trampoline branch code that aren't used.
8345        - Added global expression state to keep track of parentheses tail
8346          code and indirect branches.
8347        Other changes made to support these changes.
8348        - Split invertOrCapture flag on Patterns to two separate flags.  Added
8349          getters for these flags.  Rippled these changes to both the JIT 
8350          and interpreter code.
8351        - Split BacktrackDestination out off TermGenerationState struct.
8352          This is done to hold references to a backtrack for later code
8353          generation.
8354        https://bugs.webkit.org/show_bug.cgi?id=50295
8355
8356        * assembler/ARMAssembler.h:
8357        (JSC::ARMAssembler::JmpDst::isSet):
8358        * assembler/ARMv7Assembler.h:
8359        (JSC::ARMv7Assembler::JmpDst::isSet):
8360        * assembler/AbstractMacroAssembler.h:
8361        (JSC::AbstractMacroAssembler::Label::isSet):
8362        (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
8363        (JSC::AbstractMacroAssembler::DataLabelPtr::used):
8364        (JSC::AbstractMacroAssembler::JumpList::clear):
8365        * assembler/MIPSAssembler.h:
8366        (JSC::MIPSAssembler::JmpDst::isSet):
8367        * assembler/X86Assembler.h:
8368        (JSC::X86Assembler::JmpDst::isSet):
8369        * yarr/RegexCompiler.cpp:
8370        (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
8371        (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
8372        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
8373        (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
8374        * yarr/RegexInterpreter.cpp:
8375        (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
8376        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
8377        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
8378        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
8379        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
8380        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
8381        (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
8382        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
8383        (JSC::Yarr::ByteCompiler::emitDisjunction):
8384        * yarr/RegexInterpreter.h:
8385        (JSC::Yarr::ByteTerm::ByteTerm):
8386        (JSC::Yarr::ByteTerm::BackReference):
8387        (JSC::Yarr::ByteTerm::invert):
8388        (JSC::Yarr::ByteTerm::capture):
8389        * yarr/RegexJIT.cpp:
8390        (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
8391        (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
8392        (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
8393        (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
8394        (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
8395        (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
8396        (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
8397        (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
8398        (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
8399        (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
8400        (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
8401        (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
8402        (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
8403        (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
8404        (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
8405        (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
8406        (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
8407        (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
8408        (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
8409        (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
8410        (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
8411        (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
8412        (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
8413        (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
8414        (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
8415        (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
8416        (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
8417        (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
8418        (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
8419        (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
8420        (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
8421        (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
8422        (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
8423        (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
8424        (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
8425        (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
8426        (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
8427        (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
8428        (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
8429        (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
8430        (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
8431        (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
8432        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
8433        (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
8434        (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
8435        (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
8436        (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
8437        (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
8438        (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
8439        (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
8440        (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
8441        (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
8442        (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
8443        (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
8444        (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
8445        (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
8446        (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
8447        (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
8448        (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
8449        (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
8450        (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
8451        (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
8452        (JSC::Yarr::RegexGenerator::generateAssertionBOL):
8453        (JSC::Yarr::RegexGenerator::generateAssertionEOL):
8454        (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
8455        (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
8456        (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
8457        (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
8458        (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
8459        (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
8460        (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
8461        (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
8462        (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
8463        (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
8464        (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
8465        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
8466        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
8467        (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
8468        (JSC::Yarr::RegexGenerator::generateDisjunction):
8469        (JSC::Yarr::RegexGenerator::compile):
8470        * yarr/RegexPattern.h:
8471        (JSC::Yarr::PatternTerm::PatternTerm):
8472        (JSC::Yarr::PatternTerm::invert):
8473        (JSC::Yarr::PatternTerm::capture):
8474
84752010-12-03  Chris Rogers  <crogers@google.com>
8476
8477        Reviewed by Kenneth Russell.
8478
8479        First steps to adding web audio files to build systems
8480        https://bugs.webkit.org/show_bug.cgi?id=49952
8481
8482        * wtf/Complex.h:
8483
84842010-12-03  Patrick Gansterer  <paroga@webkit.org>
8485
8486        Reviewed by Andreas Kling.
8487
8488        Move StringWx.cpp into wtf directory
8489        https://bugs.webkit.org/show_bug.cgi?id=50060
8490
8491        * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
8492        (WTF::String::String):
8493
84942010-12-03  Patrick Gansterer  <paroga@webkit.org>
8495
8496        Reviewed by Andreas Kling.
8497
8498        Move StringBrew.cpp into wtf directory
8499        https://bugs.webkit.org/show_bug.cgi?id=50058
8500
8501        * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
8502        (WTF::String::String):
8503
85042010-12-03  Patrick Gansterer  <paroga@webkit.org>
8505
8506        Reviewed by Andreas Kling.
8507
8508        Move StringHaiku.cpp into wtf directory
8509        https://bugs.webkit.org/show_bug.cgi?id=50057
8510
8511        * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
8512        (WTF::String::String):
8513        (WTF::String::operator BString):
8514
85152010-12-02  Geoffrey Garen  <ggaren@apple.com>
8516
8517        Try to fix Windows build.
8518
8519        * runtime/GCActivityCallback.cpp:
8520        (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
8521
85222010-12-02  Geoffrey Garen  <ggaren@apple.com>
8523
8524        Reviewed by Gavin Barraclough.
8525
8526        Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
8527        com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
8528        
8529        * API/APIShims.h:
8530        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
8531        synchronize() function.
8532
8533        * runtime/Collector.cpp:
8534        (JSC::Heap::activityCallback):
8535        * runtime/Collector.h: Added an activityCallback() accessor, for the
8536        call above.
8537
8538        * runtime/GCActivityCallback.h:
8539        (JSC::GCActivityCallback::synchronize):
8540        * runtime/GCActivityCallbackCF.cpp:
8541        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
8542        (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
8543        (JSC::DefaultGCActivityCallback::operator()):
8544        (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
8545        scheduled in. If we begin/resume execution within a new run loop, reschedule
8546        on it. This prevents a crash when using a lockless context group on
8547        multiple threads -- the crash would happen if the GC timer scheduled on
8548        thread A, then you continued execution on thread B, then the thread A
8549        timer fired.
8550
85512010-12-02  Darin Adler  <darin@apple.com>
8552
8553        * wtf/ASCIICType.h: Fix wrong type from last check-in.
8554
85552010-12-02  Darin Adler  <darin@apple.com>
8556
8557        Try to fix certain builds (Qt Windows).
8558
8559        * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
8560        versions of ICU, UChar32 can be a typedef for unsigned. Adding this
8561        overload should make us compatible with these old ICUs.
8562
85632010-12-02  Patrick Gansterer  <paroga@webkit.org>
8564
8565        Reviewed by Darin Adler.
8566
8567        Add AtomicString::fromUTF8
8568        https://bugs.webkit.org/show_bug.cgi?id=45594
8569
8570        Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
8571        calculates the required length for the UTF16 conversation in one step.
8572        This is then used in a specialized translator for the string table of AtomicString.
8573
8574        * JavaScriptCore.exp:
8575        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8576        * wtf/text/AtomicString.cpp:
8577        (WTF::CStringTranslator::equal):
8578        (WTF::HashAndUTF8CharactersTranslator::hash):
8579        (WTF::HashAndUTF8CharactersTranslator::equal):
8580        (WTF::HashAndUTF8CharactersTranslator::translate):
8581        (WTF::AtomicString::add):
8582        (WTF::AtomicString::addSlowCase):
8583        (WTF::AtomicString::find):
8584        (WTF::AtomicString::fromUTF8):
8585        * wtf/text/AtomicString.h:
8586        * wtf/text/StringImpl.h:
8587        * wtf/text/WTFString.h:
8588        * wtf/unicode/UTF8.cpp:
8589        (WTF::Unicode::readUTF8Sequence):
8590        (WTF::Unicode::convertUTF8ToUTF16):
8591        (WTF::Unicode::calculateStringHashFromUTF8):
8592        (WTF::Unicode::equalUTF16WithUTF8):
8593        * wtf/unicode/UTF8.h:
8594
85952010-12-02  Geoffrey Garen  <ggaren@apple.com>
8596
8597        Reviewed by Sam Weinig.
8598
8599        Added a little hardening to OSAllocator.
8600
8601        * wtf/OSAllocatorPosix.cpp:
8602        (WTF::OSAllocator::release):
8603        * wtf/OSAllocatorWin.cpp:
8604        (WTF::OSAllocator::reserve):
8605        (WTF::OSAllocator::reserveAndCommit):
8606        (WTF::OSAllocator::commit):
8607        (WTF::OSAllocator::decommit):
8608        (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
8609        reports an error.
8610
86112010-12-02  Csaba Osztrogonác  <ossy@webkit.org>
8612
8613        Reviewed by Geoffrey Garen.
8614
8615        [Qt] Make platform managing of OSAllocator better than r73106
8616        https://bugs.webkit.org/show_bug.cgi?id=50385
8617
8618        * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
8619        * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
8620        * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
8621        * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
8622
86232010-12-02  Patrick Gansterer  <paroga@webkit.org>
8624
8625        Reviewed by Andreas Kling.
8626
8627        [WINCE] Use GetTickCount() for srand()
8628        https://bugs.webkit.org/show_bug.cgi?id=50338
8629
8630        time() is not a native function on WinCE, so use GetTickCount() instead.
8631
8632        * wtf/RandomNumberSeed.h:
8633        (WTF::initializeRandomNumberGenerator):
8634
86352010-12-02  Norbert Leser  <norbert.leser@nokia.com>
8636
8637        Reviewed by Laszlo Gombos.
8638
8639        [Qt] [Symbian] Reintroduce compiler optimizations for JSC
8640        https://bugs.webkit.org/show_bug.cgi?id=50270
8641
8642        Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
8643        Tested via Sunspider and V8 - both of which show significant performance improvement.
8644
8645        * JavaScriptCore.pro:
8646
86472010-12-02  Peter Varga  <pvarga@inf.u-szeged.hu>
8648
8649        Reviewed by Gavin Barraclough.
8650
8651        Move regex parsing and fallback handling to runtime/RegExp.cpp
8652        https://bugs.webkit.org/show_bug.cgi?id=50015
8653
8654        * runtime/RegExp.cpp:
8655        (JSC::RegExp::RegExp):
8656        (JSC::RegExp::create):
8657        (JSC::RegExp::compile):
8658        (JSC::RegExp::match):
8659        (JSC::RegExp::printTraceData):
8660        * runtime/RegExp.h:
8661        (JSC::RegExp::pattern):
8662        * yarr/RegexInterpreter.cpp:
8663        * yarr/RegexInterpreter.h:
8664        * yarr/RegexJIT.cpp:
8665        (JSC::Yarr::RegexGenerator::compile):
8666        (JSC::Yarr::jitCompileRegex):
8667        * yarr/RegexJIT.h:
8668        (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
8669        (JSC::Yarr::RegexCodeBlock::setFallBack):
8670        (JSC::Yarr::RegexCodeBlock::isFallBack):
8671        (JSC::Yarr::executeRegex):
8672
86732010-12-01  Geoffrey Garen  <ggaren@apple.com>
8674
8675        Try to fix the GTK build.
8676
8677        * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
8678
86792010-12-01  Geoffrey Garen  <ggaren@apple.com>
8680
8681        Try to fix the EFL Linux build.
8682
8683        * CMakeListsEfl.txt: Added OSAllocator to the project.
8684
86852010-12-01  Geoffrey Garen  <ggaren@apple.com>
8686
8687        Try to fix the Qt build: Include all OS files for Qt's sake, and then
8688        use #ifdefs in the files to exclude things based on OS.
8689        
8690        This is a pretty bad way to manage platforms -- hopefully we can
8691        fix the Qt build system and move away from this in the future.
8692
8693        * wtf/OSAllocatorPosix.cpp:
8694        * wtf/OSAllocatorSymbian.cpp:
8695        * wtf/OSAllocatorWin.cpp:
8696        * wtf/wtf.pri:
8697
86982010-12-01  Geoffrey Garen  <ggaren@apple.com>
8699
8700        Try to fix the Chromium build.
8701        
8702        * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
8703
87042010-12-01  Geoffrey Garen  <ggaren@apple.com>
8705
8706        Try to fix the GTK build.
8707
8708        * GNUmakefile.am: Added OSAllocator to another project.
8709
87102010-12-01  Geoffrey Garen  <ggaren@apple.com>
8711
8712        Try to fix the GTK Linux build.
8713
8714        * JavaScriptCore.gypi: Added OSAllocator to the project.
8715
87162010-12-01  Geoffrey Garen  <ggaren@apple.com>
8717
8718        Try to fix the Qt Linux build.
8719
8720        * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
8721
87222010-12-01  Geoffrey Garen  <ggaren@apple.com>
8723
8724        Try to fix Windows build: export some more symbols.
8725
8726        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8727
87282010-12-01  Geoffrey Garen  <ggaren@apple.com>
8729
8730        Try to fix the Qt Linux build.
8731
8732        * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
8733
87342010-12-01  Geoffrey Garen  <ggaren@apple.com>
8735
8736        Windows build fix: commit doesn't have a return value.
8737
8738        * wtf/OSAllocatorWin.cpp:
8739        (WTF::OSAllocator::commit):
8740
87412010-12-01  Geoffrey Garen  <ggaren@apple.com>
8742
8743        Build fix: Export some symbols.
8744
8745        * JavaScriptCore.exp:
8746
87472010-12-01  Geoffrey Garen  <ggaren@apple.com>
8748
8749        Build fix.
8750
8751        * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
8752        so other projects can see it.
8753
8754        * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
8755
87562010-12-01  Geoffrey Garen  <ggaren@apple.com>
8757
8758        Reviewed by Sam Weinig.
8759
8760        Baby step toward a cross-platform virtual memory abstraction: created
8761        an all-static OSAllocator class and changed MarkStack to use it.
8762
8763        * JavaScriptCore.exp: These functions are inlined now.
8764
8765        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
8766
8767        * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
8768
8769        * runtime/MarkStack.h:
8770        (JSC::MarkStack::allocateStack):
8771        (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
8772        own platform-specific code.
8773
8774        * runtime/MarkStackNone.cpp: Removed. Nothing used this.
8775
8776        * runtime/MarkStackPosix.cpp: 
8777        * runtime/MarkStackSymbian.cpp:
8778        * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
8779        we use the OSAllocator abstraction now.
8780
8781        * wtf/OSAllocator.h: Added.
8782        * wtf/OSAllocatorPosix.cpp: Added.
8783        (WTF::OSAllocator::reserve):
8784        (WTF::OSAllocator::reserveAndCommit):
8785        (WTF::OSAllocator::commit):
8786        (WTF::OSAllocator::decommit):
8787        (WTF::OSAllocator::release):
8788        * wtf/OSAllocatorSymbian.cpp: Added.
8789        (WTF::OSAllocator::reserve):
8790        (WTF::OSAllocator::reserveAndCommit):
8791        (WTF::OSAllocator::commit):
8792        (WTF::OSAllocator::decommit):
8793        (WTF::OSAllocator::release):
8794        * wtf/OSAllocatorWin.cpp: Added.
8795        (WTF::OSAllocator::reserve):
8796        (WTF::OSAllocator::reserveAndCommit):
8797        (WTF::OSAllocator::commit):
8798        (WTF::OSAllocator::decommit):
8799        (WTF::OSAllocator::release): The new OSAllocator abstraction.
8800
8801        * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
8802
88032010-12-01  Steve Falkenburg  <sfalken@apple.com>
8804
8805        Reviewed by Adam Roben.
8806
8807        WinCairo build should not use link-time code generation (LTCG)
8808        https://bugs.webkit.org/show_bug.cgi?id=50353
8809
8810        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
8811        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
8812        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
8813        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
8814
8815010-12-01  Steve Falkenburg  <sfalken@apple.com>
8816
8817        Reviewed by Adam Roben.
8818
8819        vcproj changes can't be applied cleanly by the Windows EWS bot
8820        https://bugs.webkit.org/show_bug.cgi?id=50328
8821
8822        * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
8823        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
8824        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
8825        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
8826        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
8827        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
8828        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
8829        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
8830        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
8831        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
8832        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
8833        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
8834        * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
8835        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
8836
88372010-12-01  Gavin Barraclough  <barraclough@apple.com>
8838
8839        Reviewed by Sam Weinig.
8840
8841        Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
8842
8843        For unmatched subpattens we previously used to set the subpattern end to -1,
8844        but now we only set the start value. E.g. consider the following:
8845            /a(b)?c/.exec("ac");
8846        Previously we would generate an internal results array of:
8847            [ 0, 2, -1, -1 ]
8848        Since fairly recently we have generated results of:
8849            [ 0, 2, -1, ??? ]
8850        (With the end index of the subpattern uninitialized).
8851
8852        Update these ASSERTs to account for this.
8853
8854        Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
8855        were checking the wrong property on the pattern term. We should have been
8856        looking at term.parentheses.subpatternId, but instead were checking
8857        term.subpatternId. The latter is actually only the subpatternId for
8858        back reference terms. Rename this to backReferenceSubpatternId.
8859
8860        * yarr/RegexInterpreter.cpp:
8861        (JSC::Yarr::Interpreter::matchBackReference):
8862        (JSC::Yarr::Interpreter::backtrackBackReference):
8863
88642010-11-30  Gavin Barraclough  <barraclough@apple.com>
8865
8866        Rubber stamped by Sam Weinig.
8867
8868        Bug 50297 - \s in YARR should match BOMs.
8869
8870        From section 15.10.2.12 CharacterClassEscape contains:
8871
8872        The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
8873        characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
8874
8875        Table 2 in section 7.2 contains:
8876
8877        \uFEFF Byte Order Mark <BOM>
8878
8879        * create_regex_tables:
8880            Add BOM to spaces table.
8881
88822010-11-30  Gavin Barraclough  <barraclough@apple.com>
8883
8884        Reviewed by Darin Adler.
8885
8886        Fixed review comments following bug #48101.
8887        Mostly typos, plus gave quantifyInfinite a symbolic name.
8888
8889        * yarr/RegexCompiler.cpp:
8890        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
8891        (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
8892        * yarr/RegexInterpreter.cpp:
8893        (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
8894        (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
8895        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
8896        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
8897        * yarr/RegexJIT.cpp:
8898        (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
8899        (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
8900        (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
8901        * yarr/RegexParser.h:
8902        (JSC::Yarr::Parser::parseTokens):
8903        (JSC::Yarr::parse):
8904
89052010-11-30  Steve Falkenburg  <sfalken@apple.com>
8906
8907        Reviewed by Darin Adler.
8908
8909        WTF project missing build-stopping code from its pre-build event
8910        https://bugs.webkit.org/show_bug.cgi?id=50281
8911
8912        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
8913
89142010-11-30  Patrick Gansterer  <paroga@webkit.org>
8915
8916        Reviewed by Darin Adler.
8917
8918        Cleanup UTF8.cpp
8919        https://bugs.webkit.org/show_bug.cgi?id=49581
8920
8921        Use macros and functions instead of range values directly.
8922
8923        * wtf/unicode/UTF8.cpp:
8924        (WTF::Unicode::inlineUTF8SequenceLength):
8925        (WTF::Unicode::UTF8SequenceLength):
8926        (WTF::Unicode::convertUTF16ToUTF8):
8927        (WTF::Unicode::readUTF8Sequence):
8928        (WTF::Unicode::convertUTF8ToUTF16):
8929        * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
8930
89312010-11-30  Geoffrey Garen  <ggaren@apple.com>
8932
8933        Reviewed by Gavin Barraclough.
8934
8935        Fixed a crash seen when using a PageAllocation to store itself.
8936
8937        * wtf/PageAllocation.h:
8938        (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
8939        it, in case unmapping m_base unmaps the PageAllocation.
8940
8941        * wtf/BumpPointerAllocator.h:
8942        (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
8943
89442010-11-30  Xan Lopez  <xlopez@igalia.com>
8945
8946        Reviewed by Darin Adler.
8947
8948        m_hasNonEnumerableProperties is never initialized in Structure
8949        https://bugs.webkit.org/show_bug.cgi?id=50266
8950
8951        * runtime/Structure.cpp:
8952        (JSC::Structure::Structure): initialize member variable.
8953
89542010-11-29  Steve Falkenburg  <sfalken@apple.com>
8955
8956        Windows build fix (part 1). Use correct environment variable syntax in cmd files.
8957
8958        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
8959        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
8960        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
8961        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
8962        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
8963        * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
8964        * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
8965        * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
8966        * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
8967        * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
8968
89692010-11-29  Dan Bernstein  <mitz@apple.com>
8970
8971        Reviewed by Darin Adler.
8972
8973        WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
8974        https://bugs.webkit.org/show_bug.cgi?id=50038
8975
8976        * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
8977
89782010-11-29  Steve Falkenburg  <sfalken@apple.com>
8979
8980        Reviewed by Darin Adler.
8981
8982        JavaScriptCore projects on Windows should use cmd files for build events
8983        https://bugs.webkit.org/show_bug.cgi?id=50193
8984
8985        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
8986        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
8987        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
8988        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
8989        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
8990        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
8991        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
8992        * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
8993        * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
8994        * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
8995        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
8996        * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
8997        * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
8998        * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
8999
90002010-11-29  Dai Mikurube  <dmikurube@google.com>
9001
9002        Reviewed by Kent Tamura.
9003
9004        when empty, clicking "down" on outer-spin-button returns "max value"
9005        https://bugs.webkit.org/show_bug.cgi?id=45491
9006
9007        It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
9008        date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
9009        returns a struct tm, not milliseconds.
9010
9011        Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
9012        environments. This calculation is already done in calculateUTCOffset(), and complicated.
9013        Duplicating this complicated calculation is unreasonable because of maintainability.
9014        To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
9015
9016        * JavaScriptCore.exp:
9017        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
9018        * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
9019        (WTF::calculateUTCOffset):
9020        (WTF::calculateDSTOffset):
9021        * wtf/DateMath.h:
9022
90232010-11-29  Chris Rogers  <crogers@google.com>
9024
9025        Reviewed by Kenneth Russell.
9026
9027        Switch web audio code to use FloatPoint3D instead of Vector3
9028        https://bugs.webkit.org/show_bug.cgi?id=50186
9029
9030        * wtf/Vector3.h: Removed.
9031
90322010-11-29  Steve Falkenburg  <sfalken@apple.com>
9033
9034        Reviewed by Adam Roben.
9035
9036        Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
9037        https://bugs.webkit.org/show_bug.cgi?id=49858
9038
9039        We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
9040        - To simplify editing (editing vsprops build steps is confusing).
9041        - For more readable diffs.
9042
9043        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
9044        * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
9045        * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
9046
90472010-11-29  Geoffrey Garen  <ggaren@apple.com>
9048
9049        Reviewed by Gavin Barraclough.
9050
9051        Improved accuracy of command-line SunSpider.
9052
9053        * jsc.cpp:
9054        (functionRun): Changed the "run" function to run a given test in
9055        its own global object. Previously, all tests ran in the same global
9056        object, which created name conflicts, and made globals from previous
9057        tests artificially survive into later tests.
9058        
9059        Also changed "run" to return the elapsed milliseconds when running a
9060        given test, for slightly more accurate numbers.
9061
9062        (functionCheckSyntax): Ditto on returning elapsed milliseconds.
9063
90642010-11-29  Darin Adler  <darin@apple.com>
9065
9066        Reviewed by Andreas Kling.
9067
9068        Remove a couple unneeded overflow checks
9069        https://bugs.webkit.org/show_bug.cgi?id=49816
9070
9071        * wtf/text/CString.cpp:
9072        (WTF::CString::init): Use an ASSERT instead of
9073        an overflow check with CRASH.
9074
90752010-11-29  Adam Roben  <aroben@apple.com>
9076
9077        Robustify react-to-vsprops-changes.py against changes to its location
9078        or the location of the .vsprops files
9079
9080        Suggested by John Sullivan.
9081
9082        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
9083        Removed file_modification_times.
9084        (main): Use glob.glob to find the .vsprops files and assert that we found some.
9085
90862010-11-29  Adam Roben  <aroben@apple.com>
9087
9088        Touch wtf/Platform.h whenever any .vsprops file changes
9089
9090        This will cause all files to be recompiled, which will make changes to
9091        preprocessor macros (e.g., ENABLE_*) actually take effect.
9092
9093        Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
9094        macros are changed (because not enough files are rebuilt)
9095
9096        Reviewed by John Sullivan.
9097
9098        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
9099        (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
9100        added some comments and logging to make it clearer what the script is
9101        doing and why.
9102
91032010-11-29  Adam Roben  <aroben@apple.com>
9104
9105        Update react-to-vsprops-changes.py after r72555
9106
9107        .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
9108
9109        Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
9110        react-to-vsprops-changes.py no longer works for people with a
9111        non-default $WebKitLibrariesDir
9112
9113        Reviewed by John Sullivan.
9114
9115        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
9116        (main): Always look in WebKitLibraries/win for .vsprops files, not in
9117        $WebKitLibrariesDir.
9118
91192010-11-28  Gavin Barraclough  <barraclough@apple.com>
9120
9121        Reviewed by Sam Weinig.
9122
9123        Bug 48100 - YARR allows what seems like a bogus character-class range
9124
9125        Per ECMA-262 character classes containing character ranges containing
9126        character classes are invalid, eg:
9127            /[\d-x]/
9128            /[x-\d]/
9129            /[\d-\d]/
9130        These should throw a syntax error.
9131
9132        * yarr/RegexParser.h:
9133
91342010-11-27  Gavin Barraclough  <barraclough@apple.com>
9135
9136        Reviewed by Sam Weinig.
9137
9138        Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
9139
9140        The test cases in the linked mozilla bug demonstrate a couple of
9141        problems in subpattern matching. These bugs lie in the optimized
9142        cases - for matching parentheses with a quantity count of 1, and
9143        for matching greedy quantified parentheses at the end of a regex
9144        (which do not backtrack).
9145
9146        In both of these cases we are failing to correctly handle empty
9147        matches. In the case of parentheses-single matches (quantity count
9148        one) we are failing to test for empty matches at all. In the case
9149        of terminal subpattern matches we do currently check, however there
9150        is a subtler bug here too. In the case of an empty match we will
9151        presently immediately fall through to the next alternative (or
9152        complete the regex match), whereas upon a failed match we should
9153        be backtracking into the failing alternative, to give it a chance
9154        to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
9155        attempting to match the first alternative this will match the empty
9156        string - since a?? is non-greedy, however rather than moving on to
9157        the second alternative we should be re-matching the first one, at
9158        which point the non-greedy a?? will match, and as such the result
9159        should be "ab", not "a").
9160
9161        Terminal subpattern matching contains a second bug, too. The frame
9162        location values in the subpattern should be being allocated with
9163        the outer disjunction's frame (as we do for the parentheses-single
9164        optimization). Consider the following three regexes:
9165            /a*(?:b*)*c*/
9166            /a*(?:b*)c*/
9167            /a*(?:b*)*/
9168        Considering only the frame location required by the atoms a,b, and
9169        c, (ignoring space associated with the nested subpattern) the first
9170        regex (a normal subpattern match) requires a frame size of 2 for
9171        the outer disjunction, (to backtrack terms a & c), with each
9172        iteration of the subpattern requiring a frame of size 1 (in order
9173        to backtrack b). In the case of the second regex (where the
9174        parentheses-single optimization will kick in) the outer frame must
9175        be set up with a frame size of 3, since the outer frame will also
9176        be used when running the nested subpattern. We will currently only
9177        allocate a farme of size 1 for the outer disjuntion (to contain a),
9178        howver the frame size should be 2 (since the subpattern will be
9179        evaluated in the outer frame). In addition to failing to allocate
9180        frame space the frame offsets are also presently invalid - in the
9181        case of the last regex b's frame location will be set assuming it
9182        to be the first term in the frame, whereas in this case b lies
9183        after the term a, and should be taking a separate frame location.
9184
9185        In order to correctly allocate the frame for terminal subpattern
9186        matches we must move this optimization back up from the JIT into
9187        the compiler (and thus interpreter too), since this is where the
9188        frame allocation takes place.
9189
9190        * yarr/RegexCompiler.cpp:
9191        (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
9192        (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
9193        (JSC::Yarr::compileRegex):
9194        * yarr/RegexInterpreter.cpp:
9195        (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
9196        (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
9197        (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
9198        (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
9199        (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
9200        (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
9201        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
9202        (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
9203        (JSC::Yarr::Interpreter::matchDisjunction):
9204        (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
9205        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
9206        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
9207        (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
9208        (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
9209        (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
9210        (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
9211        (JSC::Yarr::ByteCompiler::emitDisjunction):
9212        * yarr/RegexInterpreter.h:
9213        * yarr/RegexJIT.cpp:
9214        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
9215        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
9216        (JSC::Yarr::RegexGenerator::generateTerm):
9217        * yarr/RegexPattern.h:
9218        (JSC::Yarr::PatternTerm::PatternTerm):
9219
92202010-11-24  Patrick Gansterer  <paroga@webkit.org>
9221
9222        Reviewed by Csaba Osztrogonác.
9223
9224        Remove Bakefile build system files
9225        https://bugs.webkit.org/show_bug.cgi?id=49983
9226
9227        r53757 only removed the content, but not the files.
9228        This patch removes that empty files.
9229
9230        * JavaScriptCoreSources.bkl: Removed.
9231        * jscore.bkl: Removed.
9232
92332010-11-24  Gabor Loki  <loki@webkit.org>
9234
9235        Reviewed by Csaba Osztrogonác.
9236
9237        Merge the usage of jumps and calls at ARM-JIT
9238        https://bugs.webkit.org/show_bug.cgi?id=50008
9239
9240        Those JmpSrc objects which represent jumps (not calls) should point to
9241        after the jump instruction.
9242
9243        * assembler/ARMAssembler.h:
9244        (JSC::ARMAssembler::blx):
9245        (JSC::ARMAssembler::loadBranchTarget):
9246        (JSC::ARMAssembler::getAbsoluteJumpAddress):
9247        (JSC::ARMAssembler::linkJump):
9248        (JSC::ARMAssembler::relinkJump):
9249        (JSC::ARMAssembler::linkCall):
9250        (JSC::ARMAssembler::relinkCall):
9251        (JSC::ARMAssembler::getRelocatedAddress):
9252        (JSC::ARMAssembler::getDifferenceBetweenLabels):
9253        (JSC::ARMAssembler::getCallReturnOffset):
9254        * assembler/MacroAssemblerARM.h:
9255        (JSC::MacroAssemblerARM::call):
9256
92572010-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
9258
9259        Reviewed by Xan Lopez.
9260
9261        [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
9262        https://bugs.webkit.org/show_bug.cgi?id=48625
9263
9264        GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
9265        UTF-8 to perform the case operations and then convert back the result to
9266        UTF-16. GLib conversion methods return a new allocated string, so we
9267        have to memcpy the result into the destination buffer too. Using our
9268        own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
9269        we don't need such memcpy, since they take an already allocated buffer
9270        rather than returning a new one. There's another optimization for the
9271        case when the destination buffer is not large enough. In that case,
9272        methods should return the expected destination buffer size and are
9273        called again with a new buffer. We can avoid the conversion to UTF-16 by
9274        pre-calculating the required size for the destination buffer.
9275
9276        * wtf/unicode/glib/UnicodeGLib.cpp:
9277        (WTF::Unicode::getUTF16LengthFromUTF8):
9278        (WTF::Unicode::convertCase):
9279        (WTF::Unicode::foldCase):
9280        (WTF::Unicode::toLower):
9281        (WTF::Unicode::toUpper):
9282
92832010-11-23  Patrick Gansterer  <paroga@webkit.org>
9284
9285        Reviewed by Sam Weinig.
9286
9287        Use WTF::StringHasher directly in JavaScriptCore
9288        https://bugs.webkit.org/show_bug.cgi?id=49893
9289
9290        * profiler/CallIdentifier.h:
9291        (JSC::CallIdentifier::Hash::hash):
9292        * runtime/Identifier.cpp:
9293        (JSC::IdentifierCStringTranslator::hash):
9294        (JSC::IdentifierUCharBufferTranslator::hash):
9295
92962010-11-22  Patrick Gansterer  <paroga@webkit.org>
9297
9298        Reviewed by Sam Weinig.
9299
9300        Add WTF::FixedArray::size()
9301        https://bugs.webkit.org/show_bug.cgi?id=49891
9302
9303        Add a method to get the size of a FixedArray.
9304
9305        * wtf/FixedArray.h:
9306        (WTF::FixedArray::size):
9307
93082010-11-22  Patrick Gansterer  <paroga@webkit.org>
9309
9310        Reviewed by Adam Roben.
9311
9312        [WINCE] Set correct preprocessor definitions
9313        https://bugs.webkit.org/show_bug.cgi?id=49887
9314
9315        * wtf/Platform.h:
9316
93172010-11-22  Adam Roben  <aroben@apple.com>
9318
9319        Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
9320
9321        Apple's Windows build allows placing header files and import libraries for WebKit's
9322        dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
9323        $WebKitLibrariesDir environment variable. This is both required for production builds and
9324        convenient for Apple-internal developer builds. Apple's production builds also require that
9325        WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
9326        builds, the files are copied into that directory tree by the
9327        WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
9328        copying is done by
9329        JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
9330
9331        This .vsprops copying is problematic in one very important case: when a developer updates
9332        their source tree and then tries to build. Visual Studio only reads .vsprops files when a
9333        project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
9334        updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
9335        build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
9336        $WebKitLibrariesDir, but Visual Studio will not pick up the changes.  The rest of the build
9337        will proceed with out-of-date .vsprops files, which will likely result in a build failure.
9338
9339        To fix this, we now use normal relative paths to access the .vsprops files in the source
9340        tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
9341        variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
9342        unset, so the normal relative paths are used to read the .vsprops files out of the source
9343        tree directly. In production builds, this environment variable is set to a fake directory
9344        that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
9345        is resolved.
9346        
9347        For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
9348
9349        $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
9350
9351        In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
9352        files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
9353        JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
9354        "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
9355        FeatureDefines.vsprops becomes:
9356
9357        $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
9358
9359        which resolves to:
9360
9361        $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
9362
9363        (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
9364        actually exist since they are matched by an equal number of ".." path components.)
9365
9366        Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
9367        Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
9368
9369        Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
9370        updated
9371
9372        Reviewed by Dave Hyatt.
9373
9374        * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
9375        production builds can find the .vsprops files.
9376
9377        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
9378        .vsprops files. It isn't needed anymore.
9379
9380        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
9381        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
9382        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
9383        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
9384        Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
9385        files.
9386
93872010-11-19  Peter Varga  <pvarga@inf.u-szeged.hu>
9388
9389        Reviewed by Gavin Barraclough.
9390
9391        YARR JIT should fallback to YARR Interpreter instead of PCRE.
9392        https://bugs.webkit.org/show_bug.cgi?id=46719
9393
9394        Remove the ENABLE_YARR macro and the option of matching regular
9395        expressions with PCRE from JavaScriptCore.
9396
9397        * runtime/JSGlobalData.h:
9398        * runtime/RegExp.cpp:
9399        (JSC::RegExp::compile):
9400        (JSC::RegExp::match):
9401        * tests/mozilla/expected.html:
9402        * wtf/Platform.h:
9403        * yarr/RegexCompiler.cpp:
9404        * yarr/RegexCompiler.h:
9405        * yarr/RegexInterpreter.cpp:
9406        (JSC::Yarr::byteCompileRegex):
9407        * yarr/RegexInterpreter.h:
9408        * yarr/RegexJIT.cpp:
9409        (JSC::Yarr::jitCompileRegex):
9410        * yarr/RegexJIT.h:
9411        (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
9412        (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
9413        (JSC::Yarr::RegexCodeBlock::getFallback):
9414        (JSC::Yarr::RegexCodeBlock::isFallback):
9415        (JSC::Yarr::RegexCodeBlock::setFallback):
9416        (JSC::Yarr::executeRegex):
9417        * yarr/RegexParser.h:
9418        * yarr/RegexPattern.h:
9419
94202010-11-20  Kwang Yul Seo  <skyul@company100.net>
9421
9422        Reviewed by David Kilzer.
9423
9424        [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
9425        https://bugs.webkit.org/show_bug.cgi?id=49520
9426
9427        DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
9428
9429        * wtf/Assertions.cpp:
9430        * wtf/Assertions.h:
9431
94322010-11-20  Gabor Loki  <loki@webkit.org>
9433
9434        Reviewed by Gavin Barraclough.
9435
9436        Support JIT_OPTIMIZE_MOD on Thumb-2
9437        https://bugs.webkit.org/show_bug.cgi?id=49432
9438
9439        Rewrite the soft modulo operation into macroassembler form, and move it
9440        to JSValue32_64 section.
9441        Add support for soft modulo on Thumb-2 JIT also.
9442
9443        * assembler/ARMv7Assembler.h:
9444        (JSC::ARMv7Assembler::clz):
9445        * assembler/MacroAssemblerARM.h:
9446        (JSC::MacroAssemblerARM::countLeadingZeros32):
9447        (JSC::MacroAssemblerARM::relativeTableJump):
9448        * assembler/MacroAssemblerARMv7.h:
9449        (JSC::MacroAssemblerARMv7::countLeadingZeros32):
9450        (JSC::MacroAssemblerARMv7::relativeTableJump):
9451        * jit/JITArithmetic.cpp:
9452        (JSC::JIT::emit_op_mod):
9453        * jit/JITOpcodes.cpp:
9454        (JSC::JIT::privateCompileCTIMachineTrampolines):
9455        * jit/JITOpcodes32_64.cpp:
9456        (JSC::JIT::softModulo):
9457        * jit/JITStubs.cpp:
9458        (JSC::JITThunks::JITThunks):
9459        * wtf/Platform.h:
9460
94612010-11-20  David Kilzer  <ddkilzer@apple.com>
9462
9463        <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
9464
9465        Reviewed by Darin Adler.
9466
9467        * JavaScriptCore.exp:
9468        * wtf/text/StringImpl.cpp:
9469        (WTF::StringImpl::secure): Added argument that controls whether
9470        the last character is obscured or not.  Implemented behavior.
9471        * wtf/text/StringImpl.h:
9472        (WTF::StringImpl::LastCharacterBehavior): Added enum.
9473        (WTF::StringImpl::secure): Updated method signature.
9474
94752010-11-19  William Chan  <willchan@chromium.org>
9476
9477        Reviewed by David Levin.
9478
9479        Add USE(CHROMIUM_NET)
9480
9481        Indicates the use of Chromium's network stack.  Chromium's network
9482        stack performs better when it has full view of all resource requests,
9483        so USE(CHROMIUM_NET) can be used to bypass throttles.
9484
9485        https://bugs.webkit.org/show_bug.cgi?id=49778
9486
9487        * wtf/Platform.h:
9488
94892010-11-19  Steve Falkenburg  <sfalken@apple.com>
9490
9491        Reviewed by Adam Roben.
9492
9493        Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
9494        https://bugs.webkit.org/show_bug.cgi?id=49819
9495
9496        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
9497        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
9498        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
9499        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
9500        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
9501        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
9502
95032010-11-19  Oliver Hunt  <oliver@apple.com>
9504
9505        Reviewed by Geoffrey Garen.
9506
9507        Don't check for constant registers when we can guarantee that the register won't be in the constant pool
9508        https://bugs.webkit.org/show_bug.cgi?id=49814
9509
9510        Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
9511        when we can guarantee that the register is not referring to a constant.
9512        This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
9513        logic correct when we're using a faked callframe (as in the case of the globalExec).
9514
9515        * bytecode/CodeBlock.cpp:
9516        (JSC::CodeBlock::createActivation):
9517        * debugger/DebuggerCallFrame.cpp:
9518        (JSC::DebuggerCallFrame::thisObject):
9519        * interpreter/CallFrame.h:
9520        (JSC::ExecState::uncheckedR):
9521        * interpreter/Interpreter.cpp:
9522        (JSC::Interpreter::resolve):
9523        (JSC::Interpreter::resolveSkip):
9524        (JSC::Interpreter::resolveGlobal):
9525        (JSC::Interpreter::resolveGlobalDynamic):
9526        (JSC::Interpreter::resolveBase):
9527        (JSC::Interpreter::resolveBaseAndProperty):
9528        (JSC::Interpreter::callEval):
9529        (JSC::Interpreter::unwindCallFrame):
9530        (JSC::Interpreter::throwException):
9531        (JSC::Interpreter::execute):
9532        (JSC::Interpreter::executeCall):
9533        (JSC::Interpreter::executeConstruct):
9534        (JSC::Interpreter::prepareForRepeatCall):
9535        (JSC::Interpreter::createExceptionScope):
9536        (JSC::Interpreter::privateExecute):
9537        * jit/JITStubs.cpp:
9538        (JSC::DEFINE_STUB_FUNCTION):
9539        * runtime/JSActivation.cpp:
9540        (JSC::JSActivation::argumentsGetter):
9541
95422010-11-19  Steve Falkenburg  <sfalken@apple.com>
9543
9544        Reviewed by Darin Adler.
9545
9546        Normalize Cairo/CFLite project/solution configuration names
9547        https://bugs.webkit.org/show_bug.cgi?id=49818
9548
9549        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
9550        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
9551        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
9552
95532010-11-18  Steve Falkenburg  <sfalken@apple.com>
9554
9555        Reviewed by Adam Roben.
9556
9557        Windows vcproj configuration names should be normalized across projects
9558        https://bugs.webkit.org/show_bug.cgi?id=49776
9559
9560        * JavaScriptCore.vcproj/JavaScriptCore.sln:
9561        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
9562        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
9563        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
9564
95652010-11-19  Patrick Gansterer  <paroga@webkit.org>
9566
9567        Unreviewed, build fix after r72360.
9568
9569        * bytecode/CodeBlock.h:
9570        (JSC::CodeBlock::bytecodeOffset):
9571
95722010-11-18  Gavin Barraclough  <barraclough@apple.com>
9573
9574        Rubber stamped by Geoff Garen.
9575
9576        Bug 49577 - Function.prototype should be non-configurable
9577
9578        Ooops, Function.prototype should not be enumerable!
9579
9580        * runtime/JSFunction.cpp:
9581        (JSC::JSFunction::getOwnPropertySlot):
9582
95832010-11-18  Gavin Barraclough  <barraclough@apple.com>
9584
9585        Reviewed by Oliver Hunt.
9586
9587        Bug 49708 - Stop recompiling functions to regenerate exception info.
9588
9589        Instead only hold info as necessary – keep divot info is the inspector
9590        is enabled, line number info is debugging or profiling, and handler
9591        info for functions with try/catch.
9592
9593        * bytecode/CodeBlock.cpp:
9594        (JSC::CodeBlock::dumpStatistics):
9595        (JSC::CodeBlock::CodeBlock):
9596        (JSC::CodeBlock::lineNumberForBytecodeOffset):
9597        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
9598        (JSC::CodeBlock::shrinkToFit):
9599        * bytecode/CodeBlock.h:
9600        (JSC::CodeBlock::bytecodeOffset):
9601        (JSC::CodeBlock::addExpressionInfo):
9602        (JSC::CodeBlock::addLineInfo):
9603        (JSC::CodeBlock::hasExpressionInfo):
9604        (JSC::CodeBlock::hasLineInfo):
9605        (JSC::CodeBlock::needsCallReturnIndices):
9606        (JSC::CodeBlock::callReturnIndexVector):
9607        * bytecode/SamplingTool.cpp:
9608        (JSC::SamplingTool::dump):
9609        * bytecompiler/BytecodeGenerator.cpp:
9610        (JSC::BytecodeGenerator::generate):
9611        (JSC::BytecodeGenerator::BytecodeGenerator):
9612        * bytecompiler/BytecodeGenerator.h:
9613        (JSC::BytecodeGenerator::emitNode):
9614        (JSC::BytecodeGenerator::emitNodeInConditionContext):
9615        (JSC::BytecodeGenerator::emitExpressionInfo):
9616        (JSC::BytecodeGenerator::addLineInfo):
9617        * interpreter/Interpreter.cpp:
9618        (JSC::Interpreter::unwindCallFrame):
9619        (JSC::appendSourceToError):
9620        (JSC::Interpreter::throwException):
9621        (JSC::Interpreter::privateExecute):
9622        (JSC::Interpreter::retrieveLastCaller):
9623        * interpreter/Interpreter.h:
9624        * jit/JIT.cpp:
9625        (JSC::JIT::privateCompile):
9626        * jit/JITStubs.cpp:
9627        (JSC::jitThrow):
9628        (JSC::DEFINE_STUB_FUNCTION):
9629        * runtime/Collector.cpp:
9630        (JSC::Heap::markRoots):
9631        * runtime/Executable.cpp:
9632        (JSC::EvalExecutable::compileInternal):
9633        (JSC::ProgramExecutable::compileInternal):
9634        (JSC::FunctionExecutable::compileForCallInternal):
9635        (JSC::FunctionExecutable::compileForConstructInternal):
9636        * runtime/Executable.h:
9637        * runtime/JSGlobalData.cpp:
9638        (JSC::JSGlobalData::JSGlobalData):
9639        * runtime/JSGlobalData.h:
9640        (JSC::JSGlobalData::usingAPI):
9641        * runtime/JSGlobalObject.h:
9642        (JSC::JSGlobalObject::supportsRichSourceInfo):
9643        (JSC::JSGlobalObject::globalData):
9644
96452010-11-18  Adam Roben  <aroben@apple.com>
9646
9647        Add a script to delete manifest-related files when they are older than
9648        any .vsprops file
9649
9650        Changes to .vsprops files can cause the manifest files to become
9651        invalid, and Visual Studio doesn't always figure out that it needs to
9652        rebuild them.
9653
9654        Reviewed by Sam Weinig.
9655
9656        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
9657        Call the new script.
9658
9659        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
9660        Added the new script.
9661
9662        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
9663        (file_modification_times): Generator to return the modification time of
9664        each file in a directory hierarchy.
9665        (main): Get the modification time of the newest vsprops file, then find
9666        all manifest-related files in the obj directory. Delete all
9667        manifest-related files that are older than the newest vsprops file.
9668
96692010-11-18  Mark Rowe  <mrowe@apple.com>
9670
9671        Rubber-stamped by Adam Roben.
9672
9673        <rdar://problem/8602509&8602717&8602724> Enable compaction support.
9674
9675        * Configurations/JavaScriptCore.xcconfig:
9676
96772010-11-18  Gavin Barraclough  <barraclough@apple.com>
9678
9679        Reviewed by Oliver Hunt.
9680
9681        Bug 49635 - Profiler implementation is fragile
9682
9683        The profile presently requires the exception handling mechanism to explicitly
9684        remove all stack frames that are exited during the exception unwind mechanism.
9685        This is fragile in a number of ways:
9686          * We have to change bytecode register allocation when compiling code to run
9687            when profiling, to preserve the callee function (this is also required to
9688            call did_call after the call has returned).
9689          * In the JIT we have to maintain additional data structures
9690            (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
9691            containing the callee.
9692          * In the interpreter we use 'magic values' to offset into the instruction
9693            stream to rediscover the register containing the function.
9694
9695        Instead, move profiling into the head and tail of functions.
9696          * This correctly accounts the cost of the call itself to the caller.
9697          * This allows us to access the callee function object from the callframe.
9698          * This means that at the point a call is made we can track the stack depth
9699            on the ProfileNode.
9700          * When unwinding we can simply report the depth at which the exception is
9701            being handled - all call frames above this level are freed.
9702
9703        * bytecode/CodeBlock.cpp:
9704        (JSC::CodeBlock::shrinkToFit):
9705        * bytecode/CodeBlock.h:
9706        (JSC::CodeBlock::bytecodeOffset):
9707        (JSC::CodeBlock::methodCallLinkInfo):
9708        * bytecompiler/BytecodeGenerator.cpp:
9709        (JSC::BytecodeGenerator::emitCall):
9710        (JSC::BytecodeGenerator::emitCallVarargs):
9711        * interpreter/Interpreter.cpp:
9712        (JSC::Interpreter::unwindCallFrame):
9713        (JSC::Interpreter::throwException):
9714        (JSC::Interpreter::execute):
9715        (JSC::Interpreter::executeCall):
9716        (JSC::Interpreter::executeConstruct):
9717        (JSC::Interpreter::privateExecute):
9718        * jit/JITStubs.cpp:
9719        (JSC::DEFINE_STUB_FUNCTION):
9720        * profiler/Profile.cpp:
9721        (JSC::Profile::Profile):
9722        * profiler/ProfileGenerator.cpp:
9723        (JSC::ProfileGenerator::addParentForConsoleStart):
9724        (JSC::ProfileGenerator::willExecute):
9725        (JSC::ProfileGenerator::didExecute):
9726        (JSC::ProfileGenerator::exceptionUnwind):
9727        (JSC::ProfileGenerator::stopProfiling):
9728        * profiler/ProfileGenerator.h:
9729        * profiler/ProfileNode.cpp:
9730        (JSC::ProfileNode::ProfileNode):
9731        (JSC::ProfileNode::willExecute):
9732        * profiler/ProfileNode.h:
9733        (JSC::ProfileNode::create):
9734        (JSC::ProfileNode::callerCallFrame):
9735        * profiler/Profiler.cpp:
9736        (JSC::dispatchFunctionToProfiles):
9737        (JSC::Profiler::_willExecute):
9738        (JSC::Profiler::_didExecute):
9739        (JSC::Profiler::exceptionUnwind):
9740        * profiler/Profiler.h:
9741
97422010-11-18  Steve Falkenburg  <sfalken@apple.com>
9743
9744        Reviewed by Adam Roben.
9745
9746        Remove leftover Windows Debug_Internal configurations
9747        https://bugs.webkit.org/show_bug.cgi?id=49758
9748
9749        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
9750        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
9751        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
9752        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
9753
97542010-11-18  Chao-ying Fu  <fu@mips.com>
9755
9756        Reviewed by Csaba Osztrogonác.
9757
9758        Avoid increasing required alignment of target type warning
9759        https://bugs.webkit.org/show_bug.cgi?id=43963
9760
9761        * runtime/UString.h:
9762        (JSC::UStringHash::equal):
9763        * wtf/StdLibExtras.h:
9764
97652010-11-17  Sam Weinig  <sam@webkit.org>
9766
9767        Reviewed by Anders Carlsson.
9768
9769        Add stubbed out ScrollAnimator for the Mac
9770        https://bugs.webkit.org/show_bug.cgi?id=49678
9771
9772        * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
9773        change in behavior at the moment.
9774
97752010-11-17  David Kilzer  <ddkilzer@apple.com>
9776
9777        <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
9778
9779        Reviewed by Darin Adler.
9780
9781        Add an explicit overflow check prior to allocating our buffer,
9782        rather than implicitly relying on the guard in convertUTF16ToUTF8.
9783
9784        * wtf/text/WTFString.cpp:
9785        (WTF::String::utf8):
9786
97872010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
9788
9789        Unreviewed, rolling out r72197.
9790        http://trac.webkit.org/changeset/72197
9791        https://bugs.webkit.org/show_bug.cgi?id=49661
9792
9793        broke fast/regex/test1.html (Requested by stampho on #webkit).
9794
9795        * runtime/JSGlobalData.h:
9796        * runtime/RegExp.cpp:
9797        (JSC::RegExpRepresentation::~RegExpRepresentation):
9798        (JSC::RegExp::compile):
9799        (JSC::RegExp::match):
9800        * tests/mozilla/expected.html:
9801        * wtf/Platform.h:
9802        * yarr/RegexCompiler.cpp:
9803        * yarr/RegexCompiler.h:
9804        * yarr/RegexInterpreter.cpp:
9805        * yarr/RegexInterpreter.h:
9806        * yarr/RegexJIT.cpp:
9807        (JSC::Yarr::jitCompileRegex):
9808        * yarr/RegexJIT.h:
9809        (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
9810        (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
9811        (JSC::Yarr::RegexCodeBlock::getFallback):
9812        (JSC::Yarr::RegexCodeBlock::setFallback):
9813        (JSC::Yarr::executeRegex):
9814        * yarr/RegexParser.h:
9815        * yarr/RegexPattern.h:
9816
98172010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
9818
9819        Reviewed by Gavin Barraclough.
9820
9821        YARR JIT should fallback to YARR Interpreter instead of PCRE.
9822        https://bugs.webkit.org/show_bug.cgi?id=46719
9823
9824        Remove the ENABLE_YARR macro and the option of matching regular
9825        expressions with PCRE from JavaScriptCore.
9826
9827        * runtime/JSGlobalData.h:
9828        * runtime/RegExp.cpp:
9829        (JSC::RegExp::compile):
9830        (JSC::RegExp::match):
9831        * tests/mozilla/expected.html:
9832        * wtf/Platform.h:
9833        * yarr/RegexCompiler.cpp:
9834        * yarr/RegexCompiler.h:
9835        * yarr/RegexInterpreter.cpp:
9836        (JSC::Yarr::byteCompileRegex):
9837        * yarr/RegexInterpreter.h:
9838        * yarr/RegexJIT.cpp:
9839        (JSC::Yarr::jitCompileRegex):
9840        * yarr/RegexJIT.h:
9841        (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
9842        (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
9843        (JSC::Yarr::RegexCodeBlock::getFallback):
9844        (JSC::Yarr::RegexCodeBlock::isFallback):
9845        (JSC::Yarr::RegexCodeBlock::setFallback):
9846        (JSC::Yarr::executeRegex):
9847        * yarr/RegexParser.h:
9848        * yarr/RegexPattern.h:
9849
98502010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
9851
9852        Reviewed by Gavin Barraclough.
9853
9854        Extend YARR Interpreter with beginning character look-up optimization
9855        https://bugs.webkit.org/show_bug.cgi?id=45751
9856
9857        Add beginning character look-up optimization which sets the start
9858        index to the first possible successful pattern match.
9859        Extend YARR Interpreter with lookupForBeginChars function which
9860        implements the beginning character look-up optimization.
9861
9862        * yarr/RegexInterpreter.cpp:
9863        (JSC::Yarr::Interpreter::InputStream::readPair):
9864        (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
9865        (JSC::Yarr::Interpreter::lookupForBeginChars):
9866        (JSC::Yarr::Interpreter::matchDisjunction):
9867        (JSC::Yarr::Interpreter::interpret):
9868        * yarr/RegexInterpreter.h:
9869        (JSC::Yarr::BytecodePattern::BytecodePattern):
9870
98712010-11-17  Alexis Menard  <alexis.menard@nokia.com>, Simon Hausmann  <simon.hausmann@nokia.com>
9872
9873        Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
9874
9875        [Qt] Add support for use GStreamer with the Qt build
9876
9877        Enable the build/inclusion of the wtf/QObject convenience classes.
9878
9879        * JavaScriptCore.pri:
9880        * wtf/wtf.pri:
9881
98822010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
9883
9884        Reviewed by Gavin Barraclough.
9885
9886        Collect the beginning characters in a RegExp pattern for look-up
9887        optimization
9888        https://bugs.webkit.org/show_bug.cgi?id=45748
9889
9890        Extend the YARR's parser with an algorithm which collects the potential
9891        beginning characters from a RegExp pattern for later look-up optimization.
9892
9893        * yarr/RegexCompiler.cpp:
9894        (JSC::Yarr::BeginCharHelper::BeginCharHelper):
9895        (JSC::Yarr::BeginCharHelper::addBeginChar):
9896        (JSC::Yarr::BeginCharHelper::merge):
9897        (JSC::Yarr::BeginCharHelper::addCharacter):
9898        (JSC::Yarr::BeginCharHelper::linkHotTerms):
9899        (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
9900        (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
9901        (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
9902        (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
9903        (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
9904        (JSC::Yarr::compileRegex):
9905        * yarr/RegexPattern.h:
9906        (JSC::Yarr::TermChain::TermChain):
9907        (JSC::Yarr::BeginChar::BeginChar):
9908        (JSC::Yarr::RegexPattern::RegexPattern):
9909        (JSC::Yarr::RegexPattern::reset):
9910
99112010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
9912
9913        Unreviewed, rolling out r72160.
9914        http://trac.webkit.org/changeset/72160
9915        https://bugs.webkit.org/show_bug.cgi?id=49646
9916
9917        Broke lots of fast/profiler tests, among others (Requested by
9918        aroben on #webkit).
9919
9920        * bytecode/CodeBlock.cpp:
9921        (JSC::CodeBlock::dump):
9922        (JSC::CodeBlock::functionRegisterForBytecodeOffset):
9923        (JSC::CodeBlock::shrinkToFit):
9924        * bytecode/CodeBlock.h:
9925        (JSC::CodeBlock::addFunctionRegisterInfo):
9926        * bytecode/Opcode.h:
9927        * bytecompiler/BytecodeGenerator.cpp:
9928        (JSC::BytecodeGenerator::BytecodeGenerator):
9929        (JSC::BytecodeGenerator::emitCall):
9930        (JSC::BytecodeGenerator::emitCallVarargs):
9931        (JSC::BytecodeGenerator::emitReturn):
9932        (JSC::BytecodeGenerator::emitConstruct):
9933        * bytecompiler/BytecodeGenerator.h:
9934        (JSC::CallArguments::profileHookRegister):
9935        * bytecompiler/NodesCodegen.cpp:
9936        (JSC::CallArguments::CallArguments):
9937        * interpreter/Interpreter.cpp:
9938        (JSC::Interpreter::unwindCallFrame):
9939        (JSC::Interpreter::throwException):
9940        (JSC::Interpreter::execute):
9941        (JSC::Interpreter::executeCall):
9942        (JSC::Interpreter::executeConstruct):
9943        (JSC::Interpreter::privateExecute):
9944        * jit/JIT.cpp:
9945        (JSC::JIT::privateCompileMainPass):
9946        * jit/JIT.h:
9947        * jit/JITOpcodes.cpp:
9948        (JSC::JIT::emit_op_profile_will_call):
9949        (JSC::JIT::emit_op_profile_did_call):
9950        * jit/JITOpcodes32_64.cpp:
9951        (JSC::JIT::emit_op_profile_will_call):
9952        (JSC::JIT::emit_op_profile_did_call):
9953        * jit/JITStubs.cpp:
9954        (JSC::DEFINE_STUB_FUNCTION):
9955        * jit/JITStubs.h:
9956        * profiler/Profile.cpp:
9957        (JSC::Profile::Profile):
9958        * profiler/ProfileGenerator.cpp:
9959        (JSC::ProfileGenerator::addParentForConsoleStart):
9960        (JSC::ProfileGenerator::willExecute):
9961        (JSC::ProfileGenerator::didExecute):
9962        (JSC::ProfileGenerator::stopProfiling):
9963        * profiler/ProfileGenerator.h:
9964        * profiler/ProfileNode.cpp:
9965        (JSC::ProfileNode::ProfileNode):
9966        (JSC::ProfileNode::willExecute):
9967        * profiler/ProfileNode.h:
9968        (JSC::ProfileNode::create):
9969        (JSC::ProfileNode::operator==):
9970        * profiler/Profiler.cpp:
9971        (JSC::dispatchFunctionToProfiles):
9972        (JSC::Profiler::willExecute):
9973        (JSC::Profiler::didExecute):
9974        * profiler/Profiler.h:
9975
99762010-11-16  Gavin Barraclough  <barraclough@apple.com>
9977
9978        Reviewed by Sam Weinig.
9979
9980        Bug 49635 - Profiler implementation is fragile
9981
9982        The profile presently requires the exception handling mechanism to explicitly
9983        remove all stack frames that are exited during the exception unwind mechanism.
9984        This is fragile in a number of ways:
9985          * We have to change bytecode register allocation when compiling code to run
9986            when profiling, to preserve the callee function (this is also required to
9987            call did_call after the call has returned).
9988          * In the JIT we have to maintain additional data structures
9989            (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
9990            containing the callee.
9991          * In the interpreter we use 'magic values' to offset into the instruction
9992            stream to rediscover the register containing the function.
9993
9994        Instead, move profiling into the head and tail of functions.
9995          * This correctly accounts the cost of the call itself to the caller.
9996          * This allows us to access the callee function object from the callframe.
9997          * This means that at the point a call is made we can track the stack depth
9998            on the ProfileNode.
9999          * When unwinding we can simply report the depth at which the exception is
10000            being handled - all call frames above this level are freed.
10001
10002        * JavaScriptCore.xcodeproj/project.pbxproj:
10003        * bytecode/CodeBlock.cpp:
10004        (JSC::CodeBlock::dump):
10005        (JSC::CodeBlock::shrinkToFit):
10006        * bytecode/CodeBlock.h:
10007        (JSC::CodeBlock::bytecodeOffset):
10008        (JSC::CodeBlock::methodCallLinkInfo):
10009        * bytecode/Opcode.h:
10010        * bytecompiler/BytecodeGenerator.cpp:
10011        (JSC::BytecodeGenerator::BytecodeGenerator):
10012        (JSC::BytecodeGenerator::emitCall):
10013        (JSC::BytecodeGenerator::emitCallVarargs):
10014        (JSC::BytecodeGenerator::emitReturn):
10015        (JSC::BytecodeGenerator::emitConstruct):
10016        * bytecompiler/BytecodeGenerator.h:
10017        (JSC::CallArguments::count):
10018        * bytecompiler/NodesCodegen.cpp:
10019        (JSC::CallArguments::CallArguments):
10020        * interpreter/Interpreter.cpp:
10021        (JSC::ProfileHostCall::ProfileHostCall):
10022        (JSC::ProfileHostCall::~ProfileHostCall):
10023        (JSC::Interpreter::unwindCallFrame):
10024        (JSC::Interpreter::throwException):
10025        (JSC::Interpreter::execute):
10026        (JSC::Interpreter::executeCall):
10027        (JSC::Interpreter::executeConstruct):
10028        (JSC::Interpreter::privateExecute):
10029        * jit/JIT.cpp:
10030        (JSC::JIT::privateCompileMainPass):
10031        * jit/JIT.h:
10032        * jit/JITOpcodes.cpp:
10033        (JSC::JIT::emit_op_profile_has_called):
10034        (JSC::JIT::emit_op_profile_will_return):
10035        * jit/JITOpcodes32_64.cpp:
10036        (JSC::JIT::emit_op_profile_has_called):
10037        (JSC::JIT::emit_op_profile_will_return):
10038        * jit/JITStubs.cpp:
10039        (JSC::DEFINE_STUB_FUNCTION):
10040        * jit/JITStubs.h:
10041        * profiler/Profile.cpp:
10042        (JSC::Profile::Profile):
10043        * profiler/ProfileGenerator.cpp:
10044        (JSC::ProfileGenerator::addParentForConsoleStart):
10045        (JSC::ProfileGenerator::willExecute):
10046        (JSC::ProfileGenerator::didExecute):
10047        (JSC::ProfileGenerator::exceptionUnwind):
10048        (JSC::ProfileGenerator::stopProfiling):
10049        * profiler/ProfileGenerator.h:
10050        * profiler/ProfileNode.cpp:
10051        (JSC::ProfileNode::ProfileNode):
10052        (JSC::ProfileNode::willExecute):
10053        * profiler/ProfileNode.h:
10054        (JSC::ProfileNode::create):
10055        (JSC::ProfileNode::operator==):
10056        (JSC::ProfileNode::exec):
10057        * profiler/Profiler.cpp:
10058        (JSC::dispatchFunctionToProfiles):
10059        (JSC::Profiler::hasCalled):
10060        (JSC::Profiler::willEvaluate):
10061        (JSC::Profiler::willReturn):
10062        (JSC::Profiler::didEvaluate):
10063        (JSC::Profiler::exceptionUnwind):
10064        * profiler/Profiler.h:
10065
100662010-11-16  Brian Weinstein  <bweinstein@apple.com>
10067
10068        Reviewed by Adam Roben and Steve Falkenburg.
10069
10070        Touch Platform.h to force a rebuild for Windows.
10071
10072        * wtf/Platform.h:
10073
100742010-11-16  Steve Falkenburg  <sfalken@apple.com>
10075
10076        Reviewed by Adam Roben.
10077
10078        Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
10079        https://bugs.webkit.org/show_bug.cgi?id=49632
10080
10081        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
10082        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
10083        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
10084        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
10085
100862010-11-16  Peter Varga  <pvarga@inf.u-szeged.hu>
10087
10088        Reviewed by Gavin Barraclough.
10089
10090        The number of recursive match calls isn't limited in YARR Interpreter
10091        https://bugs.webkit.org/show_bug.cgi?id=47906
10092
10093        Check the number of the matchDisjunction recursive calls to avoid unbounded
10094        recursion.
10095        Now the matchDisjunction function returns JSRegExpResult instead of bool.
10096        The JSRegExpResult enum contains the result of matching or the error code
10097        of the failure (like HitLimit) which terminates the matching.
10098        The error codes are based on pcre's jsRegExpExecute error codes.
10099
10100        * yarr/RegexInterpreter.cpp:
10101        (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
10102        (JSC::Yarr::Interpreter::matchParentheses):
10103        (JSC::Yarr::Interpreter::backtrackParentheses):
10104        (JSC::Yarr::Interpreter::matchDisjunction):
10105        (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
10106        (JSC::Yarr::Interpreter::interpret):
10107        (JSC::Yarr::Interpreter::Interpreter):
10108        * yarr/RegexInterpreter.h:
10109
101102010-11-16  Brian Weinstein  <bweinstein@apple.com>
10111
10112        Rest of the Windows build fix.
10113
10114        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10115
101162010-11-16  Gavin Barraclough  <barraclough@apple.com>
10117
10118        Windows build fix pt 1.
10119
10120        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
10121
101222010-11-16  Gavin Barraclough  <barraclough@apple.com>
10123
10124        Reviewed by Oliver Hunt.
10125
10126        https://bugs.webkit.org/show_bug.cgi?id=49606
10127
10128        The bug here is that we read the prototype from the RHS argument using a regular
10129        op_get_by_id before op_instanceof has checked that this is an object implementing
10130        HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
10131        in the code base, since we have additional logic (implemented using the
10132        GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
10133        from the get_by_id into invalid parameter errors. Having fixed this bug this code
10134        is all redundant, since in these cases the get_by_id will never have been reached.
10135
10136        * bytecode/CodeBlock.cpp:
10137        (JSC::CodeBlock::dump):
10138        (JSC::CodeBlock::shrinkToFit):
10139        * bytecode/CodeBlock.h:
10140        (JSC::CodeBlock::addExpressionInfo):
10141        * bytecode/Opcode.h:
10142        * bytecompiler/BytecodeGenerator.cpp:
10143        (JSC::BytecodeGenerator::BytecodeGenerator):
10144        (JSC::BytecodeGenerator::emitCheckHasInstance):
10145        * bytecompiler/BytecodeGenerator.h:
10146        * bytecompiler/NodesCodegen.cpp:
10147        (JSC::InstanceOfNode::emitBytecode):
10148        * interpreter/Interpreter.cpp:
10149        (JSC::Interpreter::throwException):
10150        (JSC::Interpreter::privateExecute):
10151        * jit/JIT.cpp:
10152        (JSC::JIT::privateCompileMainPass):
10153        (JSC::JIT::privateCompileSlowCases):
10154        * jit/JIT.h:
10155        * jit/JITOpcodes.cpp:
10156        (JSC::JIT::emit_op_check_has_instance):
10157        (JSC::JIT::emit_op_instanceof):
10158        (JSC::JIT::emitSlow_op_check_has_instance):
10159        (JSC::JIT::emitSlow_op_instanceof):
10160        * jit/JITOpcodes32_64.cpp:
10161        (JSC::JIT::emit_op_check_has_instance):
10162        (JSC::JIT::emit_op_instanceof):
10163        (JSC::JIT::emitSlow_op_check_has_instance):
10164        (JSC::JIT::emitSlow_op_instanceof):
10165        * jit/JITStubs.cpp:
10166        (JSC::DEFINE_STUB_FUNCTION):
10167        * jit/JITStubs.h:
10168        * runtime/ExceptionHelpers.cpp:
10169        (JSC::createInterruptedExecutionException):
10170        (JSC::createTerminatedExecutionException):
10171        (JSC::createUndefinedVariableError):
10172        (JSC::createNotAFunctionError):
10173        (JSC::createNotAnObjectError):
10174        * runtime/ExceptionHelpers.h:
10175        * runtime/JSGlobalData.cpp:
10176        (JSC::JSGlobalData::JSGlobalData):
10177        * runtime/JSGlobalData.h:
10178        * runtime/JSNotAnObject.cpp:
10179        (JSC::JSNotAnObject::toPrimitive):
10180        (JSC::JSNotAnObject::getPrimitiveNumber):
10181        (JSC::JSNotAnObject::toBoolean):
10182        (JSC::JSNotAnObject::toNumber):
10183        (JSC::JSNotAnObject::toString):
10184        (JSC::JSNotAnObject::toObject):
10185        (JSC::JSNotAnObject::getOwnPropertySlot):
10186        (JSC::JSNotAnObject::getOwnPropertyDescriptor):
10187        (JSC::JSNotAnObject::put):
10188        (JSC::JSNotAnObject::deleteProperty):
10189        (JSC::JSNotAnObject::getOwnPropertyNames):
10190        * runtime/JSNotAnObject.h:
10191        (JSC::JSNotAnObject::JSNotAnObject):
10192        * runtime/JSObject.h:
10193        (JSC::JSObject::isActivationObject):
10194        * runtime/JSValue.cpp:
10195        (JSC::JSValue::toObjectSlowCase):
10196        (JSC::JSValue::synthesizeObject):
10197        (JSC::JSValue::synthesizePrototype):
10198
101992010-11-15  Darin Adler  <darin@apple.com>
10200
10201        Reviewed by Sam Weinig.
10202
10203        Harden additional string functions against large lengths
10204        https://bugs.webkit.org/show_bug.cgi?id=49574
10205
10206        * wtf/text/CString.cpp:
10207        (WTF::CString::init): Check for length that is too large for CString.
10208        (WTF::CString::newUninitialized): Ditto.
10209        (WTF::CString::copyBufferIfNeeded): Fix types so the length stays
10210        in a size_t.
10211
10212        * wtf/text/WTFString.cpp:
10213        (WTF::String::append): Check for length that is too large.
10214
102152010-11-15  Gavin Barraclough  <barraclough@apple.com>
10216
10217        Reviewed by Sam Weinig.
10218
10219        Bug 49577 - Function.prototype should be non-configurable
10220
10221        JSC lazily allocates the prototype property of Function objects.
10222
10223        We check the prototype exists on 'get', but not on 'put'.
10224        If you 'put' without having first done a 'get' you can end up with a configurable
10225        prototype (prototype should only ever be non-configurable).
10226
10227        This is visible in a couple of ways:
10228          * 'delete' on the property may succeed. (the next access will result in a new,
10229          reset prototype object).
10230          * the prototype may be set to a getter.
10231
10232        * runtime/JSFunction.cpp:
10233        (JSC::JSFunction::getOwnPropertyNames):
10234            Reify the prototype property before allowing an enumerate including don't enum properties.
10235        (JSC::JSFunction::put):
10236            Reify the prototype property before any put to it.
10237
102382010-11-15  Gavin Barraclough  <barraclough@apple.com>
10239
10240        Reviewed by Geoff Garen.
10241
10242        Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
10243
10244        Three types of source location information are added to errors.
10245
10246        (1) Divot information.
10247
10248        This was added with the intention of using it to provide better source highlighting in the inspector.
10249        We may still want to do so, but we probably should not be exposing these values in a manner visible to
10250        user scripts – only through an internal C++ interface. The code adding divot properties to objects has
10251        been removed.
10252
10253        (2) Line number information.
10254
10255        Line number information is presently sometimes added at the point the exception is created, and sometimes
10256        added at the point the exception passes through throwException. Change this so that throwException has
10257        the sole responsibility for adding line number and source file information.
10258
10259        (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
10260
10261        These messages are currently created at the point the exceptions is raised. Instead reformat the message
10262        such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
10263        becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
10264        the in throw Exception. This presents a number of advantages:
10265          * we no longer need to have source location information to create these TypeErrors.
10266          * we can chose to append source location information in other error messages, including those where
10267            passing source location to the point of construction would be inconvenient.
10268          * we can chose in future to omit to append source location information when running in a non-debug mode.
10269
10270        This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
10271        removing double periods (..) at end of lines, and adding slightly more context to some errors.
10272
10273        * bytecode/CodeBlock.cpp:
10274        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
10275            - Separated called to access line and range information.
10276
10277        * bytecode/CodeBlock.h:
10278            - Separated called to access line and range information.
10279
10280        * interpreter/Interpreter.cpp:
10281        (JSC::Interpreter::resolve):
10282        (JSC::Interpreter::resolveSkip):
10283        (JSC::Interpreter::resolveGlobal):
10284        (JSC::Interpreter::resolveGlobalDynamic):
10285        (JSC::Interpreter::resolveBaseAndProperty):
10286        (JSC::isInvalidParamForIn):
10287        (JSC::isInvalidParamForInstanceOf):
10288            - Update parameters passed to error constructors.
10289        (JSC::appendSourceToError):
10290            - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
10291        (JSC::Interpreter::throwException):
10292            - Updated to call appendSourceToError. 
10293        (JSC::Interpreter::privateExecute):
10294            - Update parameters passed to error constructors.
10295
10296        * jit/JITStubs.cpp:
10297        (JSC::DEFINE_STUB_FUNCTION):
10298            - Update parameters passed to error constructors.
10299
10300        * runtime/Error.cpp:
10301        (JSC::addErrorInfo):
10302        (JSC::hasErrorInfo):
10303            - Removed divot properties.
10304
10305        * runtime/Error.h:
10306            - Removed divot properties.
10307
10308        * runtime/ErrorInstance.cpp:
10309        (JSC::ErrorInstance::ErrorInstance):
10310            - Initialize new property.
10311
10312        * runtime/ErrorInstance.h:
10313        (JSC::ErrorInstance::appendSourceToMessage):
10314        (JSC::ErrorInstance::setAppendSourceToMessage):
10315        (JSC::ErrorInstance::clearAppendSourceToMessage):
10316            - Added flag to check for errors needing location information appending.
10317        (JSC::ErrorInstance::isErrorInstance):
10318            - Added virtual method to check for ErrorInstances.
10319
10320        * runtime/ExceptionHelpers.cpp:
10321        (JSC::createUndefinedVariableError):
10322        (JSC::createInvalidParamError):
10323        (JSC::createNotAConstructorError):
10324        (JSC::createNotAFunctionError):
10325        (JSC::createNotAnObjectError):
10326            - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
10327
10328        * runtime/ExceptionHelpers.h:
10329            - Updated function signatures.
10330
10331        * runtime/JSFunction.cpp:
10332        (JSC::callHostFunctionAsConstructor):
10333            - Update parameters passed to error constructors.
10334
10335        * runtime/JSObject.h:
10336        (JSC::JSObject::isErrorInstance):
10337            - Added virtual method to check for ErrorInstances.
10338
103392010-11-12  Anders Carlsson  <andersca@apple.com>
10340
10341        Reviewed by Adam Roben.
10342
10343        CString(const char*) crashes when passed a null pointer
10344        https://bugs.webkit.org/show_bug.cgi?id=49450
10345
10346        * wtf/text/CString.cpp:
10347        (WTF::CString::CString):
10348        Return early if str is null.
10349
103502010-11-11  Gavin Barraclough  <barraclough@apple.com>
10351
10352        Reviewed by Oliver Hunt.
10353
10354        Bug 49420 - Clean up syntax/reference error throw.
10355
10356        Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
10357        This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
10358        attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
10359        this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
10360
10361        We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
10362        Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
10363
10364        * JavaScriptCore.xcodeproj/project.pbxproj:
10365        * bytecode/CodeBlock.cpp:
10366        (JSC::CodeBlock::dump):
10367        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
10368        * bytecode/Opcode.h:
10369        * bytecompiler/BytecodeGenerator.cpp:
10370        (JSC::BytecodeGenerator::emitThrowReferenceError):
10371        (JSC::BytecodeGenerator::emitThrowSyntaxError):
10372        (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
10373        * bytecompiler/BytecodeGenerator.h:
10374        (JSC::BytecodeGenerator::emitNodeInConditionContext):
10375        * bytecompiler/NodesCodegen.cpp:
10376        (JSC::ThrowableExpressionData::emitThrowReferenceError):
10377        (JSC::ThrowableExpressionData::emitThrowSyntaxError):
10378        (JSC::RegExpNode::emitBytecode):
10379        (JSC::PostfixErrorNode::emitBytecode):
10380        (JSC::PrefixErrorNode::emitBytecode):
10381        (JSC::AssignErrorNode::emitBytecode):
10382        (JSC::ForInNode::emitBytecode):
10383        (JSC::ContinueNode::emitBytecode):
10384        (JSC::BreakNode::emitBytecode):
10385        (JSC::ReturnNode::emitBytecode):
10386        (JSC::LabelNode::emitBytecode):
10387        * interpreter/Interpreter.cpp:
10388        (JSC::Interpreter::privateExecute):
10389        * jit/JIT.cpp:
10390        (JSC::JIT::privateCompileMainPass):
10391        * jit/JIT.h:
10392        * jit/JITOpcodes.cpp:
10393        (JSC::JIT::emit_op_throw_reference_error):
10394        (JSC::JIT::emit_op_throw_syntax_error):
10395        * jit/JITOpcodes32_64.cpp:
10396        (JSC::JIT::emit_op_throw_reference_error):
10397        (JSC::JIT::emit_op_throw_syntax_error):
10398        * jit/JITStubs.cpp:
10399        (JSC::DEFINE_STUB_FUNCTION):
10400        * jit/JITStubs.h:
10401        * parser/Nodes.h:
10402
104032010-11-11  Darin Adler  <darin@apple.com>
10404
10405        Reviewed by Sam Weinig.
10406
10407        Harden some string functions against large lengths
10408        https://bugs.webkit.org/show_bug.cgi?id=49293
10409
10410        * wtf/text/StringImpl.cpp:
10411        (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
10412        strlen results that are too large for StringImpl.
10413        (WTF::StringImpl::lower): Check for lengths that are too large for
10414        int32_t.
10415        (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
10416        lengths that are too large for int32_t.
10417        (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
10418        rather than int and int32_t so we can handle any length.
10419        (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
10420        lengths that are too large for int32_t.
10421        (WTF::StringImpl::find): Check for strlen results that are too large for
10422        StringImpl.
10423        (WTF::StringImpl::findIgnoringCase): Ditto.
10424        (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
10425        (WTF::StringImpl::createWithTerminatingNullCharacter): Check before
10426        incrementing length.
10427
104282010-11-11  Dan Horák  <dan@danny.cz>
10429
10430        Reviewed by Andreas Kling.
10431
10432        Add support for the s390/s390x architectures, it's big-endian
10433        with s390 being 32-bit and s390x being 64-bit.
10434
10435        https://bugs.webkit.org/show_bug.cgi?id=34786
10436
10437        * wtf/Platform.h:
10438
104392010-11-10  Csaba Osztrogonác  <ossy@webkit.org>
10440
10441        Reviewed by David Hyatt.
10442
10443        HTML5 Ruby support should be mandatory feature
10444        https://bugs.webkit.org/show_bug.cgi?id=49272
10445
10446        Remove Ruby as optional feature.
10447
10448        * Configurations/FeatureDefines.xcconfig:
10449        * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
10450
104512010-11-10  Peter Rybin  <peter.rybin@gmail.com>
10452
10453        Reviewed by Adam Barth.
10454
10455        HTML parser should provide script column position within HTML document to JavaScript engine
10456        https://bugs.webkit.org/show_bug.cgi?id=45271
10457
10458        Adds TextPosition* classes -- a structure that stores line/column/generation
10459        level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
10460        wrappers that emphasize whether int number is used as zero-based or
10461        one-based.
10462
10463        * GNUmakefile.am:
10464        * JavaScriptCore.gypi:
10465        * JavaScriptCore.xcodeproj/project.pbxproj:
10466        * wtf/text/TextPosition.h: Added.
10467        (WTF::TextPosition::TextPosition):
10468        (WTF::TextPosition::minimumPosition):
10469        (WTF::TextPosition::belowRangePosition):
10470        (WTF::ZeroBasedNumber::fromZeroBasedInt):
10471        (WTF::ZeroBasedNumber::ZeroBasedNumber):
10472        (WTF::ZeroBasedNumber::zeroBasedInt):
10473        (WTF::ZeroBasedNumber::base):
10474        (WTF::ZeroBasedNumber::belowBase):
10475        (WTF::OneBasedNumber::fromOneBasedInt):
10476        (WTF::OneBasedNumber::OneBasedNumber):
10477        (WTF::OneBasedNumber::oneBasedInt):
10478        (WTF::OneBasedNumber::convertAsZeroBasedInt):
10479        (WTF::OneBasedNumber::convertToZeroBased):
10480        (WTF::OneBasedNumber::base):
10481        (WTF::OneBasedNumber::belowBase):
10482        (WTF::toZeroBasedTextPosition):
10483        (WTF::toOneBasedTextPosition):
10484        (WTF::ZeroBasedNumber::convertToOneBased):
10485
104862010-11-09  Gabor Loki  <loki@webkit.org>
10487
10488        Reviewed by Gavin Barraclough.
10489
10490        ARM JIT asserts when loading http://reader.google.com in debug mode
10491        https://bugs.webkit.org/show_bug.cgi?id=48912
10492
10493        There are several cases when the uninterrupted sequence is larger than
10494        maximum required offset for pathing the same sequence. Eg.: if in a
10495        uninterrupted sequence the last macroassembler's instruction is a stub
10496        call, it emits store instruction(s) which should not be included in the
10497        calculation of length of uninterrupted sequence. So, the insnSpace and
10498        constSpace should be upper limit instead of hard limit.
10499
10500        * jit/JIT.h:
10501        * jit/JITInlineMethods.h:
10502        (JSC::JIT::endUninterruptedSequence):
10503
105042010-11-09  David Kilzer  <ddkilzer@apple.com>
10505
10506        <http://webkit.org/b/49279> Fix include statements for local headers
10507
10508        Reviewed by Gavin Barraclough.
10509
10510        Use "Foo.h" instead of <Foo.h> for local headers.
10511
10512        * assembler/AbstractMacroAssembler.h: Also fixed sort order.
10513        * assembler/CodeLocation.h:
10514        * yarr/RegexJIT.h:
10515        * yarr/RegexParser.h:
10516
105172010-11-08  Adam Roben  <aroben@apple.com>
10518
10519        Roll out r71532
10520
10521        It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
10522        .bashrc unsets %TEMP%, which broke copy-tools.cmd.
10523
10524        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
10525        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
10526        * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
10527        * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
10528
105292010-11-08  Martin Robinson  <mrobinson@igalia.com>
10530
10531        Reviewed by Xan Lopez.
10532
10533        >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
10534        https://bugs.webkit.org/show_bug.cgi?id=49128
10535
10536        r59042 introduced a C++-style comment in Platform.h, which is often
10537        included in C source files. Change it to a C-style comment.
10538
10539        * wtf/Platform.h: Fix the C++-style comment.
10540
105412010-11-08  Adam Roben  <aroben@apple.com>
10542
10543        Show a message and cause the build to immediately fail when any
10544        .vsprops files are copied
10545
10546        When $WebKitLibrariesDir is set to a non-standard location, the
10547        .vsprops files have to be copied from WebKitLibraries/win to
10548        $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
10549        changes to the .vsprops files until the next time it opens the solution
10550        file. Before this patch, the build would soldier on with the old
10551        .vsprops files, leading to strange build failures. Now we detect that
10552        the .vsprops files have been updated, display a message to the user
10553        telling them what to do, and make the build fail immediately.
10554
10555        Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
10556        .vsprops files are updated
10557
10558        Reviewed by Steve Falkenburg.
10559
10560        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
10561        Moved code to copy the tools directory to the new copy-tools.cmd
10562        script. Moved that after the command that writes the buildfailed file
10563        so the build will be considered a failure if copy-tools.cmd fails.
10564        Changed to write the project name into buildfailed like all our other
10565        projects do, so those other projects will know that the failure was due
10566        to this project.
10567
10568        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
10569        Added new scripts.
10570
10571        * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
10572        the tools directory to $WebKitLibrariesDir. If any files were copied,
10573        we display a message to the user and exit with error code 1 to cause
10574        the build to fail. In non-interactive builds, we just print the message
10575        to the build log. In interactive builds, we show the message in an
10576        alert.
10577
10578        * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
10579        Windows Scripting Host to display a message in an alert.
10580
105812010-11-07  Sam Magnuson  <smagnuson@netflix.com>
10582
10583        Reviewed by Andreas Kling.
10584
10585        [Qt] make install does not cause JavaScriptCore to be built
10586        https://bugs.webkit.org/show_bug.cgi?id=49114
10587
10588        * JavaScriptCore.pro:
10589
105902010-11-05  Oliver Hunt  <oliver@apple.com>
10591
10592        Reviewed by Gavin Barraclough.
10593
10594        Website consistently crashing TOT in JIT::execute() on news.com.au
10595        https://bugs.webkit.org/show_bug.cgi?id=48954
10596
10597        The problem here was the strict pass of this conversion was loading the
10598        this structure into one register but doing the flags check off a different
10599        register.  This is clearly wrong.  I have been unable to trigger the crash
10600        with a reduction, but I've added an assertion to the this conversion to
10601        attempt to make it more readily catchable in future.
10602
10603        * jit/JITOpcodes.cpp:
10604        (JSC::JIT::emit_op_convert_this_strict):
10605        * jit/JITOpcodes32_64.cpp:
10606        (JSC::JIT::emit_op_convert_this_strict):
10607        * jit/JITStubs.cpp:
10608        (JSC::DEFINE_STUB_FUNCTION):
10609
106102010-11-04  Xan Lopez  <xlopez@igalia.com>
10611
10612        Reviewed by Adam Barth.
10613
10614        Use leakRef instead of releaseRef
10615        https://bugs.webkit.org/show_bug.cgi?id=48974
10616
10617        Use leakRef instead of the deprecated releaseRef. This was renamed
10618        some time ago because 'releaseRef' is too close to 'release',
10619        which does something completely different.
10620
106212010-11-04  Eric Seidel  <eric@webkit.org>
10622
10623        Reviewed by Gavin Barraclough.
10624
10625        REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
10626        https://bugs.webkit.org/show_bug.cgi?id=48789
10627
10628        The contract for all String/AtomicString methods seems to be that it's
10629        safe to call them, even when the String is null (impl() returns 0).
10630        This contract was broken by r49798 (unintentionally) when optimizing
10631        for dromeo.
10632        This patch adds a null check to AtomicString::lower() fixing this
10633        crash and preventing future confusion.
10634
10635        * wtf/text/AtomicString.cpp:
10636        (WTF::AtomicString::lower):
10637
106382010-11-04  Adam Barth  <abarth@webkit.org>
10639
10640        Enabled ICCJPEG on Chromium Mac
10641        https://bugs.webkit.org/show_bug.cgi?id=48977
10642
10643        * wtf/Platform.h:
10644
106452010-11-03  Oliver Hunt  <oliver@apple.com>
10646
10647        Reviewed by Gavin Barraclough.
10648
10649        Crash in Function.prototype.call.apply
10650        https://bugs.webkit.org/show_bug.cgi?id=48485
10651
10652        The problem here was op_load_varargs failing to ensure that
10653        there was sufficient space for the entire callframe prior to
10654        op_call_varargs.  This meant that when we then re-entered the
10655        VM it was possible to stomp over an earlier portion of the
10656        stack, so causing sub-optimal behaviour.
10657
10658        * bytecode/Opcode.h:
10659        * bytecompiler/BytecodeGenerator.cpp:
10660        (JSC::BytecodeGenerator::emitLoadVarargs):
10661        * bytecompiler/BytecodeGenerator.h:
10662        * bytecompiler/NodesCodegen.cpp:
10663        (JSC::ApplyFunctionCallDotNode::emitBytecode):
10664        * jit/JIT.cpp:
10665        (JSC::JIT::privateCompile):
10666        * jit/JITOpcodes.cpp:
10667        (JSC::JIT::emit_op_load_varargs):
10668
106692010-11-03  Kenneth Russell  <kbr@google.com>
10670
10671        Reviewed by Chris Marrin.
10672
10673        Redesign extension mechanism in GraphicsContext3D
10674        https://bugs.webkit.org/show_bug.cgi?id=46894
10675
10676        * JavaScriptCore.exp:
10677         - Exposed String::split(const String&, Vector<String>).
10678
106792010-11-03  Adam Roben  <aroben@apple.com>
10680
10681        Bring WTF.vcproj up to date
10682
10683        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
10684        unicode directories, added new files, removed old files.
10685
106862010-11-03  Gabor Loki  <loki@webkit.org>
10687
10688        Reviewed by Andreas Kling.
10689
10690        Remove unused initializeWeakRandomNumberGenerator
10691        https://bugs.webkit.org/show_bug.cgi?id=48899
10692
10693        WeakRandom class is used instead of weakRandomNumber and its initializer.
10694
10695        * wtf/RandomNumberSeed.h:
10696
106972010-11-03  Gabor Loki  <loki@webkit.org>
10698
10699        Reviewed by Geoffrey Garen.
10700
10701        Unused class: JSFastMath with JSValue64
10702        https://bugs.webkit.org/show_bug.cgi?id=48835
10703
10704        Remove unused JSFastMath class.
10705
10706        * runtime/JSImmediate.h:
10707
107082010-11-02  Adam Roben  <aroben@apple.com>
10709
10710        Windows build fix after r71127
10711
10712        MSVC isn't smart enough to figure out that the definition of the global
10713        nullptr variable isn't needed, so we provide one for it.
10714
10715        Fixes <http://webkit.org/b/48862> Windows build is broken due to
10716        undefined symbol nullptr
10717
10718        Reviewed by Anders Carlsson.
10719
10720        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
10721
10722        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
10723        resort the files.
10724
10725        * wtf/NullPtr.cpp: Added.
10726
107272010-11-02  Martin Robinson  <mrobinson@igalia.com>
10728
10729        Reviewed by Xan Lopez.
10730
10731        Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
10732        https://bugs.webkit.org/show_bug.cgi?id=48841
10733
10734        Remove special handling of HashTableDeletedValue in PlatformRefPtr.
10735        This is better handled on a case-by-case basis, when HashTraits
10736        cannot account for it.
10737
10738        * wtf/PlatformRefPtr.h:
10739        (WTF::PlatformRefPtr::~PlatformRefPtr):
10740        (WTF::PlatformRefPtr::clear):
10741        (WTF::::operator):
10742
107432010-10-29  Oliver Hunt  <oliver@apple.com>
10744
10745        Reviewed by Gavin Barraclough.
10746
10747        REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
10748        https://bugs.webkit.org/show_bug.cgi?id=47573
10749
10750        I think the interpreter portion of this was introduced by
10751        an incorrect but silent merge when I updated prior to committing.
10752        The JIT change is basically just a correctness fix, but it is
10753        needed to prevent the testcase from asserting in debug builds.
10754
10755        The basic problem is incorrectly setting the activation object
10756        on an arguments object.  The crash was due to us setting a null
10757        activation in the interpreter, in the jit we were setting the
10758        activation of a strict mode arguments object.
10759
10760        * interpreter/Interpreter.cpp:
10761        (JSC::Interpreter::privateExecute):
10762        * jit/JITStubs.cpp:
10763        (JSC::DEFINE_STUB_FUNCTION):
10764        * wtf/Platform.h:
10765
107662010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
10767
10768        Reviewed by Adam Roben and David Kilzer.
10769
10770        Fix and cleanup of build systems
10771        https://bugs.webkit.org/show_bug.cgi?id=48342
10772
10773        * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
10774
107752010-10-28  Kwang Yul Seo  <skyul@company100.net>
10776
10777        Reviewed by Darin Adler.
10778
10779        Include stddef.h unconditionally in Assertions.h
10780        https://bugs.webkit.org/show_bug.cgi?id=48573
10781
10782        There is no reason to have stddef.h include be MSVC-only.
10783
10784        * wtf/Assertions.h:
10785
107862010-10-28  Herczeg Zoltan  <zherczeg@webkit.org>
10787
10788        Rubber stamped by Csaba Osztrogonác.
10789
10790        Try to fix interpreter build.
10791
10792        Needed parentheses around assignment to avoid GCC warning after
10793        http://trac.webkit.org/changeset/70703
10794
10795        * interpreter/Interpreter.cpp:
10796        (JSC::Interpreter::privateExecute):
10797
107982010-10-28  Peter Varga  <pvarga@inf.u-szeged.hu>
10799
10800        Reviewed by Csaba Osztrogonác.
10801
10802        resetAssertionMatches() is an unused function in YARR Interpreter
10803        https://bugs.webkit.org/show_bug.cgi?id=48503
10804
10805        The resetAssertionMatches() function is removed from YARR Interpreter
10806        because it's never called.
10807
10808        * yarr/RegexInterpreter.cpp:
10809        (JSC::Yarr::Interpreter::resetMatches):
10810
108112010-10-28  Zoltan Herczeg  <zherczeg@webkit.org>
10812
10813        Reviewed by Andreas Kling.
10814
10815        Wrong instruction form for BKPT
10816        https://bugs.webkit.org/show_bug.cgi?id=48427
10817
10818        One '0' is missing from BKPT instruction.
10819        Thanks for Jacob Bramley for reporting this error.
10820
10821        * assembler/ARMAssembler.h:
10822
108232010-10-28  Xan Lopez  <xlopez@igalia.com>
10824
10825        Try to fix Snow Leopard build.
10826
10827        * jit/JITPropertyAccess.cpp:
10828        (JSC::JIT::testPrototype):
10829
108302010-10-28  Xan Lopez  <xlopez@igalia.com>
10831
10832        Reviewed by Oliver Hunt.
10833
10834        Do not have two different asCell APIs in JSValue
10835        https://bugs.webkit.org/show_bug.cgi?id=47979
10836
10837        Remove JSCell* asCell(JSValue) in favor of only using
10838        JSValue::asCell().
10839
10840        * API/APICast.h:
10841        (toRef):
10842        * jit/JITPropertyAccess32_64.cpp:
10843        (JSC::JIT::testPrototype):
10844        * jit/JITStubs.cpp:
10845        (JSC::JITThunks::tryCachePutByID):
10846        (JSC::JITThunks::tryCacheGetByID):
10847        (JSC::DEFINE_STUB_FUNCTION):
10848        * runtime/GetterSetter.h:
10849        (JSC::asGetterSetter):
10850        * runtime/JSByteArray.h:
10851        (JSC::asByteArray):
10852        * runtime/JSCell.h:
10853        (JSC::JSCell::getCallData):
10854        (JSC::JSCell::getConstructData):
10855        * runtime/JSString.h:
10856        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
10857        (JSC::asString):
10858        * runtime/JSValue.h:
10859        * runtime/Operations.cpp:
10860        (JSC::jsIsObjectType):
10861        * runtime/Operations.h:
10862        (JSC::normalizePrototypeChain):
10863        * runtime/Protect.h:
10864        (JSC::gcProtect):
10865        (JSC::gcUnprotect):
10866
108672010-10-27  Chao-ying Fu  <fu@mips.com>
10868
10869        Reviewed by Oliver Hunt.
10870
10871        Support emit_op_mod() for MIPS on JSVALUE32_64
10872        https://bugs.webkit.org/show_bug.cgi?id=46511
10873
10874        This patch uses MIPS div instructions for op_mod to improve performance.
10875
10876        * jit/JITArithmetic32_64.cpp:
10877        (JSC::JIT::emit_op_mod):
10878
108792010-10-27  Brent Fulgham  <bfulgham@webkit.org>
10880
10881        Unreviewed build correction.
10882
10883        * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
10884        turned off in the WinCairo port.  This isn't supported (yet.)
10885
108862010-10-27  Chris Rogers  <crogers@google.com>
10887
10888        Reviewed by Chris Marrin.
10889
10890        Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
10891        https://bugs.webkit.org/show_bug.cgi?id=48279
10892
10893        * Configurations/FeatureDefines.xcconfig:
10894
108952010-10-27  Brian Weinstein  <bweinstein@apple.com>
10896
10897        Windows build fix.
10898
10899        * jit/JITStubs.cpp:
10900        (JSC::jitThrow):
10901
109022010-10-27  Gavin Barraclough  <barraclough@apple.com>
10903
10904        Reviewed by Oliver Hunt.
10905
10906        Bug 48365 - Remove output parameters from JITStackFrame
10907
10908        The JIT stub functions presently use the stackframe to provide a couple of additional return values.
10909          * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
10910          * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
10911
10912        Change exception returns such that exceptions are always returned on JSGlobalData::exception.
10913        Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
10914
10915        * JavaScriptCore.xcodeproj/project.pbxproj:
10916        * debugger/Debugger.cpp:
10917        (JSC::evaluateInGlobalCallFrame):
10918        * debugger/DebuggerCallFrame.cpp:
10919        (JSC::DebuggerCallFrame::evaluate):
10920        * interpreter/CachedCall.h:
10921        (JSC::CachedCall::CachedCall):
10922        (JSC::CachedCall::call):
10923        * interpreter/CallFrame.h:
10924        (JSC::ExecState::exception):
10925        * interpreter/Interpreter.cpp:
10926        (JSC::Interpreter::callEval):
10927        (JSC::Interpreter::Interpreter):
10928        (JSC::Interpreter::execute):
10929        (JSC::Interpreter::executeCall):
10930        (JSC::Interpreter::executeConstruct):
10931        (JSC::Interpreter::prepareForRepeatCall):
10932        (JSC::Interpreter::privateExecute):
10933        * interpreter/Interpreter.h:
10934        * jit/JITCode.h:
10935        (JSC::JITCode::execute):
10936        * jit/JITOpcodes.cpp:
10937        (JSC::JIT::emit_op_catch):
10938        * jit/JITOpcodes32_64.cpp:
10939        (JSC::JIT::emit_op_catch):
10940        * jit/JITStubs.cpp:
10941        (JSC::ctiTrampoline):
10942        (JSC::jitThrow):
10943        (JSC::DEFINE_STUB_FUNCTION):
10944        * jit/JITStubs.h:
10945        * runtime/ArrayPrototype.cpp:
10946        (JSC::arrayProtoFuncFilter):
10947        (JSC::arrayProtoFuncMap):
10948        (JSC::arrayProtoFuncEvery):
10949        (JSC::arrayProtoFuncForEach):
10950        (JSC::arrayProtoFuncSome):
10951        (JSC::arrayProtoFuncReduce):
10952        (JSC::arrayProtoFuncReduceRight):
10953        * runtime/CallData.cpp:
10954        (JSC::call):
10955        * runtime/Completion.cpp:
10956        (JSC::evaluate):
10957        * runtime/ConstructData.cpp:
10958        (JSC::construct):
10959        * runtime/ExceptionHelpers.cpp:
10960        (JSC::createErrorForInvalidGlobalAssignment):
10961        (JSC::throwOutOfMemoryError):
10962        (JSC::throwStackOverflowError):
10963        * runtime/ExceptionHelpers.h:
10964        * runtime/JSArray.cpp:
10965        (JSC::JSArray::sort):
10966        * runtime/JSGlobalObjectFunctions.cpp:
10967        (JSC::globalFuncEval):
10968        * runtime/StringPrototype.cpp:
10969        (JSC::stringProtoFuncReplace):
10970
109712010-10-27  Gabor Loki  <loki@webkit.org>
10972
10973        Reviewed by Oliver Hunt.
10974
10975        https://bugs.webkit.org/show_bug.cgi?id=48060
10976        Speed up op_jeq_null and op_jneq_null.
10977
10978        For both opcodes the NullTag and UndefinedTag are checked to control the
10979        jump. These values can be simply checked by AboveOrEqual or Below
10980        condition if they are the two highest unsigned integers from JSValue's
10981        Tag field.
10982
10983        * jit/JITOpcodes32_64.cpp:
10984        (JSC::JIT::emit_op_jeq_null):
10985        (JSC::JIT::emit_op_jneq_null):
10986        * runtime/JSValue.h:
10987
109882010-10-25  Geoffrey Garen  <ggaren@apple.com>
10989
10990        Reviewed by Oliver Hunt.
10991
10992        https://bugs.webkit.org/show_bug.cgi?id=41948
10993        REGRESSION(r60392): Registerfile can be unwound too far following an exception
10994        
10995        SunSpider reports no change.
10996
10997        * interpreter/Interpreter.cpp:
10998        (JSC::Interpreter::throwException): Walk the stack to calculate the high
10999        water mark currently in use. It's not safe to assume that the current
11000        CallFrame's high water mark is the highest high water mark because
11001        calls do not always set up at the end of a CallFrame. A large caller
11002        CallFrame can encompass a small callee CallFrame.
11003
11004        * jit/JITOpcodes.cpp:
11005        (JSC::JIT::privateCompileCTINativeCall):
11006        * jit/JITOpcodes32_64.cpp:
11007        (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
11008        in the CallFrame of a host call, like the Interpreter does, instead of
11009        leaving the CodeBlock field uninitialized. The backtracing code requires
11010        a valid CodeBlock field in each CallFrame.
11011
110122010-10-27  Gabor Loki  <loki@webkit.org>
11013
11014        Reviewed by Csaba Osztrogonác.
11015
11016        Add cmn to branch32(reg, imm) on ARM
11017        https://bugs.webkit.org/show_bug.cgi?id=48062
11018
11019        The conditional comparison can be done with cmn if the imm value is
11020        negative and can fit into the cmn instruction.
11021
11022        * assembler/MacroAssemblerARM.h:
11023        (JSC::MacroAssemblerARM::branch32):
11024
110252010-10-26  Oliver Hunt  <oliver@apple.com>
11026
11027        Interpreter build fix.
11028
11029        * interpreter/Interpreter.cpp:
11030        (JSC::Interpreter::privateExecute):
11031
110322010-10-25  Oliver Hunt  <oliver@apple.com>
11033
11034        Reviewed by Gavin Barraclough.
11035
11036        Remove exec and globalData arguments from jsNumber
11037        https://bugs.webkit.org/show_bug.cgi?id=48270
11038
11039        Remove the now unused exec and globalData arguments from jsNumber
11040        and mechanically update all users of jsNumber.
11041
11042        * API/JSValueRef.cpp:
11043        (JSValueMakeNumber):
11044        * bytecompiler/BytecodeGenerator.cpp:
11045        (JSC::BytecodeGenerator::emitLoad):
11046        * bytecompiler/NodesCodegen.cpp:
11047        (JSC::ArrayNode::emitBytecode):
11048        * jit/JITArithmetic.cpp:
11049        (JSC::JIT::emit_op_mod):
11050        * jit/JITArithmetic32_64.cpp:
11051        (JSC::JIT::emit_op_mod):
11052        * jit/JITOpcodes.cpp:
11053        (JSC::JIT::emit_op_jfalse):
11054        (JSC::JIT::emit_op_jtrue):
11055        * jit/JITStubs.cpp:
11056        (JSC::DEFINE_STUB_FUNCTION):
11057        * jsc.cpp:
11058        (functionRun):
11059        * runtime/Arguments.cpp:
11060        (JSC::Arguments::getOwnPropertySlot):
11061        (JSC::Arguments::getOwnPropertyDescriptor):
11062        * runtime/ArrayConstructor.cpp:
11063        (JSC::ArrayConstructor::ArrayConstructor):
11064        * runtime/ArrayPrototype.cpp:
11065        (JSC::arrayProtoFuncPop):
11066        (JSC::arrayProtoFuncPush):
11067        (JSC::arrayProtoFuncShift):
11068        (JSC::arrayProtoFuncSplice):
11069        (JSC::arrayProtoFuncUnShift):
11070        (JSC::arrayProtoFuncFilter):
11071        (JSC::arrayProtoFuncMap):
11072        (JSC::arrayProtoFuncEvery):
11073        (JSC::arrayProtoFuncForEach):
11074        (JSC::arrayProtoFuncSome):
11075        (JSC::arrayProtoFuncReduce):
11076        (JSC::arrayProtoFuncReduceRight):
11077        (JSC::arrayProtoFuncIndexOf):
11078        (JSC::arrayProtoFuncLastIndexOf):
11079        * runtime/BooleanConstructor.cpp:
11080        (JSC::BooleanConstructor::BooleanConstructor):
11081        * runtime/CachedTranscendentalFunction.h:
11082        (JSC::CachedTranscendentalFunction::operator()):
11083        * runtime/DateConstructor.cpp:
11084        (JSC::DateConstructor::DateConstructor):
11085        (JSC::dateParse):
11086        (JSC::dateNow):
11087        (JSC::dateUTC):
11088        * runtime/DateInstance.cpp:
11089        (JSC::DateInstance::DateInstance):
11090        * runtime/DatePrototype.cpp:
11091        (JSC::dateProtoFuncGetFullYear):
11092        (JSC::dateProtoFuncGetUTCFullYear):
11093        (JSC::dateProtoFuncGetMonth):
11094        (JSC::dateProtoFuncGetUTCMonth):
11095        (JSC::dateProtoFuncGetDate):
11096        (JSC::dateProtoFuncGetUTCDate):
11097        (JSC::dateProtoFuncGetDay):
11098        (JSC::dateProtoFuncGetUTCDay):
11099        (JSC::dateProtoFuncGetHours):
11100        (JSC::dateProtoFuncGetUTCHours):
11101        (JSC::dateProtoFuncGetMinutes):
11102        (JSC::dateProtoFuncGetUTCMinutes):
11103        (JSC::dateProtoFuncGetSeconds):
11104        (JSC::dateProtoFuncGetUTCSeconds):
11105        (JSC::dateProtoFuncGetMilliSeconds):
11106        (JSC::dateProtoFuncGetUTCMilliseconds):
11107        (JSC::dateProtoFuncGetTimezoneOffset):
11108        (JSC::dateProtoFuncSetTime):
11109        (JSC::setNewValueFromTimeArgs):
11110        (JSC::setNewValueFromDateArgs):
11111        (JSC::dateProtoFuncSetYear):
11112        (JSC::dateProtoFuncGetYear):
11113        * runtime/Error.cpp:
11114        (JSC::addErrorSourceInfo):
11115        (JSC::addErrorDivotInfo):
11116        * runtime/ErrorConstructor.cpp:
11117        (JSC::ErrorConstructor::ErrorConstructor):
11118        * runtime/FunctionConstructor.cpp:
11119        (JSC::FunctionConstructor::FunctionConstructor):
11120        * runtime/FunctionPrototype.cpp:
11121        (JSC::FunctionPrototype::FunctionPrototype):
11122        * runtime/JSArray.cpp:
11123        (JSC::JSArray::getOwnPropertySlot):
11124        (JSC::JSArray::getOwnPropertyDescriptor):
11125        * runtime/JSByteArray.cpp:
11126        (JSC::JSByteArray::JSByteArray):
11127        * runtime/JSByteArray.h:
11128        (JSC::JSByteArray::getIndex):
11129        * runtime/JSFunction.cpp:
11130        (JSC::JSFunction::JSFunction):
11131        (JSC::JSFunction::lengthGetter):
11132        (JSC::JSFunction::getOwnPropertyDescriptor):
11133        * runtime/JSGlobalObject.cpp:
11134        (JSC::JSGlobalObject::reset):
11135        * runtime/JSGlobalObjectFunctions.cpp:
11136        (JSC::globalFuncParseInt):
11137        (JSC::globalFuncParseFloat):
11138        * runtime/JSNumberCell.h:
11139        (JSC::JSValue::JSValue):
11140        (JSC::jsNaN):
11141        (JSC::JSValue::toJSNumber):
11142        * runtime/JSONObject.cpp:
11143        (JSC::unwrapBoxedPrimitive):
11144        (JSC::PropertyNameForFunctionCall::value):
11145        (JSC::JSONStringify):
11146        * runtime/JSString.cpp:
11147        (JSC::JSString::getStringPropertyDescriptor):
11148        * runtime/JSString.h:
11149        (JSC::JSString::getStringPropertySlot):
11150        * runtime/JSValue.h:
11151        (JSC::jsDoubleNumber):
11152        (JSC::jsNumber):
11153        (JSC::jsNaN):
11154        (JSC::JSValue::JSValue):
11155        (JSC::JSValue::toJSNumber):
11156        * runtime/LiteralParser.cpp:
11157        (JSC::LiteralParser::parse):
11158        * runtime/MathObject.cpp:
11159        (JSC::MathObject::MathObject):
11160        (JSC::mathProtoFuncAbs):
11161        (JSC::mathProtoFuncACos):
11162        (JSC::mathProtoFuncASin):
11163        (JSC::mathProtoFuncATan):
11164        (JSC::mathProtoFuncATan2):
11165        (JSC::mathProtoFuncCeil):
11166        (JSC::mathProtoFuncCos):
11167        (JSC::mathProtoFuncExp):
11168        (JSC::mathProtoFuncFloor):
11169        (JSC::mathProtoFuncLog):
11170        (JSC::mathProtoFuncMax):
11171        (JSC::mathProtoFuncMin):
11172        (JSC::mathProtoFuncPow):
11173        (JSC::mathProtoFuncRandom):
11174        (JSC::mathProtoFuncRound):
11175        (JSC::mathProtoFuncSin):
11176        (JSC::mathProtoFuncSqrt):
11177        (JSC::mathProtoFuncTan):
11178        * runtime/NativeErrorConstructor.cpp:
11179        (JSC::NativeErrorConstructor::NativeErrorConstructor):
11180        * runtime/NumberConstructor.cpp:
11181        (JSC::NumberConstructor::NumberConstructor):
11182        (JSC::numberConstructorNaNValue):
11183        (JSC::numberConstructorNegInfinity):
11184        (JSC::numberConstructorPosInfinity):
11185        (JSC::numberConstructorMaxValue):
11186        (JSC::numberConstructorMinValue):
11187        (JSC::constructWithNumberConstructor):
11188        (JSC::callNumberConstructor):
11189        * runtime/NumberPrototype.cpp:
11190        (JSC::NumberPrototype::NumberPrototype):
11191        * runtime/ObjectConstructor.cpp:
11192        (JSC::ObjectConstructor::ObjectConstructor):
11193        * runtime/Operations.cpp:
11194        (JSC::jsAddSlowCase):
11195        * runtime/Operations.h:
11196        (JSC::jsAdd):
11197        * runtime/PrototypeFunction.cpp:
11198        (JSC::PrototypeFunction::PrototypeFunction):
11199        * runtime/RegExpConstructor.cpp:
11200        (JSC::RegExpConstructor::RegExpConstructor):
11201        (JSC::RegExpMatchesArray::fillArrayInstance):
11202        * runtime/RegExpObject.cpp:
11203        (JSC::regExpObjectLastIndex):
11204        * runtime/StringConstructor.cpp:
11205        (JSC::StringConstructor::StringConstructor):
11206        * runtime/StringPrototype.cpp:
11207        (JSC::StringPrototype::StringPrototype):
11208        (JSC::stringProtoFuncReplace):
11209        (JSC::stringProtoFuncCharCodeAt):
11210        (JSC::stringProtoFuncIndexOf):
11211        (JSC::stringProtoFuncLastIndexOf):
11212        (JSC::stringProtoFuncSearch):
11213        (JSC::stringProtoFuncLocaleCompare):
11214
112152010-10-25  David Tapuska  <dtapuska@rim.com>
11216
11217        Reviewed by David Kilzer.
11218
11219        Enable VFP if our compiler settings indicated we had a hardware
11220        VFP.
11221
11222        https://bugs.webkit.org/show_bug.cgi?id=46096
11223
11224        * assembler/MacroAssemblerARM.cpp:
11225        (JSC::isVFPPresent):
11226
112272010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
11228
11229        Unreviewed, rolling out r70451.
11230        http://trac.webkit.org/changeset/70451
11231        https://bugs.webkit.org/show_bug.cgi?id=48249
11232
11233        Broke set-unloaded-frame-location.html under Qt (Requested by
11234        caseq on #webkit).
11235
11236        * GNUmakefile.am:
11237        * JavaScriptCore.gypi:
11238        * JavaScriptCore.xcodeproj/project.pbxproj:
11239        * wtf/text/TextPosition.h: Removed.
11240
112412010-10-25  Patrick Gansterer  <paroga@webkit.org>
11242
11243        Reviewed by David Kilzer.
11244
11245        Replace _countof with WTF_ARRAY_LENGTH
11246        https://bugs.webkit.org/show_bug.cgi?id=48229
11247
11248        * wtf/Platform.h:
11249
112502010-10-25  Peter Rybin  <peter.rybin@gmail.com>
11251
11252        Reviewed by Adam Barth.
11253
11254        HTML parser should provide script column position within HTML document to JavaScript engine
11255        https://bugs.webkit.org/show_bug.cgi?id=45271
11256
11257        Adds TextPosition* classes -- a structure that stores line/column/generation
11258        level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
11259        wrappers that emphasize whether int number is used as zero-based or
11260        one-based.
11261
11262        * GNUmakefile.am:
11263        * JavaScriptCore.gypi:
11264        * JavaScriptCore.xcodeproj/project.pbxproj:
11265        * wtf/text/TextPosition.h: Added.
11266        (WTF::TextPosition::TextPosition):
11267        (WTF::TextPosition::minimumPosition):
11268        (WTF::TextPosition::belowRangePosition):
11269        (WTF::ZeroBasedNumber::fromZeroBasedInt):
11270        (WTF::ZeroBasedNumber::ZeroBasedNumber):
11271        (WTF::ZeroBasedNumber::zeroBasedInt):
11272        (WTF::ZeroBasedNumber::base):
11273        (WTF::ZeroBasedNumber::belowBase):
11274        (WTF::OneBasedNumber::fromOneBasedInt):
11275        (WTF::OneBasedNumber::OneBasedNumber):
11276        (WTF::OneBasedNumber::oneBasedInt):
11277        (WTF::OneBasedNumber::convertAsZeroBasedInt):
11278        (WTF::OneBasedNumber::convertToZeroBased):
11279        (WTF::OneBasedNumber::base):
11280        (WTF::OneBasedNumber::belowBase):
11281        (WTF::toZeroBasedTextPosition):
11282        (WTF::toOneBasedTextPosition):
11283        (WTF::ZeroBasedNumber::convertToOneBased):
11284
112852010-10-24  Kwang Yul Seo  <skyul@company100.net>
11286
11287        Reviewed by David Kilzer.
11288
11289        Check endianness with __BIG_ENDIAN in RVCT.
11290        https://bugs.webkit.org/show_bug.cgi?id=46122
11291
11292        RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
11293
11294        * wtf/Platform.h:
11295
112962010-10-24  Dan Bernstein  <mitz@apple.com>
11297
11298        Rubber-stamped by Dave Kilzer.
11299
11300        Removed empty directories.
11301
11302        * JavaScriptCore: Removed.
11303        * JavaScriptCore/runtime: Removed.
11304
113052010-10-24  Patrick Gansterer  <paroga@webkit.org>
11306
11307        Unreviewed, fix typo of last build fix.
11308
11309        * wtf/DateMath.cpp:
11310
113112010-10-24  Patrick Gansterer  <paroga@webkit.org>
11312
11313        Unreviewed build fix for chromium.
11314
11315        * wtf/DateMath.cpp: Added missing include.
11316
113172010-10-24  Patrick Gansterer  <paroga@webkit.org>
11318
11319        Reviewed by David Kilzer.
11320
11321        Add WTF_ARRAY_LENGTH macro to WTF
11322        https://bugs.webkit.org/show_bug.cgi?id=32828
11323
11324        Unify the different implementations and usages.
11325
11326        * interpreter/Interpreter.cpp:
11327        (JSC::Interpreter::privateExecute):
11328        * runtime/DatePrototype.cpp:
11329        (JSC::formatLocaleDate):
11330        * runtime/JSGlobalObject.cpp:
11331        (JSC::JSGlobalObject::reset):
11332        * runtime/JSONObject.cpp:
11333        (JSC::Stringifier::appendQuotedString):
11334        (JSC::Stringifier::toJSON):
11335        (JSC::Stringifier::appendStringifiedValue):
11336        * runtime/UString.cpp:
11337        (JSC::UString::number):
11338        * wtf/DateMath.cpp:
11339        (WTF::parseDateFromNullTerminatedCharacters):
11340        * wtf/StdLibExtras.h:
11341
113422010-10-24  Dirk Schulze  <krit@webkit.org>
11343
11344        Reviewed by Nikolas Zimmermann.
11345
11346        Filter example Chiseled from SVG Wow! is slow
11347        https://bugs.webkit.org/show_bug.cgi?id=48174
11348
11349        Added 'using WTF::ByteArray;' at the end of ByteArray.h
11350
11351        * wtf/ByteArray.h:
11352
113532010-10-24  Patrick Gansterer  <paroga@webkit.org>
11354
11355        Reviewed by David Kilzer.
11356
11357        Inline WTF::bitwise_cast and fix style
11358        https://bugs.webkit.org/show_bug.cgi?id=48208
11359
11360        * wtf/StdLibExtras.h:
11361        (WTF::bitwise_cast):
11362        (WTF::bitCount):
11363
113642010-10-23  Xan Lopez  <xlopez@igalia.com>
11365
11366        Reviewed by Sam Weinig.
11367
11368        Unify globalData APIs
11369        https://bugs.webkit.org/show_bug.cgi?id=47969
11370
11371        Make JSGlobalObject::globalData return a reference and adapt
11372        callers. This unifies the API with the existing
11373        CallFrame::globalData, which also returns a reference.
11374
11375        * debugger/Debugger.cpp:
11376        (JSC::evaluateInGlobalCallFrame):
11377        * interpreter/CallFrame.h:
11378        * interpreter/Interpreter.cpp:
11379        (JSC::Interpreter::dumpRegisters):
11380        * jsc.cpp:
11381        (runWithScripts):
11382        * parser/JSParser.cpp:
11383        (JSC::jsParse):
11384        * parser/Parser.cpp:
11385        (JSC::Parser::parse):
11386        * parser/Parser.h:
11387        (JSC::Parser::parse):
11388        * runtime/Error.cpp:
11389        (JSC::createError):
11390        (JSC::createEvalError):
11391        (JSC::createRangeError):
11392        (JSC::createReferenceError):
11393        (JSC::createSyntaxError):
11394        (JSC::createTypeError):
11395        (JSC::createURIError):
11396        * runtime/FunctionConstructor.cpp:
11397        (JSC::constructFunction):
11398        * runtime/JSGlobalObject.cpp:
11399        (JSC::JSGlobalObject::~JSGlobalObject):
11400        (JSC::JSGlobalObject::markChildren):
11401        * runtime/JSGlobalObject.h:
11402        (JSC::JSGlobalObject::globalData):
11403
114042010-10-23  Dimitri Glazkov  <dglazkov@chromium.org>
11405
11406        Unreviewed, rolling out r70369.
11407        http://trac.webkit.org/changeset/70369
11408        https://bugs.webkit.org/show_bug.cgi?id=47974
11409
11410        Caused weird artifacts in expected results.
11411
11412        * wtf/Platform.h:
11413
114142010-10-23  Martin Robinson  <mrobinson@igalia.com>
11415
11416        Reviewed by Xan Lopez.
11417
11418        Crashes randomly in cairo_scaled_font_destroy
11419        https://bugs.webkit.org/show_bug.cgi?id=46794
11420
11421        Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
11422        goes away this should probably be handled in the future via some special
11423        hooks in RefCounted (or its contained type).
11424
11425        * wtf/PlatformRefPtr.h:
11426        (WTF::PlatformRefPtr::~PlatformRefPtr):
11427        (WTF::PlatformRefPtr::clear):
11428        (WTF::::operator):
11429
114302010-10-22  Adam Roben  <aroben@apple.com>
11431
11432        Remove the QuartzCorePresent.h mechanism
11433
11434        This header was used to detect whether QuartzCore headers were present
11435        on the system. Everyone should have these headers now so we no longer
11436        need to detect.
11437
11438        Reviewed by Sam Weinig.
11439
11440        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
11441        code to generate QuartzCorePresent.h.
11442
11443        * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
11444        collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
11445
114462010-10-22  Adam Barth  <abarth@webkit.org>
11447
11448        Unreviewed, rolling out r70290.
11449        http://trac.webkit.org/changeset/70290
11450        https://bugs.webkit.org/show_bug.cgi?id=48111
11451
11452        Undelete Android build files.
11453
11454        * Android.mk: Added.
11455
114562010-10-22  Zoltan Herczeg  <zherczeg@webkit.org>
11457
11458        Reviewed by Csaba Osztrogonác.
11459
11460        JSC interpreter regressions after r69940
11461        https://bugs.webkit.org/show_bug.cgi?id=47839
11462
11463        Wrong "if": It should test whether the result exists,
11464        and not the opposite. It is an interpreter bug, hence
11465        the bots does not capture it.
11466
11467        * interpreter/Interpreter.cpp:
11468        (JSC::Interpreter::resolveBase):
11469
114702010-10-21  Adam Barth  <abarth@webkit.org>
11471
11472        Reviewed by David Levin.
11473
11474        Remove Android build system
11475        https://bugs.webkit.org/show_bug.cgi?id=48111
11476
11477        * Android.mk: Removed.
11478
114792010-10-21  Kwang Yul Seo  <skyul@company100.net>
11480
11481        Reviewed by Kent Tamura.
11482
11483        [BREWMP] Add a String constructor which takes AECHAR*
11484        https://bugs.webkit.org/show_bug.cgi?id=45043
11485
11486        Add String(const AECHAR*) constructor for convenience.
11487
11488        * wtf/text/WTFString.h:
11489
114902010-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
11491
11492        Reviewed by Martin Robinson.
11493
11494        [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
11495        https://bugs.webkit.org/show_bug.cgi?id=47896
11496
11497        * wtf/gobject/GTypedefs.h:
11498
114992010-10-21  Adam Barth  <abarth@webkit.org>
11500
11501        Unreviewed, rolling out r70174.
11502        http://trac.webkit.org/changeset/70174
11503        https://bugs.webkit.org/show_bug.cgi?id=41948
11504
11505        This patch reverts a change that causes
11506        http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
11507
11508        * interpreter/Interpreter.cpp:
11509        (JSC::Interpreter::throwException):
11510
115112010-10-20  Simon Fraser  <simon.fraser@apple.com>
11512
11513        Fix the EFL build.
11514
11515        * wtf/CMakeLists.txt:
11516
115172010-10-20  Simon Fraser  <simon.fraser@apple.com>
11518
11519        Fix Windows build: export needed symbols.
11520
11521        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11522
115232010-10-19  Simon Fraser  <simon.fraser@apple.com>
11524
11525        Reviewed by Gavin Barraclough.
11526
11527        https://bugs.webkit.org/show_bug.cgi?id=47851
11528        
11529        Add methods to DecimalNumber to return the buffer length
11530        required for decimal and exponential output.
11531        
11532        Make some of the DecimalNumber code non-inline (no
11533        effect on Sunspider), adding DecimalNumber.cpp to various
11534        build systems.
11535        
11536        Make some DecimalNumber methods 'const'.
11537
11538        * Android.mk:
11539        * Android.v8.wtf.mk:
11540        * GNUmakefile.am:
11541        * JavaScriptCore.exp:
11542        * JavaScriptCore.gypi:
11543        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
11544        * JavaScriptCore.xcodeproj/project.pbxproj:
11545        * runtime/NumberPrototype.cpp:
11546        (JSC::numberProtoFuncToExponential):
11547        (JSC::numberProtoFuncToFixed):
11548        (JSC::numberProtoFuncToPrecision):
11549        * wtf/DecimalNumber.cpp: Added.
11550        (WTF::DecimalNumber::bufferLengthForStringDecimal):
11551        (WTF::DecimalNumber::bufferLengthForStringExponential):
11552        (WTF::DecimalNumber::toStringDecimal):
11553        (WTF::DecimalNumber::toStringExponential):
11554        * wtf/DecimalNumber.h:
11555        (WTF::DecimalNumber::sign):
11556        (WTF::DecimalNumber::exponent):
11557        (WTF::DecimalNumber::significand):
11558        (WTF::DecimalNumber::precision):
11559        * wtf/dtoa.cpp:
11560        (WTF::dtoa):
11561        * wtf/dtoa.h:
11562        * wtf/wtf.pri:
11563
115642010-10-20  Sheriff Bot  <webkit.review.bot@gmail.com>
11565
11566        Unreviewed, rolling out r70165.
11567        http://trac.webkit.org/changeset/70165
11568        https://bugs.webkit.org/show_bug.cgi?id=48007
11569
11570        It broke tests on Qt bot (Requested by Ossy on #webkit).
11571
11572        * GNUmakefile.am:
11573        * JavaScriptCore.gypi:
11574        * JavaScriptCore.xcodeproj/project.pbxproj:
11575        * wtf/text/TextPosition.h: Removed.
11576
115772010-10-20  Brian Weinstein  <bweinstein@apple.com>
11578
11579        Reviewed by Adam Roben.
11580
11581        Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
11582        step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
11583
11584        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
11585        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
11586
115872010-10-20  Dumitru Daniliuc  <dumi@chromium.org>
11588
11589        Unreviewed, fixing the Win build.
11590
11591        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
11592
115932010-10-20  Geoffrey Garen  <ggaren@apple.com>
11594
11595        Reviewed by Darin Adler.
11596        
11597        https://bugs.webkit.org/show_bug.cgi?id=41948
11598        REGRESSION(r60392): Registerfile can be unwound too far following an exception
11599
11600        * interpreter/Interpreter.cpp:
11601        (JSC::Interpreter::throwException): Walk the stack to calculate the high
11602        water mark currently in use. It's not safe to assume that the current
11603        CallFrame's high water mark is the highest high water mark because
11604        calls do not always set up at the end of a CallFrame. A large caller
11605        CallFrame can encompass a small callee CallFrame.
11606
116072010-10-20  Peter Rybin  <peter.rybin@gmail.com>
11608
11609        Reviewed by Adam Barth.
11610
11611        HTML parser should provide script column position within HTML document to JavaScript engine
11612        https://bugs.webkit.org/show_bug.cgi?id=45271
11613
11614        Adds TextPosition* classes -- a structure that stores line/column/generation
11615        level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
11616        wrappers that emphasize whether int number is used as zero-based or
11617        one-based.
11618
11619        * GNUmakefile.am:
11620        * JavaScriptCore.gypi:
11621        * JavaScriptCore.xcodeproj/project.pbxproj:
11622        * wtf/text/TextPosition.h: Added.
11623        (WTF::TextPosition::TextPosition):
11624        (WTF::TextPosition::minimumPosition):
11625        (WTF::TextPosition::belowRangePosition):
11626        (WTF::ZeroBasedNumber::fromZeroBasedInt):
11627        (WTF::ZeroBasedNumber::ZeroBasedNumber):
11628        (WTF::ZeroBasedNumber::zeroBasedInt):
11629        (WTF::ZeroBasedNumber::base):
11630        (WTF::ZeroBasedNumber::belowBase):
11631        (WTF::OneBasedNumber::fromOneBasedInt):
11632        (WTF::OneBasedNumber::OneBasedNumber):
11633        (WTF::OneBasedNumber::oneBasedInt):
11634        (WTF::OneBasedNumber::convertAsZeroBasedInt):
11635        (WTF::OneBasedNumber::convertToZeroBased):
11636        (WTF::OneBasedNumber::base):
11637        (WTF::OneBasedNumber::belowBase):
11638        (WTF::toZeroBasedTextPosition):
11639        (WTF::toOneBasedTextPosition):
11640        (WTF::ZeroBasedNumber::convertToOneBased):
11641
116422010-10-19  Kwang Yul Seo  <skyul@company100.net>
11643
11644        Reviewed by David Kilzer.
11645
11646        [BREWMP] Turn off JIT for simulator build
11647        https://bugs.webkit.org/show_bug.cgi?id=47937
11648
11649        We don't need to test x86 JIT.
11650
11651        * wtf/Platform.h:
11652
116532010-10-19  Oliver Hunt  <oliver@apple.com>
11654
11655        Reviewed by Geoffrey Garen.
11656
11657        Remove support for JSVALUE32 from JSC
11658        https://bugs.webkit.org/show_bug.cgi?id=47948
11659
11660        Remove all the code for supporting JSVALUE32 from JSC.
11661
11662        * jit/JIT.cpp:
11663        (JSC::JIT::privateCompileMainPass):
11664        (JSC::JIT::privateCompileSlowCases):
11665        * jit/JIT.h:
11666        * jit/JITArithmetic.cpp:
11667        (JSC::JIT::emit_op_lshift):
11668        (JSC::JIT::emitSlow_op_lshift):
11669        (JSC::JIT::emit_op_rshift):
11670        (JSC::JIT::emitSlow_op_rshift):
11671        (JSC::JIT::emit_op_urshift):
11672        (JSC::JIT::emitSlow_op_urshift):
11673        (JSC::JIT::emit_op_jnless):
11674        (JSC::JIT::emitSlow_op_jnless):
11675        (JSC::JIT::emit_op_jless):
11676        (JSC::JIT::emitSlow_op_jless):
11677        (JSC::JIT::emit_op_jlesseq):
11678        (JSC::JIT::emitSlow_op_jlesseq):
11679        (JSC::JIT::emit_op_bitand):
11680        (JSC::JIT::emit_op_post_inc):
11681        (JSC::JIT::emit_op_post_dec):
11682        (JSC::JIT::emit_op_pre_inc):
11683        (JSC::JIT::emit_op_pre_dec):
11684        (JSC::JIT::emit_op_mod):
11685        (JSC::JIT::emitSlow_op_mod):
11686        * jit/JITCall.cpp:
11687        * jit/JITInlineMethods.h:
11688        (JSC::JIT::emitGetFromCallFrameHeaderPtr):
11689        (JSC::JIT::emitGetFromCallFrameHeader32):
11690        * jit/JITOpcodes.cpp:
11691        (JSC::JIT::emit_op_loop_if_lesseq):
11692        (JSC::JIT::emit_op_bitnot):
11693        (JSC::JIT::emit_op_next_pname):
11694        * jit/JITPropertyAccess.cpp:
11695        (JSC::JIT::emit_op_get_by_val):
11696        (JSC::JIT::emit_op_put_by_val):
11697        * jit/JITStubs.h:
11698        * jit/JSInterfaceJIT.h:
11699        * jit/SpecializedThunkJIT.h:
11700        (JSC::SpecializedThunkJIT::returnDouble):
11701        (JSC::SpecializedThunkJIT::tagReturnAsInt32):
11702        * jit/ThunkGenerators.cpp:
11703        (JSC::sqrtThunkGenerator):
11704        (JSC::powThunkGenerator):
11705        * runtime/Collector.cpp:
11706        (JSC::isPossibleCell):
11707        (JSC::typeName):
11708        * runtime/JSCell.h:
11709        * runtime/JSGlobalData.cpp:
11710        (JSC::JSGlobalData::JSGlobalData):
11711        * runtime/JSGlobalData.h:
11712        * runtime/JSGlobalObject.h:
11713        (JSC::Structure::prototypeForLookup):
11714        * runtime/JSImmediate.h:
11715        (JSC::reinterpretIntptrToDouble):
11716        (JSC::JSImmediate::isIntegerNumber):
11717        (JSC::JSImmediate::isDouble):
11718        (JSC::JSImmediate::areBothImmediateIntegerNumbers):
11719        (JSC::JSImmediate::makeDouble):
11720        (JSC::JSImmediate::doubleValue):
11721        (JSC::JSImmediate::toBoolean):
11722        (JSC::JSImmediate::fromNumberOutsideIntegerRange):
11723        (JSC::JSImmediate::from):
11724        (JSC::JSImmediate::toDouble):
11725        (JSC::JSFastMath::rightShiftImmediateNumbers):
11726        * runtime/JSNumberCell.cpp:
11727        * runtime/JSNumberCell.h:
11728        * runtime/JSObject.h:
11729        (JSC::JSObject::JSObject):
11730        * runtime/JSValue.h:
11731        * runtime/NumberObject.h:
11732        * wtf/Platform.h:
11733
117342010-10-19  Csaba Osztrogonác  <ossy@webkit.org>
11735
11736        Reviewed by Geoffrey Garen.
11737
11738        BytecodeGenerator::m_lastOpcodePosition must be initialized in all constructors
11739        https://bugs.webkit.org/show_bug.cgi?id=47920
11740
11741        * bytecompiler/BytecodeGenerator.cpp:
11742        (JSC::BytecodeGenerator::BytecodeGenerator): Add missing member initialization.
11743
117442010-10-19  Kwang Yul Seo  <skyul@company100.net>
11745
11746        Reviewed by David Kilzer.
11747
11748        RVCT fails to compile DateMath.cpp due to overloaded function pow
11749        https://bugs.webkit.org/show_bug.cgi?id=47844
11750
11751        Choose std::pow(double, double) among multiple overloaded pow functions
11752        to fix build for RVCT.
11753
11754        * wtf/DateMath.cpp:
11755        (WTF::parseES5DateFromNullTerminatedCharacters):
11756
117572010-10-19  Patrick Gansterer  <paroga@webkit.org>
11758
11759        Reviewed by David Kilzer.
11760
11761        Use UChar instead of wchar_t in UnicodeWinCE
11762        https://bugs.webkit.org/show_bug.cgi?id=47904
11763
11764        Make UnicodeWinCE more portable, so we can use it for other ports too.
11765
11766        * wtf/unicode/wince/UnicodeWinCE.cpp:
11767        (WTF::Unicode::toLower):
11768        (WTF::Unicode::toUpper):
11769        (WTF::Unicode::foldCase):
11770        (WTF::Unicode::isPrintableChar):
11771        (WTF::Unicode::isSpace):
11772        (WTF::Unicode::isLetter):
11773        (WTF::Unicode::isUpper):
11774        (WTF::Unicode::isLower):
11775        (WTF::Unicode::isDigit):
11776        (WTF::Unicode::isPunct):
11777        (WTF::Unicode::isAlphanumeric):
11778        (WTF::Unicode::toTitleCase):
11779        (WTF::Unicode::mirroredChar):
11780        (WTF::Unicode::digitValue):
11781        * wtf/unicode/wince/UnicodeWinCE.h:
11782        (WTF::Unicode::isSeparatorSpace):
11783        (WTF::Unicode::isHighSurrogate):
11784        (WTF::Unicode::isLowSurrogate):
11785        (WTF::Unicode::umemcasecmp):
11786        (WTF::Unicode::surrogateToUcs4):
11787
117882010-10-19  Patrick Gansterer  <paroga@webkit.org>
11789
11790        Reviewed by Andreas Kling.
11791
11792        Fix style of UnicodeWinCE
11793        https://bugs.webkit.org/show_bug.cgi?id=47818
11794
11795        * wtf/unicode/wince/UnicodeWinCE.cpp:
11796        (WTF::Unicode::toLower):
11797        (WTF::Unicode::toUpper):
11798        * wtf/unicode/wince/UnicodeWinCE.h:
11799
118002010-10-18  Xan Lopez  <xlopez@igalia.com>
11801
11802        Reviewed by Martin Robinson.
11803
11804        * GNUmakefile.am: add missing file.
11805
118062010-10-18  Oliver Hunt  <oliver@apple.com>
11807
11808        Reviewed by Sam Weinig.
11809
11810        Strict mode: Functions created with the function constructor don't implement strict mode semantics
11811        https://bugs.webkit.org/show_bug.cgi?id=47860
11812
11813        When creating the FunctionExecutable for a new function the function constructor
11814        was always passing false for whether or not a function was strict, rather than
11815        using the information from the freshly parsed function itself.
11816
11817        * runtime/Executable.cpp:
11818        (JSC::FunctionExecutable::fromGlobalCode):
11819
118202010-10-18  Oliver Hunt  <oliver@apple.com>
11821
11822        Reviewed by Darin Adler.
11823
11824        Strict mode: |this| should be undefined if it is not explicitly provided
11825        https://bugs.webkit.org/show_bug.cgi?id=47833
11826
11827        To make strict mode behave correctly we want to pass undefined instead of null
11828        as the default this value.  This has no impact on behaviour outside of strict
11829        mode as both values are replaced with the global object if necessary.
11830
11831        * bytecompiler/NodesCodegen.cpp:
11832        (JSC::FunctionCallValueNode::emitBytecode):
11833        (JSC::FunctionCallResolveNode::emitBytecode):
11834        (JSC::CallFunctionCallDotNode::emitBytecode):
11835        (JSC::ApplyFunctionCallDotNode::emitBytecode):
11836
11837
118382010-10-18  Darin Adler  <darin@apple.com>
11839
11840        Reviewed by Anders Carlsson.
11841
11842        Make a nullptr that works with OwnPtr and RefPtr
11843        https://bugs.webkit.org/show_bug.cgi?id=47756
11844
11845        * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.h.
11846
11847        * wtf/NullPtr.h: Added.
11848
11849        * wtf/OwnArrayPtr.h: Add an overload of = taking nullptr.
11850        * wtf/OwnPtr.h: Ditto.
11851        * wtf/PassOwnArrayPtr.h: Ditto.
11852        * wtf/PassOwnPtr.h: Ditto.
11853        * wtf/PassRefPtr.h: Ditto.
11854        * wtf/RefPtr.h: Ditto.
11855        * wtf/RetainPtr.h: Ditto.
11856
118572010-10-18  Oliver Hunt  <oliver@apple.com>
11858
11859        Reviewed by Sam Weinig.
11860
11861        Strict mode: JIT doesn't check for |this| being an immediate before dereferencing
11862        https://bugs.webkit.org/show_bug.cgi?id=47826
11863
11864        There's no guarantee that |this| will be a cell in a strict mode function, so
11865        don't claim that it is.
11866
11867        * bytecode/CodeBlock.h:
11868        (JSC::CodeBlock::isKnownNotImmediate):
11869
118702010-10-18  Zoltan Herczeg  <zherczeg@webkit.org>
11871
11872        Reviewed by Oliver Hunt.
11873
11874        if (0) throw "x" ; else { } throws parse error after r69906
11875        https://bugs.webkit.org/show_bug.cgi?id=47807
11876
11877        r69906 introduced a bug: the semicolon is not parsed after a throw
11878        expression anymore. Thus, the semicolon terminates the "if" parsing
11879        in the example above, and the else token results a parse error.
11880
11881        * parser/JSParser.cpp:
11882        (JSC::JSParser::parseThrowStatement):
11883
118842010-10-18  Peter Varga  <pvarga@inf.u-szeged.hu>
11885
11886        Reviewed by Andreas Kling.
11887
11888        Remove some unnecessary lines of code from Parser.cpp
11889        https://bugs.webkit.org/show_bug.cgi?id=47816
11890
11891        * parser/Parser.cpp:
11892
118932010-10-18  Xan Lopez  <xlopez@igalia.com>
11894
11895        Reviewed by Csaba Osztrogonác.
11896
11897        Build broken with JIT disabled
11898        https://bugs.webkit.org/show_bug.cgi?id=47801
11899
11900        This is a regression caused by r69940.
11901
11902        * interpreter/Interpreter.cpp:
11903        (JSC::Interpreter::resolveBase):
11904
119052010-10-18  Zoltan Horvath  <zoltan@webkit.org>
11906
11907        Reviewed by Darin Adler.
11908
11909        Change FastAllocBase implementation into a macro
11910        https://bugs.webkit.org/show_bug.cgi?id=42998
11911
11912        It was investigated in bug #33896 that inheriting classes from FastAllocBase 
11913        can result in objects getting larger which leads to memory regressions. 
11914        Using a macro instead of inheriting classes from FastAllocBase would solve the issue. 
11915
11916        * wtf/FastAllocBase.h: Add a WTF_MAKE_FAST_ALLOCATED macro
11917
119182010-10-17  Oliver Hunt  <oliver@apple.com>
11919
11920        Reviewed by Sam Weinig.
11921
11922        Strict mode: arguments is not valid as the base expression for pre- or post-fix expressions
11923        https://bugs.webkit.org/show_bug.cgi?id=47791
11924
11925        Simple fix, check for arguments in addition to eval.
11926
11927        * parser/JSParser.cpp:
11928        (JSC::JSParser::parseUnaryExpression):
11929
119302010-10-17  Oliver Hunt  <oliver@apple.com>
11931
11932        Reviewed by Sam Weinig.
11933
11934        Strict mode: Assignment that would create a global should be a late ReferenceError, not a syntax failure
11935        https://bugs.webkit.org/show_bug.cgi?id=47788
11936
11937        Fixing this required a couple of changes:
11938         * resolve_base now has a flag to indicate whether it is being used for a put in strict mode.
11939           this allows us to throw an exception when we're doing a completely generic resolve for
11940           assignment, and that assignment would create a new global.
11941         * There is a new opcode 'op_ensure_property_exists' that is used to determine whether
11942           the property being assigned to already exists on the global object.  This currently
11943           has no caching, but such caching could be added relatively trivially.  It is only used
11944           in the case where we know that a property will be placed on the global object, and
11945           we cannot verify that the property already exists.
11946
11947        In the jit we plant a call to cti_op_resolve_base_strict_put in the effected case rather
11948        than making op_resolve_base have an additional runtime branch.
11949
11950        There's also a new helper function to create the exception for the invalid assignment.
11951
11952        * bytecode/CodeBlock.cpp:
11953        (JSC::CodeBlock::dump):
11954        * bytecode/Opcode.h:
11955        * bytecompiler/BytecodeGenerator.cpp:
11956        (JSC::BytecodeGenerator::emitResolveBase):
11957        (JSC::BytecodeGenerator::emitResolveBaseForPut):
11958        * bytecompiler/BytecodeGenerator.h:
11959        * bytecompiler/NodesCodegen.cpp:
11960        (JSC::AssignResolveNode::emitBytecode):
11961        (JSC::ForInNode::emitBytecode):
11962        * interpreter/Interpreter.cpp:
11963        (JSC::Interpreter::resolveBase):
11964        (JSC::Interpreter::privateExecute):
11965        * jit/JIT.cpp:
11966        (JSC::JIT::privateCompileMainPass):
11967        * jit/JIT.h:
11968        * jit/JITOpcodes.cpp:
11969        (JSC::JIT::emit_op_resolve_base):
11970        (JSC::JIT::emit_op_ensure_property_exists):
11971        * jit/JITOpcodes32_64.cpp:
11972        (JSC::JIT::emit_op_resolve_base):
11973        (JSC::JIT::emit_op_ensure_property_exists):
11974        * jit/JITStubs.cpp:
11975        (JSC::DEFINE_STUB_FUNCTION):
11976        * jit/JITStubs.h:
11977        * parser/JSParser.cpp:
11978        (JSC::JSParser::parseProgram):
11979        * runtime/ExceptionHelpers.cpp:
11980        (JSC::createErrorForInvalidGlobalAssignment):
11981        * runtime/ExceptionHelpers.h:
11982        * runtime/Operations.h:
11983        (JSC::resolveBase):
11984
119852010-10-17  Simon Fraser  <simon.fraser@apple.com>
11986
11987        First part of fix for Windows build failure. Will wait for the
11988        next set of link errors to determine the mangled forms for dtoaRoundSF
11989        and dtoaRoundDP.
11990
11991        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
11992
119932010-10-17  Simon Fraser  <simon.fraser@apple.com>
11994
11995        Reviewed by Nikolas Zimmermann.
11996
11997        Very large and small numbers fail to round-trip through CSS
11998        https://bugs.webkit.org/show_bug.cgi?id=20674
11999        
12000        New exports required to use DecimalNumber in WebCore.
12001
12002        * JavaScriptCore.exp:
12003        * JavaScriptCore.xcodeproj/project.pbxproj:
12004
120052010-10-16  Kyusun Kim  <maniagoon@company100.net>
12006
12007        Reviewed by Alexey Proskuryakov.
12008
12009        Add using declarations for currentTimeMS() and parseDateFromNullTerminatedCharacters()
12010        https://bugs.webkit.org/show_bug.cgi?id=47758
12011
12012        * wtf/CurrentTime.h:
12013        * wtf/DateMath.h:
12014
120152010-10-16  Patrick Gansterer  <paroga@webkit.org>
12016
12017        Reviewed by Adam Barth.
12018
12019        Rename StringHasherFunctions.h to StringHasher.h
12020        https://bugs.webkit.org/show_bug.cgi?id=47200
12021
12022        Now StringHasherFunctions.h only contains the StringHasher class, so rename it to the correct name.
12023
12024        * GNUmakefile.am:
12025        * JavaScriptCore.gypi:
12026        * JavaScriptCore.xcodeproj/project.pbxproj:
12027        * wtf/StringHashFunctions.h: Removed.
12028        * wtf/StringHasher.h: Copied from JavaScriptCore/wtf/StringHashFunctions.h.
12029        * wtf/text/StringHash.h:
12030        * wtf/text/StringImpl.h:
12031
120322010-10-15  Oliver Hunt  <oliver@apple.com>
12033
12034        Reviewed by Sam Weinig.
12035
12036        Automatic Semicolon Insertion incorrectly inserts semicolon after break, continue, and return followed by a newline
12037        https://bugs.webkit.org/show_bug.cgi?id=47762
12038
12039        The old YACC parser depended on the lexer for some classes of semicolon insertion.
12040        The new parser handles ASI entirely on its own so when the lexer inserts a semicolon
12041        on its own the net result is a spurious semicolon in the input stream.  This can result
12042        in incorrect parsing in some cases:
12043
12044        if (0)
12045            break
12046        ;else {}
12047
12048        Would result in a parse failure as the output from the lexer is essentially
12049
12050        if (0)
12051             break
12052        ;;else
12053
12054        So the second semicolon is interpreted as a empty statement, which terminates the if,
12055        making the else an error.
12056
12057
12058        * parser/JSParser.cpp:
12059        (JSC::JSParser::parseThrowStatement):
12060          Parsing of throw statement was wrong, and only worked due to the weird behaviour
12061          in the lexer
12062        * parser/Lexer.cpp:
12063        (JSC::Lexer::lex):
12064          Remove bogus semicolon insertion from the newline handling
12065
120662010-10-15  Nikolas Zimmermann  <nzimmermann@rim.com>
12067
12068        Reviewed by Dirk Schulze.
12069
12070        Replace some String::format() usages by StringConcatenate in WebKit
12071        https://bugs.webkit.org/show_bug.cgi?id=47714
12072
12073        * wtf/text/StringConcatenate.h: Add UChar specific StringTypeAdapter, to accept single UChars in makeString().
12074
120752010-10-15  Ilya Tikhonovsky  <loislo@chromium.org>
12076
12077        Unreviewed build fix for Debug Leopard which is failng to compile after r69842.
12078
12079        * yarr/RegexInterpreter.cpp:
12080        (JSC::Yarr::ByteCompiler::emitDisjunction):
12081
120822010-10-15  Peter Varga  <pvarga@inf.u-szeged.hu>
12083
12084        Reviewed by Gavin Barraclough.
12085
12086        The parenthetical assertion checking isn't working in some cases with YARR
12087        Interpreter
12088        https://bugs.webkit.org/show_bug.cgi?id=46893
12089
12090        Calculate the countToCheck value of a TypeParentheticalAssertion by
12091        subtracting the number of characters which follows
12092        a TypeParentheticalAssertion term with the number of characters which should
12093        be matched by terms which are contained
12094        in the TypeParentheticalAssertion term (minimumSize).
12095
12096        * yarr/RegexInterpreter.cpp:
12097        (JSC::Yarr::ByteCompiler::emitDisjunction):
12098
120992010-10-14  Nathan Vander Wilt  <nate@andyet.net>
12100
12101        Reviewed by Darin Adler.
12102
12103        Added parser for ECMAScript 5 standard date format, so Date.parse can handle RFC 3339 timestamps: https://bugs.webkit.org/show_bug.cgi?id=44632
12104
12105        * runtime/DateConversion.cpp:
12106        (JSC::parseDate):
12107        * wtf/DateMath.cpp:
12108        (WTF::ymdhmsToSeconds):
12109        (WTF::parseES5DateFromNullTerminatedCharacters):
12110        * wtf/DateMath.h:
12111
121122010-10-14  Nikolas Zimmermann  <nzimmermann@rim.com>
12113
12114        Reviewed by Gavin Barraclough.
12115
12116        Replace lots of String::format() usages by StringConcatenate
12117        https://bugs.webkit.org/show_bug.cgi?id=47664
12118
12119        Add StringTypeAdapter<char> to accept single characters for makeString().
12120
12121        * wtf/text/StringConcatenate.h:
12122        (WTF::makeString):
12123
121242010-10-14  David Goodwin  <david_goodwin@apple.com>
12125
12126        Reviewed by Darin Adler.
12127
12128        need way to measure size of JITed ARM code
12129        https://bugs.webkit.org/show_bug.cgi?id=47121
12130
12131        * assembler/LinkBuffer.h:
12132        (JSC::LinkBuffer::linkCode):
12133        (JSC::LinkBuffer::dumpLinkStats):
12134        (JSC::LinkBuffer::dumpCode):
12135
121362010-10-14  Peter Varga  <pvarga@inf.u-szeged.hu>
12137
12138        Reviewed by Gavin Barraclough.
12139
12140        The backreference checking isn't working in some cases with YARR Interpreter
12141        https://bugs.webkit.org/show_bug.cgi?id=46904
12142
12143        The Interpreter::matchBackReference() function returns true without matching
12144        when a backreference points to the same parentheses where it is.
12145
12146        * yarr/RegexInterpreter.cpp:
12147        (JSC::Yarr::Interpreter::matchBackReference):
12148
121492010-10-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
12150
12151        Reviewed by Andreas Kling.
12152
12153        [Qt] Text breaking is slow: enable ICU as an opt-in
12154        https://bugs.webkit.org/show_bug.cgi?id=40332
12155
12156        Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
12157        Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
12158
12159        * JavaScriptCore.pri:
12160        * wtf/unicode/qt4/UnicodeQt4.h:
12161        (WTF::Unicode::toLower):
12162        (WTF::Unicode::toUpper):
12163        (WTF::Unicode::toTitleCase):
12164        (WTF::Unicode::foldCase):
12165        (WTF::Unicode::isPrintableChar):
12166        (WTF::Unicode::isSeparatorSpace):
12167        (WTF::Unicode::isPunct):
12168        (WTF::Unicode::isLower):
12169        (WTF::Unicode::mirroredChar):
12170        (WTF::Unicode::combiningClass):
12171        (WTF::Unicode::direction):
12172        (WTF::Unicode::category):
12173
121742010-10-14  Anton Faern  <anton@bladehawke.com>
12175
12176        Reviewed by Csaba Osztrogonác.
12177
12178        https://bugs.webkit.org/show_bug.cgi?id=47658
12179        NetBSD was not included in the WTF_PLATFORM_FOO to WTF_OS_FOO
12180        change.  This means that OS(NETBSD) is also undefined.
12181
12182        * wtf/Platform.h: s/_PLATFORM_/_OS_/ for NetBSD
12183
121842010-10-13  David Goodwin  <david_goodwin@apple.com>
12185
12186        Reviewed by Oliver Hunt.
12187
12188        ARMv7 JIT should generated conditional branches when possible
12189        https://bugs.webkit.org/show_bug.cgi?id=47384
12190
12191        Use different jump padding sizes for conditional and unconditional
12192        jumps (12 bytes and 10 bytes respectively). This allows the JIT to
12193        include the IT instruction as part of the conditional jump sequence
12194        which in turn allows it to optimize away the IT using an ARMv7 
12195        conditional branch instruction. Use 2-byte B(T1) and 4-byte B(T3) for
12196        conditional branches when displacement is in range. Also use IT/B(T4)
12197        for conditional branch when displacement does not fit in B(T3).
12198
12199        For unconditional jump, instruction selection options are:
12200        B(T2), B(T4), MOVW/MOVT/BX. For conditional jump, instruction selection
12201        options are: B(T1), B(T3), IT/B(T4), ITTT/MOVW/MOVT/BX.
12202
12203        * assembler/ARMv7Assembler.cpp:
12204        * assembler/ARMv7Assembler.h:
12205        (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
12206        (JSC::ARMv7Assembler::ifThenElse):
12207        (JSC::ARMv7Assembler::jumpSizeDelta):
12208        (JSC::ARMv7Assembler::canCompact):
12209        (JSC::ARMv7Assembler::computeJumpType):
12210        (JSC::ARMv7Assembler::link):
12211        (JSC::ARMv7Assembler::canBeJumpT1):
12212        (JSC::ARMv7Assembler::canBeJumpT3):
12213        (JSC::ARMv7Assembler::canBeJumpT4):
12214        (JSC::ARMv7Assembler::linkJumpT1):
12215        (JSC::ARMv7Assembler::linkJumpT3):
12216        (JSC::ARMv7Assembler::linkJumpT4):
12217        (JSC::ARMv7Assembler::linkConditionalJumpT4):
12218        (JSC::ARMv7Assembler::linkBX):
12219        (JSC::ARMv7Assembler::linkConditionalBX):
12220        (JSC::ARMv7Assembler::linkJumpAbsolute):
12221        * assembler/LinkBuffer.h:
12222        (JSC::LinkBuffer::linkCode):
12223        * assembler/MacroAssemblerARMv7.h:
12224        (JSC::MacroAssemblerARMv7::canCompact):
12225        (JSC::MacroAssemblerARMv7::computeJumpType):
12226        (JSC::MacroAssemblerARMv7::jumpSizeDelta):
12227        (JSC::MacroAssemblerARMv7::jump):
12228        (JSC::MacroAssemblerARMv7::nearCall):
12229        (JSC::MacroAssemblerARMv7::call):
12230        (JSC::MacroAssemblerARMv7::ret):
12231        (JSC::MacroAssemblerARMv7::tailRecursiveCall):
12232        (JSC::MacroAssemblerARMv7::makeJump):
12233        (JSC::MacroAssemblerARMv7::makeBranch):
12234
122352010-10-13  Fridrich Strba  <fridrich.strba@bluewin.ch>
12236
12237        Reviewed by Darin Adler.
12238
12239        Don't depend on Windows on sched_yield and sched.h
12240        https://bugs.webkit.org/show_bug.cgi?id=45543
12241
12242        sched.h is part of pthreads and sched_yield is implemented
12243        in pthreads-win32 as Sleep(0). This patch avoids a gratuitous
12244        dependency on pthreads-win32 in this file.
12245
12246        * wtf/TCSpinLock.h:
12247        (TCMalloc_SlowLock):
12248
122492010-10-13  Kwang Yul Seo  <skyul@company100.net>
12250
12251        Reviewed by Kent Tamura.
12252
12253        [BREWMP] Port unicode
12254        https://bugs.webkit.org/show_bug.cgi?id=45716
12255
12256        Brew MP port uses only the subset of ICU library to reduce the binary size.
12257        Follow the WinCE's implementation.
12258
12259        * wtf/Platform.h:
12260        * wtf/unicode/Unicode.h:
12261        * wtf/unicode/brew/UnicodeBrew.cpp: Added.
12262        (WTF::Unicode::toLower):
12263        (WTF::Unicode::toUpper):
12264        (WTF::Unicode::foldCase):
12265        (WTF::Unicode::isPrintableChar):
12266        (WTF::Unicode::isUpper):
12267        (WTF::Unicode::isLower):
12268        (WTF::Unicode::isDigit):
12269        (WTF::Unicode::isPunct):
12270        (WTF::Unicode::isAlphanumeric):
12271        (WTF::Unicode::toTitleCase):
12272        (WTF::Unicode::direction):
12273        (WTF::Unicode::category):
12274        (WTF::Unicode::decompositionType):
12275        (WTF::Unicode::combiningClass):
12276        (WTF::Unicode::mirroredChar):
12277        (WTF::Unicode::digitValue):
12278        (WTF::Unicode::isSpace):
12279        (WTF::Unicode::isLetter):
12280        * wtf/unicode/brew/UnicodeBrew.h: Added.
12281        (WTF::Unicode::isArabicChar):
12282        (WTF::Unicode::isSeparatorSpace):
12283        (WTF::Unicode::hasLineBreakingPropertyComplexContext):
12284        (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic):
12285        (WTF::Unicode::umemcasecmp):
12286
122872010-10-13  Gavin Barraclough  <barraclough@apple.com>
12288
12289        Windows build fix.
12290
12291        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12292
122932010-10-13  Adam Barth  <abarth@webkit.org>
12294
12295        Reviewed by Maciej Stachowiak.
12296
12297        [WTFURL] Add URLQueryCanonicalizer
12298        https://bugs.webkit.org/show_bug.cgi?id=45088
12299
12300        This class canonicalizes the query component of URLs.  The main tricky
12301        bit there is the convertCharset function, which I've moved to a
12302        templated dependency.  There'll likely be more about that in future
12303        patches.
12304
12305        * JavaScriptCore.xcodeproj/project.pbxproj:
12306        * wtf/url/src/URLEscape.cpp: Added.
12307        * wtf/url/src/URLEscape.h: Added.
12308        (WTF::appendEscapedCharacter):
12309        * wtf/url/src/URLQueryCanonicalizer.h: Added.
12310        (WTF::URLQueryCanonicalizer::canonicalize):
12311        (WTF::URLQueryCanonicalizer::isAllASCII):
12312        (WTF::URLQueryCanonicalizer::appendRaw8BitQueryString):
12313        (WTF::URLQueryCanonicalizer::convertToQueryEncoding):
12314
123152010-10-13  Gavin Barraclough  <barraclough@apple.com>
12316
12317        Reviewed by Oliver Hunt.
12318
12319        Bug 43987 - Downloading using XHR is much slower than before
12320        Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
12321        Fundamentally this should be the same (copies current contents to expand capacity,
12322        rather than using a rope), but this approach allows the intermadiate state of the
12323        String to be inspected in the buffer without copying to resolve.
12324
12325        * runtime/JSONObject.cpp:
12326        (JSC::Stringifier::appendQuotedString):
12327        (JSC::Stringifier::Holder::appendNextProperty):
12328            Renamed StringBuilder::size() -> length() (to match other String types).
12329
12330        * runtime/UStringBuilder.h:
12331        (JSC::UStringBuilder::append):
12332        (JSC::UStringBuilder::toUString):
12333            Update for changes in parent class, can just 'using' the append methods.
12334
12335        * wtf/text/StringBuilder.cpp: Added.
12336        (WTF::StringBuilder::reifyString):
12337        (WTF::StringBuilder::resize):
12338        (WTF::StringBuilder::reserveCapacity):
12339        (WTF::StringBuilder::allocateBuffer):
12340        (WTF::StringBuilder::appendUninitialized):
12341        (WTF::StringBuilder::append):
12342        (WTF::StringBuilder::shrinkToFit):
12343        * wtf/text/StringBuilder.h:
12344        (WTF::StringBuilder::StringBuilder):
12345        (WTF::StringBuilder::append):
12346        (WTF::StringBuilder::toString):
12347        (WTF::StringBuilder::toStringPreserveCapacity):
12348        (WTF::StringBuilder::length):
12349        (WTF::StringBuilder::isEmpty):
12350        (WTF::StringBuilder::operator[]):
12351        (WTF::StringBuilder::clear):
12352            Class updated to use overcapacity in a StringImpl, rather than a Vector.
12353
12354        * Android.mk:
12355        * Android.v8.wtf.mk:
12356        * GNUmakefile.am:
12357        * JavaScriptCore.exp:
12358        * JavaScriptCore.gypi:
12359        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
12360        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
12361        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
12362        * JavaScriptCore.xcodeproj/project.pbxproj:
12363        * wtf/CMakeLists.txt:
12364        * wtf/wtf.pri:
12365
123662010-10-13  Adam Roben  <aroben@apple.com>
12367
12368        Export tryFastRealloc for WebKit2's benefit
12369
12370        Rubber-stamped by Anders Carlsson.
12371
12372        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
12373        tryFastRealloc. Removed RegExpObject::info, which is now exported via
12374        JS_EXPORTDATA.
12375
123762010-10-13  Adam Barth  <abarth@webkit.org>
12377
12378        Reviewed by Maciej Stachowiak.
12379
12380        [WTFURL] Add a mechanism for classifying types of characters
12381        https://bugs.webkit.org/show_bug.cgi?id=45085
12382
12383        Various characters have different escaping rules depending on where
12384        they are in URLs.  This patch adds a table containing that information.
12385
12386        * JavaScriptCore.xcodeproj/project.pbxproj:
12387        * wtf/url/src/URLCharacterTypes.cpp: Added.
12388        * wtf/url/src/URLCharacterTypes.h: Added.
12389        (WTF::URLCharacterTypes::isQueryChar):
12390        (WTF::URLCharacterTypes::isIPv4Char):
12391        (WTF::URLCharacterTypes::isHexChar):
12392        (WTF::URLCharacterTypes::isCharOfType):
12393
123942010-10-13  Xan Lopez  <xlopez@igalia.com>
12395
12396        Reviewed by Csaba Osztrogonác.
12397
12398        Missing parameters for bytecode dump of next_pname
12399        https://bugs.webkit.org/show_bug.cgi?id=47590
12400
12401        * bytecode/CodeBlock.cpp:
12402        (JSC::CodeBlock::dump): add missing parameters to the dump.
12403
124042010-10-13  Nikolas Zimmermann  <nzimmermann@rim.com>
12405
12406        Reviewed by Dirk Schulze.
12407
12408        Add wtf/text/StringConcatenate
12409        https://bugs.webkit.org/show_bug.cgi?id=47584
12410
12411        Move runtime/StringConcatenate.h to wtf/text, make it work for Strings too.
12412        Add a special runtime/UStringConcatenate.h class that inherits from StringConcatenate, and extends it for use with UString.
12413        Exactly the same design that has been followed while refactoring StringBuilder.
12414
12415        The UString variants can all be removed as soon as WTF::String & JSC::UString converge.
12416
12417        * GNUmakefile.am: Add wtf/text/StringConcatenate.h and runtime/UStringConcatenate.h.
12418        * JavaScriptCore.gypi: Ditto.
12419        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
12420        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
12421        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
12422        * bytecode/CodeBlock.cpp: s/makeString/makeUString/
12423        (JSC::escapeQuotes):
12424        (JSC::valueToSourceString):
12425        (JSC::constantName):
12426        (JSC::idName):
12427        (JSC::CodeBlock::registerName):
12428        (JSC::regexpToSourceString):
12429        (JSC::regexpName):
12430        * bytecompiler/NodesCodegen.cpp: Ditto.
12431        (JSC::substitute):
12432        * profiler/Profiler.cpp: Ditto.
12433        (JSC::Profiler::createCallIdentifier):
12434        * runtime/ExceptionHelpers.cpp: Ditto.
12435        (JSC::createUndefinedVariableError):
12436        (JSC::createErrorMessage):
12437        (JSC::createInvalidParamError):
12438        * runtime/FunctionConstructor.cpp: Ditto.
12439        (JSC::constructFunction):
12440        * runtime/FunctionPrototype.cpp: Ditto.
12441        (JSC::insertSemicolonIfNeeded):
12442        * runtime/JSONObject.cpp: Ditto.
12443        (JSC::Stringifier::indent):
12444        * runtime/JSStringBuilder.h:
12445        (JSC::jsMakeNontrivialString):
12446        * runtime/RegExpConstructor.cpp: Ditto.
12447        (JSC::constructRegExp):
12448        * runtime/RegExpObject.cpp: Ditto.
12449        (JSC::RegExpObject::match):
12450        * runtime/RegExpPrototype.cpp: Ditto.
12451        (JSC::regExpProtoFuncCompile):
12452        * runtime/StringConcatenate.h: Removed.
12453        * runtime/UStringConcatenate.h: Added. Only contains the StringTypeAdapter<JSC::UString> code and the makeUString variants, the rest lives in wtf/text/StringConcatenate.h
12454        (JSC::makeUString):
12455        * wtf/text/StringConcatenate.h: Copied from runtime/StringConcatenate.h.
12456        (WTF::makeString):
12457
124582010-10-12  Gavin Barraclough  <barraclough@apple.com>
12459
12460        Windows build fix.
12461
12462        * wtf/text/StringBuilder.h:
12463        (WTF::StringBuilder::length):
12464
124652010-10-12  Nikolas Zimmermann  <nzimmermann@rim.com>
12466
12467        Reviewed by Gavin Barraclough.
12468
12469        Unify JSC::StringBuilder & WebCore::StringBuilder
12470        https://bugs.webkit.org/show_bug.cgi?id=47538
12471
12472        Move runtime/StringBuilder.h to wtf/text/StringBuilder.h. Rename build() to toString() and return a WTF::String().
12473        Move the append(const JSC::UString&) method into runtime/UStringBuilder.h.
12474        UStringBuilder inherits from StringBuilder.h and adds append(const JSC::UString&) and UString toUString() functionality.
12475
12476        No new code, just move code around.
12477
12478        * GNUmakefile.am: Add wtf/text/StringBuilder.h / runtime/UStringBuilder.h. Remove runtime/StringBuilder.h.
12479        * JavaScriptCore.gypi: Ditto.
12480        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
12481        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
12482        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
12483        * runtime/Executable.cpp:
12484        (JSC::FunctionExecutable::paramString): Use UStringBuilder, instead of StringBuilder. Rename build() -> toUString().
12485        * runtime/FunctionConstructor.cpp:
12486        (JSC::constructFunction): Ditto.
12487        * runtime/JSGlobalObjectFunctions.cpp:
12488        (JSC::globalFuncUnescape): Ditto.
12489        * runtime/JSONObject.cpp:
12490        (JSC::Stringifier::stringify): Ditto.
12491        (JSC::Stringifier::appendQuotedString): Ditto.
12492        (JSC::Stringifier::appendStringifiedValue): Ditto.
12493        (JSC::Stringifier::startNewLine): Ditto.
12494        (JSC::Stringifier::Holder::appendNextProperty): Ditto.
12495        * runtime/LiteralParser.cpp:
12496        (JSC::LiteralParser::Lexer::lexString): Ditto.
12497        * runtime/NumberPrototype.cpp: Remove unneeded JSStringBuilder.h / StringBuilder.h include.
12498        * runtime/StringBuilder.h: Removed.
12499        * runtime/UStringBuilder.h: Added. Inherits from WTF::StringBuilder, extending it by two methods.
12500        (JSC::UStringBuilder::append): append(const JSC::UString&)
12501        (JSC::UStringBuilder::toUString):
12502        * wtf/text/StringBuilder.h: Copied from runtime/StringBuilder.h. Move JSC::UString parts into runtime/UStringBuilder.h
12503        (WTF::StringBuilder::append): Renamed m_buffer to buffer everywhere.
12504        (WTF::StringBuilder::isEmpty): Ditto (+ constify method). 
12505        (WTF::StringBuilder::reserveCapacity): Ditto.
12506        (WTF::StringBuilder::resize): Ditto.
12507        (WTF::StringBuilder::size): Ditto.
12508        (WTF::StringBuilder::operator[]): Ditto.
12509        (WTF::StringBuilder::toString): Ditto (+ renamed from build()). Returns a String, not an UString. The old build() method is now named toUString() and lives in UStringBuilder.
12510
125112010-10-12  Michael Saboff  <msaboff@apple.com>
12512
12513        Reviewed by Oliver Hunt.
12514
12515        Cleaned up the processing of replacements after regular expression
12516        processing, especially the case where there wasn't a match.
12517        Changed to use empty strings instead of computing a zero length sub
12518        string.
12519        https://bugs.webkit.org/show_bug.cgi?id=47506
12520
12521        * runtime/StringPrototype.cpp:
12522        (JSC::jsSpliceSubstringsWithSeparators):
12523        (JSC::stringProtoFuncReplace):
12524
125252010-10-11  Patrick Gansterer  <paroga@webkit.org>
12526
12527        Unreviewed.
12528
12529        Clang build fix after r69472.
12530        https://bugs.webkit.org/show_bug.cgi?id=46523
12531
12532        * wtf/text/StringHash.h:
12533
125342010-10-11  Oliver Hunt  <oliver@apple.com>
12535
12536        Undo last minute change to 32bit build.
12537
12538        * jit/JITOpcodes32_64.cpp:
12539        (JSC::JIT::emit_op_convert_this_strict):
12540
125412010-10-11  Brian Weinstein  <bweinstein@apple.com>
12542
12543        Build fix for Windows. Add a necessary export from r69516.
12544
12545        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
12546
125472010-10-11  Oliver Hunt  <oliver@apple.com>
12548
12549        Fix interpreter build -- was broken by incorrect merge.
12550
12551        * interpreter/Interpreter.cpp:
12552        (JSC::Interpreter::privateExecute):
12553
125542010-10-01  Oliver Hunt  <oliver@apple.com>
12555
12556        Reviewed by Gavin Barraclough.
12557
12558        [ES5] Implement strict mode
12559        https://bugs.webkit.org/show_bug.cgi?id=10701
12560
12561        Initial strict mode implementation.  This is the simplest
12562        implementation that could possibly work and adds (hopefully)
12563        all of the restrictions required by strict mode.  There are
12564        a number of inefficiencies, especially in the handling of
12565        arguments and eval as smart implementations would make this
12566        patch more complicated.  
12567
12568        The SyntaxChecker AST builder has become somewhat more complex
12569        as strict mode does require more parse tree information to
12570        validate the syntax.
12571
12572        Summary of major changes to the parser:
12573            * We track when we enter strict mode (this may come as a surprise)
12574            * Strict mode actually requires a degree of AST knowledge to validate
12575              so the SyntaxChecker now produces values that can be used to distinguish
12576              "node" types.
12577            * We now track variables that are written to.  We do this to
12578              statically identify writes to global properties that don't exist
12579              and abort at that point.  This should actually make it possible
12580              to optimise some other cases in the future but for now it's
12581              purely for validity checking.  Currently writes are only tracked
12582              in strict mode code.
12583            * Labels are now tracked as it is now a syntax error to jump to a label
12584              that does not exist (or to use break, continue, or return in a context
12585              where they would be invalid).
12586
12587        Runtime changes:
12588            * In order to get correct hanlding of the Arguments object all
12589              strict mode functions that reference arguments create and tearoff
12590              the arguments object on entry.  This is not strictly necessary
12591              but was the least work necessary to get the correct behaviour.
12592            * PutPropertySlot now tracks whether it is being used for a strict
12593              mode write, and if so Object::put will throw when a write can't be
12594              completed.
12595            * StrictEvalActivation was added as an "activation" object for strict
12596              mode eval (so that strict eval does not introduce new variables into
12597              the containing scope).
12598
12599        * CMakeLists.txt:
12600        * GNUmakefile.am:
12601        * JavaScriptCore.exp:
12602        * JavaScriptCore.pro:
12603        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
12604        * JavaScriptCore.xcodeproj/project.pbxproj:
12605        * bytecode/CodeBlock.cpp:
12606        (JSC::CodeBlock::dump):
12607        (JSC::CodeBlock::CodeBlock):
12608        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
12609        * bytecode/CodeBlock.h:
12610        (JSC::CodeBlock::isStrictMode):
12611        * bytecode/EvalCodeCache.h:
12612        (JSC::EvalCodeCache::get):
12613        * bytecode/Opcode.h:
12614        * bytecompiler/BytecodeGenerator.cpp:
12615        (JSC::BytecodeGenerator::BytecodeGenerator):
12616        (JSC::BytecodeGenerator::createArgumentsIfNecessary):
12617        (JSC::BytecodeGenerator::emitReturn):
12618        * bytecompiler/BytecodeGenerator.h:
12619        (JSC::BytecodeGenerator::isStrictMode):
12620        (JSC::BytecodeGenerator::makeFunction):
12621        * debugger/Debugger.cpp:
12622        (JSC::evaluateInGlobalCallFrame):
12623        * debugger/DebuggerCallFrame.cpp:
12624        (JSC::DebuggerCallFrame::evaluate):
12625        * interpreter/Interpreter.cpp:
12626        (JSC::Interpreter::callEval):
12627        (JSC::Interpreter::unwindCallFrame):
12628        (JSC::Interpreter::execute):
12629        (JSC::Interpreter::privateExecute):
12630        * jit/JIT.cpp:
12631        (JSC::JIT::privateCompileMainPass):
12632        (JSC::JIT::privateCompileSlowCases):
12633        * jit/JIT.h:
12634        * jit/JITOpcodes.cpp:
12635        (JSC::JIT::emit_op_get_pnames):
12636        (JSC::JIT::emit_op_convert_this_strict):
12637        (JSC::JIT::emitSlow_op_convert_this_strict):
12638        * jit/JITOpcodes32_64.cpp:
12639        (JSC::JIT::emit_op_get_pnames):
12640        * jit/JITStubs.cpp:
12641        (JSC::DEFINE_STUB_FUNCTION):
12642        * jit/JITStubs.h:
12643        * parser/ASTBuilder.h:
12644        (JSC::ASTBuilder::createFunctionBody):
12645        (JSC::ASTBuilder::isResolve):
12646        * parser/JSParser.cpp:
12647        (JSC::JSParser::next):
12648        (JSC::JSParser::startLoop):
12649        (JSC::JSParser::endLoop):
12650        (JSC::JSParser::startSwitch):
12651        (JSC::JSParser::endSwitch):
12652        (JSC::JSParser::setStrictMode):
12653        (JSC::JSParser::strictMode):
12654        (JSC::JSParser::isValidStrictMode):
12655        (JSC::JSParser::declareParameter):
12656        (JSC::JSParser::breakIsValid):
12657        (JSC::JSParser::pushLabel):
12658        (JSC::JSParser::popLabel):
12659        (JSC::JSParser::hasLabel):
12660        (JSC::JSParser::DepthManager::DepthManager):
12661        (JSC::JSParser::DepthManager::~DepthManager):
12662        (JSC::JSParser::Scope::Scope):
12663        (JSC::JSParser::Scope::startSwitch):
12664        (JSC::JSParser::Scope::endSwitch):
12665        (JSC::JSParser::Scope::startLoop):
12666        (JSC::JSParser::Scope::endLoop):
12667        (JSC::JSParser::Scope::inLoop):
12668        (JSC::JSParser::Scope::breakIsValid):
12669        (JSC::JSParser::Scope::pushLabel):
12670        (JSC::JSParser::Scope::popLabel):
12671        (JSC::JSParser::Scope::hasLabel):
12672        (JSC::JSParser::Scope::isFunction):
12673        (JSC::JSParser::Scope::declareVariable):
12674        (JSC::JSParser::Scope::declareWrite):
12675        (JSC::JSParser::Scope::deleteProperty):
12676        (JSC::JSParser::Scope::declareParameter):
12677        (JSC::JSParser::Scope::setNeedsFullActivation):
12678        (JSC::JSParser::Scope::collectFreeVariables):
12679        (JSC::JSParser::Scope::getUncapturedWrittenVariables):
12680        (JSC::JSParser::Scope::getDeletedVariables):
12681        (JSC::JSParser::Scope::setStrictMode):
12682        (JSC::JSParser::Scope::strictMode):
12683        (JSC::JSParser::Scope::isValidStrictMode):
12684        (JSC::JSParser::pushScope):
12685        (JSC::JSParser::popScope):
12686        (JSC::JSParser::declareVariable):
12687        (JSC::JSParser::declareWrite):
12688        (JSC::JSParser::deleteProperty):
12689        (JSC::jsParse):
12690        (JSC::JSParser::JSParser):
12691        (JSC::JSParser::parseProgram):
12692        (JSC::JSParser::parseSourceElements):
12693        (JSC::JSParser::parseDoWhileStatement):
12694        (JSC::JSParser::parseWhileStatement):
12695        (JSC::JSParser::parseVarDeclarationList):
12696        (JSC::JSParser::parseConstDeclarationList):
12697        (JSC::JSParser::parseForStatement):
12698        (JSC::JSParser::parseBreakStatement):
12699        (JSC::JSParser::parseContinueStatement):
12700        (JSC::JSParser::parseReturnStatement):
12701        (JSC::JSParser::parseWithStatement):
12702        (JSC::JSParser::parseSwitchStatement):
12703        (JSC::JSParser::parseSwitchClauses):
12704        (JSC::JSParser::parseSwitchDefaultClause):
12705        (JSC::JSParser::parseTryStatement):
12706        (JSC::JSParser::parseBlockStatement):
12707        (JSC::JSParser::parseStatement):
12708        (JSC::JSParser::parseFormalParameters):
12709        (JSC::JSParser::parseFunctionBody):
12710        (JSC::JSParser::parseFunctionInfo):
12711        (JSC::JSParser::parseFunctionDeclaration):
12712        (JSC::JSParser::parseExpressionOrLabelStatement):
12713        (JSC::JSParser::parseIfStatement):
12714        (JSC::JSParser::parseExpression):
12715        (JSC::JSParser::parseAssignmentExpression):
12716        (JSC::JSParser::parseConditionalExpression):
12717        (JSC::JSParser::parseBinaryExpression):
12718        (JSC::JSParser::parseStrictObjectLiteral):
12719        (JSC::JSParser::parsePrimaryExpression):
12720        (JSC::JSParser::parseMemberExpression):
12721        (JSC::JSParser::parseUnaryExpression):
12722        * parser/JSParser.h:
12723        * parser/Lexer.cpp:
12724        (JSC::Lexer::parseString):
12725        (JSC::Lexer::lex):
12726        * parser/Lexer.h:
12727        (JSC::Lexer::isReparsing):
12728        * parser/Nodes.cpp:
12729        (JSC::ScopeNode::ScopeNode):
12730        (JSC::FunctionBodyNode::FunctionBodyNode):
12731        (JSC::FunctionBodyNode::create):
12732        * parser/Nodes.h:
12733        (JSC::ScopeNode::isStrictMode):
12734        * parser/Parser.cpp:
12735        (JSC::Parser::parse):
12736        * parser/Parser.h:
12737        (JSC::Parser::parse):
12738        * parser/SyntaxChecker.h:
12739        (JSC::SyntaxChecker::SyntaxChecker):
12740        (JSC::SyntaxChecker::makeFunctionCallNode):
12741        (JSC::SyntaxChecker::appendToComma):
12742        (JSC::SyntaxChecker::createCommaExpr):
12743        (JSC::SyntaxChecker::makeAssignNode):
12744        (JSC::SyntaxChecker::makePrefixNode):
12745        (JSC::SyntaxChecker::makePostfixNode):
12746        (JSC::SyntaxChecker::makeTypeOfNode):
12747        (JSC::SyntaxChecker::makeDeleteNode):
12748        (JSC::SyntaxChecker::makeNegateNode):
12749        (JSC::SyntaxChecker::makeBitwiseNotNode):
12750        (JSC::SyntaxChecker::createLogicalNot):
12751        (JSC::SyntaxChecker::createUnaryPlus):
12752        (JSC::SyntaxChecker::createVoid):
12753        (JSC::SyntaxChecker::thisExpr):
12754        (JSC::SyntaxChecker::createResolve):
12755        (JSC::SyntaxChecker::createObjectLiteral):
12756        (JSC::SyntaxChecker::createArray):
12757        (JSC::SyntaxChecker::createNumberExpr):
12758        (JSC::SyntaxChecker::createString):
12759        (JSC::SyntaxChecker::createBoolean):
12760        (JSC::SyntaxChecker::createNull):
12761        (JSC::SyntaxChecker::createBracketAccess):
12762        (JSC::SyntaxChecker::createDotAccess):
12763        (JSC::SyntaxChecker::createRegex):
12764        (JSC::SyntaxChecker::createNewExpr):
12765        (JSC::SyntaxChecker::createConditionalExpr):
12766        (JSC::SyntaxChecker::createAssignResolve):
12767        (JSC::SyntaxChecker::createFunctionExpr):
12768        (JSC::SyntaxChecker::createFunctionBody):
12769        (JSC::SyntaxChecker::appendBinaryExpressionInfo):
12770        (JSC::SyntaxChecker::operatorStackPop):
12771        * runtime/Arguments.cpp:
12772        (JSC::Arguments::createStrictModeCallerIfNecessary):
12773        (JSC::Arguments::createStrictModeCalleeIfNecessary):
12774        (JSC::Arguments::getOwnPropertySlot):
12775        (JSC::Arguments::getOwnPropertyDescriptor):
12776        (JSC::Arguments::put):
12777        (JSC::Arguments::deleteProperty):
12778        * runtime/Arguments.h:
12779        (JSC::Arguments::Arguments):
12780        * runtime/CommonIdentifiers.cpp:
12781        (JSC::CommonIdentifiers::CommonIdentifiers):
12782        * runtime/CommonIdentifiers.h:
12783        * runtime/Error.cpp:
12784        (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
12785        (JSC::StrictModeTypeErrorFunction::constructThrowTypeError):
12786        (JSC::StrictModeTypeErrorFunction::getConstructData):
12787        (JSC::StrictModeTypeErrorFunction::callThrowTypeError):
12788        (JSC::StrictModeTypeErrorFunction::getCallData):
12789        (JSC::createTypeErrorFunction):
12790        * runtime/Error.h:
12791        * runtime/Executable.cpp:
12792        (JSC::EvalExecutable::EvalExecutable):
12793        (JSC::ProgramExecutable::ProgramExecutable):
12794        (JSC::FunctionExecutable::FunctionExecutable):
12795        (JSC::EvalExecutable::compileInternal):
12796        (JSC::ProgramExecutable::checkSyntax):
12797        (JSC::ProgramExecutable::compileInternal):
12798        (JSC::FunctionExecutable::compileForCallInternal):
12799        (JSC::FunctionExecutable::compileForConstructInternal):
12800        (JSC::FunctionExecutable::reparseExceptionInfo):
12801        (JSC::EvalExecutable::reparseExceptionInfo):
12802        (JSC::FunctionExecutable::fromGlobalCode):
12803        (JSC::ProgramExecutable::reparseExceptionInfo):
12804        * runtime/Executable.h:
12805        (JSC::ScriptExecutable::ScriptExecutable):
12806        (JSC::ScriptExecutable::isStrictMode):
12807        (JSC::EvalExecutable::create):
12808        (JSC::FunctionExecutable::create):
12809        * runtime/JSActivation.cpp:
12810        (JSC::JSActivation::toStrictThisObject):
12811        * runtime/JSActivation.h:
12812        * runtime/JSFunction.cpp:
12813        (JSC::createDescriptorForThrowingProperty):
12814        (JSC::JSFunction::getOwnPropertySlot):
12815        (JSC::JSFunction::getOwnPropertyDescriptor):
12816        (JSC::JSFunction::put):
12817        * runtime/JSGlobalData.cpp:
12818        (JSC::JSGlobalData::JSGlobalData):
12819        * runtime/JSGlobalData.h:
12820        * runtime/JSGlobalObject.cpp:
12821        (JSC::JSGlobalObject::reset):
12822        * runtime/JSGlobalObject.h:
12823        (JSC::JSGlobalObject::internalFunctionStructure):
12824        * runtime/JSGlobalObjectFunctions.cpp:
12825        (JSC::globalFuncEval):
12826        * runtime/JSObject.cpp:
12827        (JSC::JSObject::put):
12828        (JSC::JSObject::toStrictThisObject):
12829        (JSC::throwTypeError):
12830        * runtime/JSObject.h:
12831        (JSC::JSObject::isStrictModeFunction):
12832        (JSC::JSObject::putDirectInternal):
12833        (JSC::JSObject::putDirect):
12834        (JSC::JSValue::putDirect):
12835        (JSC::JSValue::toStrictThisObject):
12836        * runtime/JSStaticScopeObject.cpp:
12837        (JSC::JSStaticScopeObject::toStrictThisObject):
12838        * runtime/JSStaticScopeObject.h:
12839        * runtime/JSValue.h:
12840        * runtime/JSZombie.h:
12841        (JSC::JSZombie::toStrictThisObject):
12842        * runtime/PutPropertySlot.h:
12843        (JSC::PutPropertySlot::PutPropertySlot):
12844        (JSC::PutPropertySlot::isStrictMode):
12845        * runtime/StrictEvalActivation.cpp: Added.
12846        (JSC::StrictEvalActivation::StrictEvalActivation):
12847        (JSC::StrictEvalActivation::deleteProperty):
12848        (JSC::StrictEvalActivation::toThisObject):
12849        (JSC::StrictEvalActivation::toStrictThisObject):
12850        * runtime/StrictEvalActivation.h: Added.
12851
128522010-10-10  Patrick Gansterer  <paroga@webkit.org>
12853
12854        Unreviewed.
12855
12856        Windows build fix after r69472.
12857
12858        * wtf/text/StringHash.h:
12859        (WTF::CaseFoldingHash::hash):
12860
128612010-10-10  Patrick Gansterer  <paroga@webkit.org>
12862
12863        Reviewed by Adam Barth.
12864
12865        Use WTF::StringHasher in WTF::CaseFoldingHash
12866        https://bugs.webkit.org/show_bug.cgi?id=46523
12867
12868        * wtf/text/StringHash.h:
12869        (WTF::CaseFoldingHash::foldCase):
12870        (WTF::CaseFoldingHash::hash):
12871
128722010-10-09  Pratik Solanki  <psolanki@apple.com>
12873
12874        Reviewed by Xan Lopez.
12875
12876        https://bugs.webkit.org/show_bug.cgi?id=47445
12877        Remove unused function WTFThreadData::initializeIdentifierTable()
12878
12879        * wtf/WTFThreadData.h:
12880
128812010-10-08  Michael Saboff  <msaboff@apple.com>
12882
12883        Reviewed by Darin Adler.
12884
12885        Added check to start of subexpression being positive before using
12886        subexpression in replacement.
12887        https://bugs.webkit.org/show_bug.cgi?id=47324
12888
12889        * runtime/StringPrototype.cpp:
12890        (JSC::substituteBackreferencesSlow):
12891
128922010-10-08  Chris Evans  <cevans@google.com>
12893
12894        Reviewed by David Levin.
12895
12896        https://bugs.webkit.org/show_bug.cgi?id=47393
12897
12898        Use unsigned consistently to check for max StringImpl length.
12899        Add a few integer overflow checks.
12900        Uses the existing paradigm of CRASH() when we can't reasonably handle a crazily large request.
12901
12902        * wtf/text/WTFString.cpp:
12903        * wtf/text/StringImpl.h:
12904        * wtf/text/StringImpl.cpp:
12905        Better use of size_t vs. unsigned; check for integer overflows.
12906
129072010-10-07  David Goodwin  <david_goodwin@apple.com>
12908
12909        Reviewed by Oliver Hunt.
12910
12911        ARM JIT generates undefined operations due to partially uninitialized ShiftTypeAndAmount
12912        https://bugs.webkit.org/show_bug.cgi?id=47356
12913
12914        * assembler/ARMv7Assembler.h:
12915
129162010-10-06  Chris Evans  <cevans@google.com>
12917
12918        Reviewed by David Levin.
12919
12920        https://bugs.webkit.org/show_bug.cgi?id=47248
12921
12922        Use size_t consistently in CString, to prevent theoretical trouble
12923        with > 4GB strings on 64-bit platforms.
12924
12925        * wtf/text/CString.h:
12926        * wtf/text/CString.cpp:
12927        Use size_t for string lengths.
12928        * wtf/MD5.cpp:
12929        (WTF::expectMD5): use suitable format string + cast for size_t.
12930        * JavaScriptCore.exp:
12931        Update symbol name.
12932
129332010-10-06  Anders Carlsson  <andersca@apple.com>
12934
12935        Reviewed by Sam Weinig.
12936
12937        Start cleaning up Arguments.h
12938        https://bugs.webkit.org/show_bug.cgi?id=47304
12939
12940        * wtf/TypeTraits.h:
12941        * wtf/TypeTraits.cpp:
12942        Add RemoveReference type trait.
12943
129442010-10-06  Rafael Antognolli  <antognolli@profusion.mobi>
12945
12946        Unreviewed build fix.
12947
12948        [EFL] Build fix for glib support.
12949        https://bugs.webkit.org/show_bug.cgi?id=47221
12950
12951        If compiling with GLib support enabled, we also need to link wtf against
12952        glib library.
12953
12954        * wtf/CMakeListsEfl.txt:
12955
129562010-10-05  Kwang Yul Seo  <skyul@company100.net>
12957
12958        Reviewed by Gavin Barraclough.
12959
12960        [BREWMP] Port ExecutableAllocator::cacheFlush to enable ARM JIT
12961        https://bugs.webkit.org/show_bug.cgi?id=47117
12962
12963        Use IMemCache1 to flush data cache and invalidate instruction cache.
12964
12965        * jit/ExecutableAllocator.h:
12966        (JSC::ExecutableAllocator::cacheFlush):
12967
129682010-10-05  Leandro Pereira  <leandro@profusion.mobi>
12969
12970        Unreviewed. Build fix.
12971
12972        Moved "jsc" directory to "shell", so that the name does not clash with the
12973        JavaScriptCore shell in some build systems.
12974        http://webkit.org/b/47049
12975
12976        * CMakeLists.txt: Changed reference from "jsc" to "shell".
12977        * jsc: Removed.
12978        * jsc/CMakeLists.txt: Removed.
12979        * jsc/CMakeListsEfl.txt: Removed.
12980        * shell: Copied from JavaScriptCore/jsc.
12981
129822010-10-05  Kwang Yul Seo  <skyul@company100.net>
12983
12984        Reviewed by Kent Tamura.
12985
12986        [BREWMP] Use PlatformRefPtr in randomNumber
12987        https://bugs.webkit.org/show_bug.cgi?id=46989
12988
12989        Use PlatformRefPtr to free memory automatically.
12990
12991        * wtf/RandomNumber.cpp:
12992        (WTF::randomNumber):
12993
129942010-10-05  Oliver Hunt  <oliver@apple.com>
12995
12996        Reviewed by Darin Adler.
12997
12998        REGRESSION(r68338): JavaScript error on PowerPC only (crashes on Interpreter built for x86_64)
12999        https://bugs.webkit.org/show_bug.cgi?id=46690
13000
13001        Use the correct register value when initialising the arguments
13002        object in the interpreter.  This is covered by existing tests.
13003
13004        * interpreter/Interpreter.cpp:
13005        (JSC::Interpreter::privateExecute):
13006
130072010-10-04  David Goodwin  <david_goodwin@apple.com>
13008
13009        Reviewed by Oliver Hunt.
13010
13011        ARMv7 JIT should take advantage of 2-byte branches to reduce code size
13012        https://bugs.webkit.org/show_bug.cgi?id=47007
13013
13014        * assembler/ARMv7Assembler.cpp:
13015        * assembler/ARMv7Assembler.h:
13016        (JSC::ARMv7Assembler::computeJumpType):
13017        (JSC::ARMv7Assembler::link):
13018        (JSC::ARMv7Assembler::canBeJumpT2):
13019        (JSC::ARMv7Assembler::canBeJumpT4):
13020        (JSC::ARMv7Assembler::linkBX):
13021        (JSC::ARMv7Assembler::linkJumpT4):
13022        (JSC::ARMv7Assembler::linkJumpT2):
13023        (JSC::ARMv7Assembler::linkJumpAbsolute):
13024
130252010-10-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
13026
13027        Reviewed by Antonio Gomes.
13028
13029        [EFL] Use fast malloc for WebKit EFL
13030        https://bugs.webkit.org/show_bug.cgi?id=46691
13031
13032        Use fast malloc for WebKit EFL because the fast malloc is to allocate
13033        memory quickly.
13034
13035        * wtf/CMakeListsEfl.txt:
13036
130372010-10-04  Oliver Hunt  <oliver@apple.com>
13038
13039        Reviewed by Geoff Garen.
13040
13041        Lazily create activation objects
13042        https://bugs.webkit.org/show_bug.cgi?id=47107
13043
13044        Make it possible to lazily create the activation object
13045        for a function that needs one.  This allows us to reduce
13046        the overhead of entering a function that may require
13047        an activation in some cases, but not always.
13048
13049        This does make exception handling a little more complex as
13050        it's now necessary to verify that a callframes activation
13051        has been created, and create it if not, in all of the
13052        paths used in exception handling.
13053
13054        We also need to add logic to check for the existence of
13055        the activation in the scoped_var opcodes, as well as
13056        op_ret, op_ret_object_or_this and op_tearoff_activation
13057        so that we can avoid creating an activation unnecesarily
13058        on function exit. 
13059
13060        * bytecode/CodeBlock.cpp:
13061        (JSC::CodeBlock::dump):
13062        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
13063        (JSC::CodeBlock::createActivation):
13064        * bytecode/CodeBlock.h:
13065        (JSC::CodeBlock::setActivationRegister):
13066        (JSC::CodeBlock::activationRegister):
13067        * bytecode/Opcode.h:
13068        * bytecompiler/BytecodeGenerator.cpp:
13069        (JSC::BytecodeGenerator::BytecodeGenerator):
13070        (JSC::BytecodeGenerator::emitNewFunctionInternal):
13071        (JSC::BytecodeGenerator::emitNewFunctionExpression):
13072        (JSC::BytecodeGenerator::createActivationIfNecessary):
13073        * bytecompiler/BytecodeGenerator.h:
13074        * interpreter/Interpreter.cpp:
13075        (JSC::Interpreter::resolveSkip):
13076        (JSC::Interpreter::resolveGlobalDynamic):
13077        (JSC::Interpreter::resolveBase):
13078        (JSC::Interpreter::unwindCallFrame):
13079        (JSC::Interpreter::throwException):
13080        (JSC::Interpreter::privateExecute):
13081        * jit/JIT.cpp:
13082        (JSC::JIT::privateCompileMainPass):
13083        * jit/JIT.h:
13084        * jit/JITCall32_64.cpp:
13085        (JSC::JIT::emit_op_ret):
13086        (JSC::JIT::emit_op_ret_object_or_this):
13087        * jit/JITOpcodes.cpp:
13088        (JSC::JIT::emit_op_end):
13089        (JSC::JIT::emit_op_get_scoped_var):
13090        (JSC::JIT::emit_op_put_scoped_var):
13091        (JSC::JIT::emit_op_tear_off_activation):
13092        (JSC::JIT::emit_op_ret):
13093        (JSC::JIT::emit_op_ret_object_or_this):
13094        (JSC::JIT::emit_op_create_activation):
13095        (JSC::JIT::emit_op_resolve_global_dynamic):
13096        * jit/JITOpcodes32_64.cpp:
13097        (JSC::JIT::emit_op_get_scoped_var):
13098        (JSC::JIT::emit_op_put_scoped_var):
13099        (JSC::JIT::emit_op_tear_off_activation):
13100        (JSC::JIT::emit_op_create_activation):
13101        * jit/JITStubs.cpp:
13102        (JSC::DEFINE_STUB_FUNCTION):
13103
131042010-10-04  Adam Barth  <abarth@webkit.org>
13105
13106        Reviewed by Sam Weinig.
13107
13108        Remove ENABLE_SANDBOX
13109        https://bugs.webkit.org/show_bug.cgi?id=47032
13110
13111        * Configurations/FeatureDefines.xcconfig:
13112
131132010-10-01  Pratik Solanki  <psolanki@apple.com>
13114
13115        Reviewed by Geoffrey Garen.
13116        Specify ALWAYS_INLINE at function declaration not function definition
13117        https://bugs.webkit.org/show_bug.cgi?id=46960
13118
13119        For functions defined with ALWAYS_INLINE, add the attribute to the declaration as well.
13120
13121        * bytecompiler/BytecodeGenerator.h:
13122        * wtf/FastMalloc.cpp:
13123
131242010-10-01  Kwang Yul Seo  <skyul@company100.net>
13125
13126        Unreviewed.
13127
13128        [BREWMP] Change Collector BLOCK_SIZE to 64KB
13129        https://bugs.webkit.org/show_bug.cgi?id=46436
13130
13131        Lower BLOCK_SIZE to 64KB because Brew MP runs on low end devices.
13132
13133        * runtime/Collector.h:
13134
131352010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
13136
13137        Reviewed by Andreas Kling.
13138
13139        [Qt] Stack overflow on symbian platform.
13140        https://bugs.webkit.org/show_bug.cgi?id=40598
13141        
13142        Move big allocation in arrayProtoFuncToString from stack to heap.
13143        JSC::arrayProtoFuncToString function can be called recursivly and
13144        1K allocation on stack cahse stack overflow.
13145        Can be useful for other platforms with limited stack size.
13146
13147        * runtime/ArrayPrototype.cpp:
13148        (JSC::arrayProtoFuncToString):
13149
131502010-09-30  Kwang Yul Seo  <skyul@company100.net>
13151
13152        Reviewed by Kent Tamura.
13153
13154        [BREWMP] Add a factory function which returns an instance wrapped in PlatformRefPtr.
13155        https://bugs.webkit.org/show_bug.cgi?id=46373
13156
13157        A Brew MP instance has reference count 1 when it is created, so call adoptPlatformRef
13158        to wrap the instance in PlatformRefPtr.
13159
13160        * wtf/brew/ShellBrew.h:
13161        (WTF::createRefPtrInstance):
13162
131632010-09-30  Kwang Yul Seo  <skyul@company100.net>
13164
13165        Reviewed by Kent Tamura.
13166
13167        [BREWMP] Port PlatformRefPtr
13168        https://bugs.webkit.org/show_bug.cgi?id=46370
13169
13170        Implement refPlatformPtr and derefPlatformPtr to use PlatformRefPtr in Brew MP.
13171
13172        * wtf/brew/RefPtrBrew.h: Added.
13173        (WTF::refPlatformPtr):
13174        (WTF::derefPlatformPtr):
13175
131762010-09-29  Sam Weinig  <sam@webkit.org>
13177
13178        Reviewed by Darin Adler.
13179
13180        Add additional checks to StringBuffer.
13181        <rdar://problem/7756381>
13182
13183        * wtf/text/StringBuffer.h:
13184        (WTF::StringBuffer::StringBuffer):
13185        (WTF::StringBuffer::resize):
13186
131872010-09-30  Chris Marrin  <cmarrin@apple.com>
13188
13189        Reviewed by Simon Fraser.
13190
13191        Make 2D accelerated canvas rendering build on Mac
13192        https://bugs.webkit.org/show_bug.cgi?id=46007
13193        
13194        Added ACCELERATED_2D_CANVAS to FeatureDefines
13195
13196        * Configurations/FeatureDefines.xcconfig:
13197
131982010-09-30  Kevin Ollivier  <kevino@theolliviers.com>
13199
13200        [wx] wxMSW build fix. Make sure we copy the compiler flags and remove exception handling from
13201        the copy so as not to alter global settings.
13202
13203        * wscript:
13204
132052010-09-30  Peter Varga  <pvarga@inf.u-szeged.hu>
13206
13207        Reviewed by Gavin Barraclough.
13208
13209        The case-insensitivity backreference checking isn't working with YARR
13210        Interpreter
13211        https://bugs.webkit.org/show_bug.cgi?id=46882
13212
13213        Add ignorecase checking to the Interpreter::tryConsumeBackReference() function.
13214
13215        * yarr/RegexInterpreter.cpp:
13216        (JSC::Yarr::Interpreter::tryConsumeBackReference):
13217
132182010-09-30  Kwang Yul Seo  <skyul@company100.net>
13219
13220        Reviewed by Andreas Kling.
13221
13222        [BREWMP] Leave initializeRandomNumberGenerator empty.
13223        https://bugs.webkit.org/show_bug.cgi?id=46851
13224
13225        On Brew MP, AEECLSID_RANDOM initializes itself.
13226
13227        * wtf/RandomNumberSeed.h:
13228        (WTF::initializeRandomNumberGenerator):
13229
132302010-09-30  Gabor Loki  <loki@webkit.org>
13231
13232        Reviewed by Csaba Osztrogonác.
13233
13234        Remove unnecessary cacheFlush calls from Thumb-2
13235        https://bugs.webkit.org/show_bug.cgi?id=46702
13236
13237        * assembler/ARMv7Assembler.h:
13238        (JSC::ARMv7Assembler::relinkCall):
13239        (JSC::ARMv7Assembler::repatchInt32):
13240        (JSC::ARMv7Assembler::repatchPointer):
13241
132422010-09-29  Patrick Gansterer  <paroga@webkit.org>
13243
13244        Unreviewed.
13245
13246        Next try to fix cygwin build.
13247
13248        * wtf/Assertions.cpp:
13249
132502010-09-29  Patrick Gansterer  <paroga@webkit.org>
13251
13252        Unreviewed.
13253
13254        Build fix for cygwin #2. It's OS(WINDOWS), not OS(WIN).
13255
13256        * wtf/Assertions.cpp:
13257
132582010-09-29  Patrick Gansterer  <paroga@webkit.org>
13259
13260        Unreviewed.
13261
13262        Build fix for cygwin.
13263
13264        * wtf/Assertions.cpp:
13265
132662010-09-29  Patrick Gansterer  <paroga@webkit.org>
13267
13268        Reviewed by Andreas Kling.
13269
13270        [WINCE] Buildfix for Assertions.cpp after r68511.
13271        https://bugs.webkit.org/show_bug.cgi?id=46807
13272
13273        Some, but not all WinCE environments have support for IsDebuggerPresent().
13274        Add HAVE(ISDEBUGGERPRESENT) to make this a build option.
13275        HAVE(ISDEBUGGERPRESENT) will be 1 for all OS(WIN) by default.
13276
13277        * wtf/Assertions.cpp:
13278        * wtf/Platform.h:
13279
132802010-09-29  Peter Varga  <pvarga@inf.u-szeged.hu>
13281
13282        Reviewed by Csaba Osztrogonác.
13283
13284        JSC compile fails on 32bit platform when Regexp Tracing is enabled
13285        https://bugs.webkit.org/show_bug.cgi?id=46713
13286
13287        Fix the cast of pointer in regexp tracing to avoid the warning.
13288
13289        * runtime/RegExp.cpp:
13290        (JSC::RegExp::match):
13291
132922010-09-28  Anders Carlsson  <andersca@apple.com>
13293
13294        Reviewed by Sam Weinig.
13295
13296        Begin hooking up painting in the plug-in process
13297        https://bugs.webkit.org/show_bug.cgi?id=46766
13298
13299        * JavaScriptCore.exp:
13300        Add tryFastRealloc, used by WebKit2.
13301
133022010-09-28  Philippe Normand  <pnormand@igalia.com>
13303
13304        Reviewed by Martin Robinson.
13305
13306        Guard GRefPtr/GOwnPtr files with ENABLE(GLIB_SUPPORT)
13307        https://bugs.webkit.org/show_bug.cgi?id=46721
13308
13309        Enable GOwnPtr/GRefPtr build only if glib support has been
13310        explicitly enabled using the WTF_ENABLE_GLIB_SUPPORT macro.
13311
13312        * wtf/gobject/GOwnPtr.cpp:
13313        * wtf/gobject/GOwnPtr.h:
13314        * wtf/gobject/GRefPtr.cpp:
13315        * wtf/gobject/GRefPtr.h:
13316
133172010-09-28  İsmail Dönmez  <ismail@namtrac.org>
13318
13319        Reviewed by Andreas Kling.
13320
13321        Test for WINCE instead of WINCEBASIC, compiler always defines WINCE.
13322        Remove reference to unexisting path JavaScriptCore/os-wince.
13323
13324        * JavaScriptCore.pri:
13325        * wtf/Assertions.cpp:
13326
133272010-09-27  Michael Saboff  <msaboff@apple.com>
13328
13329        Reviewed by Geoffrey Garen.
13330
13331        Changed the initialization of JSArray objects to have space for 
13332        3 elements for the constructor that takes a ArgList argument.
13333        This improves v8-deltablue performance by about 2.8% by reducing 
13334        the number of realloc() calls.
13335        https://bugs.webkit.org/show_bug.cgi?id=46664
13336
13337        * runtime/JSArray.cpp:
13338        (JSC::JSArray::JSArray):
13339
133402010-09-27  Gavin Barraclough  <barraclough@apple.com>
13341
13342        Reviewed by Darin Adler.
13343
13344        Bug 46680 - Inlining string concatenation can regress interpreter performance
13345        <rdar://problem/8362752> REGRESSION: ~6.4% sunspider regression in interpreter
13346        Do not inline calls to string concatenation in the interpret loop.
13347
13348        * interpreter/Interpreter.cpp:
13349        (JSC::concatenateStrings):
13350        (JSC::Interpreter::privateExecute):
13351
133522010-09-27  Anders Carlsson  <andersca@apple.com>
13353
13354        Fix thinko.
13355
13356        * runtime/JSCell.h:
13357
133582010-09-27  Anders Carlsson  <andersca@apple.com>
13359
13360        Reviewed by Adam Roben.
13361
13362        Try to fix Windows build.
13363
13364        * runtime/JSCell.h:
13365        (JSC::MSVCBugWorkaround::MSVCBugWorkaround):
13366        (JSC::MSVCBugWorkaround::~MSVCBugWorkaround):
13367
133682010-09-27  Erik Arvidsson  <arv@chromium.org>
13369
13370        Reviewed by Darin Adler.
13371
13372        Add operator == for AtomicString and Vector<Uchar>
13373        https://bugs.webkit.org/show_bug.cgi?id=46509
13374
13375        * JavaScriptCore.exp:
13376        * wtf/text/AtomicString.cpp:
13377        (WTF::operator==):
13378        * wtf/text/AtomicString.h:
13379        (WTF::operator==):
13380        (WTF::operator!=):
13381
133822010-09-27  Anders Carlsson  <andersca@apple.com>
13383
13384        Try to fix the Windows build.
13385
13386        * wtf/Noncopyable.h:
13387
133882010-09-26  Anders Carlsson  <andersca@apple.com>
13389
13390        Reviewed by Alexey Proskuryakov and Adam Barth.
13391
13392        Add WTF_MAKE_NONCOPYABLE macro
13393        https://bugs.webkit.org/show_bug.cgi?id=46589
13394
13395        Going forward, we'd like to get rid of the Noncopyable and FastAllocBase classes. The
13396        reason for this is that the Itanium C++ ABI states that no empty classes of the same type
13397        can be laid out at the same offset in the class. This can result in objects getting larger
13398        which leads to memory regressions. (One example of this is the String class which grew by
13399        sizeof(void*) when both its base class and its first member variable inherited indirectly
13400        from FastAllocBase).
13401
13402        * wtf/Noncopyable.h:
13403        Add a WTF_MAKE_NONCOPYABLE macro and get rid of NoncopyableCustomAllocated.
13404        
13405        * runtime/JSCell.h:
13406        * wtf/RefCounted.h:
13407        Don't inherit from NoncopyableCustomAllocated. Instead, use WTF_MAKE_NONCOPYABLE.
13408
134092010-09-27  Philippe Normand  <pnormand@igalia.com>
13410
13411        Reviewed by Martin Robinson.
13412
13413        [GTK] use ENABLE(GLIB_SUPPORT)
13414        https://bugs.webkit.org/show_bug.cgi?id=46630
13415
13416        * wtf/Platform.h: Include GTypedefs.h only if glib support
13417        is explicitly enabled.
13418
134192010-09-25  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
13420
13421        Reviewed by Adam Barth.
13422
13423        jsc: Document the strcat opcode.
13424        https://bugs.webkit.org/show_bug.cgi?id=46571
13425
13426        * interpreter/Interpreter.cpp:
13427        (JSC::Interpreter::privateExecute):
13428
134292010-09-21  Holger Hans Peter Freyther  <holger@moiji-mobile.com>
13430
13431        Reviewed by Adam Barth.
13432
13433        make-bytecode-docs.pl: Add a comment to the generated HTML
13434        https://bugs.webkit.org/show_bug.cgi?id=46570
13435
13436        Generate an HTML Comment that this file was generated from
13437        Interpreter.cpp with the make-bytecode-docs.pl script.
13438
13439        * docs/make-bytecode-docs.pl:
13440
134412010-09-27  Patrick Gansterer  <paroga@webkit.org>
13442
13443        Reviewed by Adam Barth.
13444
13445        Remove WTF::stringHash functions
13446        https://bugs.webkit.org/show_bug.cgi?id=46520
13447
13448        Since r68289 the stringHash functions are only wrappers around StringHasher::createHash.
13449        So use StringHasher::createHash directly and remove stringHash.
13450
13451        * wtf/StringHashFunctions.h:
13452        * wtf/text/StringImpl.h:
13453        (WTF::StringImpl::computeHash): Use WTF::StringHasher::createHash directly.
13454
134552010-09-26  Patrick Gansterer  <paroga@webkit.org>
13456
13457        Reviewed by Adam Barth.
13458
13459        Add WTF::StringHasher::createBlobHash
13460        https://bugs.webkit.org/show_bug.cgi?id=46514
13461
13462        Add this function for hashing FormElementKey and QualifiedNameComponents.
13463
13464        * wtf/StringHashFunctions.h:
13465        (WTF::StringHasher::createBlobHash):
13466
134672010-09-26  Patrick Gansterer  <paroga@webkit.org>
13468
13469        Reviewed by Adam Barth.
13470
13471        REGRESSION (r68289): Assertion failure in StringHasher::addCharacter() (ch != invalidCharacterValue)
13472        running websocket/tests/bad-sub-protocol-non-ascii.html
13473        https://bugs.webkit.org/show_bug.cgi?id=46553
13474
13475        Because we use StringHasher for binary data too, so the check for invalid unicode input is wrong.
13476        Add an additional member variable to indicate if we have an pending character
13477        instead of only using an invalid character for this purpose.
13478
13479        * wtf/StringHashFunctions.h:
13480        (WTF::StringHasher::StringHasher):
13481        (WTF::StringHasher::addCharacters):
13482        (WTF::StringHasher::addCharacter):
13483        (WTF::StringHasher::hash):
13484
134852010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
13486
13487        Reviewed by Oliver Hunt.
13488
13489        valueOf called in wrong order in atan2 and date constructors.
13490        https://bugs.webkit.org/show_bug.cgi?id=26978
13491
13492        Fixed the bug where the arguments to atan2 were being evaluated 
13493        out of order.
13494
13495        * runtime/MathObject.cpp:
13496        (JSC::mathProtoFuncATan2):
13497
134982010-09-26  Mark Hahnenberg  <mhahnenb@gmail.com>
13499
13500        Reviewed by Oliver Hunt.
13501
13502        valueOf called in wrong order in atan2 and date constructors.
13503        https://bugs.webkit.org/show_bug.cgi?id=26978
13504
13505        Fixed the issue where the parameters to the Date constructor
13506        were being evaluated to numbers more than once.
13507
13508        * runtime/DateConstructor.cpp:
13509        (JSC::constructDate):
13510        (JSC::dateUTC):
13511
135122010-09-25  Oliver Hunt  <oliver@apple.com>
13513
13514        Fix various builds
13515
13516        Relearning the lesson that last minute changes are bad.
13517
13518        * bytecode/CodeBlock.cpp:
13519        (JSC::CodeBlock::dump):
13520        * bytecompiler/BytecodeGenerator.cpp:
13521        (JSC::BytecodeGenerator::emitGetArgumentsLength):
13522        * jit/JITOpcodes.cpp:
13523        (JSC::JIT::emitSlow_op_get_argument_by_val):
13524
135252010-09-25  Oliver Hunt  <oliver@apple.com>
13526
13527        Reviewed by Cameron Zwarich.
13528
13529        Avoid constructing arguments object when accessing length and index properties
13530        https://bugs.webkit.org/show_bug.cgi?id=46572
13531
13532        Add opcodes to read argument length and properties, and then implement them.
13533        Much like other lazy opcodes these opcodes take a fast path when the arguments
13534        object has not been instantiated, and fall back on generic access mechanisms
13535        if they are acting on an instantiated object.
13536
13537        3% win on v8-earleyboyer, no change elsewhere.
13538
13539        * bytecode/CodeBlock.cpp:
13540        (JSC::CodeBlock::dump):
13541        * bytecode/Opcode.h:
13542        * bytecompiler/BytecodeGenerator.cpp:
13543        (JSC::BytecodeGenerator::emitGetArgumentsLength):
13544        (JSC::BytecodeGenerator::emitGetArgumentByVal):
13545        * bytecompiler/BytecodeGenerator.h:
13546        * bytecompiler/NodesCodegen.cpp:
13547        (JSC::BracketAccessorNode::emitBytecode):
13548        (JSC::DotAccessorNode::emitBytecode):
13549        * interpreter/Interpreter.cpp:
13550        (JSC::Interpreter::privateExecute):
13551        * jit/JIT.cpp:
13552        (JSC::JIT::privateCompileMainPass):
13553        (JSC::JIT::privateCompileSlowCases):
13554        * jit/JIT.h:
13555        * jit/JITOpcodes.cpp:
13556        (JSC::JIT::emit_op_get_arguments_length):
13557        (JSC::JIT::emitSlow_op_get_arguments_length):
13558        (JSC::JIT::emit_op_get_argument_by_val):
13559        (JSC::JIT::emitSlow_op_get_argument_by_val):
13560        * jit/JITOpcodes32_64.cpp:
13561        (JSC::JIT::emit_op_get_arguments_length):
13562        (JSC::JIT::emitSlow_op_get_arguments_length):
13563        (JSC::JIT::emit_op_get_argument_by_val):
13564        (JSC::JIT::emitSlow_op_get_argument_by_val):
13565
135662010-09-25  Patrick Gansterer  <paroga@webkit.org>
13567
13568        Unreviewed.
13569
13570        Fix typo in StringHasher class
13571        https://bugs.webkit.org/show_bug.cgi?id=45970
13572
13573        * wtf/StringHashFunctions.h:
13574        (WTF::StringHasher::createHash):
13575
135762010-09-24  Patrick Gansterer  <paroga@paroga.com>
13577
13578        Reviewed by Gavin Barraclough.
13579
13580        Add WTF::StringHasher
13581        https://bugs.webkit.org/show_bug.cgi?id=45970
13582
13583        StringHasher is a class for calculation stringHash out of character string.
13584        This class will unify the different usages of the same algorithm.
13585
13586        * wtf/StringHashFunctions.h:
13587        (WTF::StringHasher::StringHasher):
13588        (WTF::StringHasher::addCharacters):
13589        (WTF::StringHasher::addCharacter):
13590        (WTF::StringHasher::hash):
13591        (WTF::StringHasher::createHash):
13592        (WTF::StringHasher::defaultCoverter):
13593        (WTF::StringHasher::addCharactersToHash):
13594        (WTF::stringHash):
13595
135962010-09-24  Oliver Hunt  <oliver@apple.com>
13597
13598        Reviewed by Geoffrey Garen.
13599
13600        Variable declarations inside a catch scope don't get propogated to the parent scope
13601        https://bugs.webkit.org/show_bug.cgi?id=46501
13602
13603        Add logic to make variable declaration look for a scope for the
13604        new variable.  This allows us to create a scope (eg. for catch)
13605        and then seal it, so that additional variable declarations
13606        contained are propogated to the correct target.  Strangely this
13607        comes out as a performance win, but I think it's mostly cache
13608        effects.
13609
13610        * parser/JSParser.cpp:
13611        (JSC::JSParser::Scope::Scope):
13612        (JSC::JSParser::Scope::preventNewDecls):
13613        (JSC::JSParser::Scope::allowsNewDecls):
13614        (JSC::JSParser::declareVariable):
13615        (JSC::JSParser::parseVarDeclarationList):
13616        (JSC::JSParser::parseConstDeclarationList):
13617        (JSC::JSParser::parseTryStatement):
13618        (JSC::JSParser::parseFormalParameters):
13619        (JSC::JSParser::parseFunctionDeclaration):
13620
136212010-09-24  İsmail Dönmez  <ismail@namtrac.org>
13622
13623       Reviewed by Csaba Osztrogonác.
13624
13625       Add a Windows compatible inttypes.h header to fix WinCE build.
13626       https://bugs.webkit.org/show_bug.cgi?id=46463
13627
13628       * os-win32/inttypes.h: Added.
13629
136302010-09-24  Oliver Hunt  <oliver@apple.com>
13631
13632        Reviewed by Gavin Barraclough.
13633
13634        REGRESSION(r68223): It broke 2-3 tests on bots (Requested by Ossy on #webkit).
13635        https://bugs.webkit.org/show_bug.cgi?id=46448
13636
13637        Roll this back in, with additional logic to prevent us from delaying construction
13638        of functions named "arguments"
13639
13640        * bytecode/CodeBlock.cpp:
13641        (JSC::CodeBlock::dump):
13642        * bytecode/Opcode.h:
13643        * bytecompiler/BytecodeGenerator.cpp:
13644        (JSC::BytecodeGenerator::BytecodeGenerator):
13645        (JSC::BytecodeGenerator::emitInitLazyRegister):
13646        (JSC::BytecodeGenerator::registerFor):
13647        (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
13648        (JSC::BytecodeGenerator::constRegisterFor):
13649        (JSC::BytecodeGenerator::emitNewFunction):
13650        (JSC::BytecodeGenerator::emitLazyNewFunction):
13651        (JSC::BytecodeGenerator::emitNewFunctionInternal):
13652        * bytecompiler/BytecodeGenerator.h:
13653        * interpreter/Interpreter.cpp:
13654        (JSC::Interpreter::privateExecute):
13655        * jit/JIT.cpp:
13656        (JSC::JIT::privateCompileMainPass):
13657        * jit/JIT.h:
13658        * jit/JITOpcodes.cpp:
13659        (JSC::JIT::emit_op_init_lazy_reg):
13660        (JSC::JIT::emit_op_new_func):
13661        * jit/JITOpcodes32_64.cpp:
13662        (JSC::JIT::emit_op_init_lazy_reg):
13663        * parser/Nodes.h:
13664        (JSC::ScopeNode::needsActivationForMoreThanVariables):
13665
136662010-09-23  Sheriff Bot  <webkit.review.bot@gmail.com>
13667
13668        Unreviewed, rolling out r68223.
13669        http://trac.webkit.org/changeset/68223
13670        https://bugs.webkit.org/show_bug.cgi?id=46448
13671
13672        It broke 2-3 tests on bots (Requested by Ossy on #webkit).
13673
13674        * bytecode/CodeBlock.cpp:
13675        (JSC::CodeBlock::dump):
13676        * bytecode/Opcode.h:
13677        * bytecompiler/BytecodeGenerator.cpp:
13678        (JSC::BytecodeGenerator::BytecodeGenerator):
13679        (JSC::BytecodeGenerator::registerFor):
13680        (JSC::BytecodeGenerator::constRegisterFor):
13681        (JSC::BytecodeGenerator::emitNewFunction):
13682        * bytecompiler/BytecodeGenerator.h:
13683        * interpreter/Interpreter.cpp:
13684        (JSC::Interpreter::privateExecute):
13685        * jit/JIT.cpp:
13686        (JSC::JIT::privateCompileMainPass):
13687        * jit/JIT.h:
13688        * jit/JITOpcodes.cpp:
13689        (JSC::JIT::emit_op_new_func):
13690        (JSC::JIT::emit_op_init_arguments):
13691        * jit/JITOpcodes32_64.cpp:
13692        (JSC::JIT::emit_op_new_func):
13693        (JSC::JIT::emit_op_init_arguments):
13694        * parser/Nodes.h:
13695
136962010-09-23  Oliver Hunt  <oliver@apple.com>
13697
13698        Reviewed by Geoffrey Garen.
13699
13700        Delay construction of functions that aren't captured
13701        https://bugs.webkit.org/show_bug.cgi?id=46433
13702
13703        If a function isn't captured by an activation there's no
13704        way it can be accessed indirectly, so we can delay the
13705        construction until it's used (similar to what we do with
13706        arguments).  We rename the existing op_init_arguments to
13707        op_init_lazy_reg and removed its implicit handling of
13708        the anonymous argument register, and make op_new_function
13709        take a parameter to indicate whether it should null check
13710        the target slot before creating the function object.
13711
13712        * bytecode/CodeBlock.cpp:
13713        (JSC::CodeBlock::dump):
13714        * bytecode/Opcode.h:
13715        * bytecompiler/BytecodeGenerator.cpp:
13716        (JSC::BytecodeGenerator::BytecodeGenerator):
13717        (JSC::BytecodeGenerator::emitInitLazyRegister):
13718        (JSC::BytecodeGenerator::registerFor):
13719        (JSC::BytecodeGenerator::createLazyRegisterIfNecessary):
13720        (JSC::BytecodeGenerator::constRegisterFor):
13721        (JSC::BytecodeGenerator::emitNewFunction):
13722        (JSC::BytecodeGenerator::emitLazyNewFunction):
13723        (JSC::BytecodeGenerator::emitNewFunctionInternal):
13724        * bytecompiler/BytecodeGenerator.h:
13725        * interpreter/Interpreter.cpp:
13726        (JSC::Interpreter::privateExecute):
13727        * jit/JIT.cpp:
13728        (JSC::JIT::privateCompileMainPass):
13729        * jit/JIT.h:
13730        * jit/JITOpcodes.cpp:
13731        (JSC::JIT::emit_op_init_lazy_reg):
13732        (JSC::JIT::emit_op_new_func):
13733        * jit/JITOpcodes32_64.cpp:
13734        (JSC::JIT::emit_op_init_lazy_reg):
13735        * parser/Nodes.h:
13736        (JSC::ScopeNode::needsActivationForMoreThanVariables):
13737
137382010-09-23  David Kilzer  <ddkilzer@apple.com>
13739
13740        <rdar://problem/8460731> ~9.9% speedup when compiling interpreter with llvm-gcc-4.2
13741        https://bugs.webkit.org/show_bug.cgi?id=46423
13742
13743        Reviewed by Oliver Hunt.
13744
13745        * interpreter/Interpreter.cpp:
13746        (JSC::Interpreter::privateExecute): Disable the gcc computed
13747        goto hacks added in r55564 when compiling with llvm-gcc-4.2.
13748
137492010-09-23  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
13750
13751        Reviewed by Darin Adler.
13752
13753        Fix usage of enum as if it was a define
13754        https://bugs.webkit.org/show_bug.cgi?id=46355
13755
13756        pthread.h defines PTHREAD_MUTEX_DEFAULT and PTHREAD_MUTEX_NORMAL as an
13757        enum.  Hence, it cannot be used by the preprocessor which always
13758        evaluates that condition as true. This was giving a warning when
13759        compiling with gcc and "-Wundef" flag.
13760
13761        The second path, when PTHREAD_MUTEX_DEFAULT is not the same of
13762        PTHREAD_MUTEX_NORMAL, is not slow. So, let's eliminate the first path
13763        and get rid of that #if.
13764
13765        * wtf/ThreadingPthreads.cpp: Always call pthread_mutexattr_init() to
13766        set mutex type to PTHREAD_MUTEX_NORMAL.
13767        (WTF::Mutex::Mutex):
13768
137692010-09-23  Michael Saboff  <msaboff@apple.com>
13770
13771        Reviewed by Geoffrey Garen.
13772
13773        Removed extraneous truncation of ovector on entry and error exit.
13774        Changed the initialization to -1 of vector to only initialize
13775        the start indecies, which is sufficient for the pattern/subpatterns.
13776        Changed the JIT code to not clear the end index for subpatterns
13777        as it isn't needed.  These changes are worth ~2.7% on v8-regexp.
13778        https://bugs.webkit.org/show_bug.cgi?id=46404
13779
13780        * runtime/RegExp.cpp:
13781        (JSC::RegExp::match):
13782        * yarr/RegexJIT.cpp:
13783        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
13784
137852010-09-22  Oliver Hunt  <oliver@apple.com>
13786
13787        Reviewed by Geoff Garen.
13788
13789        Only copy captured variables into activation
13790        https://bugs.webkit.org/show_bug.cgi?id=46330
13791
13792        We now track free variable information which means that
13793        we no longer need to copy every variable defined in a
13794        function.  With this patch activations only retain those
13795        variables needed for correctness.  In order to interact
13796        safely with the inspector this means that JSActivation
13797        now provides its own lookup functions so it can avoid 
13798        trying to read or write to variables that have been
13799        optimised out.
13800
13801        * bytecode/CodeBlock.h:
13802        * bytecompiler/BytecodeGenerator.cpp:
13803        (JSC::BytecodeGenerator::BytecodeGenerator):
13804        * parser/Nodes.h:
13805        (JSC::ScopeNode::capturedVariableCount):
13806        (JSC::ScopeNode::captures):
13807        * runtime/Arguments.h:
13808        (JSC::JSActivation::copyRegisters):
13809        * runtime/Executable.cpp:
13810        (JSC::FunctionExecutable::FunctionExecutable):
13811        (JSC::FunctionExecutable::compileForCallInternal):
13812        (JSC::FunctionExecutable::compileForConstructInternal):
13813        * runtime/Executable.h:
13814        (JSC::FunctionExecutable::capturedVariableCount):
13815        * runtime/JSActivation.cpp:
13816        (JSC::JSActivation::markChildren):
13817        (JSC::JSActivation::symbolTableGet):
13818        (JSC::JSActivation::symbolTablePut):
13819        (JSC::JSActivation::getOwnPropertyNames):
13820        (JSC::JSActivation::symbolTablePutWithAttributes):
13821        * runtime/JSActivation.h:
13822
138232010-09-23  Ismail Donmez  <ismail@namtrac.org>
13824
13825        Reviewed by Andreas Kling.
13826
13827        Fix jsc.exe build for Windows CE
13828
13829        * jsc.pro: Add mmtimer.lib for Windows CE.
13830
138312010-09-23  Ismail Donmez  <ismail@namtrac.org>
13832
13833        Unreviewed.
13834
13835        JIT should be disabled on Windows CE. Broken in r64176.
13836
13837        * wtf/Platform.h:
13838
138392010-09-23  Peter Varga  <pvarga@inf.u-szeged.hu>
13840
13841        Reviewed by Gavin Barraclough.
13842
13843        Reduce the number of BOL checks in YARR Interpreter
13844        https://bugs.webkit.org/show_bug.cgi?id=46260
13845
13846        Extend the YARR Interpreter with an optimization which reduces the number of
13847        BOL assertion checks. If a "TypeBodyAlternative" byteTerm is followed by a
13848        "TypeAssertionBOL" byteTerm it will be checked just one time.
13849
13850        * yarr/RegexInterpreter.cpp:
13851        (JSC::Yarr::Interpreter::matchDisjunction):
13852        (JSC::Yarr::ByteCompiler::compile):
13853        (JSC::Yarr::ByteCompiler::regexBegin):
13854        (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
13855        (JSC::Yarr::ByteCompiler::emitDisjunction):
13856        * yarr/RegexInterpreter.h:
13857        (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
13858        (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
13859        (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
13860        (JSC::Yarr::ByteTerm::AlternativeBegin):
13861        (JSC::Yarr::ByteTerm::AlternativeDisjunction):
13862        (JSC::Yarr::ByteTerm::AlternativeEnd):
13863
138642010-09-22  Michael Saboff  <msaboff@apple.com>
13865
13866        Reviewed by Gavin Barraclough.
13867
13868        Fixed the cross over from alternatives executed once and
13869        those that loop.  This fixed the problem where the index
13870        was getting messed up for looping alternatives causing an
13871        infinite loop.
13872        https://bugs.webkit.org/show_bug.cgi?id=46189
13873
13874        * yarr/RegexJIT.cpp:
13875        (JSC::Yarr::RegexGenerator::generateDisjunction):
13876
138772010-09-22  Steve Falkenburg  <sfalken@apple.com>
13878
13879        Rubber stamped by Jon Honeycutt.
13880
13881        Allow jsc.exe to be run against unversioned ICU.
13882
13883        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
13884
138852010-09-22  Kwang Yul Seo  <skyul@company100.net>
13886
13887        Reviewed by Laszlo Gombos.
13888
13889        Use "typedef wchar_t JSChar" when compiled with RVCT
13890        https://bugs.webkit.org/show_bug.cgi?id=40651
13891
13892        Use wchar_t for JSChar and UChar when compiled with RVCT.
13893        Linux is the exception for this rule.
13894
13895        * API/JSStringRef.h:
13896        * wtf/unicode/qt4/UnicodeQt4.h:
13897
138982010-09-22  Oliver Hunt  <oliver@apple.com>
13899
13900        Reviewed by Gavin Barraclough.
13901
13902        [INTERPRETER] Two tests fail with SputnikError: #1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown
13903        https://bugs.webkit.org/show_bug.cgi?id=44245
13904
13905        Remove incorrect code from op_load_varargs in the interpreter.
13906
13907        * interpreter/Interpreter.cpp:
13908        (JSC::Interpreter::privateExecute):
13909
139102010-09-22  Oliver Hunt  <oliver@apple.com>
13911
13912        Reviewed by Gavin Barraclough.
13913
13914        [JIT] fast/js/sputnik/Conformance/15_Native_Objects/15.3_Function/15.3.5/S15.3.5.3_A2_T6.html fails
13915        https://bugs.webkit.org/show_bug.cgi?id=44246
13916
13917        JIT code generated for instanceof was not checking to ensure that the prototype property was
13918        an object, this patch ensures that it does.
13919
13920        * jit/JITOpcodes.cpp:
13921        (JSC::JIT::emit_op_instanceof):
13922        (JSC::JIT::emitSlow_op_instanceof):
13923        * jit/JITOpcodes32_64.cpp:
13924        (JSC::JIT::emit_op_instanceof):
13925        (JSC::JIT::emitSlow_op_instanceof):
13926
139272010-09-22  Patrick Gansterer  <paroga@webkit.org>
13928
13929        Reviewed by Darin Adler.
13930
13931        Inline UTF8SequenceLength
13932        https://bugs.webkit.org/show_bug.cgi?id=45589
13933
13934        * wtf/unicode/UTF8.cpp:
13935        (WTF::Unicode::convertUTF8ToUTF16): Use inline version of UTF8SequenceLength to improve performance.
13936
139372010-09-21  Oliver Hunt  <oliver@apple.com>
13938
13939        RS=Gavin Barraclough.
13940
13941        Fix codeblock dumping
13942
13943        * bytecode/CodeBlock.cpp:
13944        (JSC::CodeBlock::dump):
13945        * runtime/Executable.h:
13946        (JSC::ScriptExecutable::ScriptExecutable):
13947
139482010-09-21  Oliver Hunt  <oliver@apple.com>
13949
13950        Reviewed by Geoffrey Garen.
13951
13952        Speed up function.apply(..., arguments)
13953        https://bugs.webkit.org/show_bug.cgi?id=46207
13954
13955        Add code to do argument copying inline in the case
13956        where we're using Function.apply to forward our arguments
13957        directly.
13958
13959        * jit/JIT.cpp:
13960        (JSC::JIT::privateCompileSlowCases):
13961           Splitted op_load_varargs into fast and slow paths, so add the call
13962           to the slow path generator.
13963        * jit/JIT.h:
13964        * jit/JITCall32_64.cpp:
13965          Remove 32bit specific emit_op_load_varargs as the logic is the
13966          same for all value representations
13967        * jit/JITOpcodes.cpp:
13968        (JSC::JIT::emit_op_load_varargs):
13969          Copy arguments inline
13970        (JSC::JIT::emitSlow_op_load_varargs):
13971
139722010-09-21  Geoffrey Garen  <ggaren@apple.com>
13973
13974        Reviewed by Oliver Hunt.
13975
13976        <rdar://problem/8363003> REGRESSION: ~1.4% sunspider regression in
13977        interpreter due to 54724 and 54596
13978        
13979        Fixed a typo (using "UNLIKELY" instead of "LIKELY").
13980        
13981        * wtf/PassRefPtr.h:
13982        (WTF::refIfNotNull):
13983        (WTF::derefIfNotNull): It is likely that m_ptr != 0 because most RefPtrs
13984        hold real data. Also, in cases where they do not hold real data, the
13985        compiler usually sees a call to release() right before the call to the
13986        destructor, so it can probably optimize out the test completely.
13987
139882010-09-21  Fridrich Strba  <fridrich.strba@bluewin.ch>
13989
13990        Reviewed by Martin Robinson.
13991
13992        Build issues with Windows versions of the GTK+ port
13993        https://bugs.webkit.org/show_bug.cgi?id=45844
13994
13995        Link with winmm.dll when necessary and specify the executable extension
13996        explicitely so that the Programs/jsc-@WEBKITGTK_API_MAJOR_VERSION@
13997        rule actually works.
13998
13999        Don't try to build the ThreadSpecificWin.cpp since GTK+ port uses
14000        a section in ThreadSpecific.cpp
14001
14002        * GNUmakefile.am:
14003
140042010-09-21  Martin Robinson  <mrobinson@igalia.com>
14005
14006        Reviewed by Xan Lopez.
14007
14008        [GTK] 'make dist' should be fixed in preparation for the next release
14009        https://bugs.webkit.org/show_bug.cgi?id=46129
14010
14011        * GNUmakefile.am: Update the sources list to include missing headers.
14012
140132010-09-21  Dave Tapuska  <dtapuska@rim.com>
14014
14015        Reviewed by Csaba Osztrogonác.
14016
14017        https://bugs.webkit.org/show_bug.cgi?id=45673
14018
14019        r65596 caused ENABLE_PROFILER_REFERENCE_OFFSET to not be
14020        8 byte aligned. A non 8 byte divisible value for this will
14021        cause the sp to become non 8 byte aligned.
14022
14023        Verify and correct offset values that r65596 effected that
14024        weren't updated.
14025
14026        * jit/JITStubs.cpp:
14027        * jit/JITStubs.h:
14028
140292010-09-21  Xan Lopez  <xlopez@igalia.com>
14030
14031        Reviewed by Martin Robinson.
14032
14033        Fix Opcode stats compilation
14034        https://bugs.webkit.org/show_bug.cgi?id=46079
14035
14036        The FixedArray API had changed, and <stdio.h> was not included for
14037        printf.
14038
14039        * bytecode/Opcode.cpp:
14040        (JSC::OpcodeStats::~OpcodeStats):
14041
140422010-09-20  Michael Saboff  <msaboff@apple.com>
14043
14044        Reviewed by Gavin Barraclough.
14045
14046        Fixed detection of alternative smaller than the first alternative
14047        to only check looping alternatives.
14048        https://bugs.webkit.org/show_bug.cgi?id=46049
14049
14050        * yarr/RegexJIT.cpp:
14051        (JSC::Yarr::RegexGenerator::generateDisjunction):
14052
140532010-09-20  Peter Varga  <pvarga@inf.u-szeged.hu>
14054
14055        Reviewed by Geoffrey Garen.
14056
14057        REGRESSION(67790): jsc tests are failed with YARR interpreter
14058        https://bugs.webkit.org/show_bug.cgi?id=46083
14059
14060        Fix the initializing of the lastSubpatternId member of
14061        parentheses.
14062
14063        * yarr/RegexCompiler.cpp:
14064        (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
14065
140662010-09-20  Gavin Barraclough  <barraclough@apple.com>
14067
14068        Reviewed by Oliver Hunt.
14069
14070        Bug 46077 - ASSERT failure in YARR JIT
14071
14072        We will currently attempt to loop if there are multiple alternatives, they are all
14073        BOL predicated, and the last alternative is longer then the first - however if all
14074        alternatives are BOL predicated the head of loop label will not have been set, and
14075        we'll try to link a jump to an undefined label. Stop doing so.
14076
14077        * yarr/RegexJIT.cpp:
14078        (JSC::Yarr::RegexGenerator::generateDisjunction):
14079
140802010-09-20  Adam Roben  <aroben@apple.com>
14081
14082        Export RegExpObject::info from JavaScriptCore
14083
14084        This allows obj->inherits(&RegExpObject::info) to work correctly from
14085        outside JavaScriptCore.dll on Windows.
14086
14087        Fixes <http://webkit.org/b/46098>
14088        fast/loader/stateobjects/pushstate-object-types.html fails on Windows
14089
14090        Reviewed by John Sullivan.
14091
14092        * runtime/RegExpObject.h: Added JS_EXPORTDATA to the info member, as
14093        we already have for some other classes whose info members have to be
14094        used from outside the DLL.
14095
140962010-09-19  Gavin Barraclough  <barraclough@apple.com>
14097
14098        Windows build fix pt 2.
14099
14100        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14101
141022010-09-19  Gavin Barraclough  <barraclough@apple.com>
14103
14104        Windows build fix pt 1.
14105
14106        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14107
141082010-09-19  Gavin Barraclough  <barraclough@apple.com>
14109
14110        Build fix - implicit double-to-int conversion invalid on 32-bit.
14111
14112        * runtime/DatePrototype.cpp:
14113        (JSC::fillStructuresUsingDateArgs):
14114        (JSC::dateProtoFuncSetYear):
14115
141162010-09-19  Gavin Barraclough  <barraclough@apple.com>
14117
14118        Reviewed by Oliver Hunt.
14119
14120        Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
14121
14122        These methods implement the same conversion (see discussion in the notes
14123        of sections of 9.5 and 9.6 of the spec), only differing in how the result
14124        is interpretted.
14125
14126        Date prototype is incorrectly using toInt32, and this is causing us to
14127        provide an output value indicating whether the input to ToInt32 was finite
14128        (the corresponding methods on Date are actually spec'ed to use ToInteger,
14129        not ToInt32).  This patch partially fixes this in order to remove this
14130        bogus output value, hoewever more work will be require to bring Date
14131        fully up to spec compliance (the constructor is still performing ToInt32
14132        conversions).
14133
14134        * JavaScriptCore.exp:
14135        * runtime/DatePrototype.cpp:
14136        (JSC::fillStructuresUsingTimeArgs):
14137        (JSC::fillStructuresUsingDateArgs):
14138        (JSC::dateProtoFuncSetYear):
14139        * runtime/JSValue.cpp:
14140        (JSC::toInt32):
14141        * runtime/JSValue.h:
14142        (JSC::toUInt32):
14143        (JSC::JSValue::toInt32):
14144        (JSC::JSValue::toUInt32):
14145
141462010-09-18  Darin Adler  <darin@apple.com>
14147
14148        First step in fixing Windows build.
14149
14150        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14151        Removed incorrect symbol. The build will probably still fail,
14152        but the failure will tell us what symbol to add.
14153
141542010-09-18  Michael Saboff  <msaboff@apple.com>
14155
14156        Reviewed by Gavin Barraclough.
14157
14158        Added code to unroll regular expressions containing ^.
14159        Alternatives that begin with ^ are tagged during parsing
14160        and rolled up in containing sub expression structs.
14161        After parsing, a regular expression flagged as containing
14162        a ^ (a.k.a. BOL) is processed further in optimizeBOL().
14163        A copy of the disjunction is made excluding alternatives that
14164        are rooted with BOL.  The original alternatives are flagged
14165        to only be executed once.  The copy of the other alternatives are
14166        added to the original expression.
14167        In the case that all original alternatives are flagged, there
14168        won't be any looping alternatives.
14169        The JIT generator will emit code accordingly, executing the
14170        original alternatives once and then looping over the
14171        alternatives that aren't anchored with a BOL (if any).
14172        https://bugs.webkit.org/show_bug.cgi?id=45787
14173
14174        * yarr/RegexCompiler.cpp:
14175        (JSC::Yarr::RegexPatternConstructor::assertionBOL):
14176        (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
14177        (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
14178        (JSC::Yarr::RegexPatternConstructor::copyTerm):
14179        (JSC::Yarr::RegexPatternConstructor::optimizeBOL):
14180        (JSC::Yarr::compileRegex):
14181        * yarr/RegexJIT.cpp:
14182        (JSC::Yarr::RegexGenerator::generateDisjunction):
14183        * yarr/RegexPattern.h:
14184        (JSC::Yarr::PatternAlternative::PatternAlternative):
14185        (JSC::Yarr::PatternAlternative::setOnceThrough):
14186        (JSC::Yarr::PatternAlternative::onceThrough):
14187        (JSC::Yarr::PatternDisjunction::PatternDisjunction):
14188        (JSC::Yarr::RegexPattern::RegexPattern):
14189        (JSC::Yarr::RegexPattern::reset):
14190
141912010-09-18  Patrick Gansterer  <paroga@paroga.com>
14192
14193        Reviewed by Darin Adler.
14194
14195        Rename Wince files to WinCE
14196        https://bugs.webkit.org/show_bug.cgi?id=37287
14197
14198        * wtf/unicode/Unicode.h:
14199        * wtf/unicode/wince/UnicodeWinCE.cpp: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.cpp.
14200        * wtf/unicode/wince/UnicodeWinCE.h: Copied from JavaScriptCore/wtf/unicode/wince/UnicodeWince.h.
14201        * wtf/unicode/wince/UnicodeWince.cpp: Removed.
14202        * wtf/unicode/wince/UnicodeWince.h: Removed.
14203        * wtf/wince/FastMallocWinCE.h: Copied from JavaScriptCore/wtf/wince/FastMallocWince.h.
14204        * wtf/wince/FastMallocWince.h: Removed.
14205
142062010-09-18  Ademar de Souza Reis Jr  <ademar.reis@openbossa.org>
14207
14208        Reviewed by Kenneth Rohde Christiansen.
14209
14210        Enable Platform Strategies on Qt
14211
14212        [Qt] Turn on PLATFORM_STRATEGIES
14213        https://bugs.webkit.org/show_bug.cgi?id=45831
14214
14215        * wtf/Platform.h: Enable Platform Strategies when building QtWebkit
14216
142172010-09-17  Oliver Hunt  <oliver@apple.com>
14218
14219        Reviewed by Gavin Barraclough.
14220
14221        Imprecise tracking of variable capture leads to overly pessimistic creation of activations
14222        https://bugs.webkit.org/show_bug.cgi?id=46020
14223
14224        The old logic for track free and captured variables would cause us
14225        to decide we needed an activation in every function along the scope
14226        chain between a variable capture and its declaration.  We now track
14227        captured variables precisely which requires a bit of additional work
14228
14229        The most substantial change is that the parsing routine needs to
14230        be passed the list of function parameters when reparsing a function
14231        as when reparsing we don't parse the function declaration itself only
14232        its body.
14233
14234        * JavaScriptCore.exp:
14235        * parser/JSParser.cpp:
14236        (JSC::JSParser::Scope::Scope):
14237        (JSC::JSParser::Scope::needsFullActivation):
14238           We need to distinguish between use of a feature that requires
14239           an activation and eval so we now get this additional flag.
14240        (JSC::JSParser::Scope::collectFreeVariables):
14241        (JSC::JSParser::Scope::getCapturedVariables):
14242           We can't simply return the list of "capturedVariables" now as
14243           is insufficiently precise, so we compute them instead.
14244        (JSC::JSParser::popScope):
14245        (JSC::jsParse):
14246        (JSC::JSParser::JSParser):
14247        (JSC::JSParser::parseProgram):
14248        (JSC::JSParser::parseWithStatement):
14249        (JSC::JSParser::parseTryStatement):
14250        (JSC::JSParser::parseFunctionInfo):
14251        (JSC::JSParser::parseFunctionDeclaration):
14252        (JSC::JSParser::parseProperty):
14253        (JSC::JSParser::parseMemberExpression):
14254        * parser/JSParser.h:
14255        * parser/Parser.cpp:
14256        (JSC::Parser::parse):
14257        * parser/Parser.h:
14258        (JSC::Parser::parse):
14259        * runtime/Executable.cpp:
14260        (JSC::EvalExecutable::compileInternal):
14261        (JSC::ProgramExecutable::checkSyntax):
14262        (JSC::ProgramExecutable::compileInternal):
14263        (JSC::FunctionExecutable::compileForCallInternal):
14264        (JSC::FunctionExecutable::compileForConstructInternal):
14265        (JSC::FunctionExecutable::reparseExceptionInfo):
14266        (JSC::EvalExecutable::reparseExceptionInfo):
14267        (JSC::FunctionExecutable::fromGlobalCode):
14268           Pass function parameters (if available) to the parser.
14269
142702010-09-17  Anders Carlsson  <andersca@apple.com>
14271
14272        Reviewed by Sam Weinig.
14273
14274        Add IsFloatingPoint and IsArithmetic type traits
14275        https://bugs.webkit.org/show_bug.cgi?id=46018
14276
14277        * wtf/TypeTraits.h:
14278        * wtf/TypeTraits.cpp:
14279
142802010-09-17  Martin Robinson  <mrobinson@igalia.com>
14281
14282        Reviewed by Oliver Hunt.
14283
14284        [GTK] FontPlatformDataFreeType should use smart pointers to hold its members
14285        https://bugs.webkit.org/show_bug.cgi?id=45917
14286
14287        Added support to PlatformRefPtr for handling HashTableDeletedValue.
14288
14289        * wtf/PlatformRefPtr.h:
14290        (WTF::PlatformRefPtr::PlatformRefPtr): Added a constructor that takes HashTableDeletedValue.
14291        (WTF::PlatformRefPtr::isHashTableDeletedValue): Added.
14292
142932010-09-16  Oliver Hunt  <oliver@apple.com>
14294
14295        Reviewed by Geoffrey Garen.
14296
14297        Crash due to timer triggered GC on one heap while another heap is active
14298        https://bugs.webkit.org/show_bug.cgi?id=45932
14299        <rdar://problem/8318446>
14300
14301        The GC timer may trigger for one heap while another heap is active.  This
14302        is safe, but requires us to ensure that we have temporarily associated the
14303        thread's identifierTable with the heap we're collecting on.  Otherwise we
14304        may end up with the identifier tables in an inconsistent state leading to
14305        an eventual crash.
14306
14307        * runtime/Collector.cpp:
14308        (JSC::Heap::allocate):
14309        (JSC::Heap::reset):
14310        (JSC::Heap::collectAllGarbage):
14311           Add assertions to ensure we have the correct identifierTable active
14312           while collecting.
14313        * runtime/GCActivityCallbackCF.cpp:
14314        (JSC::DefaultGCActivityCallbackPlatformData::trigger):
14315           Temporarily make the expected IdentifierTable active
14316        * wtf/WTFThreadData.h:
14317        (JSC::IdentifierTable::remove):
14318           Make it possible to see when IdentifierTable::remove has succeeded
14319        * wtf/text/StringImpl.cpp:
14320        (WTF::StringImpl::~StringImpl):
14321           CRASH if an StringImpl is an Identifier but isn't present in the
14322           active IdentifierTable.  If we get to this state something has
14323           gone wrong and we should just crash immediately.
14324
143252010-09-16  Martin Robinson  <mrobinson@igalia.com>
14326
14327        Reviewed by Xan Lopez.
14328
14329        [GTK] Implement dissolveDragImageToFraction
14330        https://bugs.webkit.org/show_bug.cgi?id=45826
14331
14332        * wtf/gobject/GTypedefs.h: Added forward declarations for GtkWindow and GdkEventExpose.
14333
143342010-09-16  Eric Uhrhane  <ericu@chromium.org>
14335
14336        Reviewed by Jian Li.
14337
14338        Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
14339        https://bugs.webkit.org/show_bug.cgi?id=45798
14340
14341        * Configurations/FeatureDefines.xcconfig:
14342
143432010-09-15  Oliver Hunt  <oliver@apple.com>
14344
14345        Reviewed by Geoffrey Garen.
14346
14347        Use free variable analysis to improve activation performance
14348        https://bugs.webkit.org/show_bug.cgi?id=45837
14349
14350        Adds free and captured variable tracking to the JS parser.  This
14351        allows us to avoid construction of an activation object in some
14352        cases.  Future patches will make more use of this information to
14353        improve those cases where activations are still needed.
14354
14355        * parser/ASTBuilder.h:
14356        * parser/JSParser.cpp:
14357        (JSC::JSParser::Scope::Scope):
14358        (JSC::JSParser::Scope::declareVariable):
14359        (JSC::JSParser::Scope::useVariable):
14360        (JSC::JSParser::Scope::collectFreeVariables):
14361        (JSC::JSParser::Scope::capturedVariables):
14362        (JSC::JSParser::ScopeRef::ScopeRef):
14363        (JSC::JSParser::ScopeRef::operator->):
14364        (JSC::JSParser::ScopeRef::index):
14365        (JSC::JSParser::currentScope):
14366        (JSC::JSParser::pushScope):
14367        (JSC::JSParser::popScope):
14368        (JSC::JSParser::parseProgram):
14369        (JSC::JSParser::parseVarDeclarationList):
14370        (JSC::JSParser::parseConstDeclarationList):
14371        (JSC::JSParser::parseTryStatement):
14372        (JSC::JSParser::parseFormalParameters):
14373        (JSC::JSParser::parseFunctionInfo):
14374        (JSC::JSParser::parseFunctionDeclaration):
14375        (JSC::JSParser::parsePrimaryExpression):
14376        * parser/Nodes.cpp:
14377        (JSC::ScopeNodeData::ScopeNodeData):
14378        (JSC::ScopeNode::ScopeNode):
14379        (JSC::ProgramNode::ProgramNode):
14380        (JSC::ProgramNode::create):
14381        (JSC::EvalNode::EvalNode):
14382        (JSC::EvalNode::create):
14383        (JSC::FunctionBodyNode::FunctionBodyNode):
14384        (JSC::FunctionBodyNode::create):
14385        * parser/Nodes.h:
14386        (JSC::ScopeNode::needsActivation):
14387        (JSC::ScopeNode::hasCapturedVariables):
14388        * parser/Parser.cpp:
14389        (JSC::Parser::didFinishParsing):
14390        * parser/Parser.h:
14391        (JSC::Parser::parse):
14392        * parser/SyntaxChecker.h:
14393        * runtime/Executable.cpp:
14394        (JSC::EvalExecutable::compileInternal):
14395        (JSC::ProgramExecutable::compileInternal):
14396        (JSC::FunctionExecutable::compileForCallInternal):
14397        (JSC::FunctionExecutable::compileForConstructInternal):
14398        * runtime/Executable.h:
14399        (JSC::ScriptExecutable::needsActivation):
14400        (JSC::ScriptExecutable::recordParse):
14401
144022010-09-14  Hyung Song  <beergun@company100.net>
14403
14404        Reviewed by Kent Tamura.
14405
14406        [BREWMP] Add IMemGroup and IMemSpace to OwnPtr type.
14407        https://bugs.webkit.org/show_bug.cgi?id=44764
14408
14409        * wtf/OwnPtrCommon.h:
14410        * wtf/brew/OwnPtrBrew.cpp:
14411        (WTF::deleteOwnedPtr):
14412
144132010-09-14  Darin Adler  <darin@apple.com>
14414
14415        Reviewed by Geoffrey Garen.
14416
14417        Sort with non-numeric custom sort function fails on array with length but no values
14418        https://bugs.webkit.org/show_bug.cgi?id=45781
14419
14420        * runtime/JSArray.cpp:
14421        (JSC::JSArray::sort): Replaced early exit for an array of length zero to instead
14422        exit for any array without values, even if it has a non-0 length.
14423
144242010-09-14  Steve Falkenburg  <sfalken@apple.com>
14425
14426        Windows production build fix.
14427        Roll out r65143.
14428
14429        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
14430
144312010-09-14  Kwang Yul Seo  <skyul@company100.net>
14432
14433        Reviewed by Darin Adler.
14434
14435        Share UnicodeMacrosFromICU.h
14436        https://bugs.webkit.org/show_bug.cgi?id=45710
14437
14438        glib, qt4 and wince use the same macros from ICU.
14439        Remove the code duplication and use the same header file.
14440
14441        * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
14442        * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
14443        * wtf/unicode/qt4/UnicodeQt4.h:
14444        * wtf/unicode/wince/UnicodeWince.h:
14445
144462010-09-13  Darin Adler  <darin@apple.com>
14447
14448        Reviewed by Adam Barth.
14449
14450        Preparation for eliminating deprecatedParseURL
14451        https://bugs.webkit.org/show_bug.cgi?id=45695
14452
14453        * wtf/text/WTFString.h: Added isAllSpecialCharacters, moved here from
14454        the HTML tree builder.
14455
144562010-09-13  Darin Fisher  <darin@chromium.org>
14457
14458        Reviewed by David Levin.
14459
14460        Add option to conditionally compile smooth scrolling support.
14461        https://bugs.webkit.org/show_bug.cgi?id=45689
14462
14463        ENABLE(SMOOTH_SCROLLING) is disabled by default for all platforms.
14464
14465        * wtf/Platform.h:
14466
144672010-09-13  Adam Roben  <aroben@apple.com>
14468
14469        Copy JavaScriptCore's generated sources to the right directory
14470
14471        * JavaScriptCore.vcproj/JavaScriptCore.make: Fixed typo.
14472
144732010-09-13  Kwang Yul Seo  <skyul@company100.net>
14474
14475        Reviewed by Kent Tamura.
14476
14477        [BREWMP] Don't call _msize
14478        https://bugs.webkit.org/show_bug.cgi?id=45556
14479
14480        Because Brew MP uses its own memory allocator, it is not correct to use
14481        _msize in fastMallocSize. Add !PLATFORM(BREWMP) guard.
14482
14483        * wtf/FastMalloc.cpp:
14484        (WTF::fastMallocSize):
14485
144862010-09-11  Simon Hausmann  <simon.hausmann@nokia.com>
14487
14488        Reviewed by Andreas Kling.
14489
14490        [Qt] V8 port: webcore project files changes
14491        https://bugs.webkit.org/show_bug.cgi?id=45141
14492
14493        * JavaScriptCore.pro: Moved wtf specific files to wtf.pri,
14494        so that they can also be used from WebCore.pro for v8 builds.
14495        * wtf/wtf.pri: Added.
14496
144972010-09-10  Fridrich Strba  <fridrich.strba@bluewin.ch>
14498
14499        Reviewed by Andreas Kling.
14500
14501        Add a define missing when building with glib unicode backend
14502        https://bugs.webkit.org/show_bug.cgi?id=45544
14503
14504        * wtf/unicode/glib/UnicodeMacrosFromICU.h:
14505
145062010-09-10  Stephanie Lewis  <slewis@apple.com>
14507
14508        Reviewed by Alexey Proskuryakov.
14509        
14510        Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know 
14511        about the JIT and other implementation details of JavaScriptCore.  Necessary 
14512        to fix PPC build.
14513        
14514        https://bugs.webkit.org/show_bug.cgi?id=45528
14515
14516        * JavaScriptCore.exp:
14517        * JavaScriptCore.xcodeproj/project.pbxproj:
14518        * runtime/MemoryStatistics.cpp: Added.
14519        (JSC::memoryStatistics):
14520        * runtime/MemoryStatistics.h: Added.
14521
145222010-09-09  Michael Saboff  <msaboff@apple.com>
14523
14524        Reviewed by Gavin Barraclough.
14525
14526        Added a regular expression tracing facility.  This tracing is connected
14527        to jsc.  Every compiled regular expression object is added to a list.
14528        When the process exits, each regular expression dumps its pattern,
14529        JIT address, number of times it was executed and the number of matches.
14530        This tracing is controlled by the macro ENABLE_REGEXP_TRACING in
14531        wtf/Platform.h.
14532        https://bugs.webkit.org/show_bug.cgi?id=45401
14533
14534        * JavaScriptCore.exp:
14535        * jsc.cpp:
14536        (runWithScripts):
14537        * runtime/JSGlobalData.cpp:
14538        (JSC::JSGlobalData::JSGlobalData):
14539        (JSC::JSGlobalData::~JSGlobalData):
14540        (JSC::JSGlobalData::addRegExpToTrace):
14541        (JSC::JSGlobalData::dumpRegExpTrace):
14542        * runtime/JSGlobalData.h:
14543        * runtime/RegExp.cpp:
14544        (JSC::RegExp::RegExp):
14545        (JSC::RegExp::create):
14546        (JSC::RegExp::match):
14547        * runtime/RegExp.h:
14548        * wtf/Platform.h:
14549        * yarr/RegexJIT.h:
14550        (JSC::Yarr::RegexCodeBlock::getAddr):
14551
145522010-09-09  John Therrell  <jtherrell@apple.com>
14553
14554        32-bit build fix.
14555
14556        * jit/ExecutableAllocator.cpp:
14557        (JSC::ExecutableAllocator::committedByteCount):
14558
145592010-09-09  John Therrell  <jtherrell@apple.com>
14560
14561        Reviewed by Alexey Proskuryakov.
14562
14563        Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
14564        https://bugs.webkit.org/show_bug.cgi?id=45134
14565
14566        Added thread-safe committed byte counting and reporting functionality to RegisterFile and 
14567        ExecutableAllocator.
14568
14569        * JavaScriptCore.exp:
14570        Exported new symbols to allow for WebKit to get statistics from JavaScriptCore classes.
14571        
14572        * interpreter/RegisterFile.cpp:
14573        (JSC::registerFileStatisticsMutex):
14574        Added function which returns a static Mutex used for locking during read/write access to
14575        static committed byte count variable.
14576        (JSC::RegisterFile::~RegisterFile):
14577        Added call to addToStatistics since memory is decommitted here.
14578        (JSC::RegisterFile::releaseExcessCapacity):
14579        Added call to addToStatistics since memory is decommitted here.
14580        (JSC::RegisterFile::initializeThreading):
14581        Added function which calls registerFileStatisticsMutex().
14582        (JSC::RegisterFile::committedByteCount):
14583        Added function which returns the current committed byte count for RegisterFile.
14584        (JSC::RegisterFile::addToCommittedByteCount):
14585        Added function which updates committed byte count.
14586        
14587        * interpreter/RegisterFile.h:
14588        (JSC::RegisterFile::RegisterFile):
14589        Added call to addToStatistics since memory is committed here.
14590        (JSC::RegisterFile::grow):
14591        Added call to addToStatistics since memory is committed here.
14592        
14593        * jit/ExecutableAllocator.h:
14594        Added function prototype for public static function committedByteCount().
14595        
14596        * jit/ExecutableAllocatorFixedVMPool.cpp:
14597        (JSC::FixedVMPoolAllocator::release):
14598        Added call to addToStatistics since memory is decommitted here.
14599        (JSC::FixedVMPoolAllocator::reuse):
14600        Added call to addToStatistics since memory is committed here.
14601        (JSC::FixedVMPoolAllocator::addToCommittedByteCount):
14602        Added function which updates committed byte count.
14603        (JSC::ExecutableAllocator::committedByteCount):
14604        Added function which returns the current committed byte count for ExecutableAllocator.
14605        
14606        * runtime/InitializeThreading.cpp:
14607        (JSC::initializeThreadingOnce):
14608        Added call to RegisterFile::initializeThreading.
14609
146102010-09-09  Mark Rowe  <mrowe@apple.com>
14611
14612        Reviewed by Oliver Hunt.
14613
14614        <http://webkit.org/b/45502> JSObjectSetPrivateProperty does not handle NULL values as it claims
14615
14616        * API/JSObjectRef.cpp:
14617        (JSObjectSetPrivateProperty): Don't call toJS if we have a NULL value as that will cause an assertion
14618        failure. Instead map NULL directly to the null JSValue.
14619        * API/tests/testapi.c:
14620        (main): Add test coverage for the NULL value case.
14621
146222010-09-09  Csaba Osztrogonác  <ossy@webkit.org>
14623
14624        Reviewed by Gavin Barraclough.
14625
14626        [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler
14627        https://bugs.webkit.org/show_bug.cgi?id=29268
14628
14629        * wtf/Platform.h: Enable JSVALUE32_64 for Qt/Windows/MinGW, because it works now.
14630
146312010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
14632
14633        Reviewed by Darin Adler.
14634
14635        Removing doneSemicolon label in the lexer
14636        https://bugs.webkit.org/show_bug.cgi?id=45289
14637
14638        As a side effect of moving the multiline comment parsing
14639        to a separate function, an opportunity raised to simplify
14640        the single line comment parsing, and removing doneSemicolon
14641        label. Slight performance increase on --parse-only
14642        tests (from 32.8ms to 31.5ms)
14643
14644        * parser/Lexer.cpp:
14645        (JSC::Lexer::lex):
14646
146472010-09-08  Xan Lopez  <xlopez@igalia.com>
14648
14649        Reviewed by Alexey Proskuryakov.
14650
14651        Remove accessor for private member variable in JSParser
14652        https://bugs.webkit.org/show_bug.cgi?id=45378
14653
14654        m_token is private to JSParser, so it does not seem to be useful
14655        to have an accessor for it. On top of that, the file was both
14656        using the accessor and directly accessing the member variable,
14657        only one style should be used.
14658
146592010-09-08  Csaba Osztrogonác  <ossy@webkit.org>
14660
14661        Reviewed by Oliver Hunt.
14662
14663        [Qt] REGRESSION(63348): jsc is broken
14664        https://bugs.webkit.org/show_bug.cgi?id=42818
14665
14666        Need fastcall conventions on Qt/Win/MinGW.
14667        Based on patches of Gavin Barraclough: r63947 and r63948.
14668
14669        * jit/JITStubs.cpp:
14670        * jit/JITStubs.h:
14671
146722010-09-08  Robert Hogan  <robert@webkit.org>
14673
14674        Reviewed by Antonio Gomes.
14675
14676        Remove some unnecessary duplicate calls to string functions
14677
14678        https://bugs.webkit.org/show_bug.cgi?id=45314
14679
14680        * wtf/text/WTFString.cpp:
14681        (WTF::String::format):
14682
146832010-09-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
14684
14685        Reviewed by Andreas Kling.
14686
14687        Re-Disable JIT for MSVC 64bit to fix the build on this compiler.
14688        https://bugs.webkit.org/show_bug.cgi?id=45382
14689
14690        It was enabled in the cleanup made in r64176, though it is still
14691        not implemented.
14692
14693        * wtf/Platform.h:
14694
146952010-09-08  Martin Robinson  <mrobinson@igalia.com>
14696
14697        Reviewed by Xan Lopez.
14698
14699        [GTK] Need a WebSocket implementation
14700        https://bugs.webkit.org/show_bug.cgi?id=45197
14701
14702        Add a GIO-based WebSocket implementation.
14703
14704        * wtf/gobject/GRefPtr.cpp: Added PlatformRefPtr support for GSource.
14705        (WTF::refPlatformPtr):
14706        (WTF::derefPlatformPtr):
14707        * wtf/gobject/GRefPtr.h: Added new template specialization declarations.
14708        * wtf/gobject/GTypedefs.h: Add some more GLib/GIO forward declarations.
14709
147102010-08-30  Maciej Stachowiak  <mjs@apple.com>
14711
14712        Reviewed by Darin Adler.
14713
14714        Handle MediaQueryExp memory management exclusively with smart pointers
14715        https://bugs.webkit.org/show_bug.cgi?id=44874
14716        
14717        Implemented a non-copying sort function to make it possible to sort a Vector
14718        of OwnPtrs (which cannot be copied). This is required for the above.
14719
14720        * wtf/NonCopyingSort.h: Added.
14721        (WTF::nonCopyingSort): It's secretly heapsort.
14722        (WTF::heapSort): heapsort implementation.
14723        (WTF::siftDown): Helper function for heapsort.
14724        (WTF::heapify): ditto
14725
14726        Adjust build systems.
14727        
14728        * GNUmakefile.am:
14729        * JavaScriptCore.gypi:
14730        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
14731        * JavaScriptCore.xcodeproj/project.pbxproj:
14732
147332010-09-08  Zoltan Herczeg  <zherczeg@webkit.org>
14734
14735        Reviewed by Darin Adler.
14736
14737        Refactoring multiline comments in the lexer
14738        https://bugs.webkit.org/show_bug.cgi?id=45289
14739
14740        MultiLine comment parsing is moved to a separate function.
14741
14742        Slight performance increase on --parse-only tests (from 33.6ms to 32.8ms)
14743        SunSpider reports no change (from 523.1ms to 521.2ms).
14744
14745        * parser/Lexer.cpp:
14746        (JSC::Lexer::parseMultilineComment):
14747        (JSC::Lexer::lex):
14748        * parser/Lexer.h:
14749
147502010-09-07  James Robinson  <jamesr@chromium.org>
14751
14752        Compile fix attempt for windows.
14753
14754        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14755
147562010-09-07  Mihai Parparita  <mihaip@chromium.org>
14757
14758        Reviewed by James Robinson.
14759
14760        Fix Windows build after r66936
14761        https://bugs.webkit.org/show_bug.cgi?id=45348
14762
14763        Add symbol names that were missing from r66936.
14764
14765        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
14766
147672010-09-07  Mihai Parparita  <mihaip@chromium.org>
14768
14769        Reviewed by Oliver Hunt.
14770
14771        pushState and replaceState do not clone RegExp objects correctly
14772        https://bugs.webkit.org/show_bug.cgi?id=44718
14773        
14774        Move internal representation of JSC::RegExp (which depends on wether
14775        YARR and YARR_JIT is enabled) into RegExpRepresentation which can live
14776        in the implementation only. This makes it feasible to use RegExp in
14777        WebCore without bringing in all of YARR.
14778
14779        * JavaScriptCore.exp: Export RegExp and RegExpObject functions that are
14780        needed inside WebCore's JSC bindings.
14781        * runtime/RegExp.cpp:
14782        (JSC::RegExpRepresentation::~RegExpRepresentation):
14783        (JSC::RegExp::RegExp):
14784        (JSC::RegExp::~RegExp):
14785        (JSC::RegExp::compile):
14786        (JSC::RegExp::match):
14787        * runtime/RegExp.h:
14788
147892010-09-07  Anders Carlsson  <andersca@apple.com>
14790
14791        Reviewed by Darin Adler.
14792
14793        <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
14794
14795        Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
14796
14797        * Configurations/Base.xcconfig:
14798
147992010-09-07  Zoltan Horvath  <zoltan@webkit.org>
14800
14801        Reviewed by Darin Adler.
14802
14803        REGRESSION(66741): Undefined pthread macros
14804        https://bugs.webkit.org/show_bug.cgi?id=45246
14805
14806        PTHREAD_MUTEX_NORMAL and PTHREAD_MUTEX_DEFAULT (introduced in r60487) are not defined on Linux, 
14807        but used in a statement. Add an additional check to test this.
14808
14809        * wtf/FastMalloc.cpp:
14810        (WTF::TCMalloc_PageHeap::initializeScavenger):
14811
148122010-09-06  Oliver Hunt  <oliver@apple.com>
14813
14814        Windows build fix
14815
148162010-09-05  Oliver Hunt  <oliver@apple.com>
14817
14818        Reviewed by Sam Weinig.
14819
14820        SerializedScriptValue needs to use a flat storage mechanism
14821        https://bugs.webkit.org/show_bug.cgi?id=45244
14822
14823        Export JSArray::put
14824
14825        * JavaScriptCore.exp:
14826
148272010-09-06  Chao-ying Fu  <fu@mips.com>
14828
14829        Reviewed by Oliver Hunt.
14830
14831        Support JSVALUE32_64 on MIPS
14832        https://bugs.webkit.org/show_bug.cgi?id=43999
14833
14834        Add missing functions to support JSVALUE32_64 on MIPS.
14835        Remove JSVALUE32 as the default for MIPS.
14836
14837        * assembler/MIPSAssembler.h:
14838        (JSC::MIPSAssembler::divd):
14839        (JSC::MIPSAssembler::mthc1):
14840        (JSC::MIPSAssembler::cvtwd):
14841        * assembler/MacroAssemblerMIPS.h:
14842        (JSC::MacroAssemblerMIPS::neg32):
14843        (JSC::MacroAssemblerMIPS::branchOr32):
14844        (JSC::MacroAssemblerMIPS::set8):
14845        (JSC::MacroAssemblerMIPS::loadDouble):
14846        (JSC::MacroAssemblerMIPS::divDouble):
14847        (JSC::MacroAssemblerMIPS::convertInt32ToDouble):
14848        (JSC::MacroAssemblerMIPS::branchDouble):
14849        (JSC::MacroAssemblerMIPS::branchConvertDoubleToInt32):
14850        (JSC::MacroAssemblerMIPS::zeroDouble):
14851        * jit/JIT.h:
14852        * jit/JITOpcodes32_64.cpp:
14853        (JSC::JIT::privateCompileCTINativeCall):
14854        * jit/JITPropertyAccess32_64.cpp:
14855        (JSC::JIT::privateCompilePutByIdTransition):
14856        * jit/JITStubs.cpp:
14857        (JSC::JITThunks::JITThunks):
14858        * jit/JITStubs.h:
14859        * wtf/Platform.h:
14860
148612010-09-06  Robert Hogan  <robert@webkit.org>
14862
14863        Unreviewed, compile fix.
14864
14865        Fix compile failure in r66843
14866
14867        Revert to original patch in bugzilla. Leave bug open for
14868        discussion on potential removal of double utf8 conversion.
14869
14870        https://bugs.webkit.org/show_bug.cgi?id=45240
14871
14872        * wtf/text/WTFString.cpp:
14873        (WTF::String::format):
14874
148752010-09-06  Robert Hogan  <robert@webkit.org>
14876
14877        Reviewed by Andreas Kling.
14878
14879        [Qt] utf8 encoding of console() messages
14880
14881        Unskip:
14882        http/tests/security/xssAuditor/embed-tag-null-char.html
14883        http/tests/security/xssAuditor/object-embed-tag-null-char.html
14884
14885        Both tests failed because Qt's implementation of String::format()
14886        is casting a utf8 result to String, which assumes latin1 in
14887        its constructor. So instead of casting a QString to a String, use
14888        StringImpl::create() instead. Unfortunately, this involves a lot
14889        of extra casts but the end result is correct.
14890
14891        https://bugs.webkit.org/show_bug.cgi?id=45240
14892
14893        * wtf/text/WTFString.cpp:
14894        (WTF::String::format):
14895
148962010-09-03  Alexey Proskuryakov  <ap@apple.com>
14897
14898        Reviewed by Darin Adler.
14899
14900        https://bugs.webkit.org/show_bug.cgi?id=45135
14901        <rdar://problem/7823714> TCMalloc_PageHeap doesn't hold a mutex while manipulating shared data
14902
14903        * wtf/FastMalloc.cpp:
14904        (WTF::TCMalloc_PageHeap::initializeScavenger): Make sure to create a non-recursive mutex
14905        regardless of platform default, so that we can assert that it's held (this is for platforms
14906        that don't have libdispatch).
14907        (WTF::TCMalloc_PageHeap::signalScavenger): Assert that the mutex is held, so we can look
14908        at m_scavengeThreadActive. For platforms that have libdispatch, assert that pageheap_lock
14909        is held.
14910        (WTF::TCMalloc_PageHeap::periodicScavenge): Make sure that pageheap_lock is held before
14911        manipulating m_scavengeThreadActive. Otherwise, there is an obvious race condition, and we
14912        can make unbalanced calls to dispatch_resume().
14913
149142010-09-03  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
14915
14916        Reviewed by Martin Robinson.
14917
14918        [EFL] Regression (66531) Build break with Glib Support
14919        https://bugs.webkit.org/show_bug.cgi?id=45011
14920
14921        Move GtkTypedefs.h to GTypedefs.h and let it inside gobject directory
14922        since when glib is enabled, EFL port needs it, too.
14923
14924        * CMakeListsEfl.txt: Include gobject directory to find new header
14925        file.
14926        * GNUmakefile.am: Ditto.
14927        * wtf/CMakeListsEfl.txt: Ditto.
14928        * wtf/Platform.h: Include header if port is EFL and glib support is
14929        enabled.
14930        * wtf/gtk/GtkTypedefs.h: Removed.
14931        * wtf/gobject/GTypedefs.h: Added. Sections specific to GTK are now
14932        guarded by PLATFORM(GTK).
14933
149342010-09-03  Csaba Osztrogonác  <ossy@webkit.org>
14935
14936        Reviewed by Simon Hausmann.
14937
14938        Fix warning in wtf/ByteArray.h
14939        https://bugs.webkit.org/show_bug.cgi?id=44672
14940
14941        * wtf/ByteArray.h: Use maximal sized array for MSVC and unsized array for other compilers.
14942
149432010-09-02  Adam Barth  <abarth@webkit.org>
14944
14945        Reviewed by Eric Seidel.
14946
14947        Actually parse a URL from ParsedURL
14948        https://bugs.webkit.org/show_bug.cgi?id=45080
14949
14950        This patch only handles standard URLs.  At some point we'll need to
14951        distinguish between standard URLs and other kinds of URLs.
14952
14953        * wtf/url/api/ParsedURL.cpp:
14954        (WTF::ParsedURL::ParsedURL):
14955
149562010-09-02  Adam Barth  <abarth@webkit.org>
14957
14958        Reviewed by Eric Seidel.
14959
14960        Add ParsedURL and URLString to WTFURL API
14961        https://bugs.webkit.org/show_bug.cgi?id=45078
14962
14963        Currently there's no actual URL parsing going on, but this patch is a
14964        start to sketching out the API.
14965
14966        * JavaScriptCore.xcodeproj/project.pbxproj:
14967        * wtf/url/api/ParsedURL.cpp: Added.
14968        (WTF::ParsedURL::ParsedURL):
14969        (WTF::ParsedURL::scheme):
14970        (WTF::ParsedURL::username):
14971        (WTF::ParsedURL::password):
14972        (WTF::ParsedURL::host):
14973        (WTF::ParsedURL::port):
14974        (WTF::ParsedURL::path):
14975        (WTF::ParsedURL::query):
14976        (WTF::ParsedURL::fragment):
14977        (WTF::ParsedURL::segment):
14978        * wtf/url/api/ParsedURL.h: Added.
14979        (WTF::ParsedURL::spec):
14980        * wtf/url/api/URLString.h: Added.
14981        (WTF::URLString::URLString):
14982        (WTF::URLString::string):
14983
149842010-09-02  Adam Barth  <abarth@webkit.org>
14985
14986        Reviewed by Eric Seidel.
14987
14988        Add WTFURL to the JavaScriptCore build on Mac
14989        https://bugs.webkit.org/show_bug.cgi?id=45075
14990
14991        Building code is good.
14992
14993        * JavaScriptCore.xcodeproj/project.pbxproj:
14994
149952010-09-02  Alexey Proskuryakov  <ap@apple.com>
14996
14997        Reviewed by Oliver Hunt.
14998
14999        https://bugs.webkit.org/show_bug.cgi?id=43230
15000        <rdar://problem/8254215> REGRESSION: Memory leak within JSParser::JSParser
15001
15002        One can't delete a ThreadSpecific object that has data in it. It's not even possible to
15003        enumerate data objects in all threads, much less destroy them from a thread that's destroying
15004        the ThreadSpecific.
15005
15006        * parser/JSParser.cpp:
15007        (JSC::JSParser::JSParser):
15008        * runtime/JSGlobalData.h: 
15009        * wtf/WTFThreadData.cpp:
15010        (WTF::WTFThreadData::WTFThreadData):
15011        * wtf/WTFThreadData.h:
15012        (WTF::WTFThreadData::approximatedStackStart):
15013        Moved stack guard tracking from JSGlobalData to WTFThreadData.
15014
15015        * wtf/ThreadSpecific.h: Made destructor unimplemented. It's dangerous, and we probably won't
15016        ever face a situation where we'd want to delete a ThreadSpecific object.
15017
150182010-09-01  Gavin Barraclough  <barraclough@apple.com>
15019
15020        Rubber stamped by Oliver Hunt.
15021
15022        Ecma-262 15.11.1.1 states that if the argument is undefined then an
15023        Error object's message property should be set to the empty string.
15024
15025        * runtime/ErrorInstance.cpp:
15026        (JSC::ErrorInstance::ErrorInstance):
15027        (JSC::ErrorInstance::create):
15028        * runtime/ErrorInstance.h:
15029        * runtime/ErrorPrototype.cpp:
15030        (JSC::ErrorPrototype::ErrorPrototype):
15031
150322010-08-31  Darin Adler  <darin@apple.com>
15033
15034        Reviewed by Anders Carlsson.
15035
15036        * wtf/FastMalloc.cpp:
15037        (WTF::TCMalloc_PageHeap::scavenge): Replaced somewhat-quirky code that
15038        mixed types with code that uses size_t.
15039
15040        * wtf/TCPageMap.h: Removed names of unused arguments to avoid warning.
15041
150422010-08-31  Martin Robinson  <mrobinson@igalia.com>
15043
15044        Reviewed by Gustavo Noronha Silva.
15045
15046        [GTK] Isolate all GTK+ typedefs into one file
15047        https://bugs.webkit.org/show_bug.cgi?id=44900
15048
15049        * GNUmakefile.am: Add GtkTypedefs.h to the source lists.
15050        * wtf/Platform.h: #include GtkTypedefs.h for the GTK+ build.
15051        * wtf/ThreadingPrimitives.h: Remove GTK+ typedefs.
15052        * wtf/gobject/GOwnPtr.h: Ditto.
15053        * wtf/gobject/GRefPtr.h: Ditto.
15054        * wtf/gtk/GtkTypedefs.h: Added.
15055
150562010-08-31  Martin Robinson  <mrobinson@igalia.com>
15057
15058        Reviewed by Gustavo Noronha Silva.
15059
15060        [GTK] Fix 'make dist' in preparation of the 1.3.3 release
15061        https://bugs.webkit.org/show_bug.cgi?id=44978
15062
15063        * GNUmakefile.am: Adding missing headers to the sources list.
15064
150652010-08-31  Chao-ying Fu  <fu@mips.com>
15066
15067        Reviewed by Oliver Hunt.
15068
15069        Support emit_op_mod() for MIPS
15070        https://bugs.webkit.org/show_bug.cgi?id=42855
15071
15072        This patch uses MIPS div instructions for op_mod to improve performance.
15073
15074        * assembler/MIPSAssembler.h:
15075        (JSC::MIPSAssembler::div):
15076        * jit/JITArithmetic.cpp:
15077        (JSC::JIT::emit_op_mod):
15078        (JSC::JIT::emitSlow_op_mod):
15079
150802010-08-31  Csaba Osztrogonác  <ossy@webkit.org>
15081
15082        Reviewed by Darin Adler.
15083
15084        Modify ASSERT_UNUSED and UNUSED_PARAM similar to Qt's Q_UNUSED.
15085        https://bugs.webkit.org/show_bug.cgi?id=44870
15086
15087        * wtf/Assertions.h:
15088        * wtf/UnusedParam.h:
15089
150902010-08-31  Benjamin Poulain  <benjamin.poulain@nokia.com>
15091
15092        Reviewed by Kenneth Rohde Christiansen.
15093
15094        JSC TimeoutChecker::didTimeOut overflows on ARM
15095        https://bugs.webkit.org/show_bug.cgi?id=38538
15096
15097        Make getCPUTime() return values relative to the first call.
15098        The previous implementation relied on simply on currentTime(), which
15099        return a time since epoch and not a time since the thread started. This
15100        made the return value of getCPUTime() overflow on 32 bits.
15101
15102        * runtime/TimeoutChecker.cpp:
15103        (JSC::getCPUTime):
15104
151052010-08-30  Mihai Parparita  <mihaip@chromium.org>
15106
15107        Reviewed by Adam Barth.
15108
15109        HISTORY_ALWAYS_ASYNC should be removed (history should always be async)
15110        https://bugs.webkit.org/show_bug.cgi?id=44315
15111
15112        Remove ENABLE_HISTORY_ALWAYS_ASYNC #define.
15113
15114        * wtf/Platform.h: 
15115
151162010-08-30  Chris Rogers  <crogers@google.com>
15117
15118        Reviewed by Kenneth Russell.
15119
15120        Fix namespace for wtf/Complex.h and wtf/Vector3.h
15121        https://bugs.webkit.org/show_bug.cgi?id=44892
15122
15123        * wtf/Complex.h:
15124        * wtf/Vector3.h:
15125
151262010-08-30  Andy Estes  <aestes@apple.com>
15127
15128        Reviewed by Eric Carlson.
15129
15130        Strings returned by asciiDebug() should be NULL-terminated.
15131        https://bugs.webkit.org/show_bug.cgi?id=44866
15132
15133        * wtf/text/WTFString.cpp:
15134        (asciiDebug):
15135
151362010-08-30  Zoltan Herczeg  <zherczeg@webkit.org>
15137
15138        Reviewed by Darin Adler.
15139
15140        Refactor number parsing in the lexer
15141        https://bugs.webkit.org/show_bug.cgi?id=44104
15142
15143        Number parsing was full of gotos, and needed a complete
15144        redesign to remove them (Only one remained). Furthermore
15145        integer arithmetic is empolyed for fast cases (= small
15146        integer numbers).
15147
15148        * parser/Lexer.cpp:
15149        (JSC::Lexer::parseHex):
15150        (JSC::Lexer::parseOctal):
15151        (JSC::Lexer::parseDecimal):
15152        (JSC::Lexer::parseNumberAfterDecimalPoint):
15153        (JSC::Lexer::parseNumberAfterExponentIndicator):
15154        (JSC::Lexer::lex):
15155        * parser/Lexer.h:
15156
151572010-08-29  Darin Adler  <darin@apple.com>
15158
15159        Fix Qt build.
15160
15161        * wtf/unicode/glib/UnicodeMacrosFromICU.h: Added U_IS_BMP.
15162        * wtf/unicode/qt4/UnicodeQt4.h: Ditto.
15163        * wtf/unicode/wince/UnicodeWince.h: Ditto.
15164
151652010-08-29  Kwang Yul Seo  <skyul@company100.net>
15166
15167        Reviewed by Kent Tamura.
15168
15169        [BREWMP] Port vprintf_stderr_common
15170        https://bugs.webkit.org/show_bug.cgi?id=33568
15171
15172        Use BREW's DBGPRINTF to output debug messages.
15173
15174        * wtf/Assertions.cpp:
15175
151762010-08-28  Gavin Barraclough  <barraclough@apple.com>
15177
15178        Reviewed by Oliver Hunt.
15179
15180        Bug 44830 - In Array's prototype functyions we're incorrectly handing large index values
15181
15182        We are in places casting doubles to unsigneds, and unsigneds to ints, without always check
15183        that the result is within bounds. This is problematic in the case of double-to-unsigned
15184        conversion because we should be saturating to array length.
15185
15186        Also, the error return value from Array.splice should be [], not undefined.
15187
15188        I don't see any security concerns here. These methods are spec'ed in such a way that they
15189        can be applied to non Array objects, so in all cases the (potentially bogus) indices are
15190        being passed to functions that will safely check accesses are within bounds.
15191
15192        * runtime/ArrayPrototype.cpp:
15193        (JSC::argumentClampedIndexFromStartOrEnd):
15194        (JSC::arrayProtoFuncJoin):
15195        (JSC::arrayProtoFuncConcat):
15196        (JSC::arrayProtoFuncReverse):
15197        (JSC::arrayProtoFuncShift):
15198        (JSC::arrayProtoFuncSlice):
15199        (JSC::arrayProtoFuncSort):
15200        (JSC::arrayProtoFuncSplice):
15201        (JSC::arrayProtoFuncUnShift):
15202        (JSC::arrayProtoFuncFilter):
15203        (JSC::arrayProtoFuncMap):
15204        (JSC::arrayProtoFuncEvery):
15205        (JSC::arrayProtoFuncForEach):
15206        (JSC::arrayProtoFuncSome):
15207        (JSC::arrayProtoFuncReduce):
15208        (JSC::arrayProtoFuncReduceRight):
15209        (JSC::arrayProtoFuncIndexOf):
15210        (JSC::arrayProtoFuncLastIndexOf):
15211        * runtime/JSValue.h:
15212        (JSC::JSValue::toUInt32):
15213
152142010-08-28  Pratik Solanki  <psolanki@apple.com>
15215
15216        Reviewed by Dan Bernstein.
15217
15218        Add an ENABLE define for purgeable memory support
15219        https://bugs.webkit.org/show_bug.cgi?id=44777
15220
15221        * wtf/Platform.h:
15222
152232010-08-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
15224
15225        Reviewed by Kenneth Rohde Christiansen.
15226
15227        [Qt] NPAPI Plugin metadata should be cached, and loading a plugin should not require loading every plugin
15228        https://bugs.webkit.org/show_bug.cgi?id=43179
15229
15230        Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE flag to enable persistent
15231        NPAPI Plugin Cache. The flag is enabled by default.
15232
15233        * wtf/Platform.h: Add ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE
15234
152352010-07-27  Jer Noble  <jer.noble@apple.com>
15236
15237        Reviewed by Eric Carlson.
15238
15239        Add JavaScript API to allow a page to go fullscreen.
15240        rdar://problem/6867795
15241        https://bugs.webkit.org/show_bug.cgi?id=43099
15242
15243        * wtf/Platform.h: Enable FULLSCREEN_API mode for the Mac (except iOS).
15244
152452010-08-27  Gavin Barraclough  <barraclough@apple.com>
15246
15247        Windows build fix pt 2.
15248
15249        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15250
152512010-08-27  Gavin Barraclough  <barraclough@apple.com>
15252
15253        Windows build fix pt 1.
15254
15255        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15256
152572010-08-27  Gavin Barraclough  <barraclough@apple.com>
15258
15259        Reviewed by Oliver Hunt.
15260
15261        Bug 44745 - Number.toFixed/toExponential/toPrecision are inaccurate.
15262
15263        These methods should be using a version of dtoa that can generate results accurate
15264        to the requested precision, whereas our version of dtoa is only currently able to
15265        support producing results sufficiently accurate to distinguish the value from any
15266        other IEEE-754 double precision number.
15267
15268        This change has no impact on benchmarks we track.
15269
15270        On microbenchmarks for these functions, this is a slight regression where a high
15271        precision is requested (dtoa now need to iterate further to generate a a greater
15272        number of digits), but with smaller precision values (hopefully more common) this
15273        improves performance, since it reduced the accurate of result dtoa is required,
15274        to produce, and removes the need to pre-round values before calling dtoa. 
15275
15276        * JavaScriptCore.exp:
15277            doubleToStringInJavaScriptFormat renamed to numberToString
15278
15279        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15280            doubleToStringInJavaScriptFormat renamed to numberToString
15281
15282        * runtime/UString.cpp:
15283        (JSC::UString::number):
15284            doubleToStringInJavaScriptFormat renamed to numberToString
15285
15286        * wtf/DecimalNumber.h:
15287        (WTF::DecimalNumber::DecimalNumber):
15288        (WTF::DecimalNumber::toStringDecimal):
15289        (WTF::DecimalNumber::toStringExponential):
15290            Remove all pre-rounding of values, instead call dtoa correctly.
15291
15292        * wtf/dtoa.cpp:
15293        (WTF::dtoa):
15294        * wtf/dtoa.h:
15295            Reenable support for rounding to specific-figures/decimal-places in dtoa.
15296            Modify to remove unbiased rounding, provide ECMA required away-from-zero.
15297            Rewrite doubleToStringInJavaScriptFormat to use DecimalNumber, rename to
15298            numberToString.
15299
153002010-08-27  Chao-ying Fu  <fu@mips.com>
15301
15302        Reviewed by Oliver Hunt.
15303
15304        Byte alignment issue on MIPS
15305        https://bugs.webkit.org/show_bug.cgi?id=29415
15306
15307        MIPS accesses one byte at a time for now to avoid the help from the
15308        kernel to fix unaligned accesses.
15309
15310        * wtf/text/AtomicString.cpp:
15311        (WebCore::equal):
15312        * wtf/text/StringHash.h:
15313        (WebCore::StringHash::equal):
15314
153152010-08-27  Xan Lopez  <xlopez@igalia.com>
15316
15317        Reviewed by Tor Arne Vestbø.
15318
15319        Fix a couple of typos in comment.
15320
15321        * bytecode/CodeBlock.h:
15322
153232010-08-26  Gavin Barraclough  <barraclough@apple.com>
15324
15325        Windows build fix.
15326
15327        * wtf/dtoa.cpp:
15328
153292010-08-26  Gavin Barraclough  <baraclough@apple.com>
15330
15331        Reviewed by Sam Weinig.
15332
15333        Bug 44735 - Clean up dtoa.cpp
15334        Remove unused & unmaintained code paths, reformat code to match
15335        coding standard & use platform #defines from Platform.h directly.
15336
15337        * wtf/dtoa.cpp:
15338        (WTF::storeInc):
15339        (WTF::multadd):
15340        (WTF::s2b):
15341        (WTF::lo0bits):
15342        (WTF::mult):
15343        (WTF::pow5mult):
15344        (WTF::lshift):
15345        (WTF::diff):
15346        (WTF::ulp):
15347        (WTF::b2d):
15348        (WTF::d2b):
15349        (WTF::ratio):
15350        (WTF::):
15351        (WTF::strtod):
15352        (WTF::quorem):
15353        (WTF::dtoa):
15354
153552010-08-26  Gavin Barraclough  <barraclough@apple.com>
15356
15357        Rubber Stamped by Oliver Hunt.
15358
15359        Partially revert r65959. The toString changes regressed the v8 tests,
15360        but keep the toFixed/toExponential/toPrecision changes.
15361
15362        * JavaScriptCore.exp:
15363        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15364        * runtime/NumberPrototype.cpp:
15365        * runtime/UString.cpp:
15366        (JSC::UString::number):
15367        * wtf/DecimalNumber.h:
15368        * wtf/dtoa.cpp:
15369        (WTF::append):
15370        (WTF::doubleToStringInJavaScriptFormat):
15371        * wtf/dtoa.h:
15372        * wtf/text/WTFString.cpp:
15373        * wtf/text/WTFString.h:
15374
153752010-08-26  James Robinson  <jamesr@chromium.org>
15376
15377        Reviewed by Darin Fisher.
15378
15379        [chromium] Remove the USE(GLES2_RENDERING) define and associated code
15380        https://bugs.webkit.org/show_bug.cgi?id=43761
15381
15382        Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
15383
15384        * wtf/Platform.h:
15385
153862010-08-26  Gavin Barraclough  <barraclough@apple.com>
15387
15388        Rolling out r64608, this regressed performance.
15389
15390        * JavaScriptCore.xcodeproj/project.pbxproj:
15391        * assembler/ARMAssembler.cpp:
15392        (JSC::ARMAssembler::executableCopy):
15393        * assembler/LinkBuffer.h:
15394        (JSC::LinkBuffer::LinkBuffer):
15395        (JSC::LinkBuffer::~LinkBuffer):
15396        (JSC::LinkBuffer::performFinalization):
15397        * assembler/MIPSAssembler.h:
15398        (JSC::MIPSAssembler::executableCopy):
15399        * assembler/X86Assembler.h:
15400        (JSC::X86Assembler::executableCopy):
15401        * bytecode/StructureStubInfo.h:
15402        (JSC::StructureStubInfo::initGetByIdProto):
15403        (JSC::StructureStubInfo::initGetByIdChain):
15404        (JSC::StructureStubInfo::initGetByIdSelfList):
15405        (JSC::StructureStubInfo::initGetByIdProtoList):
15406        (JSC::StructureStubInfo::initPutByIdTransition):
15407        * jit/ExecutableAllocator.cpp:
15408        (JSC::ExecutablePool::systemAlloc):
15409        * jit/ExecutableAllocator.h:
15410        (JSC::ExecutablePool::create):
15411        (JSC::ExecutableAllocator::ExecutableAllocator):
15412        (JSC::ExecutableAllocator::poolForSize):
15413        (JSC::ExecutablePool::ExecutablePool):
15414        (JSC::ExecutablePool::poolAllocate):
15415        * jit/ExecutableAllocatorFixedVMPool.cpp:
15416        (JSC::FixedVMPoolAllocator::allocInternal):
15417        * jit/JIT.cpp:
15418        (JSC::JIT::privateCompile):
15419        * jit/JIT.h:
15420        (JSC::JIT::compileGetByIdProto):
15421        (JSC::JIT::compileGetByIdSelfList):
15422        (JSC::JIT::compileGetByIdProtoList):
15423        (JSC::JIT::compileGetByIdChainList):
15424        (JSC::JIT::compileGetByIdChain):
15425        (JSC::JIT::compilePutByIdTransition):
15426        (JSC::JIT::compilePatchGetArrayLength):
15427        * jit/JITOpcodes.cpp:
15428        (JSC::JIT::privateCompileCTIMachineTrampolines):
15429        * jit/JITOpcodes32_64.cpp:
15430        (JSC::JIT::privateCompileCTIMachineTrampolines):
15431        (JSC::JIT::privateCompileCTINativeCall):
15432        * jit/JITPropertyAccess.cpp:
15433        (JSC::JIT::stringGetByValStubGenerator):
15434        (JSC::JIT::privateCompilePutByIdTransition):
15435        (JSC::JIT::privateCompilePatchGetArrayLength):
15436        (JSC::JIT::privateCompileGetByIdProto):
15437        (JSC::JIT::privateCompileGetByIdSelfList):
15438        (JSC::JIT::privateCompileGetByIdProtoList):
15439        (JSC::JIT::privateCompileGetByIdChainList):
15440        (JSC::JIT::privateCompileGetByIdChain):
15441        * jit/JITPropertyAccess32_64.cpp:
15442        (JSC::JIT::stringGetByValStubGenerator):
15443        (JSC::JIT::privateCompilePutByIdTransition):
15444        (JSC::JIT::privateCompilePatchGetArrayLength):
15445        (JSC::JIT::privateCompileGetByIdProto):
15446        (JSC::JIT::privateCompileGetByIdSelfList):
15447        (JSC::JIT::privateCompileGetByIdProtoList):
15448        (JSC::JIT::privateCompileGetByIdChainList):
15449        (JSC::JIT::privateCompileGetByIdChain):
15450        * jit/JITStubs.cpp:
15451        (JSC::JITThunks::tryCachePutByID):
15452        (JSC::JITThunks::tryCacheGetByID):
15453        (JSC::DEFINE_STUB_FUNCTION):
15454        (JSC::getPolymorphicAccessStructureListSlot):
15455        * jit/JITStubs.h:
15456        * jit/SpecializedThunkJIT.h:
15457        (JSC::SpecializedThunkJIT::finalize):
15458        * runtime/ExceptionHelpers.cpp:
15459        * runtime/ExceptionHelpers.h:
15460        * runtime/Executable.cpp:
15461        (JSC::EvalExecutable::compileInternal):
15462        (JSC::ProgramExecutable::compileInternal):
15463        (JSC::FunctionExecutable::compileForCallInternal):
15464        (JSC::FunctionExecutable::compileForConstructInternal):
15465        (JSC::FunctionExecutable::reparseExceptionInfo):
15466        (JSC::EvalExecutable::reparseExceptionInfo):
15467        * yarr/RegexJIT.cpp:
15468        (JSC::Yarr::RegexGenerator::compile):
15469
154702010-08-26  Gavin Barraclough  <barraclough@apple.com>
15471
15472        Reviewed by Brady Eidson.
15473
15474        Bug 44655 - Add debug only convenience methods to obtain a Vector<char> from a String/StringImpl.
15475
15476        * wtf/text/WTFString.cpp:
15477        (asciiDebug):
15478            Return a Vector<char> containing the contents of a string as ASCII.
15479
154802010-08-26  Sam Weinig  <sam@webkit.org>
15481
15482        Reviewed by Darin Adler.
15483
15484        Add PassOwnArrayPtr
15485        https://bugs.webkit.org/show_bug.cgi?id=44627
15486
15487        * GNUmakefile.am:
15488        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
15489        * JavaScriptCore.xcodeproj/project.pbxproj:
15490        Add the new files.
15491
15492        * wtf/Forward.h:
15493        Forward declare PassOwnArrayPtr.
15494        
15495        * wtf/OwnArrayPtr.h:
15496        Mimic the OwnPtr interface.
15497
15498        * wtf/OwnArrayPtrCommon.h: Added.
15499        (WTF::deleteOwnedArrayPtr):
15500        Move delete function here so it can be shared by OwnArrayPtr and
15501        PassOwnArrayPtr.
15502
15503        * wtf/PassOwnArrayPtr.h: Added.
15504        Mimic the PassOwnPtr interface.
15505
155062010-08-26  Oliver Hunt  <oliver@apple.com>
15507
15508        Reviewed by Gavin Barraclough.
15509
15510        [JSC] JavaScript parsing error when loading Equifax web page
15511        https://bugs.webkit.org/show_bug.cgi?id=42900
15512
15513        '-->' is ostensibly only meant to occur when there is only
15514        whitespace preceeding it on the line.  However firefox treats
15515        multiline comments as a space character, so they are allowed.
15516        One side effect of the firefox model is that any line terminators
15517        inside the multiline comment are ignored, so
15518
15519            foo/*
15520            */-->
15521
15522        is treated as
15523
15524            foo -->
15525
15526        and so '-->' will not be a comment in this case.  Happily this simply
15527        means that to fix this issue all we need to do is stop updating
15528        m_atLineStart when handling multiline comments.
15529
15530        * parser/Lexer.cpp:
15531        (JSC::Lexer::lex):
15532
155332010-08-25  Oliver Hunt  <oliver@apple.com>
15534
15535        Reviewed by Geoffrey Garen.
15536
15537        Improve overflow handling in StringImpl::Replace
15538        https://bugs.webkit.org/show_bug.cgi?id=42502
15539        <rdar://problem/8203794>
15540
15541        Harden StringImpl::replace against overflow -- I can't see how this
15542        could be abused, but it's better to be safe than sorry.
15543
15544        * wtf/text/StringImpl.cpp:
15545        (WTF::StringImpl::replace):
15546
155472010-08-26  Martin Robinson  <mrobinson@igalia.com>
15548
15549        Reviewed by Xan Lopez.
15550
15551        [GTK] The GNUmakefile.am files contain a myriad of confusing preprocessor and compiler flag definitions
15552        https://bugs.webkit.org/show_bug.cgi?id=44624
15553
15554        Clean up GNUmakefile.am.
15555
15556        * GNUmakefile.am: Alphabetize the include order in javascriptcore_cppflags. Move
15557        a couple include lines from the top-level GNUmakefile.am.
15558
155592010-08-25  Xan Lopez  <xlopez@igalia.com>
15560
15561        Reviewed by Kent Tamura.
15562
15563        Local variables 'k' and 'y' in s2b() in dtoa.cpp are computed but not used
15564        https://bugs.webkit.org/show_bug.cgi?id=29259
15565
15566        Remove unused code in dtoa.cpp, spotted by Wan-Teh Chang.
15567
15568        * wtf/dtoa.cpp:
15569        (WTF::s2b):
15570
155712010-08-25  Kwang Yul Seo  <skyul@company100.net>
15572
15573        Reviewed by Kevin Ollivier.
15574
15575        [BREWMP] Add build system
15576        https://bugs.webkit.org/show_bug.cgi?id=44645
15577
15578        Make waf script portable so that we can add more ports.
15579
15580        * wscript:
15581
155822010-08-25  Michael Saboff  <msaboff@apple.com>
15583
15584        Reviewed by Sam Weinig.
15585
15586        Remove the single entry regular expression cache introduced as part of
15587        the fix for https://bugs.webkit.org/show_bug.cgi?id=41238.
15588        The performance problem in Dromaeo that initiated that bug is no 
15589        longer present. Dromaeo has been modified so that the regular
15590        expression tests are somewhat random and don't benefit from a
15591        single entry cache.
15592
15593        * runtime/RegExp.cpp:
15594        (JSC::RegExp::RegExp):
15595        (JSC::RegExp::match):
15596        * runtime/RegExp.h:
15597
155982010-08-25  Martin Robinson  <mrobinson@igalia.com>
15599
15600        Reviewed by Gustavo Noronha Silva.
15601
15602        Cairo and EFL port shouldn't depend on glib.
15603        https://bugs.webkit.org/show_bug.cgi?id=44354
15604
15605        Replace GRefPtr with PlatformRefPtr. Keep GLib specific bits in
15606        GRefPtr.h.
15607
15608        * GNUmakefile.am: Add PlatformRefPtr.h to the source list.
15609        * wtf/PlatformRefPtr.h: Migrated from GRefPtr.h.
15610        (WTF::PlatformRefPtr::PlatformRefPtr): Ditto.
15611        (WTF::PlatformRefPtr::~PlatformRefPtr): Ditto.
15612        (WTF::PlatformRefPtr::clear): Ditto.
15613        (WTF::PlatformRefPtr::get): Ditto.
15614        (WTF::PlatformRefPtr::operator*): Ditto.
15615        (WTF::PlatformRefPtr::operator->): Ditto.
15616        (WTF::PlatformRefPtr::operator!): Ditto.
15617        (WTF::PlatformRefPtr::operator UnspecifiedBoolType): Ditto.
15618        (WTF::PlatformRefPtr::hashTableDeletedValue): Ditto.
15619        (WTF::::operator): Ditto.
15620        (WTF::::swap): Ditto.
15621        (WTF::swap): Ditto.
15622        (WTF::operator==): Ditto.
15623        (WTF::operator!=): Ditto.
15624        (WTF::static_pointer_cast): Ditto.
15625        (WTF::const_pointer_cast): Ditto.
15626        (WTF::getPtr): Ditto.
15627        (WTF::adoptPlatformRef): Ditto.
15628        * wtf/gobject/GRefPtr.cpp: Changes to reflect new names.
15629        (WTF::refPlatformPtr):
15630        (WTF::derefPlatformPtr):
15631        * wtf/gobject/GRefPtr.h: Ditto.
15632        (WTF::refPlatformPtr):
15633        (WTF::derefPlatformPtr):
15634
156352010-08-25  Xan Lopez  <xlopez@igalia.com>
15636
15637        Reviewed by Alexey Proskuryakov.
15638
15639        Remove dead code in JSGlobalObject
15640        https://bugs.webkit.org/show_bug.cgi?id=44615
15641
15642        The recursion data member in the JSGlobalObject and its getter
15643        plus inc/dec methods seems to be unused, remove them.
15644
15645        * runtime/JSGlobalObject.cpp:
15646        (JSC::JSGlobalObject::init):
15647        * runtime/JSGlobalObject.h:
15648
156492010-08-25  Michael Saboff  <msaboff@apple.com>
15650
15651        Reviewed by Geoffrey Garen.
15652
15653        Changed the initial and subsequent allocation of vector storage to
15654        Array()s. The changes are to limit sparse arrays to 100000 entries
15655        and fixed the sparse map to vector storage conversion to use the 
15656        minimum amount of memory needed to store the current number of entries.
15657        These changes address https://bugs.webkit.org/show_bug.cgi?id=43707
15658
15659        * runtime/JSArray.cpp:
15660        (JSC::JSArray::putSlowCase):
15661        (JSC::JSArray::getNewVectorLength):
15662
156632010-08-16  Gabor Loki  <loki@webkit.org>
15664
15665        Reviewed by Gavin Barraclough.
15666
15667        Avoid increasing required alignment of target type warning
15668        https://bugs.webkit.org/show_bug.cgi?id=43963
15669
15670        Fix platform independent alignment warnings.
15671
15672        * wtf/ListHashSet.h:
15673        (WTF::ListHashSetNodeAllocator::pool):
15674
156752010-08-19  Gabor Loki  <loki@webkit.org>
15676
15677        Reviewed by Gavin Barraclough.
15678
15679        Enable truncated floating point feature on ARM
15680        https://bugs.webkit.org/show_bug.cgi?id=44233
15681
15682        Enable truncated floating point feature with the help of VCVTR.S32.F64
15683        instruction. If VCVTR.S32.F64 can't fit the result into a 32-bit
15684        integer/register, it saturates at INT_MAX or INT_MIN. Testing this
15685        looks quicker than testing FPSCR for exception.
15686
15687        Inspired by Jacob Bramley's patch from JaegerMonkey
15688
15689        * assembler/ARMAssembler.h:
15690        (JSC::ARMAssembler::):
15691        (JSC::ARMAssembler::cmn_r):
15692        (JSC::ARMAssembler::vcvtr_s32_f64_r):
15693        * assembler/MacroAssemblerARM.h:
15694        (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
15695        (JSC::MacroAssemblerARM::branchTruncateDoubleToInt32):
15696
156972010-08-24  Gavin Barraclough  <barraclough@apple.com>
15698
15699        Windows build fix.
15700
15701        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15702
157032010-08-24  Gavin Barraclough  <barraclough@apple.com>
15704
15705        Windows build fix.
15706
15707        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15708        * wtf/DecimalNumber.h:
15709        (WTF::DecimalNumber::intPow10):
15710        * wtf/dtoa.cpp:
15711        * wtf/dtoa.h:
15712
157132010-08-23  Gavin Barraclough  <barraclough@apple.com>
15714
15715        Reviewed by Oliver Hunt.
15716
15717        https://bugs.webkit.org/show_bug.cgi?id=44487
15718
15719        Number.toExponential/toFixed/toPrecision all contain a spaghetti of duplicated
15720        code & unnecessary complexity. Add a new DecimalNumber class to encapsulate
15721        double to string conversion, share the implementations of rounding &
15722        decimal-fraction/exponential formatting.
15723
15724        * JavaScriptCore.exp:
15725            Update exports.
15726
15727        * runtime/NumberPrototype.cpp:
15728        (JSC::toThisNumber):
15729        (JSC::getIntegerArgumentInRange):
15730            Helper methods used in implementing toExponential/toFixed/toString.
15731        (JSC::numberProtoFuncToExponential):
15732        (JSC::numberProtoFuncToFixed):
15733        (JSC::numberProtoFuncToPrecision):
15734            Reimplemented using new DecimalNumber class.
15735            
15736        * runtime/UString.cpp:
15737        (JSC::UString::number):
15738            Updated to call numberToString.
15739
15740        * wtf/DecimalNumber.h: Added.
15741        (WTF::):
15742        (WTF::DecimalNumber::DecimalNumber):
15743        (WTF::DecimalNumber::toStringDecimal):
15744        (WTF::DecimalNumber::toStringExponential):
15745        (WTF::DecimalNumber::sign):
15746        (WTF::DecimalNumber::exponent):
15747        (WTF::DecimalNumber::significand):
15748        (WTF::DecimalNumber::precision):
15749        (WTF::DecimalNumber::init):
15750        (WTF::DecimalNumber::isZero):
15751        (WTF::DecimalNumber::roundToPrecision):
15752            New class to perform double to string conversion.
15753            Has three constructors, which allow conversion with no rounding,
15754            rounding to significant-figures, or rounding to decimal-places,
15755            and two methods for formatting strings, either using decimal
15756            fraction or exponential encoding. Internal implementation uses
15757            pre-rounding of the values before calling dtoa rather than
15758            relying on dtoa to correctly round, which does not produce
15759            fully accurate results. Hopefully we can address this in the
15760            near future.
15761
15762        * wtf/dtoa.cpp:
15763        (WTF::intPow10):
15764        * wtf/dtoa.h:
15765            intPow10 is used internally by DecimalNumber.
15766            
15767        * wtf/text/WTFString.cpp:
15768        (WTF::copyToString):
15769        (WTF::nanOrInfToString):
15770            Used internally in numberToString for NaN/Infinity handling.
15771        (WTF::numberToString):
15772            Added new method to convert doubles to strings.
15773
15774        * wtf/text/WTFString.h:
15775            Added declaration for numberToString. This is here because
15776            we should switch over to using this for all double to string
15777            conversion in WebCore (see section 2.4.4.3 of the HTML5 spec).
15778
157792010-08-24  Oliver Hunt  <oliver@apple.com>
15780
15781        Reviewed by Geoff Garen.
15782
15783        Don't seed the JS random number generator from time()
15784        https://bugs.webkit.org/show_bug.cgi?id=41868
15785        <rdar://problem/8171025>
15786
15787        Switch to using the secure random number generator to
15788        seed the fast random generator, and make the generator
15789        be per global object.
15790
15791        * runtime/JSGlobalData.cpp:
15792        (JSC::JSGlobalData::JSGlobalData):
15793        * runtime/JSGlobalData.h:
15794        * runtime/JSGlobalObject.h:
15795        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
15796        (JSC::JSGlobalObject::weakRandomNumber):
15797        * runtime/MathObject.cpp:
15798        (JSC::mathProtoFuncRandom):
15799
158002010-08-24  Oliver Hunt  <oliver@apple.com>
15801
15802        Reviewed by Beth Dakin.
15803
15804        Make overflow guards in UString::utf8 explicit
15805        https://bugs.webkit.org/show_bug.cgi?id=44540
15806
15807        Add an explicit overflow check prior to allocating our buffer,
15808        rather than implicitly relying on the guard in convertUTF16ToUTF8.
15809
15810        * runtime/UString.cpp:
15811        (JSC::UString::utf8):
15812
158132010-08-24  Yael Aharon  <yael.aharon@nokia.com>
15814
15815        Reviewed by Simon Hausmann.
15816
15817        [Symbian] Fix commit/decommit of system memory using RChunk
15818
15819        Swap accidentially reversed start and m_base values for determining the
15820        offset within the RChunk.
15821
15822        * wtf/PageReservation.h:
15823        (WTF::PageReservation::systemCommit):
15824        (WTF::PageReservation::systemDecommit):
15825
158262010-08-23  Patrick Gansterer  <paroga@paroga.com>
15827
15828        Rubber-stamped by Gabor Loki.
15829
15830        [WINCE] Buildfix for GeneratedJITStubs after r64818
15831        https://bugs.webkit.org/show_bug.cgi?id=44469
15832
15833        Use " THUNK_RETURN_ADDRESS_OFFSET" instead of "#offset#".
15834
15835        * jit/JITStubs.cpp:
15836
158372010-08-23  Oliver Hunt  <oliver@apple.com>
15838
15839        Reviewed by Darin Adler.
15840
15841        [REGRESSION] Interpreter incorrectly excludes prototype chain when validating put_by_id_transition
15842        https://bugs.webkit.org/show_bug.cgi?id=44240
15843        <rdar://problem/8328995>
15844
15845        Fix an error I introduced when cleaning up the interpreter side of the logic
15846        to prevent setters being called in object initialisers.
15847
15848        * interpreter/Interpreter.cpp:
15849        (JSC::Interpreter::privateExecute):
15850
158512010-08-23  Michael Saboff  <msaboff@apple.com>
15852
15853        Reviewed by Oliver Hunt.
15854
15855        Fixed case where a single character search string in a string.replace()
15856        did not properly handle back reference replacement.  The fix is to 
15857        check for a '$' as part of the check to see if we can execute the
15858        single character replace optimization.
15859        https://bugs.webkit.org/show_bug.cgi?id=44067
15860
15861        * runtime/StringPrototype.cpp:
15862        (JSC::stringProtoFuncReplace):
15863
158642010-08-23  Oliver Hunt  <oliver@apple.com>
15865
15866        Reviewed by Gavin Barraclough.
15867
15868        JSON.stringify is much slower than Firefox on particular pathological input
15869        https://bugs.webkit.org/show_bug.cgi?id=44456
15870
15871        Make StringBuilder::reserveCapacity reserve additional space so we don't end up
15872        repeatedly copying the entire result string.
15873
15874        * runtime/StringBuilder.h:
15875        (JSC::StringBuilder::append):
15876        (JSC::StringBuilder::reserveCapacity):
15877
158782010-08-23  Jian Li  <jianli@chromium.org>
15879
15880        Reviewed by Darin Fisher.
15881
15882        Handle blob resource.
15883        https://bugs.webkit.org/show_bug.cgi?id=43941
15884
15885        * JavaScriptCore.exp: Add an export that is neede by BlobResourceHandle.
15886
158872010-08-19  Andreas Kling  <andreas.kling@nokia.com>
15888
15889        Reviewed by Geoffrey Garen.
15890
15891        JSC: Move the static_cast into to(U)Int32 fast case
15892        https://bugs.webkit.org/show_bug.cgi?id=44037
15893
15894        Do the static_cast<(u)int32_t> inline to avoid the function call overhead
15895        for easily converted values (within (u)int32_t range.)
15896
15897        * runtime/JSValue.cpp:
15898        (JSC::toInt32SlowCase):
15899        (JSC::toUInt32SlowCase):
15900        * runtime/JSValue.h:
15901        (JSC::JSValue::toInt32):
15902        (JSC::JSValue::toUInt32):
15903
159042010-08-18  Andreas Kling  <andreas.kling@nokia.com>
15905
15906        Reviewed by Geoffrey Garen.
15907
15908        REGRESSION(r58469): Math.pow() always returns double-backed JSValue which is extremely slow as array subscript
15909        https://bugs.webkit.org/show_bug.cgi?id=43742
15910
15911        Add codegen for pow() to return Int32 values when possible.
15912
15913        * jit/ThunkGenerators.cpp:
15914        (JSC::powThunkGenerator):
15915
159162010-08-18  Gabor Loki  <loki@webkit.org>
15917
15918        Reviewed by Gavin Barraclough.
15919
15920        The JITStackFrame is wrong using Thumb-2 JIT with JSVALUE32_64
15921        https://bugs.webkit.org/show_bug.cgi?id=43897
15922
15923        A 64 bits wide member in a structure is aligned to 8 bytes on ARM by
15924        default, but this is not taken into account in the offset defines of
15925        JITStackFrame.
15926
15927        * jit/JITStubs.cpp:
15928        * jit/JITStubs.h:
15929
159302010-08-18  Gavin Barraclough  <barraclough@apple.com>
15931
15932        Rubber stamped by Sam Weinig.
15933
15934        Rename UString::substr to substringSharingImpl, add to WTF::String.
15935        Now WTF::String can do everything that JSC::UString can do!
15936
15937        * JavaScriptCore.exp:
15938        * bytecode/CodeBlock.cpp:
15939        (JSC::escapeQuotes):
15940        * bytecompiler/NodesCodegen.cpp:
15941        (JSC::substitute):
15942        * parser/SourceProvider.h:
15943        (JSC::UStringSourceProvider::getRange):
15944        * runtime/FunctionPrototype.cpp:
15945        (JSC::insertSemicolonIfNeeded):
15946        * runtime/JSGlobalObjectFunctions.cpp:
15947        (JSC::parseInt):
15948        * runtime/JSONObject.cpp:
15949        (JSC::gap):
15950        (JSC::Stringifier::indent):
15951        (JSC::Stringifier::unindent):
15952        * runtime/JSString.cpp:
15953        (JSC::JSString::replaceCharacter):
15954        * runtime/NumberPrototype.cpp:
15955        (JSC::numberProtoFuncToFixed):
15956        (JSC::numberProtoFuncToPrecision):
15957        * runtime/StringPrototype.cpp:
15958        (JSC::stringProtoFuncReplace):
15959        (JSC::trimString):
15960        * runtime/UString.cpp:
15961        (JSC::UString::substringSharingImpl):
15962        * runtime/UString.h:
15963        * wtf/text/WTFString.cpp:
15964        (WTF::String::substringSharingImpl):
15965        * wtf/text/WTFString.h:
15966
159672010-08-18  Gavin Barraclough  <barraclough@apple.com>
15968
15969        Windows build fix.
15970
15971        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15972        * JavaScriptCore.xcodeproj/project.pbxproj:
15973
159742010-08-18  Gavin Barraclough  <barraclough@apple.com>
15975
15976        Windows build fix.
15977
15978        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
15979        * JavaScriptCore.xcodeproj/project.pbxproj:
15980
159812010-08-17  Gavin Barraclough  <barraclough@apple.com>
15982
15983        Reviewed by Sam Weinig.
15984
15985        Bug 44146 - Remove toDouble/toUInt32 methods from UString.
15986
15987        These methods all implement JavaScript language specific behaviour, and as such
15988        are not suited to being on a generic string object.  They are also inefficient
15989        and incorrectly used, refactor & cleanup.  Uses of these methods really divide
15990        out into two cases.
15991
15992        ToNumber:
15993        Uses of toDouble from JSString and from parseFloat are implementing ecma's
15994        ToNumber conversion from strings (see ecma-262 9.3.1), so UString::toDouble
15995        should largely just be moved out to a global jsToNumber function.  ToNumber is
15996        capable of recognizing either decimal or hexadecimal numbers, but parseFloat
15997        should only recognize decimal values.  This is currently handled by testing for
15998        hexadecimal before calling toDouble, which should unnecessary - instead we can
15999        just split out the two parts to the grammar into separate functions. Also,
16000        strtod recognizes a set of literals (nan, inf, and infinity - all with any
16001        capitalization) - which are not defined by any of the specs we are implementing.
16002        To handle this we need to perform additional work in toDouble to convert the
16003        unsupported cases of infinities back to NaNs.  Instead we should simply remove
16004        support for this literals from strtod.  This should provide a more desirable
16005        behaviour for all clients of strtod.
16006
16007        Indexed properties:
16008        Uses of the toStrictUInt32 methods are were all converting property names to
16009        indices, and all uses of toUInt32 were incorrect; in all cases we should have
16010        been calling toUInt32.  This error results in some incorrect behaviour in the
16011        DOM (accessing property "0 " of a NodeList should fail; it currently does not).
16012        Move this method onto Identifier (our canonical property name), and make it
16013        always perform a strict conversion. Add a layout test to check NodeList does
16014        convert indexed property names correctly.
16015
16016        * JavaScriptCore.exp:
16017        * runtime/Arguments.cpp:
16018        (JSC::Arguments::getOwnPropertySlot):
16019        (JSC::Arguments::getOwnPropertyDescriptor):
16020        (JSC::Arguments::put):
16021        (JSC::Arguments::deleteProperty):
16022        * runtime/Identifier.cpp:
16023        (JSC::Identifier::toUInt32):
16024        * runtime/Identifier.h:
16025        (JSC::Identifier::toUInt32):
16026        * runtime/JSArray.cpp:
16027        (JSC::JSArray::getOwnPropertySlot):
16028        (JSC::JSArray::getOwnPropertyDescriptor):
16029        (JSC::JSArray::put):
16030        (JSC::JSArray::deleteProperty):
16031        * runtime/JSArray.h:
16032        (JSC::Identifier::toArrayIndex):
16033        * runtime/JSByteArray.cpp:
16034        (JSC::JSByteArray::getOwnPropertySlot):
16035        (JSC::JSByteArray::getOwnPropertyDescriptor):
16036        (JSC::JSByteArray::put):
16037        * runtime/JSGlobalObjectFunctions.cpp:
16038        (JSC::isInfinity):
16039        (JSC::jsHexIntegerLiteral):
16040        (JSC::jsStrDecimalLiteral):
16041        (JSC::jsToNumber):
16042        (JSC::parseFloat):
16043        * runtime/JSGlobalObjectFunctions.h:
16044        * runtime/JSString.cpp:
16045        (JSC::JSString::getPrimitiveNumber):
16046        (JSC::JSString::toNumber):
16047        (JSC::JSString::getStringPropertyDescriptor):
16048        * runtime/JSString.h:
16049        (JSC::JSString::getStringPropertySlot):
16050        * runtime/ObjectPrototype.cpp:
16051        (JSC::ObjectPrototype::put):
16052        * runtime/StringObject.cpp:
16053        (JSC::StringObject::deleteProperty):
16054        * runtime/UString.cpp:
16055        * runtime/UString.h:
16056        * wtf/dtoa.cpp:
16057        (WTF::strtod):
16058
160592010-08-17  Gavin Barraclough  <barraclough@apple.com>
16060
16061        Reviewed by Sam Weinig.
16062
16063        Bug 44099 - REGRESSION(r65468): Crashes in StringImpl::find
16064
16065        Bug 44080 introuduced a couple of cases in which array bounds could be overrun.
16066        One of these was fixed in r65493, this patch fixes the other and address the
16067        concerns voiced in comment #6 by restructuring the loops to remove the code
16068        dupliction without introducing an additional if check.
16069
16070        * wtf/text/StringImpl.cpp:
16071        (WTF::StringImpl::find):
16072        (WTF::StringImpl::findIgnoringCase):
16073        (WTF::StringImpl::reverseFind):
16074        (WTF::StringImpl::reverseFindIgnoringCase):
16075
160762010-08-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
16077
16078        Reviewed by Ariya Hidayat.
16079
16080        [Qt] Move the accelerated compositing build flag to the right place
16081        https://bugs.webkit.org/show_bug.cgi?id=43882
16082
16083        * wtf/Platform.h:
16084
160852010-08-17  Yuta Kitamura  <yutak@chromium.org>
16086
16087        Reviewed by Shinichiro Hamaji.
16088
16089        Avoid uninitialized memory read in StringImpl::find().
16090
16091        REGRESSION(r65468): Crashes in StringImpl::find
16092        https://bugs.webkit.org/show_bug.cgi?id=44099
16093
16094        * wtf/text/StringImpl.cpp:
16095        (WTF::StringImpl::find):
16096
160972010-08-16  Gavin Barraclough  <barraclough@apple.com>
16098
16099        Rubber stamped by Sam Weinig
16100
16101        Add VectorTraits to String & DefaultHash traits to UString to unify behaviour.
16102
16103        * runtime/UString.h:
16104        (JSC::UStringHash::hash):
16105        (JSC::UStringHash::equal):
16106        (WTF::):
16107        * wtf/text/WTFString.h:
16108        (WTF::):
16109
161102010-08-16  Gavin Barraclough  <barraclough@apple.com>
16111
16112        Rubber stamped by Sam Weinig
16113
16114        Remove unnecessary includes from UString.h, add new includes as necessary.
16115
16116        * profiler/CallIdentifier.h:
16117        * profiler/ProfileNode.h:
16118        * runtime/DateConversion.cpp:
16119        * runtime/Identifier.h:
16120        (JSC::IdentifierRepHash::hash):
16121        * runtime/RegExpCache.h:
16122        * runtime/RegExpKey.h:
16123        * runtime/UString.cpp:
16124        (JSC::UString::substr):
16125        * runtime/UString.h:
16126        * wtf/text/WTFString.h:
16127
161282010-08-16  Gavin Barraclough  <barraclough@apple.com>
16129
16130        Reviewed by Sam Weinig
16131
16132        Bug 44080 - String find/reverseFind methods need tidying up
16133        These methods have a couple of problems with their interface, and implementation.
16134
16135        These methods take and int index, and return an int - however this is problematic
16136        since on 64-bit string indices may have a full 32-bit range.  This spills out into
16137        surrounding code, which unsafely casts string indices from unsigned to int. Code
16138        checking the result of these methods check for a mix of "== -1", "< 0", and
16139        "== notFound".  Clean this up by changing these methods to take an unsigned
16140        starting index, and return a size_t. with a failed match indicated by notFound.
16141        reverseFind also has a special meaning for the starting index argument, in that a
16142        negative index is interpreted as an offset back from the end of the string. Remove
16143        this functionality, in the (1!) case where it is used we should just calculate the
16144        offset by subtracting from the string's length.
16145
16146        The implementation has a few problems too.  The code is not in webkit style, in
16147        using assorted abbreviations in variable names, and implementations of similar
16148        find methods with differing argument types were unnecessarily inconsistent. When
16149        find is passed const char* data the string would be handled as latin1 (zero
16150        extended to UTF-16) for all characters but the first; this is sign extended.
16151        Case-insensitive find is broken for unicode strings; the hashing optimization is
16152        not unicode safe, and could result in false negatives.
16153
16154        Unify UString find methods to match String.
16155
16156        * JavaScriptCore.exp:
16157        * bytecode/CodeBlock.cpp:
16158        (JSC::escapeQuotes):
16159        * bytecompiler/NodesCodegen.cpp:
16160        (JSC::substitute):
16161        * runtime/JSString.cpp:
16162        (JSC::JSString::replaceCharacter):
16163        * runtime/RegExp.cpp:
16164        (JSC::RegExp::RegExp):
16165        * runtime/RegExpKey.h:
16166        (JSC::RegExpKey::getFlagsValue):
16167        * runtime/StringPrototype.cpp:
16168        (JSC::substituteBackreferencesSlow):
16169        (JSC::substituteBackreferences):
16170        (JSC::stringProtoFuncReplace):
16171        (JSC::stringProtoFuncIndexOf):
16172        (JSC::stringProtoFuncLastIndexOf):
16173        (JSC::stringProtoFuncSplit):
16174        * runtime/UString.cpp:
16175        * runtime/UString.h:
16176        (JSC::UString::find):
16177        (JSC::UString::reverseFind):
16178        * wtf/text/AtomicString.h:
16179        (WTF::AtomicString::find):
16180        * wtf/text/StringImpl.cpp:
16181        (WTF::StringImpl::find):
16182        (WTF::StringImpl::findCaseInsensitive):
16183        (WTF::StringImpl::reverseFind):
16184        (WTF::StringImpl::reverseFindCaseInsensitive):
16185        (WTF::StringImpl::endsWith):
16186        (WTF::StringImpl::replace):
16187        * wtf/text/StringImpl.h:
16188        (WTF::StringImpl::startsWith):
16189        * wtf/text/WTFString.cpp:
16190        (WTF::String::split):
16191        * wtf/text/WTFString.h:
16192        (WTF::String::find):
16193        (WTF::String::reverseFind):
16194        (WTF::String::findCaseInsensitive):
16195        (WTF::String::reverseFindCaseInsensitive):
16196        (WTF::String::contains):
16197        (WTF::find):
16198        (WTF::reverseFind):
16199
162002010-08-16  Kevin Ollivier  <kevino@theolliviers.com>
16201
16202        [wx] Build fix, do not build WebCore as a convenience library as this leads to
16203        errors in the Win build w/export symbols and causes problems with DOM bindings
16204        debugging in gdb. 
16205
16206        * wscript:
16207
162082010-08-16  Leandro Pereira  <leandro@profusion.mobi>
16209
16210        [EFL] Build fix after r65366.
16211
16212        * CMakeLists.txt: Use if (VAR) instead of if (${VAR}) to check if
16213        they're empty.
16214        * jsc/CMakeLists.txt: Ditto.
16215        * wtf/CMakeLists.txt: Ditto.
16216
162172010-08-15  Kevin Ollivier  <kevino@theolliviers.com>
16218
16219        [wx] Build fix, don't build intermediate source in DerivedSources dir.
16220
16221        * wscript:
16222
162232010-08-14  Patrick Gansterer  <paroga@paroga.com>
16224
16225        Reviewed by Kenneth Rohde Christiansen.
16226
16227        [CMake] Add preprocessor detection for generator scripts
16228        https://bugs.webkit.org/show_bug.cgi?id=43984
16229
16230        * CMakeLists.txt:
16231
162322010-08-14  Patrick Gansterer  <paroga@paroga.com>
16233
16234        Reviewed by Kenneth Rohde Christiansen.
16235
16236        [CMake] Set target properties only if available
16237        https://bugs.webkit.org/show_bug.cgi?id=43978
16238
16239        * CMakeLists.txt:
16240        * jsc/CMakeLists.txt:
16241        * wtf/CMakeLists.txt:
16242
162432010-08-13  Kevin Ollivier  <kevino@theolliviers.com>
16244
16245        [wx] Build fix, add CString to the list of forwards.
16246
16247        * wtf/Forward.h:
16248
162492010-08-13  Gavin Barraclough  <barraclough@apple.com>
16250
16251        Windows build fix
16252
16253        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16254
162552010-08-13  Gavin Barraclough  <barraclough@apple.com>
16256
16257        Windows build fix
16258
16259        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16260
162612010-08-13  Gavin Barraclough  <barraclough@apple.com>
16262
16263        Windows build fix
16264
16265        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16266
162672010-08-13  Gavin Barraclough  <barraclough@apple.com>
16268
16269        Rubber stamped by Sam Weinig.
16270        Switch String::/UString::ascii() to return a CString.
16271
16272        * JavaScriptCore.exp:
16273        * JavaScriptCore.xcodeproj/project.pbxproj:
16274        * bytecode/CodeBlock.cpp:
16275        (JSC::CodeBlock::dump):
16276        * bytecode/SamplingTool.cpp:
16277        (JSC::SamplingTool::dump):
16278        * interpreter/CallFrame.cpp:
16279        (JSC::CallFrame::dumpCaller):
16280        * jsc.cpp:
16281        (runWithScripts):
16282        (runInteractive):
16283        * runtime/Identifier.h:
16284        (JSC::Identifier::ascii):
16285        * runtime/ScopeChain.cpp:
16286        (JSC::ScopeChainNode::print):
16287        * runtime/UString.cpp:
16288        (JSC::UString::ascii):
16289        (JSC::UString::latin1):
16290        * runtime/UString.h:
16291        * wtf/text/StringImpl.cpp:
16292        (WTF::StringImpl::asciiOLD):
16293        * wtf/text/StringImpl.h:
16294        * wtf/text/WTFString.cpp:
16295        (WTF::String::ascii):
16296        (WTF::String::latin1):
16297        * wtf/text/WTFString.h:
16298
162992010-08-13  Gabor Loki  <loki@webkit.org>
16300
16301        Reviewed by Gavin Barraclough.
16302
16303        Avoid increasing required alignment of target type warning on ARM
16304        https://bugs.webkit.org/show_bug.cgi?id=38045
16305
16306        The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
16307        sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
16308        increases required alignment of target type warnings.
16309        Casting the type of [pointer to Type2] object to void* bypasses the
16310        warning.
16311
16312        * assembler/ARMAssembler.cpp:
16313        (JSC::ARMAssembler::executableCopy):
16314        * assembler/AssemblerBuffer.h:
16315        (JSC::AssemblerBuffer::putShortUnchecked):
16316        (JSC::AssemblerBuffer::putIntUnchecked):
16317        (JSC::AssemblerBuffer::putInt64Unchecked):
16318        * interpreter/RegisterFile.h:
16319        (JSC::RegisterFile::RegisterFile):
16320        (JSC::RegisterFile::grow):
16321        * jit/JITStubs.cpp:
16322        * pcre/pcre_compile.cpp:
16323        (jsRegExpCompile):
16324        * runtime/JSArray.cpp:
16325        (JSC::JSArray::putSlowCase):
16326        (JSC::JSArray::increaseVectorLength):
16327        (JSC::JSArray::increaseVectorPrefixLength):
16328        (JSC::JSArray::shiftCount):
16329        (JSC::JSArray::unshiftCount):
16330        * wtf/FastMalloc.cpp:
16331        (WTF::PageHeapAllocator::New):
16332        (WTF::TCMalloc_Central_FreeList::Populate):
16333        * wtf/MD5.cpp:
16334        (WTF::reverseBytes):
16335        (WTF::MD5::addBytes):
16336        (WTF::MD5::checksum):
16337        * wtf/StdLibExtras.h:
16338        (isPointerTypeAlignmentOkay):
16339        (reinterpret_cast_ptr):
16340        * wtf/Vector.h:
16341        (WTF::VectorBuffer::inlineBuffer):
16342        * wtf/qt/StringQt.cpp:
16343        (WTF::String::String):
16344
163452010-08-13  Gavin Barraclough  <barraclough@apple.com>
16346
16347        Reviewed by Sam Weinig
16348
16349        Unify UString::UTF8String() & String::utf8() methods,
16350        remove UString::cost() & make atArrayIndex a free function.
16351
16352        * JavaScriptCore.exp:
16353        * bytecode/CodeBlock.cpp:
16354        (JSC::constantName):
16355        (JSC::idName):
16356        (JSC::CodeBlock::registerName):
16357        (JSC::regexpName):
16358        (JSC::printGlobalResolveInfo):
16359        (JSC::printStructureStubInfo):
16360        (JSC::CodeBlock::printStructure):
16361        (JSC::CodeBlock::printStructures):
16362        * jsc.cpp:
16363        (functionPrint):
16364        (functionDebug):
16365        (runInteractive):
16366        (fillBufferWithContentsOfFile):
16367        * pcre/pcre_exec.cpp:
16368        (Histogram::~Histogram):
16369        * profiler/CallIdentifier.h:
16370        (JSC::CallIdentifier::c_str):
16371        * profiler/Profile.cpp:
16372        (JSC::Profile::debugPrintDataSampleStyle):
16373        * profiler/ProfileGenerator.cpp:
16374        (JSC::ProfileGenerator::willExecute):
16375        (JSC::ProfileGenerator::didExecute):
16376        * profiler/ProfileNode.cpp:
16377        (JSC::ProfileNode::debugPrintData):
16378        (JSC::ProfileNode::debugPrintDataSampleStyle):
16379        * runtime/Arguments.cpp:
16380        (JSC::Arguments::getOwnPropertySlot):
16381        (JSC::Arguments::getOwnPropertyDescriptor):
16382        (JSC::Arguments::put):
16383        (JSC::Arguments::deleteProperty):
16384        * runtime/DateConversion.cpp:
16385        (JSC::parseDate):
16386        * runtime/Identifier.h:
16387        (JSC::Identifier::toStrictUInt32):
16388        * runtime/JSArray.cpp:
16389        (JSC::JSArray::getOwnPropertySlot):
16390        (JSC::JSArray::getOwnPropertyDescriptor):
16391        (JSC::JSArray::put):
16392        (JSC::JSArray::deleteProperty):
16393        * runtime/JSArray.h:
16394        (JSC::toArrayIndex):
16395        * runtime/JSGlobalObjectFunctions.cpp:
16396        (JSC::encode):
16397        (JSC::parseInt):
16398        (JSC::globalFuncJSCPrint):
16399        * runtime/JSString.h:
16400        (JSC::RopeBuilder::JSString):
16401        * runtime/UString.cpp:
16402        (JSC::UString::toDouble):
16403        (JSC::putUTF8Triple):
16404        (JSC::UString::utf8):
16405        * runtime/UString.h:
16406        (JSC::UString::~UString):
16407        (JSC::UString::isNull):
16408        (JSC::UString::isEmpty):
16409        (JSC::UString::impl):
16410        * wtf/text/WTFString.cpp:
16411        (WTF::String::utf8):
16412        * wtf/text/WTFString.h:
16413        (WTF::String::~String):
16414        (WTF::String::swap):
16415        (WTF::String::isNull):
16416        (WTF::String::isEmpty):
16417        (WTF::String::impl):
16418        (WTF::String::length):
16419        (WTF::String::String):
16420        (WTF::String::isHashTableDeletedValue):
16421
164222010-08-12  Zoltan Herczeg  <zherczeg@webkit.org>
16423
16424        Reviewed by Gavin Barraclough.
16425
16426        Refactoring the fpu code generator for the ARM port
16427        https://bugs.webkit.org/show_bug.cgi?id=43842
16428
16429        Support up to 32 double precision registers, and the
16430        recent VFP instruction formats. This patch is mainly
16431        a style change which keeps the current functionality.
16432
16433        * assembler/ARMAssembler.h:
16434        (JSC::ARMRegisters::):
16435        (JSC::ARMAssembler::):
16436        (JSC::ARMAssembler::emitInst):
16437        (JSC::ARMAssembler::emitDoublePrecisionInst):
16438        (JSC::ARMAssembler::emitSinglePrecisionInst):
16439        (JSC::ARMAssembler::vadd_f64_r):
16440        (JSC::ARMAssembler::vdiv_f64_r):
16441        (JSC::ARMAssembler::vsub_f64_r):
16442        (JSC::ARMAssembler::vmul_f64_r):
16443        (JSC::ARMAssembler::vcmp_f64_r):
16444        (JSC::ARMAssembler::vsqrt_f64_r):
16445        (JSC::ARMAssembler::vmov_vfp_r):
16446        (JSC::ARMAssembler::vmov_arm_r):
16447        (JSC::ARMAssembler::vcvt_f64_s32_r):
16448        (JSC::ARMAssembler::vcvt_s32_f64_r):
16449        (JSC::ARMAssembler::vmrs_apsr):
16450        * assembler/MacroAssemblerARM.h:
16451        (JSC::MacroAssemblerARM::addDouble):
16452        (JSC::MacroAssemblerARM::divDouble):
16453        (JSC::MacroAssemblerARM::subDouble):
16454        (JSC::MacroAssemblerARM::mulDouble):
16455        (JSC::MacroAssemblerARM::sqrtDouble):
16456        (JSC::MacroAssemblerARM::convertInt32ToDouble):
16457        (JSC::MacroAssemblerARM::branchDouble):
16458        (JSC::MacroAssemblerARM::branchConvertDoubleToInt32):
16459
164602010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
16461
16462        Unreviewed, rolling out r65295.
16463        http://trac.webkit.org/changeset/65295
16464        https://bugs.webkit.org/show_bug.cgi?id=43950
16465
16466        It broke 4 sputnik tests (Requested by Ossy on #webkit).
16467
16468        * JavaScriptCore.exp:
16469        * bytecode/CodeBlock.cpp:
16470        (JSC::constantName):
16471        (JSC::idName):
16472        (JSC::CodeBlock::registerName):
16473        (JSC::regexpName):
16474        (JSC::printGlobalResolveInfo):
16475        (JSC::printStructureStubInfo):
16476        (JSC::CodeBlock::printStructure):
16477        (JSC::CodeBlock::printStructures):
16478        * jsc.cpp:
16479        (functionPrint):
16480        (functionDebug):
16481        (runInteractive):
16482        (fillBufferWithContentsOfFile):
16483        * pcre/pcre_exec.cpp:
16484        (Histogram::~Histogram):
16485        * profiler/CallIdentifier.h:
16486        (JSC::CallIdentifier::c_str):
16487        * profiler/Profile.cpp:
16488        (JSC::Profile::debugPrintDataSampleStyle):
16489        * profiler/ProfileGenerator.cpp:
16490        (JSC::ProfileGenerator::willExecute):
16491        (JSC::ProfileGenerator::didExecute):
16492        * profiler/ProfileNode.cpp:
16493        (JSC::ProfileNode::debugPrintData):
16494        (JSC::ProfileNode::debugPrintDataSampleStyle):
16495        * runtime/Arguments.cpp:
16496        (JSC::Arguments::getOwnPropertySlot):
16497        (JSC::Arguments::getOwnPropertyDescriptor):
16498        (JSC::Arguments::put):
16499        (JSC::Arguments::deleteProperty):
16500        * runtime/DateConversion.cpp:
16501        (JSC::parseDate):
16502        * runtime/Identifier.h:
16503        (JSC::Identifier::Identifier):
16504        (JSC::Identifier::toArrayIndex):
16505        * runtime/JSArray.cpp:
16506        (JSC::JSArray::getOwnPropertySlot):
16507        (JSC::JSArray::getOwnPropertyDescriptor):
16508        (JSC::JSArray::put):
16509        (JSC::JSArray::deleteProperty):
16510        * runtime/JSArray.h:
16511        * runtime/JSGlobalObjectFunctions.cpp:
16512        (JSC::encode):
16513        (JSC::parseInt):
16514        (JSC::globalFuncJSCPrint):
16515        * runtime/JSString.h:
16516        (JSC::RopeBuilder::JSString):
16517        * runtime/UString.cpp:
16518        (JSC::UString::toDouble):
16519        (JSC::UString::UTF8String):
16520        * runtime/UString.h:
16521        (JSC::UString::isNull):
16522        (JSC::UString::isEmpty):
16523        (JSC::UString::impl):
16524        (JSC::UString::cost):
16525        (JSC::UString::~UString):
16526        (JSC::UString::toArrayIndex):
16527        * wtf/text/WTFString.cpp:
16528        (WTF::String::utf8):
16529        * wtf/text/WTFString.h:
16530        (WTF::String::String):
16531        (WTF::String::isHashTableDeletedValue):
16532        (WTF::String::length):
16533        (WTF::String::operator[]):
16534        (WTF::String::isNull):
16535        (WTF::String::isEmpty):
16536        (WTF::String::impl):
16537
165382010-08-12  Gavin Barraclough  <barraclough@apple.com>
16539
16540        Windows build fix.
16541
16542        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16543
165442010-08-12  Gavin Barraclough  <barraclough@apple.com>
16545
16546        Reviewed by Sam Weinig
16547
16548        Unify UString::UTF8String() & String::utf8() methods,
16549        remove UString::cost() & make atArrayIndex a free function.
16550
16551        * JavaScriptCore.exp:
16552        * bytecode/CodeBlock.cpp:
16553        (JSC::constantName):
16554        (JSC::idName):
16555        (JSC::CodeBlock::registerName):
16556        (JSC::regexpName):
16557        (JSC::printGlobalResolveInfo):
16558        (JSC::printStructureStubInfo):
16559        (JSC::CodeBlock::printStructure):
16560        (JSC::CodeBlock::printStructures):
16561        * jsc.cpp:
16562        (functionPrint):
16563        (functionDebug):
16564        (runInteractive):
16565        (fillBufferWithContentsOfFile):
16566        * pcre/pcre_exec.cpp:
16567        (Histogram::~Histogram):
16568        * profiler/CallIdentifier.h:
16569        (JSC::CallIdentifier::c_str):
16570        * profiler/Profile.cpp:
16571        (JSC::Profile::debugPrintDataSampleStyle):
16572        * profiler/ProfileGenerator.cpp:
16573        (JSC::ProfileGenerator::willExecute):
16574        (JSC::ProfileGenerator::didExecute):
16575        * profiler/ProfileNode.cpp:
16576        (JSC::ProfileNode::debugPrintData):
16577        (JSC::ProfileNode::debugPrintDataSampleStyle):
16578        * runtime/Arguments.cpp:
16579        (JSC::Arguments::getOwnPropertySlot):
16580        (JSC::Arguments::getOwnPropertyDescriptor):
16581        (JSC::Arguments::put):
16582        (JSC::Arguments::deleteProperty):
16583        * runtime/DateConversion.cpp:
16584        (JSC::parseDate):
16585        * runtime/Identifier.h:
16586        (JSC::Identifier::toStrictUInt32):
16587        * runtime/JSArray.cpp:
16588        (JSC::JSArray::getOwnPropertySlot):
16589        (JSC::JSArray::getOwnPropertyDescriptor):
16590        (JSC::JSArray::put):
16591        (JSC::JSArray::deleteProperty):
16592        * runtime/JSArray.h:
16593        (JSC::toArrayIndex):
16594        * runtime/JSGlobalObjectFunctions.cpp:
16595        (JSC::encode):
16596        (JSC::parseInt):
16597        (JSC::globalFuncJSCPrint):
16598        * runtime/JSString.h:
16599        (JSC::RopeBuilder::JSString):
16600        * runtime/UString.cpp:
16601        (JSC::UString::toDouble):
16602        (JSC::putUTF8Triple):
16603        (JSC::UString::utf8):
16604        * runtime/UString.h:
16605        (JSC::UString::~UString):
16606        (JSC::UString::isNull):
16607        (JSC::UString::isEmpty):
16608        (JSC::UString::impl):
16609        * wtf/text/WTFString.cpp:
16610        (WTF::String::utf8):
16611        * wtf/text/WTFString.h:
16612        (WTF::String::~String):
16613        (WTF::String::swap):
16614        (WTF::String::isNull):
16615        (WTF::String::isEmpty):
16616        (WTF::String::impl):
16617        (WTF::String::length):
16618        (WTF::String::String):
16619        (WTF::String::isHashTableDeletedValue):
16620
166212010-08-12  Gavin Barraclough  <barraclough@apple.com>
16622
16623        Eeerk! - revert accidentally committed changes in UString!
16624
16625        * JavaScriptCore.exp:
16626        * runtime/UString.cpp:
16627        (JSC::UString::UString):
16628        * runtime/UString.h:
16629
166302010-08-12  Gavin Barraclough  <barraclough@apple.com>
16631
16632        Reviewed by Sam Weinig
16633
16634        Change UString constructors to match those in WTF::String.
16635        This changes behaviour of UString((char*)0) to create null
16636        strings, akin to UString() rather than UString::empty().
16637        (This matches String).  Remove unused constructors from
16638        UString, and add null-terminated UTF-16 constructor, to
16639        match String.  Move String's constructor into the .cpp to
16640        match UString.
16641
16642        * JavaScriptCore.exp:
16643        * debugger/DebuggerCallFrame.cpp:
16644        (JSC::DebuggerCallFrame::calculatedFunctionName):
16645        * runtime/RegExpKey.h:
16646        (JSC::RegExpKey::RegExpKey):
16647        * runtime/SmallStrings.cpp:
16648        (JSC::SmallStrings::createSingleCharacterString):
16649        * runtime/UString.cpp:
16650        (JSC::UString::UString):
16651        * runtime/UString.h:
16652        (JSC::UString::UString):
16653        (JSC::UString::swap):
16654        (JSC::UString::adopt):
16655        (JSC::UString::operator[]):
16656        * wtf/text/WTFString.h:
16657        (WTF::String::String):
16658        (WTF::String::adopt):
16659        (WTF::String::operator[]):
16660
166612010-08-12  David Levin  <levin@chromium.org>
16662
16663        Reviewed by NOBODY (build fix).
16664
16665        * runtime/UString.h: Removed unneccessary #include.
16666
166672010-08-12  Gavin Barraclough  <barraclough@apple.com>
16668
16669        Reviewed by Sam Weinig
16670
16671        Revert changes to ALWAYS_INLINEness of a couple of functions in UString.
16672        This appears to have degraded performance.
16673
16674        * runtime/UString.cpp:
16675        (JSC::UString::ascii):
16676        * runtime/UString.h:
16677        (JSC::UString::length):
16678        (JSC::UString::isEmpty):
16679        (JSC::UString::~UString):
16680
166812010-08-12  Csaba Osztrogonác  <ossy@webkit.org>
16682
16683        Reviewed by Antonio Gomes.
16684
16685        [Qt] Fix warnings: unknown conversion type character 'l' in format
16686        https://bugs.webkit.org/show_bug.cgi?id=43359
16687
16688        Qt port doesn't call any printf in String::format(...), consequently
16689        using __attribute__((format(printf,m,n))) is incorrect and causes
16690        false positive warnings on Windows if you build with MinGW.
16691
16692        Qt port calls QString::vsprintf(...) , which is platform
16693        independent, and handles %lli, %llu and %llx on all platforms.
16694        (http://trac.webkit.org/changeset/35712)
16695
16696        * wtf/text/WTFString.h:
16697
166982010-08-12  Gabor Loki  <loki@webkit.org>
16699
16700        Reviewed by Geoffrey Garen.
16701
16702        Fix the array subscript is above array bounds warning in ByteArray on ARM.
16703        https://bugs.webkit.org/show_bug.cgi?id=43358
16704
16705        The warning is very similar to this one: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861
16706
16707        * wtf/ByteArray.cpp:
16708        (WTF::ByteArray::create):
16709
167102010-08-12  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
16711
16712        Reviewed by Martin Robinson.
16713
16714        [GTK] Use GSettings to save/restore Web Inspector settings
16715        https://bugs.webkit.org/show_bug.cgi?id=43512
16716
16717        * wtf/gobject/GRefPtr.cpp: Added support for GVariant, used by our
16718        GSettings support.
16719        (WTF::refGPtr):
16720        (WTF::derefGPtr):
16721        * wtf/gobject/GRefPtr.h:
16722
167232010-08-12  Gabor Loki  <loki@webkit.org>
16724
16725        Reviewed by Simon Hausmann.
16726
16727        The scratch register should be saved in YARR with ARM JIT
16728        https://bugs.webkit.org/show_bug.cgi?id=43910
16729
16730        Reported by Jocelyn Turcotte.
16731
16732        * yarr/RegexJIT.cpp:
16733        (JSC::Yarr::RegexGenerator::generateEnter):
16734        (JSC::Yarr::RegexGenerator::generateReturn):
16735
167362010-08-11  Gavin Barraclough  <barraclough@apple.com>
16737
16738        Windows build fix.
16739
16740        * JavaScriptCore.xcodeproj/project.pbxproj:
16741        * wtf/Forward.h:
16742
167432010-08-11  Leo Yang  <leo.yang@torchmobile.com.cn>
16744
16745        Reviewed by Geoffrey Garen.
16746
16747        Date("") should be an invalid date. For IE, Firefox and Chrome, Date("") is invalid date,
16748        which means isNaN(new Date("")) should return true.
16749        https://bugs.webkit.org/show_bug.cgi?id=43793
16750        Tests: fast/js/date-constructor.html
16751
16752        * runtime/JSGlobalData.cpp:
16753        (JSC::JSGlobalData::resetDateCache):
16754
167552010-08-11  Gavin Barraclough  <barraclough@apple.com>
16756
16757        Windows & !JIT build fix.
16758
16759        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16760        * JavaScriptCore.xcodeproj/project.pbxproj:
16761        * runtime/RegExp.cpp:
16762        (JSC::RegExp::match):
16763
167642010-08-11  Gavin Barraclough  <barraclough@apple.com>
16765
16766        Rubber stamp by sam weinig
16767
16768        Touch a file to stop the bot rolling a bit change out!
16769
16770        * runtime/UString.cpp:
16771        (JSC::UString::ascii):
16772
167732010-08-11  Kevin Ollivier  <kevino@theolliviers.com>
16774
16775        [wx] Build fix for wx and WebDOM bindings, add CString classes to the list of forwards.
16776
16777        * wtf/Forward.h:
16778
167792010-08-11  Gavin Barraclough  <barraclough@apple.com>
16780
16781        Rubber stamps by Darin Adler & Sam Weinig.
16782
16783        Bug 43867 - Some UString cleanup
16784
16785        Change JSC::UString data(), size(), and from(), to characters(), length(), and number() to match WTF::String.
16786        Move string concatenation methods to a new header to simplify down UString.h.  Remove is8Bit().
16787
16788        * API/JSClassRef.cpp:
16789        (OpaqueJSClass::~OpaqueJSClass):
16790        (OpaqueJSClass::className):
16791        * API/OpaqueJSString.cpp:
16792        (OpaqueJSString::create):
16793        * JavaScriptCore.exp:
16794        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
16795        * JavaScriptCore.xcodeproj/project.pbxproj:
16796        * bytecode/CodeBlock.cpp:
16797        (JSC::constantName):
16798        (JSC::idName):
16799        (JSC::CodeBlock::registerName):
16800        (JSC::regexpName):
16801        * bytecode/EvalCodeCache.h:
16802        (JSC::EvalCodeCache::get):
16803        * bytecompiler/NodesCodegen.cpp:
16804        (JSC::ResolveNode::emitBytecode):
16805        (JSC::FunctionCallResolveNode::emitBytecode):
16806        (JSC::ReadModifyResolveNode::emitBytecode):
16807        (JSC::processClauseList):
16808        * parser/ASTBuilder.h:
16809        (JSC::ASTBuilder::createRegex):
16810        * parser/ParserArena.h:
16811        (JSC::IdentifierArena::makeNumericIdentifier):
16812        * parser/SourceProvider.h:
16813        (JSC::UStringSourceProvider::data):
16814        (JSC::UStringSourceProvider::length):
16815        * profiler/Profiler.cpp:
16816        * runtime/Arguments.cpp:
16817        (JSC::Arguments::getOwnPropertySlot):
16818        (JSC::Arguments::getOwnPropertyNames):
16819        (JSC::Arguments::put):
16820        (JSC::Arguments::deleteProperty):
16821        * runtime/ArrayPrototype.cpp:
16822        (JSC::arrayProtoFuncToString):
16823        * runtime/DatePrototype.cpp:
16824        (JSC::formatLocaleDate):
16825        * runtime/ExceptionHelpers.cpp:
16826        * runtime/FunctionConstructor.cpp:
16827        * runtime/FunctionPrototype.cpp:
16828        (JSC::insertSemicolonIfNeeded):
16829        * runtime/Identifier.h:
16830        (JSC::Identifier::characters):
16831        (JSC::Identifier::length):
16832        * runtime/JSGlobalObjectFunctions.cpp:
16833        (JSC::decode):
16834        (JSC::parseInt):
16835        (JSC::parseFloat):
16836        (JSC::globalFuncEscape):
16837        (JSC::globalFuncUnescape):
16838        * runtime/JSNumberCell.cpp:
16839        (JSC::JSNumberCell::toString):
16840        * runtime/JSONObject.cpp:
16841        (JSC::gap):
16842        (JSC::Stringifier::appendQuotedString):
16843        (JSC::Stringifier::appendStringifiedValue):
16844        (JSC::Stringifier::indent):
16845        (JSC::Stringifier::unindent):
16846        (JSC::Walker::walk):
16847        * runtime/JSString.cpp:
16848        (JSC::JSString::replaceCharacter):
16849        (JSC::JSString::getIndexSlowCase):
16850        * runtime/JSString.h:
16851        (JSC::RopeBuilder::JSString):
16852        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
16853        (JSC::RopeBuilder::fiberCount):
16854        (JSC::jsSingleCharacterSubstring):
16855        (JSC::jsNontrivialString):
16856        (JSC::JSString::getIndex):
16857        (JSC::jsString):
16858        (JSC::jsStringWithFinalizer):
16859        (JSC::jsSubstring):
16860        (JSC::jsOwnedString):
16861        * runtime/JSStringBuilder.h:
16862        (JSC::JSStringBuilder::append):
16863        * runtime/LiteralParser.h:
16864        (JSC::LiteralParser::Lexer::Lexer):
16865        * runtime/NumberPrototype.cpp:
16866        (JSC::numberProtoFuncToString):
16867        (JSC::numberProtoFuncToFixed):
16868        (JSC::numberProtoFuncToExponential):
16869        (JSC::numberProtoFuncToPrecision):
16870        * runtime/NumericStrings.h:
16871        (JSC::NumericStrings::add):
16872        (JSC::NumericStrings::lookupSmallString):
16873        * runtime/Operations.h:
16874        (JSC::jsString):
16875        * runtime/RegExp.cpp:
16876        (JSC::RegExp::match):
16877        * runtime/RegExpCache.cpp:
16878        (JSC::RegExpCache::lookupOrCreate):
16879        (JSC::RegExpCache::create):
16880        * runtime/RegExpConstructor.cpp:
16881        (JSC::RegExpConstructor::getRightContext):
16882        * runtime/RegExpObject.cpp:
16883        (JSC::RegExpObject::match):
16884        * runtime/RegExpPrototype.cpp:
16885        (JSC::regExpProtoFuncToString):
16886        * runtime/StringBuilder.h:
16887        (JSC::StringBuilder::append):
16888        * runtime/StringConcatenate.h: Copied from JavaScriptCore/runtime/UString.h.
16889        (JSC::):
16890        (JSC::sumWithOverflow):
16891        (JSC::tryMakeString):
16892        (JSC::makeString):
16893        * runtime/StringObject.cpp:
16894        (JSC::StringObject::getOwnPropertyNames):
16895        * runtime/StringPrototype.cpp:
16896        (JSC::substituteBackreferencesSlow):
16897        (JSC::localeCompare):
16898        (JSC::jsSpliceSubstringsWithSeparators):
16899        (JSC::stringProtoFuncReplace):
16900        (JSC::stringProtoFuncCharAt):
16901        (JSC::stringProtoFuncCharCodeAt):
16902        (JSC::stringProtoFuncIndexOf):
16903        (JSC::stringProtoFuncLastIndexOf):
16904        (JSC::stringProtoFuncSlice):
16905        (JSC::stringProtoFuncSplit):
16906        (JSC::stringProtoFuncSubstr):
16907        (JSC::stringProtoFuncSubstring):
16908        (JSC::stringProtoFuncToLowerCase):
16909        (JSC::stringProtoFuncToUpperCase):
16910        (JSC::stringProtoFuncFontsize):
16911        (JSC::stringProtoFuncLink):
16912        (JSC::trimString):
16913        * runtime/UString.cpp:
16914        (JSC::UString::number):
16915        (JSC::UString::ascii):
16916        (JSC::UString::operator[]):
16917        (JSC::UString::toDouble):
16918        (JSC::UString::find):
16919        (JSC::UString::rfind):
16920        (JSC::UString::substr):
16921        (JSC::operator==):
16922        (JSC::operator<):
16923        (JSC::operator>):
16924        (JSC::UString::UTF8String):
16925        * runtime/UString.h:
16926        (JSC::UString::UString):
16927        (JSC::UString::adopt):
16928        (JSC::UString::length):
16929        (JSC::UString::characters):
16930        (JSC::UString::isNull):
16931        (JSC::UString::isEmpty):
16932        (JSC::UString::impl):
16933        (JSC::UString::cost):
16934        (JSC::operator==):
16935        (JSC::operator!=):
16936        (JSC::codePointCompare):
16937        (JSC::UString::toArrayIndex):
16938        (JSC::IdentifierRepHash::hash):
16939        (WTF::):
16940        * yarr/RegexJIT.cpp:
16941        (JSC::Yarr::jitCompileRegex):
16942        * yarr/RegexParser.h:
16943        (JSC::Yarr::Parser::Parser):
16944
169452010-08-11  Gabor Loki  <loki@webkit.org>
16946
16947        Qt build fix (ARMv7).
16948
16949        Fix invalid conversion from int to Condition.
16950        Add ARMv7Assembler.cpp to JavaScriptCore.pro.
16951
16952        * JavaScriptCore.pro:
16953        * assembler/ARMv7Assembler.h:
16954        (JSC::ARMv7Assembler::):
16955        (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
16956
169572010-08-11  Nathan Lawrence  <nlawrence@apple.com>
16958
16959        Reviewed by Geoffrey Garen.
16960
16961        At collection time, we frequently want to mark a cell, while checking
16962        whether it was originally checked.  Previously, this was a get
16963        operation follwed by a set operation.  Fusing the two saves
16964        computation and gives a 0.5% sunspider speedup.
16965
16966        * runtime/Collector.h:
16967        (JSC::CollectorBitmap::getset):
16968        (JSC::Heap::checkMarkCell):
16969        * runtime/JSArray.h:
16970        (JSC::MarkStack::drain):
16971        * runtime/JSCell.h:
16972        (JSC::MarkStack::append):
16973
169742010-08-11  Steve Falkenburg  <sfalken@apple.com>
16975
16976        Reviewed by Adam Roben.
16977
16978        Improve vsprops copying for Windows build
16979        https://bugs.webkit.org/show_bug.cgi?id=41982
16980
16981        When we detect a new SDK, always copy a new set of vsprops files.
16982        Previously, if someone updated their SDK after updating their sources,
16983        they could end up with out-of-date vsprops files.
16984
16985        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
16986
169872010-08-10  Darin Adler  <darin@apple.com>
16988
16989        Reviewed by Sam Weinig.
16990
16991        Add leakRef and clear to all RefPtr variants
16992        https://bugs.webkit.org/show_bug.cgi?id=42389
16993
16994        * API/JSRetainPtr.h: Changed all uses of "template <...>" to instead do
16995        "template<...>". We should probably put this in the style guide and do it
16996        consitently. Fixed other minor style issues. Defined many of the inlined
16997        functions outside the class definition, to avoid style checker warnings
16998        about multiple statements on a single line and for slightly better clarity
16999        of the class definition itself. Renamed releaseRef to leakRef. Added a
17000        releaseRef that calls leakRef so we don't have to rename all callers oat
17001        once. Added a clear function.
17002
17003        * wtf/PassRefPtr.h: Changed all uses of releaseRef to leakRef.
17004n
17005        * wtf/RefPtr.h: Changed all uses of "template <...>" to instead do
17006        "template<...>". Tidied up declarations and comments a bit.
17007         Changed all uses of releaseRef to leakRef.
17008
17009        * wtf/RetainPtr.h: Changed all uses of "template <...>" to instead do
17010        "template<...>". Defined many of the inlined functions outside the class
17011        definition, to avoid style checker warnings about multiple statements on
17012        a single line and for slightly better clarity of the class definition itself.
17013        Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
17014        don't have to rename all callers at once. Added a clear function.
17015
170162010-08-10  Dumitru Daniliuc  <dumi@chromium.org>
17017
17018        Unreviewed, reverting an unintentional change to a file submitted in r65108.
17019
17020        * bytecode/CodeBlock.h:
17021        (JSC::binaryChop):
17022
170232010-08-10  Gavin Barraclough  <barraclough@apple.com>
17024
17025        Rubber stamped by Sam Weinig
17026
17027        Bug 43817 - Remove UString::Rep
17028        UString::Rep has for a long time been replaced by UStringImpl (Rep
17029        remaining as a typedef).  UStringImpl has since been removed too
17030        (unified with StringImpl). Remove Rep, rename rep() to impl() and
17031        m_rep to m_impl.  Also add impl() method to Identifier, and rename
17032        its UString member from _ustring to m_string.
17033
17034        * API/JSCallbackObject.h:
17035        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
17036        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
17037        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
17038        * API/JSCallbackObjectFunctions.h:
17039        (JSC::::getOwnPropertySlot):
17040        (JSC::::put):
17041        (JSC::::deleteProperty):
17042        (JSC::::getOwnPropertyNames):
17043        (JSC::::staticValueGetter):
17044        (JSC::::staticFunctionGetter):
17045        * API/JSClassRef.cpp:
17046        (tryCreateStringFromUTF8):
17047        (OpaqueJSClass::OpaqueJSClass):
17048        (OpaqueJSClass::~OpaqueJSClass):
17049        (OpaqueJSClassContextData::OpaqueJSClassContextData):
17050        * API/JSClassRef.h:
17051        * API/OpaqueJSString.cpp:
17052        (OpaqueJSString::ustring):
17053        * bytecode/EvalCodeCache.h:
17054        (JSC::EvalCodeCache::get):
17055        * bytecode/JumpTable.h:
17056        (JSC::StringJumpTable::offsetForValue):
17057        (JSC::StringJumpTable::ctiForValue):
17058        * bytecompiler/BytecodeGenerator.cpp:
17059        (JSC::BytecodeGenerator::addVar):
17060        (JSC::BytecodeGenerator::addGlobalVar):
17061        (JSC::BytecodeGenerator::BytecodeGenerator):
17062        (JSC::BytecodeGenerator::addParameter):
17063        (JSC::BytecodeGenerator::registerFor):
17064        (JSC::BytecodeGenerator::willResolveToArguments):
17065        (JSC::BytecodeGenerator::uncheckedRegisterForArguments):
17066        (JSC::BytecodeGenerator::constRegisterFor):
17067        (JSC::BytecodeGenerator::isLocal):
17068        (JSC::BytecodeGenerator::isLocalConstant):
17069        (JSC::BytecodeGenerator::addConstant):
17070        (JSC::BytecodeGenerator::emitLoad):
17071        (JSC::BytecodeGenerator::findScopedProperty):
17072        (JSC::keyForCharacterSwitch):
17073        (JSC::prepareJumpTableForStringSwitch):
17074        * bytecompiler/BytecodeGenerator.h:
17075        * bytecompiler/NodesCodegen.cpp:
17076        (JSC::processClauseList):
17077        * interpreter/Interpreter.cpp:
17078        (JSC::Interpreter::privateExecute):
17079        * jit/JITStubs.cpp:
17080        (JSC::DEFINE_STUB_FUNCTION):
17081        * parser/JSParser.cpp:
17082        (JSC::JSParser::parseStrictObjectLiteral):
17083        * pcre/pcre_exec.cpp:
17084        (Histogram::add):
17085        * profiler/CallIdentifier.h:
17086        (JSC::CallIdentifier::Hash::hash):
17087        * profiler/Profile.cpp:
17088        * profiler/ProfileNode.cpp:
17089        (JSC::ProfileNode::debugPrintDataSampleStyle):
17090        * profiler/ProfileNode.h:
17091        * runtime/ArrayPrototype.cpp:
17092        (JSC::arrayProtoFuncToString):
17093        * runtime/Identifier.cpp:
17094        (JSC::Identifier::equal):
17095        (JSC::IdentifierCStringTranslator::hash):
17096        (JSC::IdentifierCStringTranslator::equal):
17097        (JSC::IdentifierCStringTranslator::translate):
17098        (JSC::Identifier::add):
17099        (JSC::IdentifierUCharBufferTranslator::hash):
17100        (JSC::IdentifierUCharBufferTranslator::equal):
17101        (JSC::IdentifierUCharBufferTranslator::translate):
17102        (JSC::Identifier::addSlowCase):
17103        * runtime/Identifier.h:
17104        (JSC::Identifier::Identifier):
17105        (JSC::Identifier::ustring):
17106        (JSC::Identifier::impl):
17107        (JSC::Identifier::data):
17108        (JSC::Identifier::size):
17109        (JSC::Identifier::ascii):
17110        (JSC::Identifier::isNull):
17111        (JSC::Identifier::isEmpty):
17112        (JSC::Identifier::toUInt32):
17113        (JSC::Identifier::toStrictUInt32):
17114        (JSC::Identifier::toArrayIndex):
17115        (JSC::Identifier::toDouble):
17116        (JSC::Identifier::equal):
17117        (JSC::Identifier::add):
17118        * runtime/InitializeThreading.cpp:
17119        (JSC::initializeThreadingOnce):
17120        * runtime/InternalFunction.cpp:
17121        (JSC::InternalFunction::displayName):
17122        * runtime/JSFunction.cpp:
17123        (JSC::JSFunction::displayName):
17124        * runtime/JSGlobalObject.h:
17125        (JSC::JSGlobalObject::addStaticGlobals):
17126        * runtime/JSStaticScopeObject.h:
17127        (JSC::JSStaticScopeObject::JSStaticScopeObject):
17128        * runtime/JSString.h:
17129        (JSC::):
17130        (JSC::RopeBuilder::appendStringInConstruct):
17131        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
17132        (JSC::jsSingleCharacterSubstring):
17133        (JSC::jsSubstring):
17134        * runtime/JSVariableObject.cpp:
17135        (JSC::JSVariableObject::deleteProperty):
17136        (JSC::JSVariableObject::symbolTableGet):
17137        * runtime/JSVariableObject.h:
17138        (JSC::JSVariableObject::symbolTableGet):
17139        (JSC::JSVariableObject::symbolTablePut):
17140        (JSC::JSVariableObject::symbolTablePutWithAttributes):
17141        * runtime/Lookup.cpp:
17142        (JSC::HashTable::createTable):
17143        (JSC::HashTable::deleteTable):
17144        * runtime/Lookup.h:
17145        (JSC::HashEntry::initialize):
17146        (JSC::HashEntry::setKey):
17147        (JSC::HashEntry::key):
17148        (JSC::HashTable::entry):
17149        * runtime/PropertyMapHashTable.h:
17150        (JSC::PropertyMapEntry::PropertyMapEntry):
17151        * runtime/PropertyNameArray.cpp:
17152        (JSC::PropertyNameArray::add):
17153        * runtime/PropertyNameArray.h:
17154        (JSC::PropertyNameArray::add):
17155        (JSC::PropertyNameArray::addKnownUnique):
17156        * runtime/RegExp.cpp:
17157        (JSC::RegExp::match):
17158        * runtime/RegExpCache.cpp:
17159        (JSC::RegExpCache::create):
17160        * runtime/RegExpKey.h:
17161        (JSC::RegExpKey::RegExpKey):
17162        * runtime/SmallStrings.cpp:
17163        (JSC::SmallStringsStorage::rep):
17164        (JSC::SmallStrings::singleCharacterStringRep):
17165        * runtime/SmallStrings.h:
17166        * runtime/StringPrototype.cpp:
17167        (JSC::jsSpliceSubstringsWithSeparators):
17168        (JSC::stringProtoFuncMatch):
17169        (JSC::stringProtoFuncSearch):
17170        * runtime/Structure.cpp:
17171        (JSC::Structure::~Structure):
17172        (JSC::Structure::despecifyDictionaryFunction):
17173        (JSC::Structure::addPropertyTransitionToExistingStructure):
17174        (JSC::Structure::addPropertyTransition):
17175        (JSC::Structure::copyPropertyTable):
17176        (JSC::Structure::get):
17177        (JSC::Structure::despecifyFunction):
17178        (JSC::Structure::put):
17179        (JSC::Structure::hasTransition):
17180        (JSC::Structure::remove):
17181        (JSC::Structure::checkConsistency):
17182        * runtime/Structure.h:
17183        (JSC::Structure::get):
17184        (JSC::Structure::hasTransition):
17185        * runtime/StructureTransitionTable.h:
17186        * runtime/SymbolTable.h:
17187        * runtime/UString.cpp:
17188        (JSC::UString::UString):
17189        (JSC::UString::toStrictUInt32):
17190        (JSC::UString::substr):
17191        * runtime/UString.h:
17192        (JSC::UString::UString):
17193        (JSC::UString::adopt):
17194        (JSC::UString::data):
17195        (JSC::UString::size):
17196        (JSC::UString::isNull):
17197        (JSC::UString::isEmpty):
17198        (JSC::UString::impl):
17199        (JSC::UString::cost):
17200        (JSC::operator==):
17201        (JSC::codePointCompare):
17202        (JSC::IdentifierRepHash::hash):
17203        (WTF::):
17204
172052010-08-10  Gavin Barraclough  <barraclough@apple.com>
17206
17207        Bug 43816 - Remove UStringImpl
17208        The class was actually removed a long time ago, replaced by StringImpl.
17209        UStringImpl is just a typedef onto StringImpl.  Remove this.
17210
17211        * API/JSClassRef.cpp:
17212        (OpaqueJSClass::OpaqueJSClass):
17213        * JavaScriptCore.xcodeproj/project.pbxproj:
17214        * runtime/JSString.cpp:
17215        (JSC::JSString::resolveRope):
17216        (JSC::JSString::replaceCharacter):
17217        * runtime/JSString.h:
17218        (JSC::RopeBuilder::RopeIterator::operator*):
17219        (JSC::RopeBuilder::JSString):
17220        (JSC::RopeBuilder::appendStringInConstruct):
17221        (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
17222        (JSC::jsSingleCharacterSubstring):
17223        (JSC::jsSubstring):
17224        * runtime/JSStringBuilder.h:
17225        (JSC::jsMakeNontrivialString):
17226        * runtime/RopeImpl.cpp:
17227        (JSC::RopeImpl::derefFibersNonRecursive):
17228        * runtime/RopeImpl.h:
17229        (JSC::RopeImpl::deref):
17230        * runtime/SmallStrings.cpp:
17231        (JSC::SmallStringsStorage::SmallStringsStorage):
17232        * runtime/StringConstructor.cpp:
17233        (JSC::stringFromCharCodeSlowCase):
17234        * runtime/StringPrototype.cpp:
17235        (JSC::jsSpliceSubstringsWithSeparators):
17236        (JSC::stringProtoFuncFontsize):
17237        (JSC::stringProtoFuncLink):
17238        * runtime/UString.cpp:
17239        (JSC::initializeUString):
17240        * runtime/UString.h:
17241        (JSC::UString::adopt):
17242        (JSC::tryMakeString):
17243        (JSC::makeString):
17244        * runtime/UStringImpl.h: Removed.
17245
172462010-08-10  Patrick Gansterer  <paroga@paroga.com>
17247
17248        Reviewed by Eric Seidel.
17249
17250        Make FastMalloc more portable.
17251        https://bugs.webkit.org/show_bug.cgi?id=41790
17252
17253        * wtf/FastMalloc.cpp:
17254        (WTF::TCMalloc_Central_FreeList::Populate):
17255        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
17256
172572010-08-10  Patrick Gansterer  <paroga@paroga.com>
17258
17259        Reviewed by David Levin.
17260
17261        [WINCE] Buildfix for CE 6.0
17262        https://bugs.webkit.org/show_bug.cgi?id=43027
17263
17264        CE 6.0 doesn't define localtime in the system include files.
17265
17266        * wtf/Platform.h: Include ce_time.h on all OS(WINCE).
17267
172682010-08-10  Gavin Barraclough  <barraclough@apple.com>
17269
17270        Rubber stamped by Sam Weinig.
17271
17272        Bug 43786 - Move AtomicStringHash from WebCore to WTF
17273        Also remove deprecated string headers from WebCore/platform/text.
17274
17275        * GNUmakefile.am:
17276        * JavaScriptCore.gypi:
17277        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
17278        * JavaScriptCore.xcodeproj/project.pbxproj:
17279        * wtf/text/AtomicString.h:
17280        * wtf/text/AtomicStringHash.h: Copied from WebCore/platform/text/AtomicStringHash.h.
17281
172822010-08-09  Oliver Hunt  <oliver@apple.com>
17283
17284        Fix Qt/ARM again, this time including the other changed file.
17285
17286        * jit/JIT.h:
17287
172882010-08-09  Oliver Hunt  <oliver@apple.com>
17289
17290        Fix Qt/ARM
17291
17292        C++ overload resolution I stab at thee
17293
17294        * jit/JITInlineMethods.h:
17295        (JSC::JIT::beginUninterruptedSequence):
17296        (JSC::JIT::endUninterruptedSequence):
17297
172982010-08-09  Oliver Hunt  <oliver@apple.com>
17299
17300        Reviewed by Gavin Barraclough.
17301
17302        Allow an assembler/macroassembler to compact branches to more concise forms when linking
17303        https://bugs.webkit.org/show_bug.cgi?id=43745
17304
17305        This patch makes it possible for an assembler to convert jumps into a different
17306        (presumably more efficient) form at link time.  Currently implemented in the
17307        ARMv7 JIT as that already had logic to delay linking of jumps until the end of
17308        compilation already.  The ARMv7 JIT chooses between either a 4 byte short jump
17309        or a full 32-bit offset (and rewrites ITTT instructions as appropriate), so does
17310        not yet produce the most compact form possible.  The general design of the linker
17311        should make it relatively simple to introduce new branch types with little effort,
17312        as the linker has no knowledge of the exact form of any of the branches.
17313
17314        * JavaScriptCore.xcodeproj/project.pbxproj:
17315        * assembler/ARMv7Assembler.cpp: Added.
17316        (JSC::):
17317          Record jump sizes
17318
17319        * assembler/ARMv7Assembler.h:
17320        (JSC::ARMv7Assembler::LinkRecord::LinkRecord):
17321        (JSC::ARMv7Assembler::LinkRecord::from):
17322        (JSC::ARMv7Assembler::LinkRecord::setFrom):
17323        (JSC::ARMv7Assembler::LinkRecord::to):
17324        (JSC::ARMv7Assembler::LinkRecord::type):
17325        (JSC::ARMv7Assembler::LinkRecord::linkType):
17326        (JSC::ARMv7Assembler::LinkRecord::setLinkType):
17327          Encapsulate LinkRecord fields so we can compress the values somewhat
17328
17329        (JSC::ARMv7Assembler::JmpSrc::JmpSrc):
17330          Need to record the jump type now
17331
17332        (JSC::ARMv7Assembler::b):
17333        (JSC::ARMv7Assembler::blx):
17334        (JSC::ARMv7Assembler::bx):
17335          Need to pass the jump types
17336
17337        (JSC::ARMv7Assembler::executableOffsetFor):
17338        (JSC::ARMv7Assembler::jumpSizeDelta):
17339        (JSC::ARMv7Assembler::linkRecordSourceComparator):
17340        (JSC::ARMv7Assembler::computeJumpType):
17341        (JSC::ARMv7Assembler::convertJumpTo):
17342        (JSC::ARMv7Assembler::recordLinkOffsets):
17343        (JSC::ARMv7Assembler::jumpsToLink):
17344        (JSC::ARMv7Assembler::link):
17345        (JSC::ARMv7Assembler::unlinkedCode):
17346          Helper functions for the linker
17347
17348        (JSC::ARMv7Assembler::linkJump):
17349        (JSC::ARMv7Assembler::canBeShortJump):
17350        (JSC::ARMv7Assembler::linkLongJump):
17351        (JSC::ARMv7Assembler::linkShortJump):
17352        (JSC::ARMv7Assembler::linkJumpAbsolute):
17353           Moving code around for the various jump linking functions
17354
17355        * assembler/AbstractMacroAssembler.h:
17356        (JSC::AbstractMacroAssembler::beginUninterruptedSequence):
17357        (JSC::AbstractMacroAssembler::endUninterruptedSequence):
17358          We have to track uninterrupted sequences in any assembler that compacts
17359          branches as that's not something we're allowed to do in such sequences.
17360          AbstractMacroAssembler has a nop version of these functions as it makes the
17361          code elsewhere nicer.
17362
17363        * assembler/LinkBuffer.h:
17364        (JSC::LinkBuffer::LinkBuffer):
17365        (JSC::LinkBuffer::link):
17366        (JSC::LinkBuffer::patch):
17367        (JSC::LinkBuffer::locationOf):
17368        (JSC::LinkBuffer::locationOfNearCall):
17369        (JSC::LinkBuffer::returnAddressOffset):
17370        (JSC::LinkBuffer::trampolineAt):
17371          Updated these functions to adjust for any changed offsets in the linked code
17372
17373        (JSC::LinkBuffer::applyOffset):
17374          A helper function to deal with the now potentially moved labels
17375
17376        (JSC::LinkBuffer::linkCode):
17377          The new and mighty linker function
17378
17379        * assembler/MacroAssemblerARMv7.h:
17380        (JSC::MacroAssemblerARMv7::MacroAssemblerARMv7):
17381        (JSC::MacroAssemblerARMv7::beginUninterruptedSequence):
17382        (JSC::MacroAssemblerARMv7::endUninterruptedSequence):
17383        (JSC::MacroAssemblerARMv7::jumpsToLink):
17384        (JSC::MacroAssemblerARMv7::unlinkedCode):
17385        (JSC::MacroAssemblerARMv7::computeJumpType):
17386        (JSC::MacroAssemblerARMv7::convertJumpTo):
17387        (JSC::MacroAssemblerARMv7::recordLinkOffsets):
17388        (JSC::MacroAssemblerARMv7::jumpSizeDelta):
17389        (JSC::MacroAssemblerARMv7::link):
17390        (JSC::MacroAssemblerARMv7::jump):
17391        (JSC::MacroAssemblerARMv7::branchMul32):
17392        (JSC::MacroAssemblerARMv7::breakpoint):
17393        (JSC::MacroAssemblerARMv7::nearCall):
17394        (JSC::MacroAssemblerARMv7::call):
17395        (JSC::MacroAssemblerARMv7::ret):
17396        (JSC::MacroAssemblerARMv7::tailRecursiveCall):
17397        (JSC::MacroAssemblerARMv7::executableOffsetFor):
17398        (JSC::MacroAssemblerARMv7::inUninterruptedSequence):
17399        (JSC::MacroAssemblerARMv7::makeJump):
17400        (JSC::MacroAssemblerARMv7::makeBranch):
17401           All branches need to pass on their type now
17402
17403        * jit/ExecutableAllocator.h:
17404        (JSC::ExecutablePool::returnLastBytes):
17405           We can't know ahead of time how much space will be necessary to
17406           hold the linked code if we're compacting branches, this new
17407           function allows us to return the unused bytes at the end of linking
17408
17409        * jit/JIT.cpp:
17410        (JSC::JIT::JIT):
17411        (JSC::JIT::privateCompile):
17412        * jit/JIT.h:
17413        (JSC::JIT::compile):
17414           The JIT class now needs to take a linker offset so that recompilation
17415           can generate the same jumps when using branch compaction.
17416        * jit/JITArithmetic32_64.cpp:
17417        (JSC::JIT::emitSlow_op_mod):
17418        * jit/JITOpcodes.cpp:
17419        (JSC::JIT::privateCompileCTIMachineTrampolines):
17420        * jit/JITOpcodes32_64.cpp:
17421        (JSC::JIT::privateCompileCTIMachineTrampolines):
17422        (JSC::JIT::privateCompileCTINativeCall):
17423          Update for new trampolineAt changes
17424
17425        * wtf/FastMalloc.cpp:
17426        (WTF::TCMallocStats::):
17427        * wtf/Platform.h:
17428
174292010-08-09  Gavin Barraclough  <barraclough@apple.com>
17430
17431        Qt build fix III.
17432
17433        * wtf/text/WTFString.h:
17434
174352010-08-09  Gavin Barraclough  <barraclough@apple.com>
17436
17437        Qt build fix.
17438
17439        * wtf/qt/StringQt.cpp:
17440
174412010-08-06  Gavin Barraclough  <barraclough@apple.com>
17442
17443        Rubber stamped by Sam Weinig
17444
17445        Bug 43594 - Add string forwards to Forward.h
17446        This allows us to remove forward declarations for these classes from
17447        WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
17448
17449        * JavaScriptCore.xcodeproj/project.pbxproj:
17450        * wtf/Forward.h:
17451
174522010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
17453
17454        Unreviewed, rolling out r64938.
17455        http://trac.webkit.org/changeset/64938
17456        https://bugs.webkit.org/show_bug.cgi?id=43685
17457
17458        Did not compile on several ports (Requested by abarth on
17459        #webkit).
17460
17461        * Android.mk:
17462        * CMakeLists.txt:
17463        * GNUmakefile.am:
17464        * JavaScriptCore.gypi:
17465        * JavaScriptCore.pro:
17466        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
17467        * JavaScriptCore.xcodeproj/project.pbxproj:
17468        * assembler/AbstractMacroAssembler.h:
17469        * assembler/MacroAssembler.h:
17470        * assembler/MacroAssemblerX86.h:
17471        (JSC::MacroAssemblerX86::load32):
17472        (JSC::MacroAssemblerX86::store32):
17473        * assembler/X86Assembler.h:
17474        (JSC::X86Assembler::movl_rm):
17475        (JSC::X86Assembler::movl_mr):
17476        * bytecode/CodeBlock.cpp:
17477        (JSC::CodeBlock::markAggregate):
17478        * bytecode/Instruction.h:
17479        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::):
17480        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
17481        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
17482        * bytecode/StructureStubInfo.cpp:
17483        (JSC::StructureStubInfo::deref):
17484        * bytecode/StructureStubInfo.h:
17485        (JSC::StructureStubInfo::initGetByIdProto):
17486        (JSC::StructureStubInfo::initGetByIdChain):
17487        (JSC::StructureStubInfo::):
17488        * jit/JIT.h:
17489        * jit/JITMarkObjects.cpp: Removed.
17490        * jit/JITPropertyAccess.cpp:
17491        (JSC::JIT::compileGetDirectOffset):
17492        (JSC::JIT::testPrototype):
17493        (JSC::JIT::privateCompilePutByIdTransition):
17494        (JSC::JIT::privateCompileGetByIdProto):
17495        (JSC::JIT::privateCompileGetByIdProtoList):
17496        (JSC::JIT::privateCompileGetByIdChainList):
17497        (JSC::JIT::privateCompileGetByIdChain):
17498        * jit/JITPropertyAccess32_64.cpp:
17499        (JSC::JIT::compileGetDirectOffset):
17500        (JSC::JIT::testPrototype):
17501        (JSC::JIT::privateCompilePutByIdTransition):
17502        (JSC::JIT::privateCompileGetByIdProto):
17503        (JSC::JIT::privateCompileGetByIdProtoList):
17504        (JSC::JIT::privateCompileGetByIdChainList):
17505        (JSC::JIT::privateCompileGetByIdChain):
17506        * jit/JITStubs.cpp:
17507        (JSC::setupPolymorphicProtoList):
17508        * wtf/Platform.h:
17509
175102010-08-07  Nathan Lawrence  <nlawrence@apple.com>
17511
17512        Reviewed by Geoffrey Garen.
17513
17514        The JIT code contains a number of direct references to GC'd objects.
17515        When we have movable objects, these references will need to be
17516        updated.
17517
17518        * Android.mk:
17519        * CMakeLists.txt:
17520        * GNUmakefile.am:
17521        * JavaScriptCore.gypi:
17522        * JavaScriptCore.pro:
17523        * JavaScriptCore.xcodeproj/project.pbxproj:
17524        * assembler/AbstractMacroAssembler.h:
17525        (JSC::AbstractMacroAssembler::int32AtLocation):
17526        (JSC::AbstractMacroAssembler::pointerAtLocation):
17527        (JSC::AbstractMacroAssembler::jumpTarget):
17528        * assembler/MacroAssembler.h:
17529        (JSC::MacroAssembler::loadPtrWithPatch):
17530            Normally, loadPtr will optimize when the register is eax.  Since
17531            the slightly smaller instruction changes the offsets, it messes up
17532            our ability to repatch the code.  We added this new instruction
17533            that garuntees a constant size.
17534        * assembler/MacroAssemblerX86.h:
17535        (JSC::MacroAssemblerX86::load32WithPatch):
17536            Changed load32 in the same way described above.
17537        (JSC::MacroAssemblerX86::load32):
17538            Moved the logic to optimize laod32 from movl_mr to load32
17539        (JSC::MacroAssemblerX86::store32):
17540            Moved the logic to optimize store32 from movl_rm to store32
17541        * assembler/X86Assembler.h:
17542        (JSC::X86Assembler::movl_rm):
17543        (JSC::X86Assembler::movl_mr):
17544        (JSC::X86Assembler::int32AtLocation):
17545        (JSC::X86Assembler::pointerAtLocation):
17546        (JSC::X86Assembler::jumpTarget):
17547        * bytecode/CodeBlock.cpp:
17548        (JSC::CodeBlock::markAggregate):
17549        * bytecode/Instruction.h:
17550            As described in StructureStubInfo.h, we needed to add additional
17551            fields to both StructureStubInfo and
17552            PolymorphicAccessStructureList so that we can determine the
17553            structure of the JITed code at patch time.
17554        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
17555        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
17556        * bytecode/StructureStubInfo.cpp:
17557        (JSC::StructureStubInfo::markAggregate):
17558            Added this function to mark the JITed code that correosponds to
17559            this structure stub info.
17560        * bytecode/StructureStubInfo.h:
17561        (JSC::StructureStubInfo::initGetByIdProto):
17562        (JSC::StructureStubInfo::initGetByIdChain):
17563        (JSC::StructureStubInfo::):
17564        * jit/JIT.h:
17565        * jit/JITMarkObjects.cpp: Added.
17566        (JSC::JIT::patchPrototypeStructureAddress):
17567        (JSC::JIT::patchGetDirectOffset):
17568        (JSC::JIT::markGetByIdProto):
17569        (JSC::JIT::markGetByIdChain):
17570        (JSC::JIT::markGetByIdProtoList):
17571        (JSC::JIT::markPutByIdTransition):
17572        (JSC::JIT::markGlobalObjectReference):
17573        * jit/JITPropertyAccess.cpp:
17574            Added asserts for the patch offsets.
17575        (JSC::JIT::compileGetDirectOffset):
17576        (JSC::JIT::testPrototype):
17577        (JSC::JIT::privateCompilePutByIdTransition):
17578        (JSC::JIT::privateCompileGetByIdProto):
17579        (JSC::JIT::privateCompileGetByIdProtoList):
17580        (JSC::JIT::privateCompileGetByIdChainList):
17581        (JSC::JIT::privateCompileGetByIdChain):
17582        * jit/JITPropertyAccess32_64.cpp:
17583        (JSC::JIT::compileGetDirectOffset):
17584        (JSC::JIT::testPrototype):
17585        (JSC::JIT::privateCompilePutByIdTransition):
17586        (JSC::JIT::privateCompileGetByIdProto):
17587        (JSC::JIT::privateCompileGetByIdProtoList):
17588        (JSC::JIT::privateCompileGetByIdChainList):
17589        (JSC::JIT::privateCompileGetByIdChain):
17590        * jit/JITStubs.cpp:
17591        (JSC::setupPolymorphicProtoList):
17592        * wtf/Platform.h:
17593            Added ENABLE_MOVABLE_GC_OBJECTS flag
17594
175952010-08-07  Michael Saboff  <msaboff@apple.com>
17596
17597        Reviewed by Geoffrey Garen.
17598
17599        Revert JSArray to point to the beginning of the contained ArrayStorage
17600        struct.  This is described in
17601        https://bugs.webkit.org/show_bug.cgi?id=43526.
17602
17603        * jit/JITPropertyAccess.cpp:
17604        (JSC::JIT::emit_op_get_by_val):
17605        (JSC::JIT::emit_op_put_by_val):
17606        (JSC::JIT::privateCompilePatchGetArrayLength):
17607        * jit/JITPropertyAccess32_64.cpp:
17608        (JSC::JIT::emit_op_get_by_val):
17609        (JSC::JIT::emit_op_put_by_val):
17610        (JSC::JIT::privateCompilePatchGetArrayLength):
17611        * runtime/JSArray.cpp:
17612        (JSC::JSArray::JSArray):
17613        (JSC::JSArray::~JSArray):
17614        (JSC::JSArray::getOwnPropertySlot):
17615        (JSC::JSArray::getOwnPropertyDescriptor):
17616        (JSC::JSArray::put):
17617        (JSC::JSArray::putSlowCase):
17618        (JSC::JSArray::deleteProperty):
17619        (JSC::JSArray::getOwnPropertyNames):
17620        (JSC::JSArray::getNewVectorLength):
17621        (JSC::JSArray::increaseVectorLength):
17622        (JSC::JSArray::increaseVectorPrefixLength):
17623        (JSC::JSArray::setLength):
17624        (JSC::JSArray::pop):
17625        (JSC::JSArray::push):
17626        (JSC::JSArray::shiftCount):
17627        (JSC::JSArray::unshiftCount):
17628        (JSC::JSArray::sortNumeric):
17629        (JSC::JSArray::sort):
17630        (JSC::JSArray::fillArgList):
17631        (JSC::JSArray::copyToRegisters):
17632        (JSC::JSArray::compactForSorting):
17633        (JSC::JSArray::subclassData):
17634        (JSC::JSArray::setSubclassData):
17635        (JSC::JSArray::checkConsistency):
17636        * runtime/JSArray.h:
17637        (JSC::JSArray::length):
17638        (JSC::JSArray::canGetIndex):
17639        (JSC::JSArray::getIndex):
17640        (JSC::JSArray::setIndex):
17641        (JSC::JSArray::uncheckedSetIndex):
17642        (JSC::JSArray::markChildrenDirect):
17643
176442010-08-07  Kwang Yul Seo  <skyul@company100.net>
17645
17646        Reviewed by Eric Seidel.
17647
17648        Add ENABLE(YARR) guard around JSGlobalData::m_regexAllocator
17649        https://bugs.webkit.org/show_bug.cgi?id=43399
17650
17651        m_regexAllocator is used only by RegExp::compile which is guarded with ENABLE(YARR).
17652
17653        * runtime/JSGlobalData.h:
17654
176552010-08-07  Patrick Roland Gansterer  <paroga@paroga.com>
17656
17657        Reviewed by Eric Seidel.
17658
17659        [Qt] Enable JIT on WinCE
17660        https://bugs.webkit.org/show_bug.cgi?id=43303
17661
17662        Add ExtraCompiler for generating GeneratedJITStubs_MSVC.asm.
17663
17664        * DerivedSources.pro:
17665
176662010-08-07  Dan Bernstein  <mitz@apple.com>
17667
17668        Reviewed by Anders Carlsson.
17669
17670        Created a separate SimpleFontData constructor exclusively for SVG fonts and moved the CTFontRef
17671        from SimpleFontData to FontPlatformData.
17672        https://bugs.webkit.org/show_bug.cgi?id=43674
17673
17674        * wtf/Platform.h: Moved definitions of WTF_USE_CORE_TEXT and WTF_USE_ATSUI here from WebCore/config.h.
17675
176762010-08-07  Zoltan Herczeg  <zherczeg@webkit.org>
17677
17678        Reviewed by Eric Seidel.
17679
17680        Bitmap.h has no default constructor
17681        https://bugs.webkit.org/show_bug.cgi?id=43619
17682
17683        Without a constructor, the initial bits of the Bitmap class
17684        are undefinied. If only a few, or zero bits are 0, the memory
17685        area provided by AlignedMemoryAllocator can be easly exhausted.
17686
17687        Csaba Osztrogonác helped to find this bug.
17688
17689        * wtf/Bitmap.h:
17690        (WTF::::Bitmap):
17691
176922010-08-06  Rafael Antognolli  <antognolli@profusion.mobi>
17693
17694        [EFL] Build fix.
17695
17696        * CMakeLists.txt: add runtime/CGHandle.cpp.
17697
176982010-08-06  Jessie Berlin  <jberlin@apple.com>
17699
17700        Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
17701        Unreviewed.
17702
17703        * JavaScriptCore.xcodeproj/project.pbxproj:
17704        * wtf/Forward.h:
17705
177062010-08-06  Jessie Berlin  <jberlin@apple.com>
17707
17708        Windows Build Fix (continued). Unreviewed.
17709
17710        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
17711
177122010-08-06  Jessie Berlin  <jberlin@apple.com>
17713
17714        Windows Build Fix. Unreviewed.
17715
17716        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
17717        Add GCHandle.h and GCHandle.cpp.
17718
177192010-08-06  Nathan Lawrence  <nlawrence@apple.com>
17720
17721        Reviewed by Geoffrey Garen.
17722
17723        https://bugs.webkit.org/show_bug.cgi?id=43207
17724
17725        WeakGCPtr's should instead of directly pointing to the GC'd object
17726        should be directed to an array of pointers that can be updated for
17727        movable objects.
17728
17729        * Android.mk:
17730        * GNUmakefile.am:
17731        * JavaScriptCore.exp:
17732        * JavaScriptCore.gypi:
17733        * JavaScriptCore.pro:
17734        * JavaScriptCore.xcodeproj/project.pbxproj:
17735        * runtime/Collector.cpp:
17736        (JSC::Heap::destroy):
17737        (JSC::Heap::allocateBlock):
17738        (JSC::Heap::freeBlock):
17739        (JSC::Heap::updateWeakGCHandles):
17740        (JSC::WeakGCHandlePool::update):
17741        (JSC::Heap::addWeakGCHandle):
17742        (JSC::Heap::markRoots):
17743        * runtime/Collector.h:
17744        (JSC::Heap::weakGCHandlePool):
17745        * runtime/GCHandle.cpp: Added.
17746        (JSC::WeakGCHandle::pool):
17747        (JSC::WeakGCHandlePool::WeakGCHandlePool):
17748        (JSC::WeakGCHandlePool::allocate):
17749        (JSC::WeakGCHandlePool::free):
17750        (JSC::WeakGCHandlePool::operator new):
17751        * runtime/GCHandle.h: Added.
17752        (JSC::WeakGCHandle::isValidPtr):
17753        (JSC::WeakGCHandle::isPtr):
17754        (JSC::WeakGCHandle::isNext):
17755        (JSC::WeakGCHandle::invalidate):
17756        (JSC::WeakGCHandle::get):
17757        (JSC::WeakGCHandle::set):
17758        (JSC::WeakGCHandle::getNextInFreeList):
17759        (JSC::WeakGCHandle::setNextInFreeList):
17760        (JSC::WeakGCHandlePool::isFull):
17761        * runtime/WeakGCPtr.h:
17762        (JSC::WeakGCPtr::WeakGCPtr):
17763        (JSC::WeakGCPtr::~WeakGCPtr):
17764        (JSC::WeakGCPtr::get):
17765        (JSC::WeakGCPtr::clear):
17766        (JSC::WeakGCPtr::assign):
17767        (JSC::get):
17768
177692010-08-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
17770
17771        Reviewed by Antonio Gomes.
17772
17773        [Qt] Fix warnings about difference in symbol visiblity on Mac OS X
17774
17775        * jsc.pro:
17776
177772010-08-06  Zoltan Herczeg  <zherczeg@webkit.org>
17778
17779        Reviewed by Darin Adler.
17780
17781        Refactor identifier parsing in lexer
17782        https://bugs.webkit.org/show_bug.cgi?id=41845
17783
17784        The code is refactored to avoid gotos. The new code
17785        has the same performance as the old one.
17786
17787        SunSpider --parse-only: no change (from 34.0ms to 33.6ms)
17788        SunSpider: no change (from 523.2ms to 523.5ms)
17789
17790        * parser/Lexer.cpp:
17791        (JSC::Lexer::parseIdent):
17792        (JSC::Lexer::lex):
17793        * parser/Lexer.h:
17794
177952010-08-06  Gabor Loki  <loki@webkit.org>
17796
17797        Reviewed by Gavin Barraclough.
17798
17799        The ARM JIT does not support JSValue32_64 with RVCT
17800        https://bugs.webkit.org/show_bug.cgi?id=43411
17801
17802        JSValue32_64 is enabled for RVCT by default.
17803
17804        * create_jit_stubs:
17805        * jit/JITStubs.cpp:
17806        (JSC::ctiTrampoline):
17807        (JSC::ctiVMThrowTrampoline):
17808        (JSC::ctiOpThrowNotCaught):
17809        * wtf/Platform.h:
17810
178112010-08-05  Chao-ying Fu  <fu@mips.com>
17812
17813        Reviewed by Darin Adler.
17814
17815        Define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER for MIPS
17816        https://bugs.webkit.org/show_bug.cgi?id=43514
17817
17818        MIPS needs to define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER, so that
17819        RenderArena::allocate() can return 8-byte aligned memory to avoid
17820        exceptions on sdc1/ldc1.
17821
17822        * wtf/Platform.h:
17823
178242010-08-05  Gavin Barraclough  <barraclough@apple.com>
17825
17826        Rubber stamped by Sam Weinig
17827
17828        Bug 43594 - Add string forwards to Forward.h
17829        This allows us to remove forward declarations for these classes from
17830        WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
17831
17832        * JavaScriptCore.xcodeproj/project.pbxproj:
17833        * wtf/Forward.h:
17834
178352010-08-05  Geoffrey Garen  <ggaren@apple.com>
17836
17837        Reviewed by Mark Rowe.
17838
17839        Fixed leak seen on buildbot.
17840
17841        * runtime/GCActivityCallbackCF.cpp:
17842        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
17843        (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
17844        (JSC::DefaultGCActivityCallback::operator()): Make out timer a RetainPtr,
17845        since anything less would be uncivilized.
17846
178472010-08-05  Andy Estes  <aestes@apple.com>
17848
17849        Reviewed by David Kilzer.
17850
17851        Rename iOS-related OS and PLATFORM macros.
17852        https://bugs.webkit.org/show_bug.cgi?id=43493
17853        
17854        Rename WTF_OS_IPHONE_OS to WTF_OS_IOS, WTF_PLATFORM_IPHONE to
17855        WTF_PLATFORM_IOS, and WTF_PLATFORM_IPHONE_SIMULATOR to
17856        WTF_PLATFORM_IOS_SIMULATOR.
17857
17858        * jit/ExecutableAllocator.h:
17859        * jit/JITStubs.cpp:
17860        * profiler/ProfilerServer.mm:
17861        (-[ProfilerServer init]):
17862        * wtf/FastMalloc.cpp:
17863        (WTF::TCMallocStats::):
17864        * wtf/Platform.h:
17865        * wtf/unicode/icu/CollatorICU.cpp:
17866        (WTF::Collator::userDefault):
17867
178682010-08-05  Nathan Lawrence  <nlawrence@apple.com>
17869
17870        Reviewed by Darin Adler.
17871
17872        https://bugs.webkit.org/show_bug.cgi?id=43464
17873
17874        Currently, the global object is being embedded in the JavaScriptCore
17875        bytecode, however since the global object is the same for all opcodes
17876        in a code block, we can have the global object just be a member of the
17877        associated code block.
17878
17879        Additionally, I added an assert inside of emitOpcode that verifies
17880        that the last generated opcode was of the correct length.
17881
17882        * bytecode/CodeBlock.cpp:
17883        (JSC::CodeBlock::CodeBlock):
17884        (JSC::CodeBlock::derefStructures):
17885        (JSC::CodeBlock::markAggregate):
17886        * bytecode/CodeBlock.h:
17887        (JSC::CodeBlock::globalObject):
17888        (JSC::GlobalCodeBlock::GlobalCodeBlock):
17889        (JSC::ProgramCodeBlock::ProgramCodeBlock):
17890        (JSC::EvalCodeBlock::EvalCodeBlock):
17891        (JSC::FunctionCodeBlock::FunctionCodeBlock):
17892        * bytecode/Opcode.h:
17893        (JSC::opcodeLength):
17894        * bytecompiler/BytecodeGenerator.cpp:
17895        (JSC::BytecodeGenerator::BytecodeGenerator):
17896        (JSC::BytecodeGenerator::emitOpcode):
17897            Added an assert to check that the last generated opcode is the
17898            correct length.
17899        (JSC::BytecodeGenerator::rewindBinaryOp):
17900            Changed the last opcode to op_end since the length will no longer
17901            be correct.
17902        (JSC::BytecodeGenerator::rewindUnaryOp):
17903            Changed the last opcode to op_end since the length will no longer
17904            be correct.
17905        (JSC::BytecodeGenerator::emitResolve):
17906        (JSC::BytecodeGenerator::emitGetScopedVar):
17907        (JSC::BytecodeGenerator::emitPutScopedVar):
17908        (JSC::BytecodeGenerator::emitResolveWithBase):
17909        * bytecompiler/BytecodeGenerator.h:
17910        * interpreter/Interpreter.cpp:
17911        (JSC::Interpreter::resolveGlobal):
17912        (JSC::Interpreter::resolveGlobalDynamic):
17913        (JSC::Interpreter::privateExecute):
17914        * jit/JITOpcodes.cpp:
17915        (JSC::JIT::emit_op_get_global_var):
17916        (JSC::JIT::emit_op_put_global_var):
17917        (JSC::JIT::emit_op_resolve_global):
17918        (JSC::JIT::emitSlow_op_resolve_global):
17919        (JSC::JIT::emit_op_resolve_global_dynamic):
17920        (JSC::JIT::emitSlow_op_resolve_global_dynamic):
17921        * jit/JITOpcodes32_64.cpp:
17922        (JSC::JIT::emit_op_get_global_var):
17923        (JSC::JIT::emit_op_put_global_var):
17924        (JSC::JIT::emit_op_resolve_global):
17925        (JSC::JIT::emitSlow_op_resolve_global):
17926        * jit/JITStubs.cpp:
17927        (JSC::cti_op_resolve_global):
17928        * runtime/Executable.cpp:
17929        (JSC::FunctionExecutable::compileForCallInternal):
17930        (JSC::FunctionExecutable::compileForConstructInternal):
17931        (JSC::FunctionExecutable::reparseExceptionInfo):
17932
179332010-08-05  Gavin Barraclough  <barraclough@apple.com>
17934
17935        Reviewed by Sam Weinig.
17936
17937        Bug 43185 - Switch RegisterFile over to use PageAllocation
17938
17939        Remove platform-specific memory allocation code.
17940
17941        * interpreter/RegisterFile.cpp:
17942        (JSC::RegisterFile::~RegisterFile):
17943        (JSC::RegisterFile::releaseExcessCapacity):
17944        * interpreter/RegisterFile.h:
17945        (JSC::RegisterFile::RegisterFile):
17946        (JSC::RegisterFile::grow):
17947        (JSC::RegisterFile::checkAllocatedOkay):
17948        * wtf/PageAllocation.cpp:
17949        (WTF::PageAllocation::lastError):
17950        * wtf/PageAllocation.h:
17951        (WTF::PageAllocation::allocate):
17952        (WTF::PageAllocation::allocateAt):
17953        (WTF::PageAllocation::allocateAligned):
17954        (WTF::PageAllocation::pageSize):
17955        (WTF::PageAllocation::isPageAligned):
17956        (WTF::PageAllocation::isPowerOfTwo):
17957        * wtf/PageReservation.h:
17958        (WTF::PageReservation::commit):
17959        (WTF::PageReservation::decommit):
17960        (WTF::PageReservation::reserve):
17961        (WTF::PageReservation::reserveAt):
17962
179632010-08-05  Michael Saboff  <msaboff@apple.com>
17964
17965        Reviewed by Darin Adler.
17966
17967        Fixed https://bugs.webkit.org/show_bug.cgi?id=43401 where array 
17968        content aren't properly initialized as part of unshift.  
17969
17970        * runtime/JSArray.cpp:
17971        (JSC::JSArray::unshiftCount):
17972
179732010-08-05  Jian Li  <jianli@chromium.org>
17974
17975        Reviewed by David Levin.
17976
17977        Unify blob related feature defines to ENABLE(BLOB).
17978        https://bugs.webkit.org/show_bug.cgi?id=43081
17979
17980        * Configurations/FeatureDefines.xcconfig:
17981
179822010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
17983
17984        Rubber-stamped by Xan Lopez.
17985
17986        Remove GHashTable left-overs. GHashTable is ref-counted, and is
17987        correctly supported by GRefPtr.
17988
17989        * wtf/gobject/GOwnPtr.h:
17990
179912010-08-05  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
17992
17993        Unreviewed.
17994
17995        Typo fix that makes distcheck happy.
17996
17997        * GNUmakefile.am:
17998
179992010-08-03  Geoffrey Garen  <ggaren@apple.com>
18000
18001        Reviewed by Oliver Hunt and Beth Dakin.
18002
18003        https://bugs.webkit.org/show_bug.cgi?id=43461
18004        Invalid NaN parsing
18005        
18006        * wtf/dtoa.cpp: Turn off the dtoa feature that allows you to specify a
18007        non-standard NaN representation, since our NaN encoding assumes that all
18008        true NaNs have the standard bit pattern.
18009
18010        * API/JSValueRef.cpp:
18011        (JSValueMakeNumber): Don't allow an API client to accidentally specify
18012        a non-standard NaN either.
18013
180142010-08-04  Gavin Barraclough  <barraclough@apple.com>
18015
18016        Windows build fix part II.
18017
18018        * wtf/PageReservation.h:
18019        (WTF::PageReservation::systemReserve):
18020
180212010-08-04  Gavin Barraclough  <barraclough@apple.com>
18022
18023        Windows build fix.
18024
18025        * wtf/PageReservation.h:
18026        (WTF::PageReservation::systemReserve):
18027
180282010-08-04  Gavin Barraclough  <barraclough@apple.com>
18029
18030        Build fix - add new header to !Mac projects.
18031
18032        * GNUmakefile.am:
18033        * JavaScriptCore.gypi:
18034        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
18035
180362010-08-04  Gavin Barraclough  <barraclough@apple.com>
18037
18038        Reviewed by Sam Weinig.
18039
18040        Bug 43515 - Fix small design issues with PageAllocation, split out PageReservation.
18041
18042        The PageAllocation class has a number of issues:
18043        * Changes in bug #43269 accidentally switched SYMBIAN over to use malloc/free to allocate
18044          blocks of memory for the GC heap, instead of allocating RChunks.  Revert this change in
18045          behaviour.
18046        * In order for PageAllocation to work correctly on WinCE we should be decommitting memory
18047          before deallocating.  In order to simplify understanding the expected state at deallocate,
18048          split behaviour out into PageAllocation and PageReservation classes.  Require that all
18049          memory be decommitted before calling deallocate on a PageReservation, add asserts to
18050          enforce this.
18051        * add many missing asserts.
18052        * inline more functions.
18053        * remove ability to create sub-PageAllocations from an existing PageAllocations object -
18054          this presented an interface that would allow sub regions to be deallocated, which would
18055          not have provided expected behaviour.
18056        * remove writable/executable arguments to commit, this value can be cached at the point
18057          the memory is reserved.
18058        * remove writable/executable arguments to allocateAligned, protection other than RW is not
18059          supported.
18060        * add missing checks for overflow & failed allocation to mmap path through allocateAligned.
18061
18062        * JavaScriptCore.xcodeproj/project.pbxproj:
18063        * jit/ExecutableAllocator.cpp:
18064        (JSC::ExecutableAllocator::intializePageSize):
18065        * jit/ExecutableAllocator.h:
18066        (JSC::ExecutablePool::Allocation::Allocation):
18067        (JSC::ExecutablePool::Allocation::base):
18068        (JSC::ExecutablePool::Allocation::size):
18069        (JSC::ExecutablePool::Allocation::operator!):
18070        * jit/ExecutableAllocatorFixedVMPool.cpp:
18071        (JSC::FixedVMPoolAllocator::reuse):
18072        (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
18073        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
18074        (JSC::FixedVMPoolAllocator::alloc):
18075        (JSC::FixedVMPoolAllocator::free):
18076        (JSC::FixedVMPoolAllocator::allocInternal):
18077        * runtime/AlignedMemoryAllocator.h:
18078        (JSC::::allocate):
18079        (JSC::::AlignedMemoryAllocator):
18080        * runtime/Collector.cpp:
18081        (JSC::Heap::allocateBlock):
18082        * runtime/Collector.h:
18083        * wtf/PageAllocation.cpp:
18084        * wtf/PageAllocation.h:
18085        (WTF::PageAllocation::operator!):
18086        (WTF::PageAllocation::allocate):
18087        (WTF::PageAllocation::allocateAt):
18088        (WTF::PageAllocation::allocateAligned):
18089        (WTF::PageAllocation::deallocate):
18090        (WTF::PageAllocation::pageSize):
18091        (WTF::PageAllocation::systemAllocate):
18092        (WTF::PageAllocation::systemAllocateAt):
18093        (WTF::PageAllocation::systemAllocateAligned):
18094        (WTF::PageAllocation::systemDeallocate):
18095        (WTF::PageAllocation::systemPageSize):
18096        * wtf/PageReservation.h: Copied from JavaScriptCore/wtf/PageAllocation.h.
18097        (WTF::PageReservation::PageReservation):
18098        (WTF::PageReservation::commit):
18099        (WTF::PageReservation::decommit):
18100        (WTF::PageReservation::reserve):
18101        (WTF::PageReservation::reserveAt):
18102        (WTF::PageReservation::deallocate):
18103        (WTF::PageReservation::systemCommit):
18104        (WTF::PageReservation::systemDecommit):
18105        (WTF::PageReservation::systemReserve):
18106        (WTF::PageReservation::systemReserveAt):
18107        * wtf/Platform.h:
18108
181092010-08-04  Sheriff Bot  <webkit.review.bot@gmail.com>
18110
18111        Unreviewed, rolling out r64655.
18112        http://trac.webkit.org/changeset/64655
18113        https://bugs.webkit.org/show_bug.cgi?id=43496
18114
18115        JavaScriptCore references patch seems to have caused
18116        regressions in QT and GTK builds (Requested by nlawrence on
18117        #webkit).
18118
18119        * bytecode/CodeBlock.cpp:
18120        (JSC::CodeBlock::markAggregate):
18121        * runtime/Collector.cpp:
18122        (JSC::Heap::markConservatively):
18123        * runtime/JSCell.h:
18124        (JSC::JSValue::asCell):
18125        (JSC::MarkStack::append):
18126        * runtime/JSGlobalObject.cpp:
18127        (JSC::markIfNeeded):
18128        * runtime/JSONObject.cpp:
18129        (JSC::Stringifier::Holder::object):
18130        * runtime/JSObject.h:
18131        (JSC::JSObject::prototype):
18132        * runtime/JSStaticScopeObject.cpp:
18133        (JSC::JSStaticScopeObject::markChildren):
18134        * runtime/JSValue.h:
18135        (JSC::JSValue::):
18136        (JSC::JSValue::JSValue):
18137        (JSC::JSValue::asCell):
18138        * runtime/MarkStack.h:
18139        * runtime/NativeErrorConstructor.cpp:
18140        * runtime/NativeErrorConstructor.h:
18141        * runtime/Structure.h:
18142        (JSC::Structure::storedPrototype):
18143
181442010-08-04  Gavin Barraclough  <barraclough@apple.com>
18145
18146        Rubber stamped by Sam Weinig.
18147
18148        Enable JSVALUE64 for CPU(PPC64).
18149        Basic browsing seems to work.
18150
18151        * wtf/Platform.h:
18152
181532010-08-04  Nathan Lawrence  <nlawrence@apple.com>
18154
18155        Reviewed by Darin Adler.
18156
18157        Refactoring MarkStack::append to take a reference.  This is in
18158        preparation for movable objects when we will need to update pointers.
18159        http://bugs.webkit.org/show_bug.cgi?id=41177
18160
18161        Unless otherwise noted, all changes are to either return by reference
18162        or pass a reference to MarkStack::append.
18163
18164        * bytecode/CodeBlock.cpp:
18165        (JSC::CodeBlock::markAggregate):
18166        * runtime/Collector.cpp:
18167        (JSC::Heap::markConservatively):
18168            Added a temporary variable to prevent marking from changing an
18169            unknown value on the stack
18170        * runtime/JSCell.h:
18171        (JSC::JSValue::asCell):
18172        (JSC::MarkStack::append):
18173        (JSC::MarkStack::appendInternal):
18174        * runtime/JSGlobalObject.cpp:
18175        (JSC::markIfNeeded):
18176        * runtime/JSONObject.cpp:
18177        (JSC::Stringifier::Holder::object):
18178        * runtime/JSObject.h:
18179        (JSC::JSObject::prototype):
18180        * runtime/JSStaticScopeObject.cpp:
18181        (JSC::JSStaticScopeObject::markChildren):
18182        * runtime/JSValue.h:
18183        (JSC::JSValue::JSValue):
18184        (JSC::JSValue::asCell):
18185        * runtime/MarkStack.h:
18186        * runtime/NativeErrorConstructor.cpp:
18187        (JSC::NativeErrorConstructor::createStructure):
18188            Changed the structure flags to include a custom markChildren.
18189        (JSC::NativeErrorConstructor::markChildren):
18190            Update the prototype of the stored structure.
18191        * runtime/NativeErrorConstructor.h:
18192            Added structure flags.
18193        * runtime/Structure.h:
18194        (JSC::Structure::storedPrototype):
18195
181962010-08-03  Nathan Lawrence  <nlawrence@apple.com>
18197
18198        Reviewed by Oliver Hunt.
18199
18200        Tightened up some get_by_id_chain* code generation
18201        https://bugs.webkit.org/show_bug.cgi?id=40935
18202
18203        This is in the style of
18204        https://bugs.webkit.org/show_bug.cgi?id=30539, and changed code to
18205        call accessor functions when it was not necessary to directly access
18206        the private variables.
18207
18208        * jit/JIT.h:
18209        * jit/JITPropertyAccess.cpp:
18210        (JSC::JIT::compileGetDirectOffset):
18211        (JSC::JIT::testPrototype):
18212        (JSC::JIT::privateCompilePutByIdTransition):
18213        (JSC::JIT::privateCompileGetByIdChainList):
18214        (JSC::JIT::privateCompileGetByIdChain):
18215        * jit/JITPropertyAccess32_64.cpp:
18216        (JSC::JIT::testPrototype):
18217        (JSC::JIT::privateCompilePutByIdTransition):
18218        (JSC::JIT::privateCompileGetByIdChainList):
18219        (JSC::JIT::privateCompileGetByIdChain):
18220
182212010-08-03  Adam Roben  <aroben@apple.com>
18222
18223        Turn on PLATFORM_STRATEGIES on Windows
18224
18225        Fixes <http://webkit.org/b/43431>.
18226
18227        Reviewed by Anders Carlsson.
18228
18229        * wtf/Platform.h:
18230
182312010-08-04  Gabor Loki  <loki@webkit.org>
18232
18233        Reviewed by Geoffrey Garen.
18234
18235        Enable JSValue32_64 for GCC on ARM by default
18236        https://bugs.webkit.org/show_bug.cgi?id=43410
18237
18238        * wtf/Platform.h:
18239
182402010-08-03  Gavin Barraclough  <barraclough@apple.com>
18241
18242        Speculative windows build fix.
18243
18244        * wtf/Bitmap.h:
18245
182462010-08-03  Gavin Barraclough  <barraclough@apple.com>
18247
18248        Build fix following r64624.
18249
18250        * JavaScriptCore.xcodeproj/project.pbxproj:
18251        * wtf/PageAllocation.h:
18252
182532010-08-03  Nathan Lawrence  <nlawrence@apple.com>
18254
18255        Reviewed by Gavin Barraclough.
18256
18257        https://bugs.webkit.org/show_bug.cgi?id=43269
18258
18259        Added new allocateAligned methods to PageAllocation.  In order to
18260        prevent a regress in performance, the function needs to be inlined.
18261
18262        Additionally, I ported the symbian block allocator to use
18263        PageAllocation and added a new WTF::Bitmap class to support this.
18264
18265        * GNUmakefile.am:
18266        * JavaScriptCore.gypi:
18267        * JavaScriptCore.xcodeproj/project.pbxproj:
18268        * runtime/AlignedMemoryAllocator.h: Added.
18269        (JSC::AlignedMemory::deallocate):
18270        (JSC::AlignedMemory::base):
18271        (JSC::AlignedMemory::AlignedMemory):
18272        (JSC::AlignedMemoryAllocator::destroy):
18273        (JSC::AlignedMemoryAllocator::allocate):
18274        (JSC::AlignedMemoryAllocator::AlignedMemoryAllocator):
18275        (JSC::AlignedMemoryAllocator::~AlignedMemoryAllocator):
18276        (JSC::AlignedMemoryAllocator::free):
18277        * runtime/Collector.cpp:
18278        (JSC::Heap::Heap):
18279        (JSC::Heap::destroy):
18280        (JSC::Heap::allocateBlock):
18281        (JSC::Heap::freeBlock):
18282        (JSC::Heap::freeBlocks):
18283        (JSC::Heap::allocate):
18284        (JSC::Heap::shrinkBlocks):
18285        (JSC::Heap::markConservatively):
18286        (JSC::Heap::clearMarkBits):
18287        (JSC::Heap::markedCells):
18288        * runtime/Collector.h:
18289        (JSC::CollectorHeap::collectorBlock):
18290        * runtime/CollectorHeapIterator.h:
18291        (JSC::CollectorHeapIterator::operator*):
18292        (JSC::LiveObjectIterator::operator++):
18293        (JSC::DeadObjectIterator::operator++):
18294        * wtf/Bitmap.h: Added.
18295        (WTF::Bitmap::get):
18296        (WTF::Bitmap::set):
18297        (WTF::Bitmap::clear):
18298        (WTF::Bitmap::clearAll):
18299        (WTF::Bitmap::advanceToNextFreeBit):
18300        (WTF::Bitmap::count):
18301        (WTF::Bitmap::isEmpty):
18302        (WTF::Bitmap::isFull):
18303        * wtf/PageAllocation.h:
18304        (WTF::PageAllocation::operator UnspecifiedBoolType):
18305        (WTF::PageAllocation::allocateAligned):
18306        (WTF::PageAllocation::reserveAligned):
18307        * wtf/Platform.h:
18308        * wtf/symbian: Removed.
18309        * wtf/symbian/BlockAllocatorSymbian.cpp: Removed.
18310        * wtf/symbian/BlockAllocatorSymbian.h: Removed.
18311
183122010-08-03  Michael Saboff  <msaboff@apple.com>
18313
18314        Reviewed by Gavin Barraclough.
18315
18316        Fix for https://bugs.webkit.org/show_bug.cgi?id=43314.  The prior code
18317        was using the wrong "length" value to move array contents when adding
18318        space to the beginning of an array for an unshift() or similar
18319        operation.  Instead of using m_vectorLength, the length of the
18320        allocated JSValue array, the code was using m_length, the declared
18321        length of the array.  These two values do not need to match.
18322
18323        * JavaScriptCore.xcodeproj/project.pbxproj:
18324        * runtime/JSArray.cpp:
18325        (JSC::JSArray::increaseVectorPrefixLength):
18326
183272010-08-03  Chao-ying Fu  <fu@mips.com>
18328
18329        Reviewed by Gavin Barraclough.
18330
18331        Fix following https://bugs.webkit.org/show_bug.cgi?id=43089
18332        (accidentally inverted a compiler version check).
18333
18334        * jit/ExecutableAllocator.h:
18335        (JSC::ExecutableAllocator::cacheFlush):
18336
183372010-08-03  Patrick Gansterer  <paroga@paroga.com>
18338
18339        Reviewed by Gavin Barraclough.
18340
18341        Implement DEFINE_STUB_FUNCTION for WinCE.
18342        https://bugs.webkit.org/show_bug.cgi?id=34953
18343
18344        * jit/JITStubs.cpp:
18345        (JSC::):
18346        (JSC::DEFINE_STUB_FUNCTION):
18347
183482010-08-02  Gavin Barraclough  <barraclough@apple.com>
18349
18350        Reviewed by Oliver Hunt.
18351
18352        Bug 43390 - Do not CRASH if we run out of room for jit code.
18353
18354        Change the ExecutableAllocator implementations not to crash, and to return 0 if memory cannot be allocated.
18355        The assemblers should pass this through without trying to use it in executableCopy.
18356        Change the LinkBuffer to handle this, and to provide an allocationSuccessful() method to test for this.
18357
18358        Change the JIT to throw an exception if allocation fails.
18359        Make JIT optimizations fail gracefully if memory cannot be allocated (use non-optimized path).
18360        Change YARR JIT to fallback to PCRE 
18361
18362        * assembler/ARMAssembler.cpp:
18363        (JSC::ARMAssembler::executableCopy):
18364        * assembler/ARMv7Assembler.h:
18365        (JSC::ARMv7Assembler::executableCopy):
18366        * assembler/LinkBuffer.h:
18367        (JSC::LinkBuffer::allocationSuccessful):
18368        * assembler/MIPSAssembler.h:
18369        (JSC::MIPSAssembler::executableCopy):
18370        * assembler/X86Assembler.h:
18371        (JSC::X86Assembler::executableCopy):
18372        * bytecode/StructureStubInfo.h:
18373        (JSC::StructureStubInfo::initGetByIdProto):
18374        (JSC::StructureStubInfo::initGetByIdChain):
18375        (JSC::StructureStubInfo::initGetByIdSelfList):
18376        (JSC::StructureStubInfo::initGetByIdProtoList):
18377        (JSC::StructureStubInfo::initPutByIdTransition):
18378        * jit/ExecutableAllocator.cpp:
18379        (JSC::ExecutablePool::systemAlloc):
18380        * jit/ExecutableAllocatorFixedVMPool.cpp:
18381        (JSC::FixedVMPoolAllocator::allocInternal):
18382        * jit/JIT.cpp:
18383        (JSC::JIT::privateCompile):
18384        * jit/JIT.h:
18385        (JSC::JIT::compileGetByIdProto):
18386        (JSC::JIT::compileGetByIdSelfList):
18387        (JSC::JIT::compileGetByIdProtoList):
18388        (JSC::JIT::compileGetByIdChainList):
18389        (JSC::JIT::compileGetByIdChain):
18390        (JSC::JIT::compilePutByIdTransition):
18391        (JSC::JIT::compilePatchGetArrayLength):
18392        * jit/JITOpcodes.cpp:
18393        (JSC::JIT::privateCompileCTIMachineTrampolines):
18394        * jit/JITOpcodes32_64.cpp:
18395        (JSC::JIT::privateCompileCTIMachineTrampolines):
18396        (JSC::JIT::privateCompileCTINativeCall):
18397        * jit/JITPropertyAccess.cpp:
18398        (JSC::JIT::stringGetByValStubGenerator):
18399        (JSC::JIT::privateCompilePutByIdTransition):
18400        (JSC::JIT::privateCompilePatchGetArrayLength):
18401        (JSC::JIT::privateCompileGetByIdProto):
18402        (JSC::JIT::privateCompileGetByIdSelfList):
18403        (JSC::JIT::privateCompileGetByIdProtoList):
18404        (JSC::JIT::privateCompileGetByIdChainList):
18405        (JSC::JIT::privateCompileGetByIdChain):
18406        * jit/JITPropertyAccess32_64.cpp:
18407        (JSC::JIT::stringGetByValStubGenerator):
18408        (JSC::JIT::privateCompilePutByIdTransition):
18409        (JSC::JIT::privateCompilePatchGetArrayLength):
18410        (JSC::JIT::privateCompileGetByIdProto):
18411        (JSC::JIT::privateCompileGetByIdSelfList):
18412        (JSC::JIT::privateCompileGetByIdProtoList):
18413        (JSC::JIT::privateCompileGetByIdChainList):
18414        (JSC::JIT::privateCompileGetByIdChain):
18415        * jit/JITStubs.cpp:
18416        (JSC::JITThunks::tryCachePutByID):
18417        (JSC::JITThunks::tryCacheGetByID):
18418        (JSC::DEFINE_STUB_FUNCTION):
18419        (JSC::setupPolymorphicProtoList):
18420        * jit/JITStubs.h:
18421        * jit/SpecializedThunkJIT.h:
18422        (JSC::SpecializedThunkJIT::finalize):
18423        * runtime/ExceptionHelpers.cpp:
18424        (JSC::createOutOfMemoryError):
18425        * runtime/ExceptionHelpers.h:
18426        * runtime/Executable.cpp:
18427        (JSC::EvalExecutable::compileInternal):
18428        (JSC::ProgramExecutable::compileInternal):
18429        (JSC::FunctionExecutable::compileForCallInternal):
18430        (JSC::FunctionExecutable::compileForConstructInternal):
18431        (JSC::FunctionExecutable::reparseExceptionInfo):
18432        (JSC::EvalExecutable::reparseExceptionInfo):
18433        * yarr/RegexJIT.cpp:
18434        (JSC::Yarr::RegexGenerator::compile):
18435
184362010-08-03  Geoffrey Garen  <ggaren@apple.com>
18437
18438        Reviewed by Oliver Hunt.
18439
18440        Fixed a crash seen on the GTK 64bit buildbot.
18441        
18442        When JSArray is allocated for the vptr stealing hack, it's not allocated
18443        in the heap, so the JSArray constructor can't safely call Heap::heap().
18444        
18445        Since this was subtle enough to confuse smart people, I've changed JSArray
18446        to have an explicit vptr stealing constructor.
18447
18448        * JavaScriptCore.xcodeproj/project.pbxproj:
18449        * runtime/JSArray.cpp:
18450        (JSC::JSArray::JSArray):
18451        * runtime/JSArray.h:
18452        (JSC::JSArray::):
18453        * runtime/JSGlobalData.cpp:
18454        (JSC::JSGlobalData::storeVPtrs):
18455
184562010-08-03  Alex Milowski  <alex@milowski.com>
18457
18458        Reviewed by Beth Dakin.
18459
18460        Changed the ENABLE_MATHML value to enable MathML by default.
18461
18462        * Configurations/FeatureDefines.xcconfig:
18463
184642010-08-03  Michael Saboff  <msaboff@apple.com>
18465
18466        Reviewed by Gavin Barraclough.
18467
18468        Change to keep returned pointer from malloc family functions to
18469        quiet memory leak detect.  The pointer is saved in the new m_allocBase
18470        member of the ArrayStorage structure.  This fixes the issue found in 
18471        https://bugs.webkit.org/show_bug.cgi?id=43229.
18472
18473        As part of this change, we use m_allocBase when reallocating and
18474        freeing the memory associated with ArrayStorage.
18475
18476        * runtime/JSArray.cpp:
18477        (JSC::JSArray::JSArray):
18478        (JSC::JSArray::~JSArray):
18479        (JSC::JSArray::putSlowCase):
18480        (JSC::JSArray::increaseVectorLength):
18481        (JSC::JSArray::increaseVectorPrefixLength):
18482        * runtime/JSArray.h:
18483
184842010-08-03  Geoffrey Garen  <ggaren@apple.com>
18485
18486        Reviewed by Mark Rowe.
18487
18488        https://bugs.webkit.org/show_bug.cgi?id=43444
18489        PLATFORM(CF) is false on Windows in JavaScriptCore
18490
18491        Moved some PLATFORM(WIN) #defines down into JavaScriptCore.
18492
18493        * wtf/Platform.h: Added WTF_PLATFORM_CF 1 and WTF_USE_PTHREADS 0, inherited
18494        from WebCore/config.h. Removed WTF_USE_WININET 1 since WebCore/config.h
18495        just #undefined that later.
18496
184972010-08-03  Geoffrey Garen  <ggaren@apple.com>
18498
18499        Try to fix Windows build: Don't use GCActivityCallbackCF on Windows, since
18500        PLATFORM(CF) is not defined on Windows.
18501        
18502        We'll need to enable the GC activity callback some other way, but this
18503        change should get the build back to normal.
18504
18505        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
18506
18507        * runtime/GCActivityCallbackCF.cpp: Make it easier to detect this error
18508        in the future with an explicit error message.
18509
185102010-08-03  Geoffrey Garen  <ggaren@apple.com>
18511
18512        Try to fix Windows build: update .def file.
18513
18514        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18515
185162010-08-03  Nathan Lawrence  <nlawrence@apple.com>
18517
18518        Reviewed by Oliver Hunt.
18519
18520        https://bugs.webkit.org/show_bug.cgi?id=41318
18521        GC should reclaim garbage even when new objects are not being allocated rapidly
18522
18523        Added a callback in JavaScriptCore that gets triggered after an
18524        allocation causes the heap to reset.  This is useful for adding a
18525        timer that will trigger garbage collection after the "last" allocation.
18526
18527        Also needed was to add lock and unlock methods to JSLock that needed
18528        only a JSGlobalData object versus an ExecState object.
18529
18530        * CMakeLists.txt:
18531        * GNUmakefile.am:
18532        * JavaScriptCore.exp:
18533        * JavaScriptCore.gypi:
18534        * JavaScriptCore.pro:
18535        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
18536        * JavaScriptCore.xcodeproj/project.pbxproj:
18537        * jit/JITPropertyAccess.cpp:
18538        (JSC::JIT::emit_op_put_by_val):
18539        * runtime/Collector.cpp:
18540        (JSC::Heap::Heap):
18541        (JSC::Heap::reset):
18542        (JSC::Heap::setActivityCallback):
18543        * runtime/Collector.h:
18544        * runtime/GCActivityCallback.cpp: Added.
18545        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
18546        (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
18547        (JSC::DefaultGCActivityCallback::operator()):
18548        * runtime/GCActivityCallback.h: Added.
18549        (JSC::GCActivityCallback::~GCActivityCallback):
18550        (JSC::GCActivityCallback::operator()):
18551        (JSC::GCActivityCallback::GCActivityCallback):
18552        (JSC::DefaultGCActivityCallback::create):
18553        * runtime/GCActivityCallbackCF.cpp: Added.
18554        (JSC::DefaultGCActivityCallbackPlatformData::trigger):
18555        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
18556        (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
18557        (JSC::DefaultGCActivityCallback::operator()):
18558        * runtime/JSLock.cpp:
18559        (JSC::JSLock::JSLock):
18560        * runtime/JSLock.h:
18561
185622010-08-02  Kevin Ollivier  <kevino@theolliviers.com>
18563
18564        [wx] Build fix after removal of need to compile ExecutableAllocatorPosix.cpp
18565
18566        * wscript:
18567
185682010-08-02  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
18569
18570        Reviewed by Simon Hausmann.
18571
18572        [QT] build fix for symbian
18573        https://bugs.webkit.org/show_bug.cgi?id=43234
18574
18575        1) wrong order of passing param's
18576        2) static_cast complains on symbian so using reinterpret_cast
18577
18578        No new tests added. Just a build fix for qt symbian
18579
18580        * wtf/PageAllocation.cpp:
18581        (WTF::PageAllocation::commit):
18582        (WTF::PageAllocation::decommit):
18583        (WTF::PageAllocation::reserve):
18584
185852010-07-30  Luiz Agostini  <luiz.agostini@openbossa.org>
18586
18587        Reviewed by Simon Fraser.
18588
18589        Enabling view modes to all platforms
18590        https://bugs.webkit.org/show_bug.cgi?id=37505
18591
18592        Removing ENABLE_WIDGETS_10_SUPPORT flag.
18593
18594        As view mode media feature is not part of widget 1.0 specification
18595        any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use
18596        of this flag was related to view mode media feature implementation in Qt. 
18597
18598        * wtf/Platform.h:
18599
186002010-07-30  Andy Estes  <aestes@apple.com>
18601
18602        Reviewed by David Kilzer.
18603
18604        Add Xcode support for compiling WebKit against iOS SDKs.
18605        https://bugs.webkit.org/show_bug.cgi?id=42796
18606
18607        * Configurations/Base.xcconfig:
18608        * Configurations/DebugRelease.xcconfig:
18609        * Configurations/FeatureDefines.xcconfig:
18610
186112010-07-30  Dumitru Daniliuc  <dumi@chromium.org>
18612
18613        Reviewed by Davin Levin.
18614
18615        Added a yield() function.
18616        https://bugs.webkit.org/show_bug.cgi?id=42843
18617
18618        * JavaScriptCore.exp:
18619        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18620        * wtf/Threading.h:
18621        * wtf/ThreadingPthreads.cpp:
18622        (WTF::yield):
18623        * wtf/ThreadingWin.cpp:
18624        (WTF::yield):
18625        * wtf/gtk/ThreadingGtk.cpp:
18626        (WTF::yield):
18627        * wtf/qt/ThreadingQt.cpp:
18628        (WTF::yield):
18629
186302010-07-30  Rafael Antognolli  <antognolli@profusion.mobi>
18631
18632        Reviewed by Antonio Gomes.
18633
18634        [EFL] Add library version and soname to EFL generated libraries and binary.
18635        https://bugs.webkit.org/show_bug.cgi?id=43212
18636
18637        Add version and soname to libjavascriptcore.so and libwtf.so in case of
18638        linking as shared libraries, and version to jsc executable.
18639
18640        * CMakeLists.txt:
18641        * jsc/CMakeLists.txt:
18642        * wtf/CMakeLists.txt:
18643
186442010-07-30  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
18645
18646        Reviewed by Simon Hausmann.
18647
18648        [QT] build fix for symbian
18649        https://bugs.webkit.org/show_bug.cgi?id=43234
18650
18651        * wtf/PageAllocation.h:
18652        (WTF::PageAllocation::PageAllocation):
18653
186542010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
18655
18656        Unreviewed, rolling out r64313.
18657        http://trac.webkit.org/changeset/64313
18658        https://bugs.webkit.org/show_bug.cgi?id=43233
18659
18660        Some Chromium bots are not happy with it for some unknown
18661        reason. (Requested by dumi on #webkit).
18662
18663        * JavaScriptCore.exp:
18664        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18665        * wtf/Threading.h:
18666        * wtf/ThreadingPthreads.cpp:
18667        * wtf/ThreadingWin.cpp:
18668        * wtf/gtk/ThreadingGtk.cpp:
18669        * wtf/qt/ThreadingQt.cpp:
18670
186712010-07-29  Sheriff Bot  <webkit.review.bot@gmail.com>
18672
18673        Unreviewed, rolling out r64302.
18674        http://trac.webkit.org/changeset/64302
18675        https://bugs.webkit.org/show_bug.cgi?id=43223
18676
18677        Assertion is bogus (Requested by olliej on #webkit).
18678
18679        * assembler/ARMAssembler.cpp:
18680        (JSC::ARMAssembler::executableCopy):
18681        * assembler/AssemblerBuffer.h:
18682        (JSC::AssemblerBuffer::putShortUnchecked):
18683        (JSC::AssemblerBuffer::putIntUnchecked):
18684        (JSC::AssemblerBuffer::putInt64Unchecked):
18685        * jit/JITStubs.cpp:
18686        * pcre/pcre_compile.cpp:
18687        (jsRegExpCompile):
18688        * wtf/FastMalloc.cpp:
18689        (WTF::PageHeapAllocator::New):
18690        (WTF::TCMalloc_Central_FreeList::Populate):
18691        * wtf/MD5.cpp:
18692        (WTF::reverseBytes):
18693        (WTF::MD5::addBytes):
18694        (WTF::MD5::checksum):
18695        * wtf/StdLibExtras.h:
18696        * wtf/Vector.h:
18697        (WTF::VectorBuffer::inlineBuffer):
18698        * wtf/qt/StringQt.cpp:
18699        (WebCore::String::String):
18700
187012010-07-29  Michael Saboff  <msaboff@apple.com>
18702
18703        Reviewed by Gavin Barraclough.
18704
18705        Changed the handling for removing and adding elements at the front
18706        of an array.  The code now keeps a bias that indicates the amount of
18707        JSValue sized holes are prior to the ArrayStorage block.  This means
18708        that shift operations are now memmove's of the header part of
18709        the ArrayStorage and unshift operations are similar, but may require a
18710        realloc first to create the space.  Similar operations are performed
18711        for special cases of splice and slice.
18712        Also optimized the new Array(size) case so that we don't allocate and
18713        initialize array elements until the JS code starts using elements.
18714        The array growth code is slightly more aggressive for initial growth
18715        based on size growth of any previous array.
18716
18717        * Configurations/JavaScriptCore.xcconfig:
18718        * jit/JITPropertyAccess.cpp:
18719        (JSC::JIT::emit_op_get_by_val):
18720        (JSC::JIT::emit_op_put_by_val):
18721        (JSC::JIT::privateCompilePatchGetArrayLength):
18722        * jit/JITPropertyAccess32_64.cpp:
18723        (JSC::JIT::emit_op_get_by_val):
18724        (JSC::JIT::emit_op_put_by_val):
18725        (JSC::JIT::privateCompilePatchGetArrayLength):
18726        * runtime/ArrayPrototype.cpp:
18727        (JSC::arrayProtoFuncShift):
18728        (JSC::arrayProtoFuncSplice):
18729        (JSC::arrayProtoFuncUnShift):
18730        * runtime/JSArray.cpp:
18731        (JSC::JSArray::JSArray):
18732        (JSC::JSArray::~JSArray):
18733        (JSC::JSArray::getOwnPropertySlot):
18734        (JSC::JSArray::getOwnPropertyDescriptor):
18735        (JSC::JSArray::put):
18736        (JSC::JSArray::putSlowCase):
18737        (JSC::JSArray::deleteProperty):
18738        (JSC::JSArray::getOwnPropertyNames):
18739        (JSC::JSArray::getNewVectorLength):
18740        (JSC::JSArray::increaseVectorLength):
18741        (JSC::JSArray::increaseVectorPrefixLength):
18742        (JSC::JSArray::setLength):
18743        (JSC::JSArray::pop):
18744        (JSC::JSArray::push):
18745        (JSC::JSArray::shiftCount):
18746        (JSC::JSArray::unshiftCount):
18747        (JSC::JSArray::sortNumeric):
18748        (JSC::JSArray::sort):
18749        (JSC::JSArray::fillArgList):
18750        (JSC::JSArray::copyToRegisters):
18751        (JSC::JSArray::compactForSorting):
18752        (JSC::JSArray::subclassData):
18753        (JSC::JSArray::setSubclassData):
18754        (JSC::JSArray::checkConsistency):
18755        * runtime/JSArray.h:
18756        (JSC::JSArray::length):
18757        (JSC::JSArray::canGetIndex):
18758        (JSC::JSArray::getIndex):
18759        (JSC::JSArray::setIndex):
18760        (JSC::JSArray::uncheckedSetIndex):
18761        (JSC::JSArray::arrayStorage):
18762        (JSC::JSArray::setArrayStorage):
18763        (JSC::JSArray::markChildrenDirect):
18764
187652010-07-29  Michael Saboff  <msaboff@apple.com>
18766
18767        Reviewed by Darin Adler.
18768
18769        Changed MINIMUM_CELL_SIZE to be fixed at 64 bytes.
18770
18771        * runtime/Collector.h:
18772
187732010-07-28  Dumitru Daniliuc  <dumi@chromium.org>
18774
18775        Reviewed by David Levin.
18776
18777        Added a yield() function.
18778        https://bugs.webkit.org/show_bug.cgi?id=42843
18779
18780        * JavaScriptCore.exp:
18781        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
18782        * wtf/Threading.h:
18783        * wtf/ThreadingPthreads.cpp:
18784        (WTF::yield):
18785        * wtf/ThreadingWin.cpp:
18786        (WTF::yield):
18787        * wtf/gtk/ThreadingGtk.cpp:
18788        (WTF::yield):
18789        * wtf/qt/ThreadingQt.cpp:
18790        (WTF::yield):
18791
187922010-07-29  Michael Saboff  <msaboff@apple.com>
18793
18794        Reviewed by Oliver Hunt.
18795
18796        Fixed issue where RegExp greedy jit code loops when no input is
18797        consumed.  Changed the code to only loop if some input was consumed,
18798        but fall through if we successfully match an alternative that 
18799        doesn't consume any input.
18800        https://bugs.webkit.org/show_bug.cgi?id=42664
18801
18802        * yarr/RegexJIT.cpp:
18803        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
18804
188052010-07-29  Gabor Loki  <loki@webkit.org>
18806
18807        Reviewed by Gavin Barraclough.
18808
18809        Avoid increasing required alignment of target type warning on ARM
18810        https://bugs.webkit.org/show_bug.cgi?id=38045
18811
18812        The reinterpret_cast<Type1*>([pointer to Type2]) expressions - where
18813        sizeof(Type1) > sizeof(Type2) - cause the following warning on ARM:
18814        increases required alignment of target type warnings.
18815        Casting the type of [pointer to Type2] object to void* bypasses the
18816        warning.
18817
18818        * assembler/ARMAssembler.cpp:
18819        (JSC::ARMAssembler::executableCopy):
18820        * assembler/AssemblerBuffer.h:
18821        (JSC::AssemblerBuffer::putShortUnchecked):
18822        (JSC::AssemblerBuffer::putIntUnchecked):
18823        (JSC::AssemblerBuffer::putInt64Unchecked):
18824        * jit/JITStubs.cpp:
18825        * pcre/pcre_compile.cpp:
18826        (jsRegExpCompile):
18827        * wtf/FastMalloc.cpp:
18828        (WTF::PageHeapAllocator::New):
18829        (WTF::TCMalloc_Central_FreeList::Populate):
18830        * wtf/MD5.cpp:
18831        (WTF::reverseBytes):
18832        (WTF::MD5::addBytes):
18833        (WTF::MD5::checksum):
18834        * wtf/StdLibExtras.h:
18835        (reinterpret_cast_ptr):
18836        * wtf/Vector.h:
18837        (WTF::VectorBuffer::inlineBuffer):
18838        * wtf/qt/StringQt.cpp:
18839        (WebCore::String::String):
18840
188412010-07-29  Martin Robinson  <mrobinson@igalia.com>
18842
18843        Unreviewed build fix.
18844
18845        Include a missing header in the source list to fix 'make dist.'
18846
18847        * GNUmakefile.am: Include missing header.
18848
188492010-07-28  Gavin Barraclough  <barraclough@apple.com>
18850
18851        Reviewed by Darin Adler.
18852
18853        Bug 43162 - Add support for MADV_FREE to PageAllocation.
18854
18855        * wtf/PageAllocation.cpp:
18856        (WTF::PageAllocation::commit):
18857        (WTF::PageAllocation::decommit):
18858
188592010-07-27  Kinuko Yasuda  <kinuko@chromium.org>
18860
18861        Reviewed by Ojan Vafai.
18862
18863        Add FILE_SYSTEM build flag for FileSystem API
18864        https://bugs.webkit.org/show_bug.cgi?id=42915
18865
18866        * Configurations/FeatureDefines.xcconfig:
18867
188682010-07-27  Gavin Barraclough  <barraclough@apple.com>
18869
18870        Temporarily rolling out http://trac.webkit.org/changeset/64177,
18871        this seems to give QT ARM/Win a headache (specifically, looks
18872        like structure layour differs, objects get too large - 
18873        "..\..\..\JavaScriptCore\runtime\ArrayPrototype.cpp:41:"
18874        "error: size of array 'dummyclass_fits_in_cell' is negative").
18875
18876        * jit/JITPropertyAccess.cpp:
18877        (JSC::JIT::emit_op_get_by_val):
18878        (JSC::JIT::emit_op_put_by_val):
18879        (JSC::JIT::privateCompilePatchGetArrayLength):
18880        * jit/JITPropertyAccess32_64.cpp:
18881        (JSC::JIT::emit_op_get_by_val):
18882        (JSC::JIT::emit_op_put_by_val):
18883        (JSC::JIT::privateCompilePatchGetArrayLength):
18884        * runtime/ArrayPrototype.cpp:
18885        (JSC::arrayProtoFuncShift):
18886        (JSC::arrayProtoFuncSplice):
18887        (JSC::arrayProtoFuncUnShift):
18888        * runtime/JSArray.cpp:
18889        (JSC::increasedVectorLength):
18890        (JSC::JSArray::JSArray):
18891        (JSC::JSArray::~JSArray):
18892        (JSC::JSArray::getOwnPropertySlot):
18893        (JSC::JSArray::getOwnPropertyDescriptor):
18894        (JSC::JSArray::put):
18895        (JSC::JSArray::putSlowCase):
18896        (JSC::JSArray::deleteProperty):
18897        (JSC::JSArray::getOwnPropertyNames):
18898        (JSC::JSArray::increaseVectorLength):
18899        (JSC::JSArray::setLength):
18900        (JSC::JSArray::pop):
18901        (JSC::JSArray::push):
18902        (JSC::JSArray::sortNumeric):
18903        (JSC::JSArray::sort):
18904        (JSC::JSArray::fillArgList):
18905        (JSC::JSArray::copyToRegisters):
18906        (JSC::JSArray::compactForSorting):
18907        (JSC::JSArray::subclassData):
18908        (JSC::JSArray::setSubclassData):
18909        (JSC::JSArray::checkConsistency):
18910        * runtime/JSArray.h:
18911        (JSC::JSArray::length):
18912        (JSC::JSArray::canGetIndex):
18913        (JSC::JSArray::getIndex):
18914        (JSC::JSArray::setIndex):
18915        (JSC::JSArray::uncheckedSetIndex):
18916        (JSC::JSArray::markChildrenDirect):
18917
189182010-07-27  Gavin Barraclough  <barraclough@apple.com>
18919
18920        Speculative build fix for Chromium/Win
18921
18922        * wtf/Platform.h:
18923
189242010-07-27  Gavin Barraclough  <barraclough@apple.com>
18925
18926        Oh! that makes more sense!  Maybe C++-style comments are bringing teh bad mojo.
18927
18928        * wtf/Platform.h:
18929
189302010-07-27  Gavin Barraclough  <barraclough@apple.com>
18931
18932        Speculative build fix for GTK/64 ... seems to be barfing on a comment o_O
18933
18934        * wtf/Platform.h:
18935
189362010-07-27  Michael Saboff  <msaboff@apple.com>
18937
18938        Reviewed by Gavin Barraclough.
18939
18940        Changed the handling for removing and adding elements at the front
18941        of an array.  The code now keeps a bias that indicates the amount of
18942        JSValue sized holes are prior to the ArrayStorage block.  This means
18943        that shift operations are now memmove's of the header part of
18944        the ArrayStorage and unshift operations are similar, but may require a
18945        realloc first to create the space.  Similar operations are performed
18946        for special cases of splice and slice.
18947        Also optimized the new Array(size) case so that we don't allocate and
18948        initialize array elements until the JS code starts using elements.
18949        The array growth code is slightly more aggressive for initial growth
18950        based on size growth of any previous array.
18951
18952        * Configurations/JavaScriptCore.xcconfig:
18953        * jit/JITPropertyAccess.cpp:
18954        (JSC::JIT::emit_op_get_by_val):
18955        (JSC::JIT::emit_op_put_by_val):
18956        (JSC::JIT::privateCompilePatchGetArrayLength):
18957        * jit/JITPropertyAccess32_64.cpp:
18958        (JSC::JIT::emit_op_get_by_val):
18959        (JSC::JIT::emit_op_put_by_val):
18960        (JSC::JIT::privateCompilePatchGetArrayLength):
18961        * runtime/ArrayPrototype.cpp:
18962        (JSC::arrayProtoFuncShift):
18963        (JSC::arrayProtoFuncSplice):
18964        (JSC::arrayProtoFuncUnShift):
18965        * runtime/JSArray.cpp:
18966        (JSC::JSArray::JSArray):
18967        (JSC::JSArray::~JSArray):
18968        (JSC::JSArray::getOwnPropertySlot):
18969        (JSC::JSArray::getOwnPropertyDescriptor):
18970        (JSC::JSArray::put):
18971        (JSC::JSArray::putSlowCase):
18972        (JSC::JSArray::deleteProperty):
18973        (JSC::JSArray::getOwnPropertyNames):
18974        (JSC::JSArray::getNewVectorLength):
18975        (JSC::JSArray::increaseVectorLength):
18976        (JSC::JSArray::increaseVectorPrefixLength):
18977        (JSC::JSArray::setLength):
18978        (JSC::JSArray::pop):
18979        (JSC::JSArray::push):
18980        (JSC::JSArray::shiftCount):
18981        (JSC::JSArray::unshiftCount):
18982        (JSC::JSArray::sortNumeric):
18983        (JSC::JSArray::sort):
18984        (JSC::JSArray::fillArgList):
18985        (JSC::JSArray::copyToRegisters):
18986        (JSC::JSArray::compactForSorting):
18987        (JSC::JSArray::subclassData):
18988        (JSC::JSArray::setSubclassData):
18989        (JSC::JSArray::checkConsistency):
18990        * runtime/JSArray.h:
18991        (JSC::JSArray::length):
18992        (JSC::JSArray::canGetIndex):
18993        (JSC::JSArray::getIndex):
18994        (JSC::JSArray::setIndex):
18995        (JSC::JSArray::uncheckedSetIndex):
18996        (JSC::JSArray::arrayStorage):
18997        (JSC::JSArray::setArrayStorage):
18998        (JSC::JSArray::markChildrenDirect):
18999
190002010-07-27  Gavin Barraclough  <barraclough@apple.com>
19001
19002        Reviewed by Oliver Hunt.
19003
19004        Bug 43089 - Cleanup JIT related switched in Platform.h
19005
19006        The code the enable to JIT checks every permutation of platform & OS individually, but
19007        now the JIT is enabled on the majority much all x86/x86-64/ARM/MIPS systems.  It should
19008        be cleaner to just enable by default on these platforms, and explicitly disable on configs
19009        that don't aren't supported.
19010
19011        Also, rename ENABLE_JIT_OPTIMIZE_MOD to ENABLE_JIT_USE_SOFT_MODULO.  I always find this
19012        confusing since enabling this "optimization" would be possible, but would be a regression
19013        on x86/x86-64 systems!  I think it's clearer to reserve "JIT_OPTIMIZE" for compiler
19014        technologies applicable to all platforms, and make a more optional behaviour like this a
19015        "USE".
19016
19017        * jit/ExecutableAllocator.h:
19018        (JSC::ExecutableAllocator::cacheFlush):
19019        * jit/JIT.h:
19020        * jit/JITArithmetic.cpp:
19021        (JSC::JIT::emit_op_mod):
19022        (JSC::JIT::emitSlow_op_mod):
19023        * jit/JITArithmetic32_64.cpp:
19024        (JSC::JIT::emit_op_mod):
19025        (JSC::JIT::emitSlow_op_mod):
19026        * jit/JITOpcodes.cpp:
19027        (JSC::JIT::privateCompileCTIMachineTrampolines):
19028        * jit/JITOpcodes32_64.cpp:
19029        (JSC::JIT::privateCompileCTIMachineTrampolines):
19030        * wtf/Platform.h:
19031
190322010-07-27  James Robinson  <jamesr@chromium.org>
19033
19034        Reviewed by Darin Fisher.
19035
19036        [chromium] Make PLATFORM(CHROMIUM) and not OS(MAC) turn USE(GLES2_RENDERING) on
19037        https://bugs.webkit.org/show_bug.cgi?id=43084
19038
19039        This turns USE(GLES2_RENDERING) on for chromium on windows/linux.  This causes no
19040        change in behavior, that's all controlled by ENABLE() macros that are currently off.
19041
19042        * wtf/Platform.h:
19043
190442010-07-23  Helder Correia  <heldercorreia@codeaurora.org>
19045
19046        Reviewed by Darin Adler.
19047
19048        Canvas tests 2d.imageData.object.round and 2d.imageData.object.wrap are
19049        failing. For canvas image data manipulation, the values passed should
19050        be truncated and wrapped. Also fix the canvas-ImageData-behaviour test
19051        to expect wrapping rather than clamping, and add some new checkings.
19052        https://bugs.webkit.org/show_bug.cgi?id=40272
19053
19054        * runtime/JSByteArray.h:
19055        (JSC::JSByteArray::setIndex):
19056        (JSC::JSByteArray::JSByteArray):
19057
190582010-07-27  Gavin Barraclough  <barraclough@apple.com>
19059
19060        Reviewed by Oliver Hunt.
19061
19062        Bug 42621 - Add a bump allocator for the YARR interpreter
19063
19064        The regex engine requires lifo allocation, however currently uses the general purpose
19065        malloc/free memory allocation.  A simple bump pointer allocator should provide a lower
19066        overhead allocation solution.
19067
19068        When using YARR interpreter, 15% progression on v8-regex.
19069
19070        * JavaScriptCore.xcodeproj/project.pbxproj:
19071        * runtime/JSGlobalData.h:
19072        * runtime/RegExp.cpp:
19073        (JSC::RegExp::compile):
19074        * wtf/BumpPointerAllocator.h: Added.
19075        (WTF::BumpPointerPool::ensureCapacity):
19076        (WTF::BumpPointerPool::alloc):
19077        (WTF::BumpPointerPool::dealloc):
19078        (WTF::BumpPointerPool::operator new):
19079        (WTF::BumpPointerPool::BumpPointerPool):
19080        (WTF::BumpPointerPool::create):
19081        (WTF::BumpPointerPool::shrink):
19082        (WTF::BumpPointerPool::destroy):
19083        (WTF::BumpPointerPool::ensureCapacityCrossPool):
19084        (WTF::BumpPointerPool::deallocCrossPool):
19085        (WTF::BumpPointerAllocator::BumpPointerAllocator):
19086        (WTF::BumpPointerAllocator::~BumpPointerAllocator):
19087        (WTF::BumpPointerAllocator::startAllocator):
19088        (WTF::BumpPointerAllocator::stopAllocator):
19089        * yarr/RegexInterpreter.cpp:
19090        (JSC::Yarr::Interpreter::allocDisjunctionContext):
19091        (JSC::Yarr::Interpreter::freeDisjunctionContext):
19092        (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
19093        (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
19094        (JSC::Yarr::Interpreter::interpret):
19095        (JSC::Yarr::Interpreter::Interpreter):
19096        (JSC::Yarr::ByteCompiler::compile):
19097        (JSC::Yarr::byteCompileRegex):
19098        * yarr/RegexInterpreter.h:
19099        (JSC::Yarr::BytecodePattern::BytecodePattern):
19100
191012010-07-26  Gavin Barraclough  <barraclough@apple.com>
19102
19103        Windows build fix from Chromium/GTK build fix!
19104
19105        * wtf/PageAllocation.cpp:
19106
191072010-07-26  Gavin Barraclough  <barraclough@apple.com>
19108
19109        Chromium/GTK build fix
19110
19111        * wtf/PageAllocation.cpp:
19112
191132010-07-26  Gavin Barraclough  <barraclough@apple.com>
19114
19115        Build fix for !Mac platforms.
19116
19117        * Android.mk:
19118        * CMakeLists.txt:
19119        * GNUmakefile.am:
19120        * JavaScriptCore.gypi:
19121        * JavaScriptCore.pro:
19122        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
19123
191242010-07-26  Gavin Barraclough  <barraclough@apple.com>
19125
19126        Reviewed by Oliver Hunt.
19127
19128        Bug 43009 - Abstract out page allocation from executable allocators
19129
19130        It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
19131
19132        In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
19133        I think this will match current behaviour for the next client we will want to port across (RegisterFile &
19134        Collector).
19135
19136        * CMakeListsEfl.txt:
19137        * GNUmakefile.am:
19138        * JavaScriptCore.gypi:
19139        * JavaScriptCore.pro:
19140        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19141        * JavaScriptCore.xcodeproj/project.pbxproj:
19142        * jit/ExecutableAllocator.cpp:
19143        (JSC::ExecutableAllocator::intializePageSize):
19144        (JSC::ExecutablePool::systemAlloc):
19145        (JSC::ExecutablePool::systemRelease):
19146        (JSC::ExecutableAllocator::isValid):
19147        * jit/ExecutableAllocator.h:
19148        (JSC::ExecutablePool::ExecutablePool):
19149        (JSC::ExecutablePool::poolAllocate):
19150        * jit/ExecutableAllocatorFixedVMPool.cpp:
19151        (JSC::FixedVMPoolAllocator::release):
19152        (JSC::FixedVMPoolAllocator::reuse):
19153        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
19154        (JSC::FixedVMPoolAllocator::alloc):
19155        (JSC::FixedVMPoolAllocator::free):
19156        (JSC::FixedVMPoolAllocator::isValid):
19157        (JSC::FixedVMPoolAllocator::isWithinVMPool):
19158        (JSC::ExecutablePool::systemAlloc):
19159        (JSC::ExecutablePool::systemRelease):
19160        * jit/ExecutableAllocatorPosix.cpp: Removed.
19161        * jit/ExecutableAllocatorSymbian.cpp: Removed.
19162        * jit/ExecutableAllocatorWin.cpp: Removed.
19163        * wscript:
19164        * wtf/PageAllocator.cpp: Added.
19165        (WTF::protection):
19166        (WTF::PageAllocation::commit):
19167        (WTF::PageAllocation::decommit):
19168        (WTF::PageAllocator::allocate):
19169        (WTF::PageAllocator::reserve):
19170        (WTF::PageAllocator::deallocate):
19171        (WTF::PageAllocator::pagesize):
19172        * wtf/PageAllocator.h: Added.
19173        (WTF::PageAllocation::PageAllocation):
19174        (WTF::PageAllocation::base):
19175        (WTF::PageAllocation::size):
19176        (WTF::PageAllocation::chunk):
19177        (WTF::PageAllocation::operator!):
19178        (WTF::PageAllocator::):
19179
191802010-07-26  Gavin Barraclough  <barraclough@apple.com>
19181
19182        Rolling out r64097:64100, oops, more b0rked than I relized by my last changes, sorry!
19183
19184        * CMakeListsEfl.txt:
19185        * GNUmakefile.am:
19186        * JavaScriptCore.gypi:
19187        * JavaScriptCore.pro:
19188        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19189        * JavaScriptCore.xcodeproj/project.pbxproj:
19190        * jit/ExecutableAllocator.cpp:
19191        (JSC::ExecutableAllocator::reprotectRegion):
19192        (JSC::ExecutableAllocator::cacheFlush):
19193        * jit/ExecutableAllocator.h:
19194        (JSC::ExecutablePool::ExecutablePool):
19195        (JSC::ExecutablePool::poolAllocate):
19196        * jit/ExecutableAllocatorFixedVMPool.cpp:
19197        (JSC::FixedVMPoolAllocator::release):
19198        (JSC::FixedVMPoolAllocator::reuse):
19199        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
19200        (JSC::FixedVMPoolAllocator::alloc):
19201        (JSC::FixedVMPoolAllocator::free):
19202        (JSC::FixedVMPoolAllocator::isValid):
19203        (JSC::FixedVMPoolAllocator::isWithinVMPool):
19204        (JSC::ExecutablePool::systemAlloc):
19205        (JSC::ExecutablePool::systemRelease):
19206        * jit/ExecutableAllocatorPosix.cpp: Added.
19207        (JSC::ExecutableAllocator::intializePageSize):
19208        (JSC::ExecutablePool::systemAlloc):
19209        (JSC::ExecutablePool::systemRelease):
19210        (JSC::ExecutableAllocator::isValid):
19211        * jit/ExecutableAllocatorSymbian.cpp: Added.
19212        (JSC::ExecutableAllocator::intializePageSize):
19213        (JSC::ExecutablePool::systemAlloc):
19214        (JSC::ExecutablePool::systemRelease):
19215        (JSC::ExecutableAllocator::isValid):
19216        * jit/ExecutableAllocatorWin.cpp: Added.
19217        (JSC::ExecutableAllocator::intializePageSize):
19218        (JSC::ExecutablePool::systemAlloc):
19219        (JSC::ExecutablePool::systemRelease):
19220        (JSC::ExecutableAllocator::isValid):
19221        * wscript:
19222        * wtf/PageAllocation.cpp: Removed.
19223        * wtf/PageAllocation.h: Removed.
19224
192252010-07-26  Gavin Barraclough  <barraclough@apple.com>
19226
19227        Speculative !debug build fix II.
19228
19229        * wtf/PageAllocation.h:
19230        (WTF::PageAllocation::PageAllocation):
19231
192322010-07-26  Gavin Barraclough  <barraclough@apple.com>
19233
19234        Speculative !debug build fix.
19235
19236        * wtf/PageAllocation.h:
19237        (WTF::PageAllocation::PageAllocation):
19238
192392010-07-26  Gavin Barraclough  <barraclough@apple.com>
19240
19241        Reviewed by Oliver Hunt.
19242
19243        Bug 43009 - Abstract out page allocation from executable allocators
19244
19245        It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
19246
19247        In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
19248        I think this will match current behaviour for the next client we will want to port across (RegisterFile &
19249        Collector).
19250
19251        * CMakeListsEfl.txt:
19252        * GNUmakefile.am:
19253        * JavaScriptCore.gypi:
19254        * JavaScriptCore.pro:
19255        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
19256        * JavaScriptCore.xcodeproj/project.pbxproj:
19257        * jit/ExecutableAllocator.cpp:
19258        (JSC::ExecutableAllocator::intializePageSize):
19259        (JSC::ExecutablePool::systemAlloc):
19260        (JSC::ExecutablePool::systemRelease):
19261        (JSC::ExecutableAllocator::isValid):
19262        * jit/ExecutableAllocator.h:
19263        (JSC::ExecutablePool::ExecutablePool):
19264        (JSC::ExecutablePool::poolAllocate):
19265        * jit/ExecutableAllocatorFixedVMPool.cpp:
19266        (JSC::FixedVMPoolAllocator::release):
19267        (JSC::FixedVMPoolAllocator::reuse):
19268        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
19269        (JSC::FixedVMPoolAllocator::alloc):
19270        (JSC::FixedVMPoolAllocator::free):
19271        (JSC::FixedVMPoolAllocator::isValid):
19272        (JSC::FixedVMPoolAllocator::isWithinVMPool):
19273        (JSC::ExecutablePool::systemAlloc):
19274        (JSC::ExecutablePool::systemRelease):
19275        * jit/ExecutableAllocatorPosix.cpp: Removed.
19276        * jit/ExecutableAllocatorSymbian.cpp: Removed.
19277        * jit/ExecutableAllocatorWin.cpp: Removed.
19278        * wscript:
19279        * wtf/PageAllocator.cpp: Added.
19280        (WTF::protection):
19281        (WTF::PageAllocation::commit):
19282        (WTF::PageAllocation::decommit):
19283        (WTF::PageAllocator::allocate):
19284        (WTF::PageAllocator::reserve):
19285        (WTF::PageAllocator::deallocate):
19286        (WTF::PageAllocator::pagesize):
19287        * wtf/PageAllocator.h: Added.
19288        (WTF::PageAllocation::PageAllocation):
19289        (WTF::PageAllocation::base):
19290        (WTF::PageAllocation::size):
19291        (WTF::PageAllocation::chunk):
19292        (WTF::PageAllocation::operator!):
19293        (WTF::PageAllocator::):
19294
192952009-10-30  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
19296
19297        Reviewed by Kenneth Rohde Christiansen.
19298
19299        [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
19300
19301        This ensures that long-running JavaScript (for example due to a modal alert() dialog),
19302        will not trigger a deferred load after only 500ms (the default tokenizer delay) while
19303        still giving a reasonable timeout (10 seconds) to prevent deadlock.
19304
19305        https://bugs.webkit.org/show_bug.cgi?id=29381
19306
19307        * runtime/TimeoutChecker.h: Add getter for the timeout interval
19308
193092010-07-25  Patrick Gansterer  <paroga@paroga.com>
19310
19311        Reviewed by Kent Tamura.
19312
19313        [WINCE] Buildfix for JSC in release mode
19314        https://bugs.webkit.org/show_bug.cgi?id=42934
19315
19316        * jsc.cpp: Don't use __try on WinCE.
19317
193182010-07-24  Patrick Gansterer  <paroga@paroga.com>
19319
19320        Reviewed by Darin Adler.
19321
19322        [MSVC] Ensure 4 byte alignment on ARM
19323        https://bugs.webkit.org/show_bug.cgi?id=42935
19324
19325        * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame.
19326
193272010-07-24  Patrick Gansterer  <paroga@paroga.com>
19328
19329        Reviewed by Darin Adler.
19330
19331        [WINCE] Cleanup defines in Platform.h
19332        https://bugs.webkit.org/show_bug.cgi?id=42933
19333
19334        * wtf/Platform.h:
19335
193362010-07-23  Rafael Antognolli  <antognolli@profusion.mobi>
19337
19338        Reviewed by Antonio Gomes.
19339
19340        [EFL] Cleanup glib support (make it optional)
19341        https://bugs.webkit.org/show_bug.cgi?id=42480
19342
19343        Remove gobject/GRefPtr.cpp if not using soup/glib.
19344
19345        * wtf/CMakeListsEfl.txt:
19346
193472010-07-23  Patrick Gansterer  <paroga@paroga.com>
19348
19349        Reviewed by Adam Roben.
19350
19351        [WINCE] Implement TCSpinLock.
19352        https://bugs.webkit.org/show_bug.cgi?id=41792
19353
19354        Implement the SpinLock with InterlockedExchange from the Windows API.
19355
19356        * wtf/TCSpinLock.h:
19357        (TCMalloc_SpinLock::Lock):
19358        (TCMalloc_SpinLock::Unlock):
19359        (TCMalloc_SpinLock::IsHeld):
19360        (TCMalloc_SpinLock::Init):
19361        (TCMalloc_SlowLock):
19362
193632010-07-22  Csaba Osztrogonác  <ossy@webkit.org>
19364
19365        Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build.
19366
19367        * jit/JITStubs.cpp:
19368        * jit/JITStubs.h:
19369
193702010-07-22  Gavin Barraclough  <barraclough@apple.com>
19371
19372        Eeeep! r63947 hosed all non-x86 builds!
19373
19374        * jit/JITStubs.h:
19375
193762010-07-22  Gavin Barraclough  <barraclough@apple.com>
19377
19378        Reviewed by Oliver Hunt.
19379
19380        Bug 42818 - [Qt] REGRESSION(63348): jsc is broken
19381        Speculative fix, need fastcall conventions on Qt/Win.
19382
19383        * jit/JITStubs.cpp:
19384        * jit/JITStubs.h:
19385
193862010-07-22  Oliver Hunt  <oliver@apple.com>
19387
19388        Reviewed by Gavin Barraclough.
19389
19390        Do more constant folding
19391        https://bugs.webkit.org/show_bug.cgi?id=42867
19392
19393        Constant fold a few more operations.  SunSpider says this is
19394        a win but I suspect that's just code motion at play.
19395
19396        * parser/ASTBuilder.h:
19397        (JSC::ASTBuilder::makeModNode):
19398        (JSC::ASTBuilder::makeURightShiftNode):
19399        (JSC::ASTBuilder::makeBitOrNode):
19400        (JSC::ASTBuilder::makeBitAndNode):
19401        (JSC::ASTBuilder::makeBitXOrNode):
19402        (JSC::ASTBuilder::makeBinaryNode):
19403
194042010-07-22  Kent Hansen  <kent.hansen@nokia.com>
19405
19406        Reviewed by Kent Tamura.
19407
19408        Error properties of the Global Object are missing the DontEnum attribute
19409        https://bugs.webkit.org/show_bug.cgi?id=28771
19410
19411        Add the attributes to become spec compliant.
19412
19413        * runtime/JSGlobalObject.cpp:
19414        (JSC::JSGlobalObject::reset):
19415
194162010-07-20  Steve Falkenburg  <sfalken@apple.com>
19417
19418        Reviewed by Adam Roben.
19419
19420        WebKit on Windows should build optionally with an unversioned ICU DLL
19421        https://bugs.webkit.org/show_bug.cgi?id=42722
19422        <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
19423        
19424        Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
19425        Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
19426        should be namespaced with the current ICU version number. Proper value is determined
19427        by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
19428        
19429        To get the proper value for U_DISABLE_RENAMING into all source files, we force
19430        the include of ICUVersion.h (our generated header) via the compiler options.
19431        
19432        Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
19433        we copy the ICU lib to an intermediate location under obj with a common name. This
19434        allows us to link properly with either without adding a new build configuration.
19435
19436        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
19437        Copy ICU libs into a common location with a common name.
19438        Add additional library search path to pick up icu lib.
19439        Change ICU library filename specified to linker.
19440        Add forced include of ICUVersion.h.
19441        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
19442        * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
19443        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
19444        Copy ICU libs into a common location with a common name.
19445        Add additional library search path to pick up icu lib.
19446        Change ICU library filename specified to linker.
19447        Add forced include of ICUVersion.h.
19448        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
19449        Copy ICU libs into a common location with a common name.
19450        Add additional library search path to pick up icu lib.
19451        Change ICU library filename specified to linker.
19452        Add forced include of ICUVersion.h.
19453
194542010-07-20  Steve Falkenburg  <sfalken@apple.com>
19455
19456        Re-save vsprops files after no-op edits in Visual Studio
19457        to fix manual edit issues.
19458
194592010-07-20  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
19460
19461        Reviewed by Steve Block.
19462
19463        Need to be able to configure Geolocation policy regarding user permissions
19464        https://bugs.webkit.org/show_bug.cgi?id=42068
19465
19466        If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
19467        by default 
19468
19469        * wtf/Platform.h:
19470        
194712010-07-20  Sheriff Bot  <webkit.review.bot@gmail.com>
19472
19473        Unreviewed, rolling out r63742.
19474        http://trac.webkit.org/changeset/63742
19475        https://bugs.webkit.org/show_bug.cgi?id=42641
19476
19477        Broke Leopard Intel build. (Requested by bbandix on #webkit).
19478
19479        * wtf/Platform.h:
19480
194812010-07-20  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
19482
19483        Reviewed by Steve Block.
19484
19485        Need to be able to configure Geolocation policy regarding user permissions
19486        https://bugs.webkit.org/show_bug.cgi?id=42068
19487
19488        If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
19489        by default 
19490
19491        * wtf/Platform.h:
19492        
194932010-07-19  Dirk Schulze  <krit@webkit.org>
19494
19495        Reviewed by Nikolas Zimmermann.
19496
19497        SVG CleanUp of SVGPathData parsing
19498        https://bugs.webkit.org/show_bug.cgi?id=41410
19499
19500        Added piOverTwo to MathExtras.
19501
19502        * wtf/MathExtras.h:
19503
195042010-07-19  Mike Moretti  <mike.moretti@nokia.com>
19505
19506        Reviewed by Laszlo Gombos.
19507
19508        [Symbian] Build fix after r63404.
19509
19510        Implement isValid() function for the Symbian executable allocator.
19511
19512        * jit/ExecutableAllocatorSymbian.cpp:
19513        (JSC::ExecutableAllocator::isValid):
19514
195152010-07-19  Chris Marrin  <cmarrin@apple.com>
19516
19517        Reviewed by Darin Adler.
19518
19519        https://bugs.webkit.org/show_bug.cgi?id=42118
19520        Disable WebGL on Leopard for now. 
19521
19522        LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
19523        GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
19524        SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
19525        software OpenGL driver on machines without this support.
19526
19527        * Configurations/FeatureDefines.xcconfig:
19528
195292010-07-16  Darin Adler  <darin@apple.com>
19530
19531        Reviewed by Sam Weinig.
19532
19533        Use OwnPtr for CodeBlock objects
19534        https://bugs.webkit.org/show_bug.cgi?id=42490
19535
19536        * runtime/Executable.cpp:
19537        (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
19538        Eliminated the code that used to initialize the raw pointer since it's now
19539        an OwnPtr.
19540        (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
19541        (JSC::ProgramExecutable::ProgramExecutable): Ditto.
19542        (JSC::ProgramExecutable::~ProgramExecutable): Ditto.
19543        (JSC::FunctionExecutable::FunctionExecutable): Ditto.
19544        (JSC::FunctionExecutable::~FunctionExecutable): Ditto.
19545        (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
19546        (JSC::ProgramExecutable::compileInternal): Ditto.
19547        (JSC::FunctionExecutable::compileForCallInternal): Ditto.
19548        (JSC::FunctionExecutable::compileForConstructInternal): Ditto.
19549        (JSC::FunctionExecutable::recompile): Use clear instead of delete followed
19550        by assignment of 0.
19551
19552        * runtime/Executable.h: Moved constructors to the cpp file and changed
19553        raw pointers to OwnPtr.
19554
195552010-07-19  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
19556
19557        Reviewed by Kenneth Rohde Christiansen.
19558
19559        [EFL] Fix build on 64-bit systems. According to
19560        JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
19561        needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
19562        system.
19563        https://bugs.webkit.org/show_bug.cgi?id=42559
19564
19565        * CMakeListsEfl.txt: add missing file for x86_64.
19566
195672010-07-16  Leandro Pereira  <leandro@profusion.mobi>
19568
19569        [EFL] Unreviewed build system cleanup.
19570
19571        Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
19572        root CMakeLists.txt to the platform CMakeLists.txt.
19573
19574        * CMakeLists.txt:
19575        * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
19576
195772010-07-16  Oliver Hunt  <oliver@apple.com>
19578
19579        Reviewed by Geoffrey Garen.
19580
19581        ES5 allows use of reserved words as IdentifierName
19582        https://bugs.webkit.org/show_bug.cgi?id=42471
19583
19584        Modify the lexer to allow us to avoid identifying reserved
19585        words in those contexts where they are valid identifiers, and
19586        we know it's safe.  Additionally tag the reserved word tokens
19587        so we can easily identify them in those cases where we can't
19588        guarantee that we've skipped reserved word identification.
19589
19590        * parser/JSParser.cpp:
19591        (JSC::JSParser::next):
19592        (JSC::JSParser::parseProperty):
19593        (JSC::JSParser::parseMemberExpression):
19594        * parser/JSParser.h:
19595        (JSC::):
19596        * parser/Lexer.cpp:
19597        (JSC::Lexer::lex):
19598        * parser/Lexer.h:
19599        (JSC::Lexer::):
19600
196012010-07-16  Anders Carlsson  <andersca@apple.com>
19602
19603        Reviewed by Sam Weinig.
19604
19605        clang++ build fixes for JavaScriptCore and WebCore
19606        https://bugs.webkit.org/show_bug.cgi?id=42478
19607
19608        * runtime/RegExpKey.h:
19609        (JSC::operator==):
19610        Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
19611
196122010-07-16  Anders Carlsson  <andersca@apple.com>
19613
19614        Reviewed by David Levin.
19615
19616        Really add WARN_UNUSED_RESULT to leakRef
19617        https://bugs.webkit.org/show_bug.cgi?id=42464
19618
19619        * wtf/PassRefPtr.h:
19620        (WTF::PassRefPtr::):
19621        (WTF::NonNullPassRefPtr::):
19622        Put the WARN_UNUSED_RESULT attribute at the right place.
19623
19624        * wtf/RetainPtr.h:
19625        (WTF::RetainPtr::releaseRef):
19626        Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
19627        to be fixed first.
19628
196292010-07-15  Victor Wang  <victorw@chromium.org>
19630
19631        Reviewed by David Levin.
19632
19633        [Chromium] Disable c4291 for chromium windows multi dll build.
19634
19635        https://bugs.webkit.org/show_bug.cgi?id=42177
19636
19637        * JavaScriptCore.gyp/JavaScriptCore.gyp:
19638
196392010-07-15  Geoffrey Garen  <ggaren@apple.com>
19640
19641        Reviewed by Maciej Stachowiak.
19642
19643        Crash entering mail.yahoo.com
19644        https://bugs.webkit.org/show_bug.cgi?id=42394
19645    
19646        * bytecompiler/BytecodeGenerator.cpp:
19647        (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
19648        identifier we're resolving is not a local variable, registerFor returns
19649        NULL.
19650
19651        * bytecompiler/NodesCodegen.cpp:
19652        (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
19653        noticed this while working on it: No need to NULL-check returnNode,
19654        since an early return has already done so.
19655
196562010-07-15  Martin Robinson  <mrobinson@igalia.com>
19657
19658        Reviewed by Oliver Hunt.
19659
19660        [GTK] Simplify the distribution step
19661        https://bugs.webkit.org/show_bug.cgi?id=42414
19662
19663        * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
19664        of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
19665        Refer to create_hash_table and create_regexp_tables directly, as is the
19666        behavior with other code generation scripts.
19667
196682010-07-15  Oliver Hunt  <oliver@apple.com>
19669
19670        Reviewed by Geoff Garen.
19671
19672        Fix dumping of op_put_by_id.
19673
19674        * bytecode/CodeBlock.cpp:
19675        (JSC::CodeBlock::printPutByIdOp):
19676
196772010-07-15  Zoltan Herczeg  <zherczeg@webkit.org>
19678
19679        Reviewed by Darin Adler.
19680
19681        Refactoring some parts of the lexer
19682        https://bugs.webkit.org/show_bug.cgi?id=41845
19683
19684        This patch is a precursor of refactoring the identifier
19685        parsing, which currently slows down the lexer, and not
19686        ready for landing. This patch contains those sources,
19687        which does not slow down the lexer (mainly style changes).
19688
19689        SunSpider: no change (529.4ms to 528.7ms)
19690        --parse-only: no change (31.0ms to 31.2ms)
19691
19692        * parser/Lexer.cpp:
19693        (JSC::isIdentStart): using typesOfASCIICharacters to determine
19694             whether the current character is in identifier start
19695        (JSC::isIdentPart): using typesOfASCIICharacters to determine
19696             whether the current character is in identifier part
19697        (JSC::Lexer::parseString): style fix
19698        (JSC::Lexer::lex): removing the else after the main which
19699             which reduces code duplication
19700
197012010-07-15  Mark Rowe  <mrowe@apple.com>
19702
19703        Update the sorting in the Xcode project files.
19704
19705        * JavaScriptCore.xcodeproj/project.pbxproj:
19706
197072010-07-14  Oliver Hunt  <oliver@apple.com>
19708
19709        Reviewed by Gavin Barraclough.
19710
19711        Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
19712        https://bugs.webkit.org/show_bug.cgi?id=42310
19713
19714        Add some null checks to deal with the Fixed VM allocator failing
19715        to get the requested executable region, delay the creation of the
19716        JITStubs in JSGlobalData until after we know whether we're using
19717        the JIT.
19718
19719        * jit/ExecutableAllocator.h:
19720        (JSC::ExecutableAllocator::ExecutableAllocator):
19721        (JSC::ExecutableAllocator::poolForSize):
19722        * jit/ExecutableAllocatorFixedVMPool.cpp:
19723        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
19724        (JSC::FixedVMPoolAllocator::alloc):
19725        (JSC::FixedVMPoolAllocator::free):
19726        (JSC::FixedVMPoolAllocator::isValid):
19727        (JSC::ExecutableAllocator::isValid):
19728        (JSC::ExecutablePool::systemAlloc):
19729        (JSC::ExecutablePool::systemRelease):
19730        * jit/ExecutableAllocatorPosix.cpp:
19731        (JSC::ExecutableAllocator::isValid):
19732        * jit/ExecutableAllocatorWin.cpp:
19733        (JSC::ExecutableAllocator::isValid):
19734        * jit/JIT.cpp:
19735        (JSC::JIT::linkCall):
19736        (JSC::JIT::linkConstruct):
19737        * jit/JIT.h:
19738        (JSC::JIT::compileCTIMachineTrampolines):
19739        (JSC::JIT::compileCTINativeCall):
19740        * jit/JITArithmetic.cpp:
19741        (JSC::JIT::emit_op_mod):
19742        * jit/JITArithmetic32_64.cpp:
19743        (JSC::JIT::emit_op_mod):
19744        * jit/JITCall.cpp:
19745        (JSC::JIT::compileOpCallVarargs):
19746        (JSC::JIT::compileOpCall):
19747        (JSC::JIT::compileOpCallSlowCase):
19748        * jit/JITCall32_64.cpp:
19749        (JSC::JIT::compileOpCallVarargs):
19750        (JSC::JIT::compileOpCall):
19751        (JSC::JIT::compileOpCallSlowCase):
19752        * jit/JITOpcodes.cpp:
19753        (JSC::JIT::privateCompileCTINativeCall):
19754        * jit/JITStubs.cpp:
19755        (JSC::JITThunks::JITThunks):
19756        (JSC::JITThunks::tryCacheGetByID):
19757        (JSC::JITThunks::hostFunctionStub):
19758        * jit/ThunkGenerators.cpp:
19759        (JSC::charCodeAtThunkGenerator):
19760        (JSC::charAtThunkGenerator):
19761        (JSC::fromCharCodeThunkGenerator):
19762        (JSC::sqrtThunkGenerator):
19763        (JSC::powThunkGenerator):
19764        * runtime/Executable.h:
19765        (JSC::NativeExecutable::create):
19766        * runtime/JSGlobalData.cpp:
19767        (JSC::JSGlobalData::JSGlobalData):
19768        (JSC::JSGlobalData::getHostFunction):
19769        * runtime/JSGlobalData.h:
19770        (JSC::JSGlobalData::getCTIStub):
19771        * yarr/RegexJIT.cpp:
19772        (JSC::Yarr::jitCompileRegex):
19773
197742010-07-14  Gavin Barraclough  <barraclough@apple.com>
19775
19776        Speculative Qt/Windows build fix.
19777
19778        * jit/JITStubs.h:
19779
197802010-07-14  Gavin Barraclough  <barraclough@apple.com>
19781
19782        Reviewed by Oliver Hunt.
19783
19784        https://bugs.webkit.org/show_bug.cgi?id=42280
19785        JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
19786
19787        * jit/JIT.h:
19788        * jit/JITInlineMethods.h:
19789        (JSC::JIT::restoreArgumentReferenceForTrampoline):
19790        * jit/JITStubs.cpp:
19791        * jit/JITStubs.h:
19792        * wtf/Platform.h:
19793
197942010-07-14  Oliver Hunt  <oliver@apple.com>
19795
19796        RS=Geoff Garen.
19797
19798        Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
19799
19800        This allows the code to work on windows as well.  Also unifies the
19801        environment variable with the preference name.
19802
19803        * runtime/JSGlobalData.cpp:
19804        (JSC::JSGlobalData::JSGlobalData):
19805
198062010-07-14  Oliver Hunt  <oliver@apple.com>
19807
19808        Reviewed by Don Melton.
19809
19810        Crash when trying to enable JIT and Interpreter in a single build.
19811
19812        CFPreferences code added at the last minute failed to account for
19813        the preference not being present and then attempted to CFRelease
19814        a null value.
19815
19816        * runtime/JSGlobalData.cpp:
19817        (JSC::JSGlobalData::JSGlobalData):
19818
198192010-07-14  Zoltan Herczeg  <zherczeg@webkit.org>
19820
19821        Reviewed by Darin Adler.
19822
19823        Change indentations in the lexer
19824        https://bugs.webkit.org/show_bug.cgi?id=41845
19825
19826        This patch fixes an old, indentation error comes from kjs,
19827        as webkit has a different style rule for switches, and change
19828        the indentation of the main switch, which is a temporary
19829        style error. This change makes easier to see the behavioural
19830        changes in the follow-up patch.
19831
19832        No behavioural changes.
19833
19834        * parser/Lexer.cpp:
19835        (JSC::singleEscape):
19836        (JSC::Lexer::lex):
19837
198382010-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
19839
19840        Unreviewed, rolling out r63262.
19841        http://trac.webkit.org/changeset/63262
19842        https://bugs.webkit.org/show_bug.cgi?id=42229
19843
19844        broke Windows compile (Requested by bweinstein on #webkit).
19845
19846        * API/tests/testapi.c:
19847        (assertEqualsAsCharactersPtr):
19848        (main):
19849        * testapi.pro: Removed.
19850
198512010-07-13  Oliver Hunt  <oliver@apple.com>
19852
19853        Reviewed by Gavin Barraclough.
19854
19855        ES5 requires BOMs to be treated as whitespace
19856        https://bugs.webkit.org/show_bug.cgi?id=42218
19857
19858        Add BOM character to the Lexer's definition of whitespace,
19859        and remove the logic that dealt with stripping BOMs and
19860        caching the cleaned string.
19861
19862        * parser/Lexer.h:
19863        (JSC::Lexer::isWhiteSpace):
19864        * parser/SourceProvider.h:
19865        (JSC::UStringSourceProvider::create):
19866        (JSC::UStringSourceProvider::UStringSourceProvider):
19867        * wtf/text/StringImpl.h:
19868
198692010-07-13  Andreas Kling  <andreas.kling@nokia.com>
19870
19871        Reviewed by Darin Adler.
19872
19873        Avoid slow-path for put() in Array.splice()
19874        https://bugs.webkit.org/show_bug.cgi?id=41920
19875
19876        Defer creation of the returned array until its final size is known
19877        to avoid growing it while adding elements.
19878
19879        * runtime/JSArray.cpp:
19880        (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
19881        and CreateCompact (which should only be used when constructing arrays whose
19882        size and contents are known at the time of creation.)
19883        (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
19884        initialization mode. (Only applies to non-empty arrays.)
19885        (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
19886        * runtime/JSArray.h:
19887        (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
19888        arrays. Does no bounds or other sanity checking.
19889        * runtime/ArrayPrototype.cpp:
19890        (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
19891        * runtime/ArrayConstructor.cpp:
19892        (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
19893        * runtime/JSGlobalObject.h:
19894        (JSC::constructEmptyArray): Pass CreateInitialized to ctor.
19895        * runtime/RegExpConstructor.cpp:
19896        (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
19897
198982010-07-13  Gavin Barraclough  <barraclough@apple.com>
19899
19900        Reviewed by Oliver Hunt.
19901
19902        Bug 42207 - Clean up interface to compile executables, always check for exceptions
19903
19904        Presently interface to compile executable is inconsistent between eval/program and
19905        function code, and is error prone in allowing a caller to byte compile without JIT
19906        compiling an executable (we rely on all executables with codeblocks having JIT code).
19907        Unify on an interface where all compilation is performed by a single compile (with
19908        ForCall|ForConstruct variants) method, and make all clients check for errors.
19909
19910        * interpreter/Interpreter.cpp:
19911        (JSC::Interpreter::unwindCallFrame):
19912        (JSC::Interpreter::execute):
19913        (JSC::Interpreter::executeCall):
19914        (JSC::Interpreter::executeConstruct):
19915        (JSC::Interpreter::prepareForRepeatCall):
19916        (JSC::Interpreter::privateExecute):
19917        * jit/JITStubs.cpp:
19918        (JSC::DEFINE_STUB_FUNCTION):
19919        * parser/Parser.h:
19920        (JSC::Parser::isFunctionBodyNode):
19921        (JSC::Parser::parse):
19922        * runtime/ArrayPrototype.cpp:
19923        (JSC::isNumericCompareFunction):
19924        * runtime/ExceptionHelpers.cpp:
19925        (JSC::createStackOverflowError):
19926        * runtime/ExceptionHelpers.h:
19927        * runtime/Executable.cpp:
19928        (JSC::EvalExecutable::compileInternal):
19929        (JSC::ProgramExecutable::checkSyntax):
19930        (JSC::ProgramExecutable::compileInternal):
19931        (JSC::FunctionExecutable::compileForCallInternal):
19932        (JSC::FunctionExecutable::compileForConstructInternal):
19933        (JSC::FunctionExecutable::reparseExceptionInfo):
19934        (JSC::EvalExecutable::reparseExceptionInfo):
19935        (JSC::FunctionExecutable::fromGlobalCode):
19936        * runtime/Executable.h:
19937        (JSC::EvalExecutable::compile):
19938        (JSC::EvalExecutable::generatedBytecode):
19939        (JSC::EvalExecutable::generatedJITCode):
19940        (JSC::ProgramExecutable::compile):
19941        (JSC::ProgramExecutable::generatedBytecode):
19942        (JSC::ProgramExecutable::generatedJITCode):
19943        (JSC::FunctionExecutable::generatedBytecode):
19944        (JSC::FunctionExecutable::compileForCall):
19945        (JSC::FunctionExecutable::compileForConstruct):
19946        (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
19947        * runtime/FunctionConstructor.cpp:
19948        (JSC::constructFunction):
19949        * runtime/JSActivation.cpp:
19950        (JSC::JSActivation::argumentsGetter):
19951        * runtime/JSGlobalData.h:
19952        (JSC::JSGlobalData::canUseJIT):
19953
199542010-07-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
19955
19956        Reviewed by Oliver Hunt.
19957
19958        testapi.c depends on the Core Foundation.
19959        https://bugs.webkit.org/show_bug.cgi?id=40058
19960
19961        Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
19962        to compile in Qt environments.
19963
19964        All tests should work except for the JSStringCreateWithCharacters() function,
19965        because its tests depend on Core Foundation specific functions.
19966
19967        * API/tests/testapi.c:
19968        (testJSStringRefCF): moved CoreFoundation specific tests to this function.
19969        (main): The moves plus some minor tweaks.
19970        * testapi.pro: Added.
19971
199722010-07-13  Gavin Barraclough  <barraclough@apple.com>
19973
19974        Reviewed by Oliver Hunt.
19975
19976        Bug 42182 - Change how numeric compare functions are detected
19977
19978        There are three problems with the current mechanism:
19979          * It requires that a function executable be bytecode compiled without
19980            being JIT generated (in order to copy the bytecode from the numeric
19981            compare function).  This is a problem since we have an invariant when
19982            running with the JIT that functions are never bytecode compiled without
19983            also being JIT generated (after checking the codeblock we assume the
19984            function has JIT code).  To help maintain this invariant 
19985          * This implementation will prevent us from experimenting with alternate
19986            compilation paths which do not compile via bytecode.
19987          * It doesn't work.  Functions passing more than two arguments will match
19988            if they are comparing their last two arguments, not the first two.
19989            Generally the mapping back from bytecode to semantics may be more
19990            complex then initially expected.
19991
19992        * bytecompiler/BytecodeGenerator.cpp:
19993        (JSC::BytecodeGenerator::generate):
19994        (JSC::BytecodeGenerator::setIsNumericCompareFunction):
19995        (JSC::BytecodeGenerator::argumentNumberFor):
19996        * bytecompiler/BytecodeGenerator.h:
19997        * bytecompiler/NodesCodegen.cpp:
19998        (JSC::BlockNode::singleStatement):
19999        (JSC::FunctionBodyNode::emitBytecode):
20000        * parser/Nodes.h:
20001        (JSC::ExpressionNode::isSubtract):
20002        (JSC::BinaryOpNode::lhs):
20003        (JSC::BinaryOpNode::rhs):
20004        (JSC::SubNode::isSubtract):
20005        (JSC::ReturnNode::value):
20006        * runtime/JSGlobalData.cpp:
20007        (JSC::JSGlobalData::JSGlobalData):
20008        * runtime/JSGlobalData.h:
20009
200102010-07-12  Oliver Hunt  <oliver@apple.com>
20011
20012        Reviewed by Gavin Barraclough.
20013
20014        REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
20015        https://bugs.webkit.org/show_bug.cgi?id=41763
20016
20017        There are two parts to this patch, the first is to fix the actual
20018        problem.  When calling copyStringWithoutBOMs on a string we know
20019        to contain BOMs we return a value indicating that there are no
20020        BOMs.
20021
20022        The second part of this fix is simply to harden the path that
20023        led to a crash when parsing failed.
20024
20025        * jit/JITOpcodes.cpp:
20026        (JSC::JIT::privateCompileCTIMachineTrampolines):
20027        * jit/JITOpcodes32_64.cpp:
20028        (JSC::JIT::privateCompileCTIMachineTrampolines):
20029        * jit/JITStubs.cpp:
20030        (JSC::DEFINE_STUB_FUNCTION):
20031           Harden compilation stubs against parser failure.
20032        * parser/Lexer.cpp:
20033        (JSC::Lexer::sourceCode):
20034           Add assertions to ensure that subranges into a source provider
20035           are always actually braces.  Hopefully this should catch similar
20036           failures in future.  These assertions fire on existing tests
20037           without this fix.
20038        * runtime/Executable.h:
20039        (JSC::FunctionExecutable::tryJitCodeForCall):
20040        (JSC::FunctionExecutable::tryJitCodeForConstruct):
20041        * wtf/text/StringImpl.h:
20042        (WebCore::StringImpl::copyStringWithoutBOMs):
20043           Make copyStringWithBOMs do the right thing.
20044
200452010-07-13  Gabor Loki  <loki@webkit.org>
20046
20047        Reviewed by Gavin Barraclough.
20048
20049        Fix the constant encoding in data transfer instructions on ARM
20050        https://bugs.webkit.org/show_bug.cgi?id=42166
20051
20052        The getImm function is designed to produce modified immediate constant
20053        for data processing instructions. It should not be used to encode
20054        any constant for data transfer. In the current situation there is no
20055        way to use any immediate constant for data transfer. So, the moveImm
20056        function is the desired method to pass the offset value to the data
20057        transfer instructions.
20058
20059        Reported by Jacob Bramley.
20060
20061        * assembler/ARMAssembler.cpp:
20062        (JSC::ARMAssembler::dataTransfer32):
20063        * assembler/MacroAssemblerARM.h:
20064        (JSC::MacroAssemblerARM::call32):
20065
200662010-07-09  Darin Adler  <darin@apple.com>
20067
20068        Reviewed by Geoffrey Garen.
20069
20070        String to number coercion is not spec compliant
20071        https://bugs.webkit.org/show_bug.cgi?id=31349
20072
20073        ToNumber should ignore NBSP (\u00a0)
20074        https://bugs.webkit.org/show_bug.cgi?id=25490
20075
20076        * runtime/JSGlobalObjectFunctions.cpp:
20077        (JSC::parseIntOverflow): Added a version that works on UChar.
20078        * runtime/JSGlobalObjectFunctions.h: Ditto.
20079
20080        * runtime/UString.cpp:
20081        (JSC::isInfinity): Added helper functions.
20082        (JSC::UString::toDouble): Use isStrWhiteSpace instead of
20083        isSASCIISpace to define what we should skip. Got rid of the
20084        code that used CString and UTF8String, instead processing the
20085        UChar of the string directly, except for when we call strtod.
20086        For strtod, use our own home-grown conversion function that
20087        does not try to do any UTF-16 processing. Tidied up the logic
20088        a bit as well.
20089
200902010-07-12  Martin Robinson  <mrobinson@igalia.com>
20091
20092        Reviewed by Xan Lopez.
20093
20094        [GTK] make dist is broken because of missing headers and other miscellaneous reasons
20095        https://bugs.webkit.org/show_bug.cgi?id=42107
20096
20097        * GNUmakefile.am: Add missing header to the sources list.
20098
200992010-07-12  Adam Roben  <aroben@apple.com>
20100
20101        Stop generating stripped symbols for Release builds
20102
20103        It turns out we can strip the symbols after-the-fact using PDBCopy.
20104
20105        Fixes <http://webkit.org/b/42085>.
20106
20107        Reviewed by Steve Falkenburg.
20108
20109        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
20110        Removed the pre-link event, which just created the public\sym
20111        directory.
20112
201132010-07-12  Anders Carlsson  <andersca@apple.com>
20114
20115        Reviewed by Dan Bernstein.
20116
20117        Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
20118        https://bugs.webkit.org/show_bug.cgi?id=42086
20119
20120        * wtf/OwnPtr.h:
20121        * wtf/PassOwnPtr.h:
20122        * wtf/PassRefPtr.h:
20123        (WTF::PassRefPtr::releaseRef):
20124        (WTF::NonNullPassRefPtr::leakRef):
20125        (WTF::NonNullPassRefPtr::releaseRef):
20126        * wtf/RetainPtr.h:
20127        (WTF::RetainPtr::releaseRef):
20128
201292010-07-10  Oliver Hunt  <oliver@apple.com>
20130
20131        Reviewed by Maciej Stachowiak.
20132
20133        HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
20134        https://bugs.webkit.org/show_bug.cgi?id=42039
20135
20136        Separate the existence of computed goto support in the compiler
20137        from whether or not we are using the interpreter.  All the current
20138        HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
20139        the option of using it elsewhere.  The interpreter now uses
20140        ENABLE(COMPUTED_GOTO_INTERPRETER) 
20141
20142        * bytecode/Instruction.h:
20143        (JSC::Instruction::Instruction):
20144        * bytecode/Opcode.h:
20145        * interpreter/Interpreter.cpp:
20146        (JSC::Interpreter::Interpreter):
20147        (JSC::Interpreter::isOpcode):
20148        (JSC::Interpreter::privateExecute):
20149        * interpreter/Interpreter.h:
20150        (JSC::Interpreter::getOpcode):
20151        (JSC::Interpreter::getOpcodeID):
20152        * wtf/Platform.h:
20153
201542010-07-10  Oliver Hunt  <oliver@apple.com>
20155
20156        Reviewed by Gavin Barraclough.
20157
20158        Remove switches from inner expression loops in the parser
20159        https://bugs.webkit.org/show_bug.cgi?id=42035
20160
20161        Use bitmasks and flags on the token types to identify unary and
20162        binary operators, rather than switching on the token type to
20163        identify them.
20164
20165        * parser/JSParser.cpp:
20166        (JSC::isUnaryOp):
20167        (JSC::JSParser::isBinaryOperator):
20168        * parser/JSParser.h:
20169        (JSC::):
20170
201712010-07-09  Leon Clarke  <leonclarke@google.com>
20172
20173        Reviewed by Adam Barth.
20174
20175        add support for link prefetching
20176        https://bugs.webkit.org/show_bug.cgi?id=3652
20177
20178        * Configurations/FeatureDefines.xcconfig:
20179
201802010-07-09  Oliver Hunt  <oliver@apple.com>
20181
20182        Reviewed by Darin Adler.
20183
20184        Tidy up lexer token ids
20185        https://bugs.webkit.org/show_bug.cgi?id=42014
20186
20187        Stop using character literals to identify single character tokens
20188        and instead use symbolic names for all tokens.
20189
20190        * parser/ASTBuilder.h:
20191        (JSC::ASTBuilder::makeBinaryNode):
20192        * parser/JSParser.cpp:
20193        (JSC::JSParser::consume):
20194        (JSC::JSParser::match):
20195        (JSC::JSParser::autoSemiColon):
20196        (JSC::JSParser::JSParser):
20197        (JSC::JSParser::parseProgram):
20198        (JSC::JSParser::allowAutomaticSemicolon):
20199        (JSC::JSParser::parseDoWhileStatement):
20200        (JSC::JSParser::parseWhileStatement):
20201        (JSC::JSParser::parseVarDeclarationList):
20202        (JSC::JSParser::parseConstDeclarationList):
20203        (JSC::JSParser::parseForStatement):
20204        (JSC::JSParser::parseReturnStatement):
20205        (JSC::JSParser::parseWithStatement):
20206        (JSC::JSParser::parseSwitchStatement):
20207        (JSC::JSParser::parseSwitchClauses):
20208        (JSC::JSParser::parseSwitchDefaultClause):
20209        (JSC::JSParser::parseTryStatement):
20210        (JSC::JSParser::parseDebuggerStatement):
20211        (JSC::JSParser::parseStatement):
20212        (JSC::JSParser::parseFormalParameters):
20213        (JSC::JSParser::parseFunctionInfo):
20214        (JSC::JSParser::parseExpressionOrLabelStatement):
20215        (JSC::JSParser::parseIfStatement):
20216        (JSC::JSParser::parseExpression):
20217        (JSC::JSParser::parseAssignmentExpression):
20218        (JSC::JSParser::parseConditionalExpression):
20219        (JSC::isUnaryOp):
20220        (JSC::JSParser::isBinaryOperator):
20221        (JSC::JSParser::parseBinaryExpression):
20222        (JSC::JSParser::parseProperty):
20223        (JSC::JSParser::parseObjectLiteral):
20224        (JSC::JSParser::parseStrictObjectLiteral):
20225        (JSC::JSParser::parseArrayLiteral):
20226        (JSC::JSParser::parsePrimaryExpression):
20227        (JSC::JSParser::parseArguments):
20228        (JSC::JSParser::parseMemberExpression):
20229        (JSC::JSParser::parseUnaryExpression):
20230        * parser/JSParser.h:
20231        (JSC::):
20232        * parser/Lexer.cpp:
20233        (JSC::):
20234        (JSC::Lexer::lex):
20235        * parser/Lexer.h:
20236
202372010-07-09  Gavin Barraclough  <barraclough@apple.com>
20238
20239        Reviewed by Oliver Hunt.
20240
20241        Bug 42015 - Enable JSValue32_64 on ARMv7
20242
20243        * Configurations/JavaScriptCore.xcconfig:
20244        * jit/JIT.h:
20245        * jit/JITStubs.cpp:
20246        * wtf/Platform.h:
20247
202482010-07-09  Kenneth Russell  <kbr@google.com>
20249
20250        Reviewed by Dimitri Glazkov.
20251
20252        Assertion failure in String::utf8() for certain invalid UTF16 inputs
20253        https://bugs.webkit.org/show_bug.cgi?id=41983
20254
20255        * wtf/text/WTFString.cpp:
20256        (WebCore::String::utf8):
20257         - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
20258
202592010-07-09  Oliver Hunt  <oliver@apple.com>
20260
20261        Reviewed by Geoffrey Garen.
20262
20263        Remove a couple of excess writes from the lexer
20264        https://bugs.webkit.org/show_bug.cgi?id=41981
20265
20266        Remove a couple of fields from JSTokenInfo, and rename the remaining ones
20267        to something more accurate
20268
20269        * parser/JSParser.cpp:
20270        (JSC::JSParser::next):
20271        (JSC::JSParser::tokenStart):
20272        (JSC::JSParser::tokenLine):
20273        (JSC::JSParser::tokenEnd):
20274        * parser/JSParser.h:
20275        (JSC::JSTokenInfo::JSTokenInfo):
20276        * parser/Lexer.cpp:
20277        (JSC::Lexer::lex):
20278
202792010-07-08  Oliver Hunt  <oliver@apple.com>
20280
20281        Reviewed by Sam Weinig.
20282
20283        Property declarations in an object literal should not consider the prototype chain when being added to the new object
20284        https://bugs.webkit.org/show_bug.cgi?id=41929
20285
20286        To fix this all we need to do is ensure that all new properties are
20287        added with putDirect rather than a fully generic call to put.  This
20288        is safe as an object literal is by definition going to produce a
20289        completely normal object.
20290
20291        Rather than duplicating all the put_by_id logic we add an additional
20292        flag to op_put_by_id to indicate it should be using putDirect.  In
20293        the interpreter this adds a runtime branch, but in the jit this is
20294        essentially free as the branch is taken at compile time.  This does
20295        actually improve object literal creation time even in the interpreter
20296        as we no longer need to walk the prototype chain to verify that the
20297        cached put is safe.
20298
20299        We still emit normal put_by_id code when emitting __proto__ as we want
20300        to get the correct handling for changing the prototype.
20301
20302        Sunspider claims this is a 0.7% speedup which is conceivably real due
20303        to the performance improvement in object literals, but I suspect its
20304        really just the result of code motion.
20305
20306        * bytecode/Opcode.h:
20307        * bytecompiler/BytecodeGenerator.cpp:
20308        (JSC::BytecodeGenerator::emitPutById):
20309        (JSC::BytecodeGenerator::emitDirectPutById):
20310        * bytecompiler/BytecodeGenerator.h:
20311        * bytecompiler/NodesCodegen.cpp:
20312        (JSC::PropertyListNode::emitBytecode):
20313        * interpreter/Interpreter.cpp:
20314        (JSC::Interpreter::privateExecute):
20315        * jit/JIT.h:
20316        (JSC::JIT::compilePutByIdTransition):
20317        * jit/JITPropertyAccess.cpp:
20318        (JSC::JIT::emit_op_put_by_id):
20319        (JSC::JIT::emitSlow_op_put_by_id):
20320        (JSC::JIT::privateCompilePutByIdTransition):
20321        (JSC::JIT::patchPutByIdReplace):
20322        * jit/JITPropertyAccess32_64.cpp:
20323        (JSC::JIT::emitSlow_op_put_by_id):
20324        (JSC::JIT::privateCompilePutByIdTransition):
20325        (JSC::JIT::patchPutByIdReplace):
20326        * jit/JITStubs.cpp:
20327        (JSC::JITThunks::tryCachePutByID):
20328        (JSC::DEFINE_STUB_FUNCTION):
20329        * jit/JITStubs.h:
20330        (JSC::):
20331        * runtime/JSGlobalData.cpp:
20332        (JSC::JSGlobalData::JSGlobalData):
20333        * runtime/JSObject.h:
20334        (JSC::JSObject::putDirect):
20335        (JSC::JSValue::putDirect):
20336        * runtime/JSValue.h:
20337
203382010-07-08  Gavin Barraclough  <barraclough@apple.com>
20339
20340        Reviewed by Sam Weinig.
20341
20342        String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
20343
20344        * runtime/StringPrototype.cpp:
20345        (JSC::stringProtoFuncCharAt):
20346        (JSC::stringProtoFuncCharCodeAt):
20347        (JSC::stringProtoFuncConcat):
20348        (JSC::stringProtoFuncIndexOf):
20349        (JSC::stringProtoFuncLastIndexOf):
20350        (JSC::stringProtoFuncMatch):
20351        (JSC::stringProtoFuncSearch):
20352        (JSC::stringProtoFuncSlice):
20353        (JSC::stringProtoFuncSplit):
20354        (JSC::stringProtoFuncSubstr):
20355        (JSC::stringProtoFuncSubstring):
20356        (JSC::stringProtoFuncToLowerCase):
20357        (JSC::stringProtoFuncToUpperCase):
20358        (JSC::stringProtoFuncLocaleCompare):
20359        (JSC::trimString):
20360
203612010-07-08  Gavin Barraclough  <barraclough@apple.com>
20362
20363        Reviewed by Sam Weinig.
20364
20365        Date.prototype.toJSON takes one argument, report this correctly.
20366
20367        * runtime/DatePrototype.cpp:
20368
203692010-07-08  Gavin Barraclough  <barraclough@apple.com>
20370
20371        Reviewed by Sam Weinig.
20372
20373        RegExp's prototype should be an object of type RegExp.
20374
20375        * runtime/RegExpPrototype.cpp:
20376        (JSC::RegExpPrototype::RegExpPrototype):
20377        * runtime/RegExpPrototype.h:
20378
203792010-07-08  Oliver Hunt  <oliver@apple.com>
20380
20381        Reviewed by Gavin Barraclough.
20382
20383        JavaScript parser violates ECMA automatic semicolon insertion rule
20384        https://bugs.webkit.org/show_bug.cgi?id=41844
20385
20386        Remove (very) old and bogus logic that automatically inserted a semicolon
20387        at the end of a script's source.
20388
20389        * parser/Lexer.cpp:
20390        (JSC::Lexer::lex):
20391
203922010-07-08  Oliver Hunt  <oliver@apple.com>
20393
20394        Reviewed by Anders Carlson.
20395
20396        Tidy up the lexer
20397
20398        Remove some of the old yacc/lex-isms still present in the lexer
20399
20400        * parser/JSParser.h:
20401        (JSC::):
20402        * parser/Lexer.cpp:
20403        (JSC::Lexer::parseString):
20404        (JSC::Lexer::lex):
20405        * parser/Lexer.h:
20406
204072010-07-08  Oliver Hunt  <oliver@apple.com>
20408
20409        Reviewed by Gavin Barraclough.
20410
20411        Make object-literal parsing conformant with the spec.
20412        https://bugs.webkit.org/show_bug.cgi?id=41892
20413
20414        Bring our parsing of object literals into conformance with the ES5 spec.
20415        Basically disallow conflicting accessor vs. normal property definitions
20416        The bulk of this patch is just fiddling to maintain performance.
20417
20418        * parser/ASTBuilder.h:
20419        (JSC::ASTBuilder::createGetterOrSetterProperty):
20420        (JSC::ASTBuilder::createProperty):
20421        (JSC::ASTBuilder::getName):
20422        (JSC::ASTBuilder::getType):
20423        * parser/JSParser.cpp:
20424        (JSC::jsParse):
20425        (JSC::JSParser::JSParser):
20426        (JSC::JSParser::parseProperty):
20427        (JSC::JSParser::parseObjectLiteral):
20428        (JSC::JSParser::parseStrictObjectLiteral):
20429        * parser/JSParser.h:
20430        * parser/Lexer.cpp:
20431        (JSC::Lexer::clear):
20432        * parser/Lexer.h:
20433        (JSC::Lexer::currentOffset):
20434        (JSC::Lexer::setOffset):
20435          Add logic to allow us to roll the lexer back in the input stream.
20436        * parser/Nodes.h:
20437        (JSC::PropertyNode::):
20438        (JSC::PropertyNode::type):
20439        * parser/Parser.cpp:
20440        (JSC::Parser::parse):
20441        * parser/SourceProvider.h:
20442        (JSC::SourceProvider::SourceProvider):
20443        (JSC::SourceProvider::isValid):
20444        (JSC::SourceProvider::setValid):
20445          SourceProvider now records whether the input text
20446          has already been validated.
20447        * parser/SyntaxChecker.h:
20448        (JSC::SyntaxChecker::SyntaxChecker):
20449        (JSC::SyntaxChecker::Property::Property):
20450        (JSC::SyntaxChecker::Property::operator!):
20451        (JSC::SyntaxChecker::createProperty):
20452        (JSC::SyntaxChecker::createPropertyList):
20453        (JSC::SyntaxChecker::createGetterOrSetterProperty):
20454          The SyntaxChecker mode now needs to maintain a bit more information
20455          to ensure that we can validate object literals correctly.
20456
204572010-07-08  Darin Adler  <darin@apple.com>
20458
20459        * runtime/JSGlobalData.cpp:
20460        (JSC::JSGlobalData::sharedInstance): Fix typo.
20461
204622010-07-08  Darin Adler  <darin@apple.com>
20463
20464        Reviewed by Oliver Hunt.
20465
20466        Fix assertion seen on the Leopard buildbot.
20467        The single shared instance of JSGlobalData was not being
20468        adopted after creation.
20469
20470        * runtime/JSGlobalData.cpp:
20471        (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
20472
204732010-07-08  Gavin Barraclough  <barraclough@apple.com>
20474
20475        Reviewed by Sam Weinig.
20476
20477        BOMs are whitespace.
20478
20479        * runtime/JSGlobalObjectFunctions.cpp:
20480        (JSC::isStrWhiteSpace):
20481
204822010-07-08  Martin Robinson  <mrobinson@igalia.com>
20483
20484        Unreviewed.
20485
20486        Try fix the GTK+ build by touching this file.
20487
20488        * jit/ExecutableAllocatorFixedVMPool.cpp:
20489
204902010-07-08  Gavin Barraclough  <barraclough@apple.com>
20491
20492        GTK build fix take two.
20493
20494        * GNUmakefile.am:
20495
204962010-07-08  Gavin Barraclough  <barraclough@apple.com>
20497
20498        GTK build fix.
20499
20500        * GNUmakefile.am:
20501
205022010-07-08  Gavin Barraclough  <barraclough@apple.com>
20503
20504        Reviewed by Sam Weinig.
20505
20506        https://bugs.webkit.org/show_bug.cgi?id=41641
20507
20508        Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
20509        other than x86-64 (this may be useful on 32-bit platforms, too).
20510
20511        Simplify ifdefs by dividing into thwo broad allocation strategies
20512        (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
20513
20514        Rename constant used in the code to have names descriptive of their purpose,
20515        rather than their specific value on a given platform.
20516
20517        * jit/ExecutableAllocator.cpp:
20518        (JSC::ExecutableAllocator::reprotectRegion):
20519        (JSC::ExecutableAllocator::cacheFlush):
20520        * jit/ExecutableAllocatorFixedVMPool.cpp:
20521        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
20522        (JSC::FixedVMPoolAllocator::free):
20523        (JSC::ExecutablePool::systemAlloc):
20524        * jit/ExecutableAllocatorPosix.cpp:
20525        * jit/ExecutableAllocatorSymbian.cpp:
20526        * jit/ExecutableAllocatorWin.cpp:
20527        * wtf/Platform.h:
20528
205292010-07-08  Xan Lopez  <xlopez@igalia.com>
20530
20531        Reviewed by Gustavo Noronha.
20532
20533        Silence a few noisy build rules.
20534
20535        * GNUmakefile.am:
20536
205372010-07-08  Sheriff Bot  <webkit.review.bot@gmail.com>
20538
20539        Unreviewed, rolling out r62765.
20540        http://trac.webkit.org/changeset/62765
20541        https://bugs.webkit.org/show_bug.cgi?id=41840
20542
20543        All jscore and layout tests crash on Qt bot (Requested by Ossy
20544        on #webkit).
20545
20546        * wtf/FastMalloc.cpp:
20547        (WTF::TCMalloc_PageHeap::initializeScavenger):
20548        (WTF::TCMalloc_PageHeap::signalScavenger):
20549        (WTF::TCMalloc_PageHeap::scavengerThread):
20550
205512010-07-08  Andreas Kling  <andreas.kling@nokia.com>
20552
20553        Reviewed by Oliver Hunt.
20554
20555        Interpreter: Crash in op_load_varargs on 64-bit
20556        https://bugs.webkit.org/show_bug.cgi?id=41795
20557
20558        Added missing cast of argCount to int32_t in op_load_varargs.
20559
20560        * interpreter/Interpreter.cpp:
20561        (JSC::Interpreter::privateExecute):
20562
205632010-07-08  Patrick Gansterer  <paroga@paroga.com>
20564
20565        Reviewed by Geoffrey Garen.
20566
20567        Make FastMalloc more portable.
20568        https://bugs.webkit.org/show_bug.cgi?id=41790
20569
20570        Use WTF::Mutex instead of pthread_mutex_t and
20571        replace pthread_cond_t with WTF::ThreadCondition.
20572
20573        * wtf/FastMalloc.cpp:
20574        (WTF::TCMalloc_PageHeap::initializeScavenger):
20575        (WTF::TCMalloc_PageHeap::signalScavenger):
20576        (WTF::TCMalloc_PageHeap::scavengerThread):
20577
205782010-07-08  Patrick Gansterer  <paroga@paroga.com>
20579
20580        Reviewed by Darin Adler.
20581
20582        Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
20583        https://bugs.webkit.org/show_bug.cgi?id=41777
20584
20585        * wtf/TCSystemAlloc.cpp:
20586
205872010-07-07  Darin Adler  <darin@apple.com>
20588
20589        Fixed build in configurations like PowerPC.
20590
20591        * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
20592        * runtime/RegExpObject.cpp: Ditto.
20593        * wtf/SizeLimits.cpp: Changed compile time assertion to work
20594        even on platforms where two bool members do not end up taking
20595        the same size as one int member!
20596
205972010-07-07  Oliver Hunt  <oliver@apple.com>
20598
20599        Reviewed by Geoffrey Garen.
20600
20601        Lazy mode of parser allows invalid syntax in object literals.
20602        https://bugs.webkit.org/show_bug.cgi?id=41809
20603
20604        Make the parser itself validate getter and setter syntax rather
20605        than offloading it to the AST builder.
20606
20607        * parser/ASTBuilder.h:
20608        (JSC::ASTBuilder::createGetterOrSetterProperty):
20609        * parser/JSParser.cpp:
20610        (JSC::JSParser::parseProperty):
20611
206122010-07-07  Dumitru Daniliuc  <dumi@chromium.org>
20613
20614        Reviewed by Adam Roben.
20615
20616        Revert r62689.
20617        https://bugs.webkit.org/show_bug.cgi?id=41804
20618
20619        * runtime/Collector.cpp:
20620        (JSC::Heap::freeBlocks):
20621
206222010-07-07  Adam Barth  <abarth@webkit.org>
20623
20624        Reviewed by Sam Weinig.
20625
20626        Add reverseFind to Vector and deploy in HTML5 parser
20627        https://bugs.webkit.org/show_bug.cgi?id=41778
20628
20629        This method seems generally useful.  I'm slightly surprised we don't
20630        have it already.
20631
20632        * wtf/Vector.h:
20633        (WTF::::reverseFind):
20634
206352010-07-07  Darin Adler  <darin@apple.com>
20636
20637        Reviewed by Adam Barth.
20638
20639        Turn on adoptRef assertion for RefCounted
20640        https://bugs.webkit.org/show_bug.cgi?id=41547
20641
20642        * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
20643        WTF headers should use "" includes; consistent in most WTF headers.
20644        Added a call to relaxAdoptionRequirement.
20645
20646        * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
20647        Added relaxAdoptionRequirement.
20648
206492010-07-07  Anders Carlsson  <andersca@apple.com>
20650
20651        Try to fix the Windows build.
20652
20653        * runtime/Collector.cpp:
20654        (JSC::Heap::freeBlocks):
20655
206562010-07-07  Darin Adler  <darin@apple.com>
20657
20658        Reviewed by Adam Barth.
20659
20660        More OwnPtr work
20661        https://bugs.webkit.org/show_bug.cgi?id=41727
20662
20663        * API/JSCallbackObject.h:
20664        (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
20665        * API/JSCallbackObjectFunctions.h:
20666        (JSC::JSCallbackObject::JSCallbackObject): Ditto.
20667        * bytecode/CodeBlock.cpp:
20668        (JSC::CodeBlock::CodeBlock): Ditto.
20669        * bytecode/CodeBlock.h:
20670        (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
20671        * parser/Nodes.cpp:
20672        (JSC::ScopeNode::ScopeNode): Ditto.
20673        * parser/ParserArena.cpp:
20674        (JSC::ParserArena::ParserArena): Ditto.
20675        * runtime/Arguments.h:
20676        (JSC::Arguments::Arguments): Ditto.
20677        * runtime/Executable.cpp:
20678        (JSC::EvalExecutable::compile): Ditto.
20679        (JSC::ProgramExecutable::compile): Ditto.
20680        (JSC::FunctionExecutable::compileForCall): Ditto.
20681        (JSC::FunctionExecutable::compileForConstruct): Ditto.
20682        (JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
20683        (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
20684        * runtime/JSArray.cpp:
20685        (JSC::JSArray::sort): Ditto.
20686        * runtime/RegExpConstructor.cpp:
20687        (JSC::RegExpConstructor::RegExpConstructor): Ditto.
20688        * runtime/RegExpObject.cpp:
20689        (JSC::RegExpObject::RegExpObject): Ditto.
20690        * runtime/SmallStrings.cpp:
20691        (JSC::SmallStrings::createSingleCharacterString): Ditto.
20692        (JSC::SmallStrings::singleCharacterStringRep): Ditto.
20693
20694        * wtf/unicode/icu/CollatorICU.cpp:
20695        (WTF::Collator::userDefault): Use adoptPtr.
20696        * yarr/RegexInterpreter.cpp:
20697        (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
20698        (JSC::Yarr::ByteCompiler::compile): Ditto.
20699        (JSC::Yarr::ByteCompiler::regexBegin): Ditto.
20700        (JSC::Yarr::byteCompileRegex): Ditto.
20701        * yarr/RegexInterpreter.h:
20702        (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
20703
207042010-07-07  Darin Adler  <darin@apple.com>
20705
20706        Reviewed by Adam Barth.
20707
20708        Make clear set the pointer to 0 before deletion
20709        https://bugs.webkit.org/show_bug.cgi?id=41727
20710
20711        * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
20712        value before deleting the old one, including in the set function and the
20713        clear function. This required changing safeDelete.
20714        * wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
20715        * wtf/PassOwnPtr.h: Ditto.
20716
20717        * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
20718        value before deref'ing the old one in the clear function. Also added a
20719        leakRef function for NonNullPassRefPtr.
20720        * wtf/RefPtr.h: Ditto.
20721
20722        * wtf/gobject/GOwnPtr.h: More of the same.
20723        * wtf/gobject/GRefPtr.h: Ditto.
20724
207252010-07-07  Zoltan Herczeg  <zherczeg@webkit.org>
20726
20727        Reviewed by Oliver Hunt.
20728
20729        Refactored string parsing inside the lexer
20730        https://bugs.webkit.org/show_bug.cgi?id=41606
20731
20732        Does not use goto. Although the last sunspider
20733        parse-only tests yields 1.044x speedup, I think the
20734        patch can have a slight improvement at most.
20735
20736        * parser/Lexer.cpp:
20737        (JSC::singleEscape):
20738        (JSC::Lexer::parseString):
20739        (JSC::Lexer::lex):
20740        * parser/Lexer.h:
20741
207422010-07-06  Oliver Hunt  <oliver@apple.com>
20743
20744        Reviewed by Maciej Stachowiak.
20745
20746        Make it possible to have both the JIT and Interpreter available in a single build
20747        https://bugs.webkit.org/show_bug.cgi?id=41722
20748
20749        Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
20750        to have both JIT and INTERPRETER enabled at the same time.  This doesn't add
20751        support for mix mode execution, but it does allow a single build to contain all
20752        the code needed to use either the interpreter or the jit.
20753
20754        If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
20755        variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
20756
20757        This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
20758        or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
20759        #if ENABLE(INTERPRETER), etc.  There are also a few functions that need to be
20760        renamed to resolve return type ambiguity.
20761
20762        * bytecode/CodeBlock.cpp:
20763        (JSC::CodeBlock::~CodeBlock):
20764        (JSC::CodeBlock::shrinkToFit):
20765        * bytecode/CodeBlock.h:
20766        * interpreter/CallFrame.h:
20767        (JSC::ExecState::returnVPC):
20768        * interpreter/Interpreter.cpp:
20769        (JSC::Interpreter::unwindCallFrame):
20770        (JSC::Interpreter::throwException):
20771        (JSC::Interpreter::execute):
20772        (JSC::Interpreter::executeCall):
20773        (JSC::Interpreter::executeConstruct):
20774        (JSC::Interpreter::prepareForRepeatCall):
20775        (JSC::Interpreter::privateExecute):
20776        (JSC::Interpreter::retrieveLastCaller):
20777        * interpreter/Interpreter.h:
20778        * runtime/ArrayPrototype.cpp:
20779        (JSC::isNumericCompareFunction):
20780        * runtime/Executable.cpp:
20781        (JSC::EvalExecutable::generateJITCode):
20782        (JSC::ProgramExecutable::generateJITCode):
20783        (JSC::FunctionExecutable::generateJITCodeForCall):
20784        (JSC::FunctionExecutable::generateJITCodeForConstruct):
20785        (JSC::FunctionExecutable::reparseExceptionInfo):
20786        (JSC::EvalExecutable::reparseExceptionInfo):
20787        * runtime/JSFunction.cpp:
20788        * runtime/JSGlobalData.cpp:
20789        (JSC::JSGlobalData::JSGlobalData):
20790        * runtime/JSGlobalData.h:
20791        (JSC::JSGlobalData::canUseJIT):
20792        * wtf/Platform.h:
20793
207942010-07-06  Darin Adler  <darin@apple.com>
20795
20796        Reviewed by Adam Barth.
20797
20798        Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
20799        https://bugs.webkit.org/show_bug.cgi?id=41320
20800
20801        * bytecode/CodeBlock.cpp:
20802        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
20803        instead of set since the result of reparseExceptionInfo is now a
20804        PassOwnPtr.
20805
20806        * bytecode/CodeBlock.h: Change extractExceptionInfo to return a
20807        PassOwnPtr instead of a raw pointer.
20808
20809        * runtime/Executable.cpp:
20810        (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
20811        (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
20812        (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
20813        in the header before, but it's better to not have it there to reduce
20814        header dependencies. Return a PassOwnPtr.
20815
20816        * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
20817        and put it in the private sections of classes other than the base class.
20818
20819        * wtf/MessageQueue.h:
20820        (WTF::MessageQueue::append): Use leakPtr instead of release.
20821        (WTF::MessageQueue::appendAndCheckEmpty): Ditto.
20822        (WTF::MessageQueue::prepend): Ditto.
20823
20824        * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
20825        a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
20826        returns a raw pointer. Put the constructor that takes a raw pointer and
20827        the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
20828        new adoptPtr function from PassOwnPtr.h.
20829
20830        * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
20831        to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
20832        Put the constructor and assignment operators that take a raw pointer
20833        into a section guarded by LOOSE_PASS_OWN_PTR.
20834
208352010-07-06  Sam Weinig  <sam@webkit.org>
20836
20837        Reviewed by Darin Adler
20838
20839        Update comment in StringExtras.h to be more accurate.
20840
20841        * wtf/StringExtras.h:
20842
208432010-07-06  Sheriff Bot  <webkit.review.bot@gmail.com>
20844
20845        Unreviewed, rolling out r62511.
20846        http://trac.webkit.org/changeset/62511
20847        https://bugs.webkit.org/show_bug.cgi?id=41686
20848
20849        Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
20850
20851        * jit/ExecutableAllocator.cpp:
20852        * jit/ExecutableAllocatorFixedVMPool.cpp:
20853        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
20854        (JSC::FixedVMPoolAllocator::free):
20855        (JSC::ExecutablePool::systemAlloc):
20856        * jit/ExecutableAllocatorPosix.cpp:
20857        (JSC::ExecutableAllocator::reprotectRegion):
20858        (JSC::ExecutableAllocator::cacheFlush):
20859        * jit/ExecutableAllocatorSymbian.cpp:
20860        * jit/ExecutableAllocatorWin.cpp:
20861        * wtf/Platform.h:
20862
208632010-07-05  Gavin Barraclough  <barraclough@apple.com>
20864
20865        Reviewed by Sam Weinig.
20866
20867        https://bugs.webkit.org/show_bug.cgi?id=41641
20868
20869        Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
20870        other than x86-64 (this may be useful on 32-bit platforms, too).
20871
20872        Simplify ifdefs by dividing into thwo broad allocation strategies
20873        (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
20874
20875        Rename constant used in the code to have names descriptive of their purpose,
20876        rather than their specific value on a given platform.
20877
20878        * jit/ExecutableAllocator.cpp:
20879        (JSC::ExecutableAllocator::reprotectRegion):
20880        (JSC::ExecutableAllocator::cacheFlush):
20881        * jit/ExecutableAllocatorFixedVMPool.cpp:
20882        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
20883        (JSC::FixedVMPoolAllocator::free):
20884        (JSC::ExecutablePool::systemAlloc):
20885        * jit/ExecutableAllocatorPosix.cpp:
20886        * jit/ExecutableAllocatorSymbian.cpp:
20887        * jit/ExecutableAllocatorWin.cpp:
20888        * wtf/Platform.h:
20889
208902010-07-05  Steve Block  <steveblock@google.com>
20891
20892        Reviewed by Darin Adler.
20893
20894        ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
20895        https://bugs.webkit.org/show_bug.cgi?id=41594
20896
20897        * wtf/ThreadingPthreads.cpp:
20898
208992010-07-04  Mark Rowe  <mrowe@apple.com>
20900
20901        Build fix after r62456.
20902
20903        * interpreter/Interpreter.cpp:
20904        (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
20905        warnings about comparisons between signed and unsigned types, and attempts to call an overload
20906        of std::min that doesn't exist.
20907
209082010-07-02  Sam Weinig  <sam@webkit.org>
20909
20910        Reviewed by Darin Adler.
20911
20912        Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
20913        Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
20914
20915        - MSVC does not ensure the buffers are null terminated as the unix versions do.
20916
20917        * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
20918        * runtime/UString.cpp: Clean up includes.
20919        (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
20920        * wtf/StringExtras.h:
20921        (snprintf): Ensure null termination of buffer.
20922        (vsnprintf): Ditto.
20923
209242010-07-03  Yong Li  <yoli@rim.com>
20925
20926        Reviewed by Darin Adler.
20927
20928        Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
20929        the interpreter as well as the JIT.
20930
20931        https://bugs.webkit.org/show_bug.cgi?id=41351
20932        rdar://problem/8142141
20933
20934        * interpreter/Interpreter.cpp:
20935        (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
20936        in op_load_varargs handling. 0xFFFFFFFF was read as -1.
20937
209382010-06-26  Jeremy Orlow  <jorlow@chromium.org>
20939
20940        Reviewed by Dumitru Daniliuc.
20941
20942        Support for keys and in-memory storage for IndexedDB
20943        https://bugs.webkit.org/show_bug.cgi?id=41252
20944
20945        Set the role to Private.
20946
20947        * JavaScriptCore.xcodeproj/project.pbxproj:
20948
209492010-07-02  Oliver Hunt  <oliver@apple.com>
20950
20951        Reviewed by Geoffrey Garen.
20952
20953        Move BOM handling out of the lexer and parser
20954        https://bugs.webkit.org/show_bug.cgi?id=41539
20955
20956        Doing the BOM stripping in the lexer meant that we could
20957        end up having to strip the BOMs from a source multiple times.
20958        To deal with this we now require all strings provided by
20959        a SourceProvider to already have had the BOMs stripped.
20960        This also simplifies some of the lexer logic.
20961
20962        * parser/Lexer.cpp:
20963        (JSC::Lexer::setCode):
20964        (JSC::Lexer::sourceCode):
20965        * parser/SourceProvider.h:
20966        (JSC::SourceProvider::SourceProvider):
20967        (JSC::UStringSourceProvider::create):
20968        (JSC::UStringSourceProvider::getRange):
20969        (JSC::UStringSourceProvider::UStringSourceProvider):
20970        * wtf/text/StringImpl.h:
20971        (WebCore::StringImpl::copyStringWithoutBOMs):
20972
209732010-07-03  Patrick Gansterer  <paroga@paroga.com>
20974
20975        Reviewed by Kent Tamura.
20976
20977        [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
20978        https://bugs.webkit.org/show_bug.cgi?id=41411
20979
20980        * wtf/unicode/wince/UnicodeWince.cpp:
20981        (WTF::Unicode::isAlphanumeric):
20982        * wtf/unicode/wince/UnicodeWince.h:
20983        (WTF::Unicode::isArabicChar):
20984
209852010-07-03  Kwang Yul Seo  <skyul@company100.net>
20986
20987        Reviewed by Kent Tamura.
20988
20989        [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
20990        https://bugs.webkit.org/show_bug.cgi?id=41524
20991
20992        Print "WebKit CRASH" before crashing.
20993
20994        * wtf/Assertions.h:
20995
209962010-07-02  Gavin Barraclough  <barraclough@apple.com>
20997
20998        Reviewed by Oliver Hunt.
20999
21000        Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
21001
21002        This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
21003        repatches the first instruction word.  The layout of the fields in the
21004        second word is different, and also needs repatching.
21005
21006        * assembler/ARMv7Assembler.h:
21007        (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
21008
210092010-07-02  Oliver Hunt  <oliver@apple.com>
21010
21011        Reviewed by Gavin Barraclough.
21012
21013        Clamp the number of arguments supported by function.apply
21014        https://bugs.webkit.org/show_bug.cgi?id=41351
21015        <rdar://problem/8142141>
21016
21017        Add clamping logic to function.apply similar to that
21018        enforced by firefox.  We have a smaller clamp than
21019        firefox as our calling convention means that stack
21020        usage is proportional to argument count -- the firefox
21021        limit is larger than you could actually call.
21022
21023        * interpreter/Interpreter.cpp:
21024        (JSC::Interpreter::privateExecute):
21025        * jit/JITStubs.cpp:
21026        (JSC::DEFINE_STUB_FUNCTION):
21027        * runtime/Arguments.h:
21028        (JSC::Arguments::):
21029
210302010-07-02  Chao-ying Fu  <fu@mips.com>
21031
21032        Reviewed by Oliver Hunt.
21033
21034        Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
21035        https://bugs.webkit.org/show_bug.cgi?id=40179
21036
21037        Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
21038
21039        * jit/JITOpcodes.cpp:
21040        (JSC::JIT::privateCompileCTINativeCall):
21041        * wtf/Platform.h:
21042
210432010-07-02  Gavin Barraclough  <barraclough@apple.com>
21044
21045        Reviewed by Oliver Hunt.
21046
21047        Bug 41552 - Clean up ARMv7 vfp code generation
21048        Emit separate opcode individually, remove magic numbers.
21049
21050        Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
21051
21052        * assembler/ARMv7Assembler.h:
21053        (JSC::ARMv7Assembler::):
21054        (JSC::ARMv7Assembler::vadd_F64):
21055        (JSC::ARMv7Assembler::vcmp_F64):
21056        (JSC::ARMv7Assembler::vcvt_F64_S32):
21057        (JSC::ARMv7Assembler::vcvtr_S32_F64):
21058        (JSC::ARMv7Assembler::vdiv_F64):
21059        (JSC::ARMv7Assembler::vldr):
21060        (JSC::ARMv7Assembler::vmov_F64_0):
21061        (JSC::ARMv7Assembler::vmov):
21062        (JSC::ARMv7Assembler::vmrs):
21063        (JSC::ARMv7Assembler::vmul_F64):
21064        (JSC::ARMv7Assembler::vstr):
21065        (JSC::ARMv7Assembler::vsub_F64):
21066        (JSC::ARMv7Assembler::VFPOperand::VFPOperand):
21067        (JSC::ARMv7Assembler::VFPOperand::bits1):
21068        (JSC::ARMv7Assembler::VFPOperand::bits4):
21069        (JSC::ARMv7Assembler::vcvtOp):
21070        (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
21071        (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
21072        * assembler/MacroAssemblerARMv7.h:
21073        (JSC::MacroAssemblerARMv7::branchDouble):
21074        * runtime/JSImmediate.h:
21075        (JSC::JSValue::isCell):
21076
210772010-07-02  Sheriff Bot  <webkit.review.bot@gmail.com>
21078
21079        Unreviewed, rolling out r62410.
21080        http://trac.webkit.org/changeset/62410
21081        https://bugs.webkit.org/show_bug.cgi?id=41549
21082
21083        accursed last minute changes (Requested by olliej on #webkit).
21084
21085        * parser/Lexer.cpp:
21086        (JSC::Lexer::setCode):
21087        (JSC::Lexer::copyCodeWithoutBOMs):
21088        (JSC::Lexer::sourceCode):
21089        * parser/SourceProvider.h:
21090        (JSC::):
21091        (JSC::SourceProvider::SourceProvider):
21092        (JSC::SourceProvider::hasBOMs):
21093        (JSC::UStringSourceProvider::create):
21094        (JSC::UStringSourceProvider::getRange):
21095        (JSC::UStringSourceProvider::UStringSourceProvider):
21096        * wtf/text/StringImpl.h:
21097
210982010-07-02  Sam Weinig  <sam@webkit.org>
21099
21100        Reviewed by Geoffrey Garen.
21101
21102        Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
21103        Use snprintf instead of sprintf everywhere in JavaScriptCore
21104
21105        * runtime/JSGlobalObjectFunctions.cpp:
21106        (JSC::encode):
21107        (JSC::globalFuncEscape):
21108        * runtime/UString.cpp:
21109        (JSC::UString::from):
21110
211112010-07-02  Oliver Hunt  <oliver@apple.com>
21112
21113        Reviewed by Geoffrey Garen.
21114
21115        Move BOM handling out of the lexer and parser
21116        https://bugs.webkit.org/show_bug.cgi?id=41539
21117
21118        Doing the BOM stripping in the lexer meant that we could
21119        end up having to strip the BOMs from a source multiple times.
21120        To deal with this we now require all strings provided by
21121        a SourceProvider to already have had the BOMs stripped.
21122        This also simplifies some of the lexer logic.
21123
21124        * parser/Lexer.cpp:
21125        (JSC::Lexer::setCode):
21126        (JSC::Lexer::sourceCode):
21127        * parser/SourceProvider.h:
21128        (JSC::SourceProvider::SourceProvider):
21129        (JSC::UStringSourceProvider::create):
21130        (JSC::UStringSourceProvider::getRange):
21131        (JSC::UStringSourceProvider::UStringSourceProvider):
21132        * wtf/text/StringImpl.h:
21133        (WebCore::StringImpl::copyStringWithoutBOMs):
21134
211352010-07-02  Renata Hodovan  <reni@inf.u-szeged.hu>
21136
21137        Reviewed by Oliver Hunt.
21138        
21139        [ Updated after rollout. ]
21140
21141        Merged RegExp constructor and RegExp::create methods.
21142        Both functions are called with three parameters and check whether 
21143        flags (the third param) is given or not.
21144        Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
21145        iterator parameter.
21146        https://bugs.webkit.org/show_bug.cgi?id=41055
21147
21148        * runtime/RegExp.cpp:
21149        (JSC::RegExp::RegExp):
21150        * runtime/RegExp.h:
21151        * runtime/RegExpCache.cpp:
21152        (JSC::RegExpCache::lookupOrCreate):
21153        (JSC::RegExpCache::create):
21154        * runtime/RegExpCache.h:
21155
211562010-07-02  Martin Robinson  <mrobinson@igalia.com>
21157
21158        Unreviewed. Build fix for GTK+.
21159
21160        Build Lexer.lut.h with the rest of the .lut.h files. Later these should
21161        all probably be moved to DerivedSources.
21162
21163        * GNUmakefile.am:
21164
211652010-06-23  Martin Robinson  <mrobinson@igalia.com>
21166
21167        Reviewed by Gustavo Noronha Silva.
21168
21169        [GTK] Separate DerivedSources per-project
21170        https://bugs.webkit.org/show_bug.cgi?id=41109
21171
21172        Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
21173
21174        * GNUmakefile.am:
21175
211762010-07-02  Peter Varga  <pvarga@inf.u-szeged.hu>
21177
21178        Reviewed by Oliver Hunt.
21179
21180        The alternativeFrameLocation value is wrong in the emitDisjunction function in
21181        case of PatternTerm::TypeParentheticalAssertion. This value needs to be
21182        computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
21183        memory corruption in some cases.
21184        Layout test added for checking of TypeParentheticalAssertion case.
21185        https://bugs.webkit.org/show_bug.cgi?id=41458
21186
21187        * yarr/RegexInterpreter.cpp:
21188        (JSC::Yarr::ByteCompiler::emitDisjunction):
21189
211902010-07-01  Oliver Hunt  <oliver@apple.com>
21191
21192        Reviewed by Maciej Stachowiak.
21193
21194        Add a FixedArray template to encapsulate fixed length arrays
21195        https://bugs.webkit.org/show_bug.cgi?id=41506
21196
21197        This new type is used in place of fixed length C arrays so
21198        that debug builds can guard against attempts to go beyond
21199        the end of the array.
21200
21201        * JavaScriptCore.xcodeproj/project.pbxproj:
21202        * bytecode/Opcode.cpp:
21203        (JSC::OpcodeStats::~OpcodeStats):
21204        * pcre/pcre_compile.cpp:
21205        (calculateCompiledPatternLength):
21206        * runtime/Collector.cpp:
21207        (JSC::Heap::allocateBlock):
21208        (JSC::Heap::allocate):
21209        * runtime/Collector.h:
21210        (JSC::CollectorBitmap::clearAll):
21211        * runtime/CollectorHeapIterator.h:
21212        (JSC::CollectorHeapIterator::operator*):
21213        * runtime/DateInstanceCache.h:
21214        * runtime/JSString.cpp:
21215        (JSC::JSString::replaceCharacter):
21216        * runtime/JSString.h:
21217        (JSC::RopeBuilder::JSStringFinalizerStruct::):
21218        * runtime/NumericStrings.h:
21219        * runtime/RegExpCache.h:
21220        * runtime/SmallStrings.h:
21221        (JSC::SmallStrings::singleCharacterStrings):
21222        * wtf/AVLTree.h:
21223        * wtf/FixedArray.h: Added.
21224        (WTF::FixedArray::operator[]):
21225        (WTF::FixedArray::data):
21226
212272010-07-01  Zoltan Herczeg  <zherczeg@webkit.org>
21228
21229        Reviewed by Oliver Hunt.
21230
21231        Improve the main lexer switch by mapping input characters to their type
21232        https://bugs.webkit.org/show_bug.cgi?id=41459
21233
21234        Sunsipder: no change (from 532.9ms to 531.5ms)
21235        SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
21236
21237        * parser/Lexer.cpp:
21238        (JSC::):
21239        (JSC::Lexer::lex):
21240
212412010-07-01  Sam Weinig  <sam@webkit.org>
21242
21243        Rubber-stamped by Ander Carlsson.
21244
21245        Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
21246
21247        * wtf/Platform.h:
21248
212492010-07-01  Gavin Barraclough  <barraclough@apple.com>
21250
21251        Reviewed by Oliver Hunt.
21252
21253        Bug 41490 - Add missing operations to MacroAssemblerARMv7
21254        Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
21255
21256        * assembler/ARMv7Assembler.h:
21257        (JSC::ARMRegisters::):
21258        (JSC::ARMRegisters::asSingle):
21259        (JSC::ARMRegisters::asDouble):
21260        (JSC::VFPImmediate::VFPImmediate):
21261        (JSC::VFPImmediate::isValid):
21262        (JSC::VFPImmediate::value):
21263        (JSC::ARMv7Assembler::singleRegisterMask):
21264        (JSC::ARMv7Assembler::doubleRegisterMask):
21265        (JSC::ARMv7Assembler::):
21266        (JSC::ARMv7Assembler::add_S):
21267        (JSC::ARMv7Assembler::neg):
21268        (JSC::ARMv7Assembler::orr_S):
21269        (JSC::ARMv7Assembler::sub):
21270        (JSC::ARMv7Assembler::sub_S):
21271        (JSC::ARMv7Assembler::vadd_F64):
21272        (JSC::ARMv7Assembler::vcmp_F64):
21273        (JSC::ARMv7Assembler::vcvt_F64_S32):
21274        (JSC::ARMv7Assembler::vcvtr_S32_F64):
21275        (JSC::ARMv7Assembler::vdiv_F64):
21276        (JSC::ARMv7Assembler::vldr):
21277        (JSC::ARMv7Assembler::vmov_F64_0):
21278        (JSC::ARMv7Assembler::vmov):
21279        (JSC::ARMv7Assembler::vmul_F64):
21280        (JSC::ARMv7Assembler::vstr):
21281        (JSC::ARMv7Assembler::vsub_F64):
21282        (JSC::ARMv7Assembler::vcvt):
21283        (JSC::ARMv7Assembler::vmem):
21284        * assembler/AbstractMacroAssembler.h:
21285        * assembler/MacroAssemblerARM.h:
21286        * assembler/MacroAssemblerARMv7.h:
21287        (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
21288        (JSC::MacroAssemblerARMv7::neg32):
21289        (JSC::MacroAssemblerARMv7::loadDouble):
21290        (JSC::MacroAssemblerARMv7::divDouble):
21291        (JSC::MacroAssemblerARMv7::convertInt32ToDouble):
21292        (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
21293        (JSC::MacroAssemblerARMv7::zeroDouble):
21294        (JSC::MacroAssemblerARMv7::branchOr32):
21295        (JSC::MacroAssemblerARMv7::set32):
21296        (JSC::MacroAssemblerARMv7::set8):
21297        * assembler/MacroAssemblerMIPS.h:
21298        * assembler/MacroAssemblerX86Common.h:
21299
213002010-07-01  Oliver Hunt  <oliver@apple.com>
21301
21302        Reviewed by Geoff Garen.
21303
21304        Improve reentrancy logic in polymorphic cache stubs
21305        <https://bugs.webkit.org/show_bug.cgi?id=41482>
21306        <rdar://problem/8094380>
21307
21308        Make the polymorphic cache stubs handle reentrancy
21309        better.
21310
21311        * jit/JITStubs.cpp:
21312        (JSC::DEFINE_STUB_FUNCTION):
21313        (JSC::getPolymorphicAccessStructureListSlot):
21314
213152010-07-01  Antti Koivisto  <koivisto@iki.fi>
21316
21317        Revert accidental commit.
21318
21319        * runtime/Collector.cpp:
21320        (JSC::Heap::allocateBlock):
21321
213222010-06-30  Darin Adler  <darin@apple.com>
21323
21324        Reviewed by Adam Barth.
21325
21326        Add assertion, off by default, for when you forget to do adoptRef
21327        https://bugs.webkit.org/show_bug.cgi?id=41422
21328
21329        * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
21330        function, called on the pointer by adoptRef, with an empty inline
21331        default version, meant to be overloaded. Unified the inlining
21332        with a macro named REF_DEREF_INLINE to make it clearer what's
21333        going on in the refIfNotNull/derefIfNotNull functions. Renamed
21334        releaseRef to leakRef, but left the old name in for compatibility
21335        for now.
21336
21337        * wtf/RefCounted.h: Added code to require adoption and assert if
21338        you don't call adoptRef. For now, it is turned off because of the
21339        LOOSE_REF_COUNTED define in this header. Later we can turn it on
21340        once we get everything working without asserting.
21341
213422010-06-29  Michael Saboff  <msaboff@apple.com>
21343
21344        Reviewed by Darin Adler.
21345
21346        Bug 41238 - RegExp performance slow on Dromaeo benchmark
21347
21348        Other javascript engines appear to cache prior results of regular 
21349        expression operations.
21350
21351        Suggest adding some sort of caching mechanism to regular expression 
21352        processing.
21353
21354        Added a single entry cache of match() results to RegExp class.
21355
21356        Also added performance improvements to UString == operator.
21357        First check the impls for equality.  Then get the length of
21358        each of the non-null impls.  Next check the sizes for equality.
21359        Then check the data for the case of different impls that point 
21360        to the same data (most likely due to substrings from the beginning of
21361        another string).  Lastly we check the underlying data for equality.
21362
21363        * runtime/RegExp.cpp:
21364        (JSC::RegExp::RegExp):
21365        (JSC::RegExp::match):
21366        * runtime/RegExp.h:
21367        * runtime/UString.h:
21368        (JSC::operator==):
21369
213702010-06-29  Nathan Lawrence  <nlawrence@apple.com>
21371
21372        Reviewed by Geoffrey Garen.
21373
21374        WTF::HashSet iterators are quasi-mutable.  Changing the value through
21375        dereferencing an iterator will not change the behavior of methods like
21376        contains or find, but will change the behavior of iterating.
21377
21378        * wtf/HashSet.h:
21379        (WTF::::begin):
21380        (WTF::::end):
21381        (WTF::::find):
21382        (WTF::::remove):
21383        * wtf/HashTable.h:
21384
213852010-06-29  Martin Robinson  <mrobinson@igalia.com>
21386
21387        Reviewed by Xan Lopez.
21388
21389        [GTK] Clean up the source lists in the GNUMakefile.am files
21390        https://bugs.webkit.org/show_bug.cgi?id=41229
21391
21392        Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
21393        the source lists.
21394
21395        * GNUmakefile.am:
21396
213972010-06-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
21398
21399        Reviewed by Kenneth Rohde Christiansen.
21400
21401        [Qt] Fix QtScript build after QScriptValuePrivate ctor changes
21402        https://bugs.webkit.org/show_bug.cgi?id=41307
21403
21404        * qt/api/qscriptvalue_p.h:
21405        (QScriptValuePrivate::prototype):
21406        * qt/benchmarks/qscriptengine/qscriptengine.pro:
21407
214082010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
21409
21410        Reviewed by Kenneth Rohde Christiansen.
21411
21412        [Qt] QScriptEngine API should contain a newArray function
21413        https://bugs.webkit.org/show_bug.cgi?id=39115
21414
21415        * qt/api/qscriptengine.cpp:
21416        (QScriptEngine::newArray):
21417        * qt/api/qscriptengine.h:
21418        * qt/api/qscriptengine_p.cpp:
21419        (QScriptEnginePrivate::newArray):
21420        * qt/api/qscriptengine_p.h:
21421        * qt/tests/qscriptengine/tst_qscriptengine.cpp:
21422        (tst_QScriptEngine::newArray):
21423
214242010-06-28  Xan Lopez  <xlopez@igalia.com>
21425
21426        Reviewed by Gustavo Noronha.
21427
21428        Install jsc as jsc-X where X is the major API version to allow
21429        parallel installation of both GTK+ 2.x and 3.x versions.
21430
21431        * GNUmakefile.am:
21432
214332010-06-28  John Gregg  <johnnyg@google.com>
21434
21435        Reviewed by Kent Tamura.
21436
21437        add ENABLE_DIRECTORY_UPLOAD build support
21438        https://bugs.webkit.org/show_bug.cgi?id=41100
21439
21440        * Configurations/FeatureDefines.xcconfig:
21441
214422010-06-28  Xan Lopez  <xlopez@igalia.com>
21443
21444        Revert to build jsc, since the tests expect this.
21445
21446        * GNUmakefile.am:
21447
214482010-06-28  Zoltan Herczeg  <zherczeg@webkit.org>
21449
21450        Reviewed by Oliver Hunt.
21451
21452        Only one character lookahead should be enough for the lexer
21453        https://bugs.webkit.org/show_bug.cgi?id=41213
21454
21455        The lexer had 4 character lookahead before, which required
21456        a complex shifting mechanism. This can be improved by using
21457        only one character lookahead for most decisions, and a
21458        peek() function as a fallback when it is absolutely necessary.
21459
21460        * parser/Lexer.cpp:
21461        (JSC::Lexer::currentCharacter):
21462        (JSC::Lexer::currentOffset):
21463        (JSC::Lexer::setCode):
21464        (JSC::Lexer::shift):
21465        (JSC::Lexer::peek):
21466        (JSC::Lexer::getUnicodeCharacter):
21467        (JSC::Lexer::shiftLineTerminator):
21468        (JSC::Lexer::lastTokenWasRestrKeyword):
21469        (JSC::Lexer::lex):
21470        (JSC::Lexer::scanRegExp):
21471        (JSC::Lexer::skipRegExp):
21472        * parser/Lexer.h:
21473
214742010-06-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
21475
21476        Unreviewed build fix.
21477
21478        [EFL] Build fix for latest version of Ecore library.
21479        Ecore recently changed return type of callbacks from int to Eina_Bool.
21480
21481        * wtf/efl/MainThreadEfl.cpp:
21482        (WTF::timeoutFired): Return Eina_Bool instead of int.
21483
214842010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
21485
21486        Reviewed by Kenneth Rohde Christiansen.
21487
21488        [Qt] QScriptValue should have API for accessing object properties
21489        https://bugs.webkit.org/show_bug.cgi?id=40903
21490
21491        Make possible to access properties inside QScriptValues. While this
21492        still doesn't support the ResolveLocal parameter, it is already useful
21493        for testing the API.
21494
21495        The tests from upstream QtScript weren't imported since most of them
21496        depend on the setProperty() function as well. A simple test was created.
21497
21498        * qt/api/qscriptvalue.cpp:
21499        (QScriptValue::property):
21500        * qt/api/qscriptvalue.h:
21501        (QScriptValue::):
21502        * qt/api/qscriptvalue_p.h:
21503        (QScriptValuePrivate::property):
21504        * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
21505        (tst_QScriptValue::propertySimple):
21506        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
21507
215082010-06-28  Xan Lopez  <xlopez@igalia.com>
21509
21510        Reviewed by Gustavo Noronha.
21511
21512        [GTK] Add support for GTK+3
21513        https://bugs.webkit.org/show_bug.cgi?id=41253
21514
21515        Suffix jsc with the API version of the library, so that
21516        libwebkitgtk 1.x and 3.x can install jsc.
21517
21518        * GNUmakefile.am:
21519
215202010-06-27  Kwang Yul Seo  <skyul@company100.net>
21521
21522        Reviewed by Kent Tamura.
21523
21524        [BREWMP] Turn ENABLE(SINGLE_THREADED) on.
21525        https://bugs.webkit.org/show_bug.cgi?id=41135
21526
21527        Brew MP does not support preemptive multi-threading.
21528        Disable threading for Brew MP.
21529
21530        * wtf/Platform.h:
21531
215322010-06-26  Tony Gentilcore  <tonyg@chromium.org>
21533
21534        Reviewed by Dimitri Glazkov.
21535
21536        Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
21537        https://bugs.webkit.org/show_bug.cgi?id=38924
21538
21539        * Configurations/FeatureDefines.xcconfig:
21540
215412010-06-25  Nathan Lawrence  <nlawrence@apple.com>
21542
21543        Reviewed by Geoffrey Garen.
21544
21545        We assume in testapi.c that the value aHeapRef refers to will not be
21546        moved.  When we have movable objects, this will not be the case.
21547
21548        * API/tests/testapi.c:
21549        (main):
21550
215512010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
21552
21553        Unreviewed, rolling out r61924.
21554        http://trac.webkit.org/changeset/61924
21555        https://bugs.webkit.org/show_bug.cgi?id=41240
21556
21557        It was rolled out, but cq+ wasn't removed (Requested by Ossy_
21558        on #webkit).
21559
21560        * runtime/RegExp.cpp:
21561        (JSC::RegExp::RegExp):
21562        (JSC::RegExp::create):
21563        * runtime/RegExp.h:
21564        * runtime/RegExpCache.cpp:
21565        (JSC::RegExpCache::lookupOrCreate):
21566        (JSC::RegExpCache::create):
21567        * runtime/RegExpCache.h:
21568
215692010-06-25  Renata Hodovan  <reni@inf.u-szeged.hu>
21570
21571        Reviewed by Geoffrey Garen.
21572
21573        Merge RegExp constructor and RegExp::create methods into one.
21574        Both of function are called with tree parameters and check whether 
21575        flags (the third param) is given or not.
21576        Simplify hash lookups in RegExpCache::create with giving them an extra 
21577        iterator parameter.
21578        https://bugs.webkit.org/show_bug.cgi?id=41055
21579
21580        * runtime/RegExp.cpp:
21581        (JSC::RegExp::RegExp):
21582        * runtime/RegExp.h:
21583        * runtime/RegExpCache.cpp:
21584        (JSC::RegExpCache::lookupOrCreate):
21585        (JSC::RegExpCache::create):
21586        * runtime/RegExpCache.h:
21587
215882010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
21589
21590        Reviewed by Simon Hausmann.
21591
21592        Introduce QtScript benchmarks.
21593
21594        The QtScript performance should be tested regularly. The patch introduces
21595        micro benchmarks for existing API.
21596
21597        [Qt] Performance of the QtScript API is not tested.
21598        https://bugs.webkit.org/show_bug.cgi?id=40911
21599
21600        * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
21601        * qt/benchmarks/benchmarks.pro: Added.
21602        * qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
21603        * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
21604        (tst_QScriptEngine::checkSyntax_data):
21605        (tst_QScriptEngine::checkSyntax):
21606        (tst_QScriptEngine::constructor):
21607        (tst_QScriptEngine::evaluateString_data):
21608        (tst_QScriptEngine::evaluateString):
21609        (tst_QScriptEngine::evaluateProgram_data):
21610        (tst_QScriptEngine::evaluateProgram):
21611        (tst_QScriptEngine::newObject):
21612        (tst_QScriptEngine::nullValue):
21613        (tst_QScriptEngine::undefinedValue):
21614        (tst_QScriptEngine::globalObject):
21615        (tst_QScriptEngine::toStringHandle):
21616        * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
21617        * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
21618        (tst_QScriptValue::tst_QScriptValue):
21619        (tst_QScriptValue::~tst_QScriptValue):
21620        (tst_QScriptValue::values_data):
21621        (tst_QScriptValue::ctorBool):
21622        (tst_QScriptValue::ctorReal):
21623        (tst_QScriptValue::ctorNumber):
21624        (tst_QScriptValue::ctorQString):
21625        (tst_QScriptValue::ctorCString):
21626        (tst_QScriptValue::ctorSpecial):
21627        (tst_QScriptValue::ctorQScriptValue):
21628        (tst_QScriptValue::isValid_data):
21629        (tst_QScriptValue::isValid):
21630        (tst_QScriptValue::isBool_data):
21631        (tst_QScriptValue::isBool):
21632        (tst_QScriptValue::isNumber_data):
21633        (tst_QScriptValue::isNumber):
21634        (tst_QScriptValue::isFunction_data):
21635        (tst_QScriptValue::isFunction):
21636        (tst_QScriptValue::isNull_data):
21637        (tst_QScriptValue::isNull):
21638        (tst_QScriptValue::isString_data):
21639        (tst_QScriptValue::isString):
21640        (tst_QScriptValue::isUndefined_data):
21641        (tst_QScriptValue::isUndefined):
21642        (tst_QScriptValue::isObject_data):
21643        (tst_QScriptValue::isObject):
21644        (tst_QScriptValue::isError_data):
21645        (tst_QScriptValue::isError):
21646        (tst_QScriptValue::toString_data):
21647        (tst_QScriptValue::toString):
21648        (tst_QScriptValue::toNumber_data):
21649        (tst_QScriptValue::toNumber):
21650        (tst_QScriptValue::toBool_data):
21651        (tst_QScriptValue::toBool):
21652        (tst_QScriptValue::toInteger_data):
21653        (tst_QScriptValue::toInteger):
21654        (tst_QScriptValue::toInt32_data):
21655        (tst_QScriptValue::toInt32):
21656        (tst_QScriptValue::toUInt32_data):
21657        (tst_QScriptValue::toUInt32):
21658        (tst_QScriptValue::toUInt16_data):
21659        (tst_QScriptValue::toUInt16):
21660        (tst_QScriptValue::toObject_data):
21661        (tst_QScriptValue::toObject):
21662        (tst_QScriptValue::equals_data):
21663        (tst_QScriptValue::equals):
21664        (tst_QScriptValue::strictlyEquals_data):
21665        (tst_QScriptValue::strictlyEquals):
21666        (tst_QScriptValue::instanceOf_data):
21667        (tst_QScriptValue::instanceOf):
21668
216692010-06-25  Oliver Hunt  <oliver@apple.com>
21670
21671        Reviewed by Geoffrey Garen.
21672
21673        Remove old js parser
21674        https://bugs.webkit.org/show_bug.cgi?id=41222
21675
21676        Remove the old yacc parser, this also solves the tiger problem.  Which
21677        was a conflict between yacc generated token values and those in the
21678        custom parser
21679
21680        * Android.mk:
21681        * CMakeLists.txt:
21682        * DerivedSources.make:
21683        * DerivedSources.pro:
21684        * GNUmakefile.am:
21685        * JavaScriptCore.pro:
21686        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
21687        * JavaScriptCore.xcodeproj/project.pbxproj:
21688        * parser/Grammar.y: Removed.
21689        * parser/JSParser.cpp:
21690        * parser/JSParser.h:
21691        * parser/Lexer.cpp:
21692        * parser/NodeConstructors.h:
21693        (JSC::Node::Node):
21694        * parser/Parser.cpp:
21695        (JSC::Parser::parse):
21696        * wtf/Platform.h:
21697
216982010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
21699
21700        Reviewed by Simon Hausmann.
21701
21702        New QtScript API; setPrototype() and prototype().
21703
21704        This patch implements QScriptValue's prototype accessors.
21705
21706        [Qt] QScriptValue should have accessors to a prototype.
21707        https://bugs.webkit.org/show_bug.cgi?id=39356
21708
21709        * qt/api/qscriptvalue.cpp:
21710        (QScriptValue::prototype):
21711        (QScriptValue::setPrototype):
21712        * qt/api/qscriptvalue.h:
21713        * qt/api/qscriptvalue_p.h:
21714        (QScriptValuePrivate::prototype):
21715        (QScriptValuePrivate::setPrototype):
21716        * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
21717        (tst_QScriptValue::getSetPrototype):
21718        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
21719
217202010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
21721
21722        Reviewed by Kenneth Rohde Christiansen.
21723
21724        [CMake] Add option to enable JIT.
21725        JIT is disabled by default, but now it's possible to enable it through
21726        an option to CMake: -DENABLE_JIT will enable it.
21727        https://bugs.webkit.org/show_bug.cgi?id=40936
21728
21729        * CMakeLists.txt: Add missing files and re-sort.
21730
217312010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
21732
21733        Reviewed by Gustavo Noronha Silva.
21734
21735        [CMake] Remove unused variable in EFL build system. It was previously
21736        being used to set the flags of each port but it was superseded by
21737        other flags.
21738        https://bugs.webkit.org/show_bug.cgi?id=40931
21739
21740        * jsc/CMakeLists.txt:
21741
217422010-06-25  Nathan Lawrence  <nlawrence@apple.com>
21743
21744        Reviewed by Geoffrey Garen.
21745
21746        Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
21747        sunspider.
21748
21749        * assembler/AssemblerBuffer.h:
21750        (JSC::AssemblerBuffer::AssemblerBuffer):
21751
217522010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
21753
21754        Unreviewed, rolling out r61842.
21755        http://trac.webkit.org/changeset/61842
21756        https://bugs.webkit.org/show_bug.cgi?id=41208
21757
21758        It broke Windows build (Requested by Ossy_ on #webkit).
21759
21760        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
21761        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
21762        * wtf/OwnPtrCommon.h:
21763        * wtf/brew/OwnPtrBrew.h: Removed.
21764        * wtf/win/OwnPtrWin.h: Removed.
21765
217662010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
21767
21768        Unreviewed, rolling out r61833.
21769        http://trac.webkit.org/changeset/61833
21770        https://bugs.webkit.org/show_bug.cgi?id=41205
21771
21772        It broke Leopard and GTK (Requested by Ossy_ on #webkit).
21773
21774        * runtime/RegExp.cpp:
21775        (JSC::RegExp::RegExp):
21776        (JSC::RegExp::create):
21777        * runtime/RegExp.h:
21778        * runtime/RegExpCache.cpp:
21779        (JSC::RegExpCache::lookupOrCreate):
21780        (JSC::RegExpCache::create):
21781        * runtime/RegExpCache.h:
21782
217832010-06-25  Kwang Yul Seo  <skyul@company100.net>
21784
21785        Reviewed by Adam Barth.
21786
21787        Change OwnPtrCommon to include platform-specific headers
21788        https://bugs.webkit.org/show_bug.cgi?id=40279
21789
21790        Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
21791        Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
21792
21793        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
21794        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
21795        * wtf/OwnPtrCommon.h:
21796        * wtf/brew/OwnPtrBrew.h: Added.
21797        * wtf/win/OwnPtrWin.h: Added.
21798
217992010-06-25  Patrick Gansterer  <paroga@paroga.com>
21800
21801        Reviewed by Darin Adler.
21802
21803        Add the possibility for a head and footer section to create_jit_stubs.
21804        https://bugs.webkit.org/show_bug.cgi?id=36050
21805
21806        * create_jit_stubs:
21807
218082010-06-24  Renata Hodovan  <reni@inf.u-szeged.hu>
21809
21810        Reviewed by Geoffrey Garen.
21811
21812        Merge RegExp constructor and RegExp::create methods into one.
21813        Both of function are called with tree parameters and check whether 
21814        flags (the third param) is given or not.
21815        Simplify hash lookups in RegExpCache::create with giving them an extra 
21816        iterator parameter.
21817        https://bugs.webkit.org/show_bug.cgi?id=41055
21818
21819        * runtime/RegExp.cpp:
21820        (JSC::RegExp::RegExp):
21821        * runtime/RegExp.h:
21822        * runtime/RegExpCache.cpp:
21823        (JSC::RegExpCache::lookupOrCreate):
21824        (JSC::RegExpCache::create):
21825        * runtime/RegExpCache.h:
21826
218272010-06-24  Oliver Hunt  <oliver@apple.com>
21828
21829        Reviewed by Maciej Stachowiak.
21830
21831        Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
21832        https://bugs.webkit.org/show_bug.cgi?id=41193
21833
21834        I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
21835        were a few places where endianness was being hardcoded.  This patch fixes
21836        the errors i could find through code inspection.
21837
21838        * jit/JITOpcodes32_64.cpp:
21839        (JSC::JIT::emit_op_resolve_global):
21840        * jit/JITPropertyAccess32_64.cpp:
21841        (JSC::JIT::emit_op_get_by_val):
21842        (JSC::JIT::emit_op_put_by_val):
21843        (JSC::JIT::compileGetDirectOffset):
21844        (JSC::JIT::privateCompilePutByIdTransition):
21845        (JSC::JIT::patchGetByIdSelf):
21846        (JSC::JIT::patchPutByIdReplace):
21847
218482010-06-24  Oliver Hunt  <oliver@apple.com>
21849
21850        Build fix
21851
21852        Temporarily get the tiger bot working again by disabling the
21853        new JS parser.  GCC on tiger is miscompiling the parser and
21854        I don't have access to a tiger machine right now.
21855
21856        * wtf/Platform.h:
21857
21858 2010-06-21  Nathan Lawrence  <nlawrence@apple.com>
21859
21860         Reviewed by Geoff Garen.
21861
21862         https://bugs.webkit.org/show_bug.cgi?id=40128
21863         Fixed broken debug functionality.
21864
21865         * interpreter/Interpreter.cpp:
21866         (JSC::Interpreter::dumpRegisters):
21867             Fixed to work with updated call frame.
21868         * runtime/JSImmediate.h:
21869         (JSC::JSValue::isCell):
21870             Added assert for aligned cell.
21871         * runtime/JSValue.cpp:
21872         (JSC::JSValue::description):
21873             Fixed to work with current JSValue implementation.
21874         * runtime/JSZombie.cpp:
21875         (JSC::JSZombie::leakedZombieStructure):
21876             JSombies compile again.
21877
218782010-06-24  Leandro Pereira  <leandro@profusion.mobi>
21879
21880        Unreviewed build fix.
21881
21882        * CMakeLists.txt: Add JSParser.cpp.
21883
218842010-06-24  Oliver Hunt  <oliver@apple.com>
21885
21886        Reviewed by Maciej Stachowiak.
21887
21888        Single character string replacement may replace too many characters
21889        https://bugs.webkit.org/show_bug.cgi?id=41138
21890        <rdar://problem/8097496>
21891
21892        Simple fix to stop the rope path of single character replacement
21893        once the first replacement occurs.
21894
21895        * runtime/JSString.cpp:
21896        (JSC::JSString::replaceCharacter):
21897
218982010-06-24  Gabor Loki  <loki@webkit.org>
21899
21900        Reviewed by Gavin Barraclough.
21901
21902        Fix the length of instruction stream controlled by constant pool
21903        https://bugs.webkit.org/show_bug.cgi?id=40293
21904
21905        The initial/maximum length of instruction stream (m_maxDistance) should
21906        be set when the first constant arrives to the constant pool. Otherwise
21907        the constant pool could be placed into an uninterrupted sequence.
21908
21909        * assembler/AssemblerBufferWithConstantPool.h:
21910        (JSC::):
21911
219122010-06-24  Oliver Hunt  <oliver@apple.com>
21913
21914        Reviewed by Gavin Barraclough.
21915
21916        We assume bytecodeOffset will always return a value > 1,
21917        so we adjust the failure case to return 1 instead of 0.
21918
21919        * bytecode/CodeBlock.h:
21920        (JSC::CodeBlock::bytecodeOffset):
21921
219222010-06-23  Oliver Hunt  <oliver@apple.com>
21923
21924        Reviewed by Gavin Barraclough.
21925
21926        Custom-written JavaScript parser
21927        https://bugs.webkit.org/show_bug.cgi?id=34019
21928
21929        Implement a recursive descent parser similar to that used by V8 and
21930        SpiderMonkey.  Greater than 2x improvement in SunSpider parsing tests.
21931
21932        The parser consists of a JSParser class that uses a TreeBuilder to actually
21933        build the AST.  There are currently two builders -- the ASTBuilder and
21934        SyntaxChecker which separate the job of building an AST for code generation
21935        and simply checking syntactic correctness.
21936
21937        There's still some less than ideal code remaining in the parser to allow
21938        us to retain the existing lexing code with minimal changes.  We'll tidy
21939        this up at a later date.
21940
21941        * GNUmakefile.am:
21942        * JavaScriptCore.gypi:
21943        * JavaScriptCore.pro:
21944        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
21945        * JavaScriptCore.xcodeproj/project.pbxproj:
21946        * parser/ASTBuilder.h: Added.
21947        (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
21948        (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
21949        (JSC::ASTBuilder::ASTBuilder):
21950        (JSC::ASTBuilder::createSourceElements):
21951        (JSC::ASTBuilder::varDeclarations):
21952        (JSC::ASTBuilder::funcDeclarations):
21953        (JSC::ASTBuilder::features):
21954        (JSC::ASTBuilder::numConstants):
21955        (JSC::ASTBuilder::appendToComma):
21956        (JSC::ASTBuilder::createCommaExpr):
21957        (JSC::ASTBuilder::createLogicalNot):
21958        (JSC::ASTBuilder::createUnaryPlus):
21959        (JSC::ASTBuilder::createVoid):
21960        (JSC::ASTBuilder::thisExpr):
21961        (JSC::ASTBuilder::createResolve):
21962        (JSC::ASTBuilder::createObjectLiteral):
21963        (JSC::ASTBuilder::createArray):
21964        (JSC::ASTBuilder::createNumberExpr):
21965        (JSC::ASTBuilder::createString):
21966        (JSC::ASTBuilder::createBoolean):
21967        (JSC::ASTBuilder::createNull):
21968        (JSC::ASTBuilder::createBracketAccess):
21969        (JSC::ASTBuilder::createDotAccess):
21970        (JSC::ASTBuilder::createRegex):
21971        (JSC::ASTBuilder::createNewExpr):
21972        (JSC::ASTBuilder::createConditionalExpr):
21973        (JSC::ASTBuilder::createAssignResolve):
21974        (JSC::ASTBuilder::createFunctionExpr):
21975        (JSC::ASTBuilder::createFunctionBody):
21976        (JSC::ASTBuilder::createGetterOrSetterProperty):
21977        (JSC::ASTBuilder::createArguments):
21978        (JSC::ASTBuilder::createArgumentsList):
21979        (JSC::ASTBuilder::createProperty):
21980        (JSC::ASTBuilder::createPropertyList):
21981        (JSC::ASTBuilder::createElementList):
21982        (JSC::ASTBuilder::createFormalParameterList):
21983        (JSC::ASTBuilder::createClause):
21984        (JSC::ASTBuilder::createClauseList):
21985        (JSC::ASTBuilder::setUsesArguments):
21986        (JSC::ASTBuilder::createFuncDeclStatement):
21987        (JSC::ASTBuilder::createBlockStatement):
21988        (JSC::ASTBuilder::createExprStatement):
21989        (JSC::ASTBuilder::createIfStatement):
21990        (JSC::ASTBuilder::createForLoop):
21991        (JSC::ASTBuilder::createForInLoop):
21992        (JSC::ASTBuilder::createEmptyStatement):
21993        (JSC::ASTBuilder::createVarStatement):
21994        (JSC::ASTBuilder::createReturnStatement):
21995        (JSC::ASTBuilder::createBreakStatement):
21996        (JSC::ASTBuilder::createContinueStatement):
21997        (JSC::ASTBuilder::createTryStatement):
21998        (JSC::ASTBuilder::createSwitchStatement):
21999        (JSC::ASTBuilder::createWhileStatement):
22000        (JSC::ASTBuilder::createDoWhileStatement):
22001        (JSC::ASTBuilder::createLabelStatement):
22002        (JSC::ASTBuilder::createWithStatement):
22003        (JSC::ASTBuilder::createThrowStatement):
22004        (JSC::ASTBuilder::createDebugger):
22005        (JSC::ASTBuilder::createConstStatement):
22006        (JSC::ASTBuilder::appendConstDecl):
22007        (JSC::ASTBuilder::appendStatement):
22008        (JSC::ASTBuilder::addVar):
22009        (JSC::ASTBuilder::combineCommaNodes):
22010        (JSC::ASTBuilder::evalCount):
22011        (JSC::ASTBuilder::appendBinaryExpressionInfo):
22012        (JSC::ASTBuilder::operatorStackPop):
22013        (JSC::ASTBuilder::operatorStackHasHigherPrecedence):
22014        (JSC::ASTBuilder::getFromOperandStack):
22015        (JSC::ASTBuilder::shrinkOperandStackBy):
22016        (JSC::ASTBuilder::appendBinaryOperation):
22017        (JSC::ASTBuilder::operatorStackAppend):
22018        (JSC::ASTBuilder::popOperandStack):
22019        (JSC::ASTBuilder::appendUnaryToken):
22020        (JSC::ASTBuilder::unaryTokenStackLastType):
22021        (JSC::ASTBuilder::unaryTokenStackLastStart):
22022        (JSC::ASTBuilder::unaryTokenStackRemoveLast):
22023        (JSC::ASTBuilder::assignmentStackAppend):
22024        (JSC::ASTBuilder::createAssignment):
22025        (JSC::ASTBuilder::Scope::Scope):
22026        (JSC::ASTBuilder::setExceptionLocation):
22027        (JSC::ASTBuilder::incConstants):
22028        (JSC::ASTBuilder::usesThis):
22029        (JSC::ASTBuilder::usesCatch):
22030        (JSC::ASTBuilder::usesClosures):
22031        (JSC::ASTBuilder::usesArguments):
22032        (JSC::ASTBuilder::usesAssignment):
22033        (JSC::ASTBuilder::usesWith):
22034        (JSC::ASTBuilder::usesEval):
22035        (JSC::ASTBuilder::createNumber):
22036        (JSC::ASTBuilder::makeTypeOfNode):
22037        (JSC::ASTBuilder::makeDeleteNode):
22038        (JSC::ASTBuilder::makeNegateNode):
22039        (JSC::ASTBuilder::makeBitwiseNotNode):
22040        (JSC::ASTBuilder::makeMultNode):
22041        (JSC::ASTBuilder::makeDivNode):
22042        (JSC::ASTBuilder::makeAddNode):
22043        (JSC::ASTBuilder::makeSubNode):
22044        (JSC::ASTBuilder::makeLeftShiftNode):
22045        (JSC::ASTBuilder::makeRightShiftNode):
22046        (JSC::ASTBuilder::makeFunctionCallNode):
22047        (JSC::ASTBuilder::makeBinaryNode):
22048        (JSC::ASTBuilder::makeAssignNode):
22049        (JSC::ASTBuilder::makePrefixNode):
22050        (JSC::ASTBuilder::makePostfixNode):
22051        * parser/JSParser.cpp: Added.
22052        (JSC::JSParser::AllowInOverride::AllowInOverride):
22053        (JSC::JSParser::AllowInOverride::~AllowInOverride):
22054        (JSC::JSParser::token):
22055        (JSC::JSParser::next):
22056        (JSC::JSParser::consume):
22057        (JSC::JSParser::match):
22058        (JSC::JSParser::tokenStart):
22059        (JSC::JSParser::tokenLine):
22060        (JSC::JSParser::tokenEnd):
22061        (JSC::JSParser::):
22062        (JSC::JSParser::autoSemiColon):
22063        (JSC::JSParser::canRecurse):
22064        (JSC::JSParser::lastTokenEnd):
22065        (JSC::jsParse):
22066        (JSC::JSParser::JSParser):
22067        (JSC::JSParser::parseProgram):
22068        (JSC::JSParser::allowAutomaticSemicolon):
22069        (JSC::JSParser::parseSourceElements):
22070        (JSC::JSParser::parseVarDeclaration):
22071        (JSC::JSParser::parseConstDeclaration):
22072        (JSC::JSParser::parseDoWhileStatement):
22073        (JSC::JSParser::parseWhileStatement):
22074        (JSC::JSParser::parseVarDeclarationList):
22075        (JSC::JSParser::parseConstDeclarationList):
22076        (JSC::JSParser::parseForStatement):
22077        (JSC::JSParser::parseBreakStatement):
22078        (JSC::JSParser::parseContinueStatement):
22079        (JSC::JSParser::parseReturnStatement):
22080        (JSC::JSParser::parseThrowStatement):
22081        (JSC::JSParser::parseWithStatement):
22082        (JSC::JSParser::parseSwitchStatement):
22083        (JSC::JSParser::parseSwitchClauses):
22084        (JSC::JSParser::parseSwitchDefaultClause):
22085        (JSC::JSParser::parseTryStatement):
22086        (JSC::JSParser::parseDebuggerStatement):
22087        (JSC::JSParser::parseBlockStatement):
22088        (JSC::JSParser::parseStatement):
22089        (JSC::JSParser::parseFormalParameters):
22090        (JSC::JSParser::parseFunctionBody):
22091        (JSC::JSParser::parseFunctionInfo):
22092        (JSC::JSParser::parseFunctionDeclaration):
22093        (JSC::JSParser::parseExpressionOrLabelStatement):
22094        (JSC::JSParser::parseExpressionStatement):
22095        (JSC::JSParser::parseIfStatement):
22096        (JSC::JSParser::parseExpression):
22097        (JSC::JSParser::parseAssignmentExpression):
22098        (JSC::JSParser::parseConditionalExpression):
22099        (JSC::isUnaryOp):
22100        (JSC::JSParser::isBinaryOperator):
22101        (JSC::JSParser::parseBinaryExpression):
22102        (JSC::JSParser::parseProperty):
22103        (JSC::JSParser::parseObjectLiteral):
22104        (JSC::JSParser::parseArrayLiteral):
22105        (JSC::JSParser::parsePrimaryExpression):
22106        (JSC::JSParser::parseArguments):
22107        (JSC::JSParser::parseMemberExpression):
22108        (JSC::JSParser::parseUnaryExpression):
22109        * parser/JSParser.h: Added.
22110        (JSC::):
22111        (JSC::JSTokenInfo::JSTokenInfo):
22112        * parser/Lexer.cpp:
22113        (JSC::Lexer::lex):
22114        * parser/Lexer.h:
22115        (JSC::Lexer::setLastLineNumber):
22116        (JSC::Lexer::lastLineNumber):
22117        * parser/NodeConstructors.h:
22118        (JSC::Node::Node):
22119        * parser/Parser.cpp:
22120        (JSC::Parser::parse):
22121        * parser/SyntaxChecker.h: Added.
22122        (JSC::SyntaxChecker::SyntaxChecker):
22123        (JSC::SyntaxChecker::createSourceElements):
22124        (JSC::SyntaxChecker::makeFunctionCallNode):
22125        (JSC::SyntaxChecker::appendToComma):
22126        (JSC::SyntaxChecker::createCommaExpr):
22127        (JSC::SyntaxChecker::makeAssignNode):
22128        (JSC::SyntaxChecker::makePrefixNode):
22129        (JSC::SyntaxChecker::makePostfixNode):
22130        (JSC::SyntaxChecker::makeTypeOfNode):
22131        (JSC::SyntaxChecker::makeDeleteNode):
22132        (JSC::SyntaxChecker::makeNegateNode):
22133        (JSC::SyntaxChecker::makeBitwiseNotNode):
22134        (JSC::SyntaxChecker::createLogicalNot):
22135        (JSC::SyntaxChecker::createUnaryPlus):
22136        (JSC::SyntaxChecker::createVoid):
22137        (JSC::SyntaxChecker::thisExpr):
22138        (JSC::SyntaxChecker::createResolve):
22139        (JSC::SyntaxChecker::createObjectLiteral):
22140        (JSC::SyntaxChecker::createArray):
22141        (JSC::SyntaxChecker::createNumberExpr):
22142        (JSC::SyntaxChecker::createString):
22143        (JSC::SyntaxChecker::createBoolean):
22144        (JSC::SyntaxChecker::createNull):
22145        (JSC::SyntaxChecker::createBracketAccess):
22146        (JSC::SyntaxChecker::createDotAccess):
22147        (JSC::SyntaxChecker::createRegex):
22148        (JSC::SyntaxChecker::createNewExpr):
22149        (JSC::SyntaxChecker::createConditionalExpr):
22150        (JSC::SyntaxChecker::createAssignResolve):
22151        (JSC::SyntaxChecker::createFunctionExpr):
22152        (JSC::SyntaxChecker::createFunctionBody):
22153        (JSC::SyntaxChecker::createArguments):
22154        (JSC::SyntaxChecker::createArgumentsList):
22155        (JSC::SyntaxChecker::createProperty):
22156        (JSC::SyntaxChecker::createPropertyList):
22157        (JSC::SyntaxChecker::createElementList):
22158        (JSC::SyntaxChecker::createFormalParameterList):
22159        (JSC::SyntaxChecker::createClause):
22160        (JSC::SyntaxChecker::createClauseList):
22161        (JSC::SyntaxChecker::setUsesArguments):
22162        (JSC::SyntaxChecker::createFuncDeclStatement):
22163        (JSC::SyntaxChecker::createBlockStatement):
22164        (JSC::SyntaxChecker::createExprStatement):
22165        (JSC::SyntaxChecker::createIfStatement):
22166        (JSC::SyntaxChecker::createForLoop):
22167        (JSC::SyntaxChecker::createForInLoop):
22168        (JSC::SyntaxChecker::createEmptyStatement):
22169        (JSC::SyntaxChecker::createVarStatement):
22170        (JSC::SyntaxChecker::createReturnStatement):
22171        (JSC::SyntaxChecker::createBreakStatement):
22172        (JSC::SyntaxChecker::createContinueStatement):
22173        (JSC::SyntaxChecker::createTryStatement):
22174        (JSC::SyntaxChecker::createSwitchStatement):
22175        (JSC::SyntaxChecker::createWhileStatement):
22176        (JSC::SyntaxChecker::createWithStatement):
22177        (JSC::SyntaxChecker::createDoWhileStatement):
22178        (JSC::SyntaxChecker::createLabelStatement):
22179        (JSC::SyntaxChecker::createThrowStatement):
22180        (JSC::SyntaxChecker::createDebugger):
22181        (JSC::SyntaxChecker::createConstStatement):
22182        (JSC::SyntaxChecker::appendConstDecl):
22183        (JSC::SyntaxChecker::createGetterOrSetterProperty):
22184        (JSC::SyntaxChecker::appendStatement):
22185        (JSC::SyntaxChecker::addVar):
22186        (JSC::SyntaxChecker::combineCommaNodes):
22187        (JSC::SyntaxChecker::evalCount):
22188        (JSC::SyntaxChecker::appendBinaryExpressionInfo):
22189        (JSC::SyntaxChecker::operatorStackPop):
22190        * runtime/JSGlobalData.h:
22191        * wtf/Platform.h:
22192        * wtf/ThreadSpecific.h:
22193        (WTF::T):
22194
221952010-06-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
22196
22197        Reviewed by Simon Hausmann.
22198
22199        Optimization of the QScriptValuePrivate.
22200
22201        Patch change only internals of the QScriptValuePrivate.
22202        Most of the QScriptValuePrivate's attributes were moved
22203        into an union.
22204
22205        [Qt] Optimization of the QScriptVAluePrivate.
22206        https://bugs.webkit.org/show_bug.cgi?id=40415
22207
22208        * qt/api/qscriptengine_p.cpp:
22209        (QScriptEnginePrivate::globalObject):
22210        * qt/api/qscriptvalue_p.h:
22211        (QScriptValuePrivate::):
22212        (QScriptValuePrivate::~QScriptValuePrivate):
22213        (QScriptValuePrivate::QScriptValuePrivate):
22214        (QScriptValuePrivate::toString):
22215        (QScriptValuePrivate::toNumber):
22216        (QScriptValuePrivate::toBool):
22217        (QScriptValuePrivate::toObject):
22218        (QScriptValuePrivate::equals):
22219        (QScriptValuePrivate::strictlyEquals):
22220        (QScriptValuePrivate::assignEngine):
22221        (QScriptValuePrivate::operator JSValueRef):
22222        (QScriptValuePrivate::operator JSObjectRef):
22223        (QScriptValuePrivate::refinedJSValue):
22224
222252010-06-23  Kwang Yul Seo  <skyul@company100.net>
22226
22227        Reviewed by Oliver Hunt.
22228
22229        [GTK] Implement ThreadSpecific with glib
22230        https://bugs.webkit.org/show_bug.cgi?id=39829
22231
22232        Implement ThreadSpecific with glib's GStaticPrivate.
22233        This patch makes it possible to build GTK port without pthread.
22234
22235        * wtf/ThreadSpecific.h:
22236        (WTF::::ThreadSpecific):
22237        (WTF::::~ThreadSpecific):
22238        (WTF::::get):
22239        (WTF::::set):
22240        (WTF::::destroy):
22241
222422010-06-23  Leandro Pereira  <leandro@profusion.mobi>
22243
22244        Unreviewed build fix.
22245
22246        * CMakeLists.txt: Add runtime/RegExpCache.cpp.
22247
222482010-06-22  Renata Hodovan  <hodovan@inf.u-szeged.hu>
22249
22250        Reviewed by Geoffrey Garen.
22251
22252        Adding regular expression caching to JavaScriptCore
22253        https://bugs.webkit.org/show_bug.cgi?id=38142
22254
22255        The cache is based on Round Robin eviction policy, and
22256        can cache at most 256 character long regular expressions,
22257        and at most 256 of them. These values can be changed at compile time.
22258
22259        * GNUmakefile.am:
22260        * JavaScriptCore.gypi:
22261        * JavaScriptCore.pro:
22262        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
22263        * JavaScriptCore.xcodeproj/project.pbxproj:
22264        * bytecompiler/NodesCodegen.cpp:
22265        (JSC::RegExpNode::emitBytecode):
22266        * runtime/JSGlobalData.cpp:
22267        (JSC::JSGlobalData::JSGlobalData):
22268        (JSC::JSGlobalData::~JSGlobalData):
22269        * runtime/JSGlobalData.h:
22270        (JSC::JSGlobalData::regExpCache):
22271        * runtime/RegExpCache.cpp: Added.
22272        (JSC::RegExpCache::lookupOrCreate):
22273        (JSC::RegExpCache::create):
22274        (JSC::RegExpCache::RegExpCache):
22275        * runtime/RegExpCache.h: Added.
22276        * runtime/RegExpConstructor.cpp:
22277        (JSC::constructRegExp):
22278        * runtime/RegExpKey.h: Added.
22279        (JSC::RegExpKey::RegExpKey):
22280        (JSC::RegExpKey::getFlagsValue):
22281        (WTF::operator==):
22282        (WTF::):
22283        * runtime/RegExpPrototype.cpp:
22284        (JSC::regExpProtoFuncCompile):
22285        * runtime/StringPrototype.cpp:
22286        (JSC::stringProtoFuncMatch):
22287        (JSC::stringProtoFuncSearch):
22288
222892010-06-22  Gabor Loki  <loki@webkit.org>
22290
22291        Reviewed by Geoffrey Garen.
22292
22293        Add native call support for ARM and Thumb-2 JIT.
22294        https://bugs.webkit.org/show_bug.cgi?id=40231
22295
22296        * jit/JITOpcodes.cpp:
22297        (JSC::JIT::privateCompileCTINativeCall):
22298        * jit/JITOpcodes32_64.cpp:
22299        (JSC::JIT::privateCompileCTINativeCall):
22300        * wtf/Platform.h:
22301
223022010-06-21  Oliver Hunt  <oliver@apple.com>
22303
22304        Reviewed by Geoffrey Garen.
22305
22306        Make JSC more resilient in the face of parse failures
22307        https://bugs.webkit.org/show_bug.cgi?id=40951
22308
22309        A number of recent bugs have occurred due to issues like miscounting
22310        BOMs, etc which lead to interesting crashes later on.  Adding this
22311        logic hardens JSC in the face of these errors, and has no impact on
22312        performance (32bit jit actually gets 0.7% faster but I put that down
22313        to cache effects).
22314
22315        * bytecode/CodeBlock.cpp:
22316        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
22317        (JSC::CodeBlock::lineNumberForBytecodeOffset):
22318        (JSC::CodeBlock::expressionRangeForBytecodeOffset):
22319        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
22320        * bytecode/CodeBlock.h:
22321        (JSC::CodeBlock::bytecodeOffset):
22322        * interpreter/Interpreter.cpp:
22323        (JSC::Interpreter::execute):
22324        (JSC::Interpreter::executeCall):
22325        (JSC::Interpreter::executeConstruct):
22326        (JSC::Interpreter::prepareForRepeatCall):
22327        (JSC::Interpreter::privateExecute):
22328        * jit/JITOpcodes.cpp:
22329        (JSC::JIT::privateCompileCTIMachineTrampolines):
22330        * jit/JITOpcodes32_64.cpp:
22331        (JSC::JIT::privateCompileCTIMachineTrampolines):
22332        * jit/JITStubs.cpp:
22333        (JSC::DEFINE_STUB_FUNCTION):
22334        * runtime/ArrayPrototype.cpp:
22335        (JSC::isNumericCompareFunction):
22336        * runtime/Executable.cpp:
22337        (JSC::FunctionExecutable::compileForCall):
22338        (JSC::FunctionExecutable::compileForConstruct):
22339        (JSC::FunctionExecutable::generateJITCodeForCall):
22340        (JSC::FunctionExecutable::generateJITCodeForConstruct):
22341        (JSC::FunctionExecutable::reparseExceptionInfo):
22342        (JSC::EvalExecutable::reparseExceptionInfo):
22343        * runtime/Executable.h:
22344        (JSC::FunctionExecutable::bytecodeForCall):
22345        (JSC::FunctionExecutable::bytecodeForConstruct):
22346        * runtime/JSGlobalData.cpp:
22347        (JSC::JSGlobalData::numericCompareFunction):
22348
223492010-06-21  John Sullivan  <sullivan@apple.com>
22350
22351        Reviewed by Adam Roben.
22352
22353        RetainPtr can't be used in HashMaps or HashSets
22354        <https://bugs.webkit.org/show_bug.cgi?id=40938>
22355        
22356        Added hashing knowledge similar to that in COMPtr.h.
22357
22358        * wtf/RetainPtr.h:
22359        (WTF::RetainPtr::RetainPtr):
22360        New function, copied from COMPtr.h but for the type change.
22361        (WTF::RetainPtr::isHashTableDeletedValue):
22362        Ditto.
22363        (WTF::RetainPtr::hashTableDeletedValue):
22364        Ditto.
22365        Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
22366        The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
22367        rather than the COMPtr implementation.
22368
223692010-06-19  Oliver Hunt  <oliver@apple.com>
22370
22371        Reviewed by Geoffrey Garen.
22372
22373        Need to ensure that we grow the RegisterFile when creating a callframe for host code
22374        https://bugs.webkit.org/show_bug.cgi?id=40858
22375        <rdar://problem/8108986>
22376
22377        In the past the use of the callframe in hostcode was much more
22378        limited.  Now that we expect the callframe to always be valid
22379        we need to grow the RegisterFile so that this is actually the
22380        case.  In this particular case the problem was failing to grow
22381        the registerfile could lead to a callframe that extended beyond
22382        RegisterFiler::end(), so vm re-entry would clobber the callframe
22383        other scenarios could also lead to badness.
22384
22385        I was unable to construct a simple testcase to trigger badness,
22386        and any such testcase would be so dependent on exact vm stack
22387        layout that it would be unlikely to work as a testcase following
22388        any callframe or register allocation changes anyway.
22389
22390        Thankfully the new assertion I added should help to catch these
22391        failures in future, and triggers on a couple of tests currently.
22392
22393        * interpreter/CallFrame.cpp:
22394        (JSC::CallFrame::registerFile):
22395        * interpreter/CallFrame.h:
22396        (JSC::ExecState::init):
22397        * interpreter/Interpreter.cpp:
22398        (JSC::Interpreter::privateExecute):
22399        * jit/JITStubs.cpp:
22400        (JSC::DEFINE_STUB_FUNCTION):
22401
224022010-06-21  Satish Sampath  <satish@chromium.org>
22403
22404        Reviewed by Steve Block.
22405
22406        Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
22407        https://bugs.webkit.org/show_bug.cgi?id=40878
22408
22409        * Configurations/FeatureDefines.xcconfig:
22410
224112010-06-21  Kwang Yul Seo  <skyul@company100.net>
22412
22413        Reviewed by Kent Tamura.
22414
22415        [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
22416        https://bugs.webkit.org/show_bug.cgi?id=40653
22417
22418        Currently, other ports do not use global new/delete operator overloading
22419        when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
22420        "global fastMalloc new" because the default new/delete causes crash on device.
22421        We need to replace them with Brew MP's MALLOC/FREE.
22422
22423        * wtf/FastMalloc.h:
22424
224252010-06-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
22426
22427        Reviewed by Simon Hausmann.
22428
22429        [Qt] Work around a build problem with libjscore on Symbian.
22430        https://bugs.webkit.org/show_bug.cgi?id=40840
22431
22432        Sbsv2 sometimes have problems with debug/release configuration
22433        determination causing QtWebKit in release to try linking with the debug
22434        JavaScriptCore static library. This patch limit the jscore/jscored
22435        r58306 fix necessary for mac builds only to the mac platform to prevent the
22436        different name problem.
22437
22438        The real fix would be to fix qmake or the toolchain, this patch might
22439        help meanwhile.
22440
22441        * JavaScriptCore.pri:
22442
224432010-06-21  Patrick Gansterer  <paroga@paroga.com>
22444
22445        Reviewed by Kent Tamura.
22446
22447        Buildfix after r61338.
22448        https://bugs.webkit.org/show_bug.cgi?id=40888
22449
22450        roundUpAllocationSize is needed in RegisterFile.h.
22451
22452        * jit/ExecutableAllocator.h:
22453
224542010-06-19  Kwang Yul Seo  <skyul@company100.net>
22455
22456        Reviewed by Darin Adler.
22457
22458        Include <string.h> in StringExtras.h
22459        https://bugs.webkit.org/show_bug.cgi?id=40808
22460
22461        Without string.h, RVCT 2.2 can't compile StringExtras.h.
22462        It can't find strlen and strncmp.
22463
22464        * wtf/StringExtras.h:
22465
224662010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
22467
22468        Reviewed by Kenneth Rohde Christiansen.
22469
22470        Don't use __attribute__((may_alias)) with the Intel compiler,
22471        as it doesn't understand it.
22472
22473        * wtf/Vector.h:
22474
224752010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
22476
22477        Reviewed by Kenneth Rohde Christiansen.
22478
22479        Fix compilation with the Intel C++ compiler (11.1.072).
22480
22481        Like RVCT, label pointers must be void*, not const void*.
22482
22483        * bytecode/Opcode.h:
22484
224852010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
22486
22487        Reviewed by Kenneth Rohde Christiansen.
22488
22489        Add the WTF_COMPILER_INTEL for when the Intel compiler is used
22490        for building. Usually, the Intel compiler masquerades as
22491        another compiler in the system and gets away with it, but some
22492        times specific fixes are required (such as when using language
22493        extensions).
22494
22495        * wtf/Platform.h:
22496
224972010-06-18  Oliver Hunt  <oliver@apple.com>
22498
22499        Reviewed by Geoffrey Garen.
22500
22501        Incorrect handling of multiple BOMs scattered through a file.
22502        https://bugs.webkit.org/show_bug.cgi?id=40865
22503
22504        When determining the offset of open and close braces in a source
22505        with BOMs we were finishing our count early as we failed to account
22506        for BOMs prior to the open/close brace positions effecting those
22507        positions.
22508
22509        * parser/Lexer.cpp:
22510        (JSC::Lexer::sourceCode):
22511
225122010-06-17  Oliver Hunt  <oliver@apple.com>
22513
22514        Reviewed by Sam Weinig.
22515
22516        Don't throw away exception information for functions that use exceptions
22517        https://bugs.webkit.org/show_bug.cgi?id=40786
22518
22519        Simple patch to stop JSC from throwing away the exception information
22520        of a function that uses "exceptiony" features like try and throw.  This
22521        is a speed up for catching expressions but it's difficult to quantify as
22522        the old cost of reparsing is amortised over all exceptions caught in the
22523        effected function.
22524
22525        * bytecode/CodeBlock.cpp:
22526        (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
22527        * bytecompiler/BytecodeGenerator.cpp:
22528        (JSC::BytecodeGenerator::generate):
22529        (JSC::BytecodeGenerator::emitCatch):
22530        * bytecompiler/BytecodeGenerator.h:
22531        (JSC::BytecodeGenerator::emitThrow):
22532
225332010-06-18  Anders Carlsson  <andersca@apple.com>
22534
22535        Reviewed by Sam Weinig.
22536
22537        Add PlatformStrategies and PluginStrategy classes.
22538        https://bugs.webkit.org/show_bug.cgi?id=40850
22539
22540        * wtf/Platform.h:
22541
225422010-06-18  Leandro Pereira  <leandro@profusion.mobi>
22543
22544        [EFL] Unreviewed build fix.
22545
22546        * wtf/CMakeLists.txt: Add MD5.cpp.
22547
225482010-06-17  Shu Chang  <chang.shu@nokia.com>
22549
22550        Reviewed by Kenneth Rohde Christiansen.
22551
22552        [Qt] Fix the link error on symbian with ENABLE_JIT=0.
22553        1. Add "#if ENABLE(JIT)" in the header file;
22554        2. Put feature enable/disable logic to a common.pri so
22555        that both JavaScriptCore.pri and WebCore.pri can share.
22556
22557        https://bugs.webkit.org/show_bug.cgi?id=40780
22558
22559        * JavaScriptCore.pri:
22560        * jit/ExecutableAllocator.h:
22561
225622010-06-17  Darin Adler  <darin@apple.com>
22563
22564        Reviewed by Sam Weinig.
22565
22566        Use adoptRef and create functions in more code paths
22567        https://bugs.webkit.org/show_bug.cgi?id=40760
22568
22569        * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
22570        * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
22571
22572        * bytecode/CodeBlock.h:
22573        (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
22574        SharedSymbolTable::create function instead of calling new directly.
22575
22576        * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
22577        class and made the constructor private.
22578
225792010-06-17  Mark Brand  <mabrand@mabrand.nl>
22580
22581        Reviewed by Simon Hausmann.
22582
22583        [Qt] use "win32-g++*" scope to match all MinGW makespecs
22584
22585        The scope "win32-g++" comes from the name of the makespec. However, it
22586        is frequently used to check for MinGW. This works fine as long as
22587        win32-g++ is the only makespec for MinGW. Now we need the wildcard
22588        to cover "win32-g++-cross" as well.
22589
22590        * JavaScriptCore.pro:
22591
225922010-06-16  Darin Adler  <darin@apple.com>
22593
22594        Reviewed by David Levin.
22595
22596        Deploy adoptRef in more places, including all HTML and MathML elements
22597        https://bugs.webkit.org/show_bug.cgi?id=39941
22598
22599        * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
22600        unneeded support for initial reference counts other than 1.
22601
226022010-06-16  Peter Varga  <pvarga@inf.u-szeged.hu>
22603
22604        Reviewed by Geoffrey Garen.
22605
22606        Store matchBegin directly in the array of output instead of the stack.
22607        https://bugs.webkit.org/show_bug.cgi?id=38988
22608
22609        * yarr/RegexJIT.cpp:
22610        (JSC::Yarr::RegexGenerator::generateDisjunction):
22611        (JSC::Yarr::RegexGenerator::generate):
22612
226132010-06-15  Anders Carlsson  <andersca@apple.com>
22614
22615        Reviewed by Sam Weinig.
22616
22617        Make JavaScriptCore build with clang++.
22618
22619        * jit/JITInlineMethods.h:
22620        (JSC::JIT::emitPutVirtualRegister):
22621        Explicitly cast to an int.
22622
22623        * yarr/RegexCompiler.cpp:
22624        (JSC::Yarr::compileRegex):
22625        Return 0 instead of false.
22626
226272010-06-15  Adam Roben  <aroben@apple.com>
22628
22629        Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
22630
22631        Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
22632
22633        Reviewed by Sam Weinig.
22634
22635        * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
22636        JavaScriptCore's DerivedSources directory to
22637        AppleInternal/Sources/JavaScriptCore.
22638
226392010-06-15  Gabor Loki  <loki@webkit.org>
22640
22641        Rubber-stamped by Eric Seidel.
22642
22643        Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
22644        https://bugs.webkit.org/show_bug.cgi?id=40423
22645
22646        Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
22647        non-static data member warning.
22648
22649        * jit/JITPropertyAccess32_64.cpp:
22650        (JSC::JIT::privateCompilePutByIdTransition):
22651
226522010-06-11  Eric Seidel  <eric@webkit.org>
22653
22654        Reviewed by Adam Barth.
22655
22656        Rename the rest of the *Tokenizer classes to *DocumentParser
22657        https://bugs.webkit.org/show_bug.cgi?id=40507
22658
22659        * wtf/Platform.h:
22660         - fixed a comment to match new names.
22661
226622010-06-11  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
22663
22664        Reviewed by Simon Hausmann.
22665
22666        [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
22667        https://bugs.webkit.org/show_bug.cgi?id=40412
22668
22669        Conversion between a JSC C types and a QtScript private types, takes
22670        main part of the source code. In most cases a mapping between the types
22671        is one to one. New cast operators were added to simplify the code.
22672
22673        The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
22674        The QScriptEnginePrivate could be casted to the JSGlobalContext.
22675        The QScriptProgramPrivate could be casted to the JSStringRef.
22676
22677        * qt/api/qscriptengine_p.cpp:
22678        (QScriptEnginePrivate::evaluate):
22679        (QScriptEnginePrivate::newObject):
22680        (QScriptEnginePrivate::globalObject):
22681        * qt/api/qscriptengine_p.h:
22682        (QScriptEnginePrivate::operator JSGlobalContextRef):
22683        * qt/api/qscriptprogram_p.h:
22684        (QScriptProgramPrivate::operator JSStringRef):
22685        * qt/api/qscriptsyntaxcheckresult.cpp:
22686        (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
22687        (QScriptSyntaxCheckResultPrivate::errorMessage):
22688        (QScriptSyntaxCheckResultPrivate::errorLineNumber):
22689        * qt/api/qscriptvalue_p.h:
22690        (QScriptValuePrivate::~QScriptValuePrivate):
22691        (QScriptValuePrivate::QScriptValuePrivate):
22692        (QScriptValuePrivate::isBool):
22693        (QScriptValuePrivate::isNumber):
22694        (QScriptValuePrivate::isNull):
22695        (QScriptValuePrivate::isString):
22696        (QScriptValuePrivate::isUndefined):
22697        (QScriptValuePrivate::isFunction):
22698        (QScriptValuePrivate::toString):
22699        (QScriptValuePrivate::toNumber):
22700        (QScriptValuePrivate::toBool):
22701        (QScriptValuePrivate::toObject):
22702        (QScriptValuePrivate::equals):
22703        (QScriptValuePrivate::strictlyEquals):
22704        (QScriptValuePrivate::instanceOf):
22705        (QScriptValuePrivate::call):
22706        (QScriptValuePrivate::operator JSValueRef):
22707        (QScriptValuePrivate::operator JSObjectRef):
22708        (QScriptValuePrivate::setValue):
22709        (QScriptValuePrivate::inherits):
22710        (QScriptValuePrivate::refinedJSValue):
22711
227122010-05-31  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
22713
22714        Reviewed by Simon Hausmann.
22715
22716        [Qt] Implement the simple text code path.
22717        https://bugs.webkit.org/show_bug.cgi?id=40077
22718
22719        Remove the FONT_FAST_PATH macro and use the Qt's
22720        fast text implementation instead of the one of WebKit.
22721
22722        The Qt::TextBypassShaping flag is used to tell Qt to
22723        only use the glyph advances.
22724
22725        Qt 4.7 is needed to get this flag thus the complex path is always
22726        used if QtWebKit is compiled against an earlier version.
22727
22728        Contrary to the WebKit's implementation, the complex code path
22729        is taken if the text is RightToLeft, justified or is formatted
22730        with non-zero letter or word spacing.
22731
22732        * wtf/Platform.h:
22733
227342010-06-11  Luiz Agostini  <luiz.agostini@openbossa.org>
22735
22736        Reviewed by Kenneth Rohde Christiansen.
22737
22738        add codePointCompare to JavaScriptCore.exp
22739        https://bugs.webkit.org/show_bug.cgi?id=40426
22740
22741        * JavaScriptCore.exp:
22742
227432010-06-10  Oliver Hunt  <oliver@apple.com>
22744
22745        Reviewed by Maciej Stachowiak.
22746
22747        Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
22748        https://bugs.webkit.org/show_bug.cgi?id=40367
22749
22750        If we're in the slow case of right shift we must write the type tag as
22751        the only reason we hit this code path is because we know we're working
22752        with a double.  eg. we are guaranteed that the tag cannot be reused.
22753
22754        * jit/JITArithmetic32_64.cpp:
22755        (JSC::JIT::emitRightShiftSlowCase):
22756
227572010-06-10  Kwang Yul Seo  <skyul@company100.net>
22758
22759        Reviewed by Eric Seidel.
22760
22761        Remove weakRandomNumber
22762        https://bugs.webkit.org/show_bug.cgi?id=40291
22763
22764        weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
22765
22766        * wtf/RandomNumber.cpp:
22767        * wtf/RandomNumber.h:
22768
227692010-06-09  Alexey Proskuryakov  <ap@apple.com>
22770
22771        Reviewed by Brady Eidson.
22772
22773        Export StringImpl::ascii(). It might be not very useful, but it's a public function.
22774
22775        * JavaScriptCore.exp:
22776
227772010-06-09  Leandro Pereira  <leandro@profusion.mobi>
22778
22779        Reviewed by Adam Treat.
22780
22781        [EFL] Allow building core libraries as shared objects to speed up
22782        linking time on machines with small amounts of memory.
22783        http://webkit.org/b/39899
22784
22785        * CMakeLists.txt: If building with shared core, install the lib.
22786        * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
22787        * wtf/CMakeLists.txt: If building with shared core, install the lib.
22788
227892010-06-09  Gabor Loki  <loki@webkit.org>
22790
22791        Reviewed by David Levin.
22792
22793        Remove some unused variable warnings from JITOpcodes
22794        https://bugs.webkit.org/show_bug.cgi?id=40298
22795
22796        * jit/JITOpcodes.cpp:
22797        (JSC::JIT::privateCompileCTINativeCall):
22798        * jit/JITOpcodes32_64.cpp:
22799        (JSC::JIT::privateCompileCTINativeCall):
22800
228012010-05-18  Yuzo Fujishima  <yuzo@google.com>
22802
22803        Reviewed by Shinichiro Hamaji.
22804
22805        Fix for Bug 34529 -  [CSSOM] issues with cssText and selectorText
22806        Add U16_LENGTH that is needed to implement CSS character serialization.
22807        https://bugs.webkit.org/show_bug.cgi?id=34529
22808
22809        * wtf/unicode/qt4/UnicodeQt4.h:
22810        * wtf/unicode/wince/UnicodeWince.h:
22811
228122010-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
22813
22814        Unreviewed, rolling out r60830.
22815        http://trac.webkit.org/changeset/60830
22816        https://bugs.webkit.org/show_bug.cgi?id=40305
22817
22818        Broke the Windows build (Requested by abarth on #webkit).
22819
22820        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
22821        * wtf/OwnPtrCommon.h:
22822        * wtf/brew/OwnPtrBrew.h: Removed.
22823        * wtf/win/OwnPtrWin.h: Removed.
22824
228252010-06-08  MORITA Hajime  <morrita@google.com>
22826
22827        Unreviewed. An attempt to fix test break.
22828
22829        * Configurations/FeatureDefines.xcconfig:
22830
228312010-06-08  Kwang Yul Seo  <skyul@company100.net>
22832
22833        Reviewed by Adam Barth.
22834
22835        Change OwnPtrCommon to include platform-specific headers
22836        https://bugs.webkit.org/show_bug.cgi?id=40279
22837
22838        Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
22839        Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
22840
22841        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
22842        * wtf/OwnPtrCommon.h:
22843        * wtf/brew/OwnPtrBrew.h: Added.
22844        * wtf/win/OwnPtrWin.h: Added.
22845
228462010-06-07  MORITA Hajime  <morrita@google.com>
22847        
22848        Reviewed by Kent Tamura.
22849
22850        https://bugs.webkit.org/show_bug.cgi?id=40219
22851        [Mac] ENABLE_METER_TAG should be enabled
22852        
22853        Added ENABLE_METER_TAG.
22854
22855        * Configurations/FeatureDefines.xcconfig:
22856
228572010-06-07  Kwang Yul Seo  <skyul@company100.net>
22858
22859        Reviewed by Eric Seidel.
22860
22861        [BREWMP] Add more types to OwnPtr
22862        https://bugs.webkit.org/show_bug.cgi?id=39667
22863
22864        Add ISSL and ISocket to the list of OwnPtr-ed type.
22865
22866        * wtf/OwnPtrCommon.h:
22867        * wtf/brew/OwnPtrBrew.cpp:
22868        (WTF::deleteOwnedPtr):
22869
228702010-06-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
22871
22872        Reviewed by Simon Hausmann.
22873
22874        [Qt] Crash when compiling on Snow Leopard and running on Leopard
22875        https://bugs.webkit.org/show_bug.cgi?id=31403
22876
22877        Disable the use of pthread_setname_np and other symbols
22878        when targetting Leopard.
22879
22880        Use the defines TARGETING_XX instead of BUILDING_ON_XX 
22881        for features that cannot be used before Snow Leopard.
22882
22883        * wtf/Platform.h:
22884
228852010-06-07  Gabor Loki  <loki@webkit.org>
22886
22887        Reviewed by NOBODY (JSVALUE32_64 build fix).
22888
22889        * jit/JITOpcodes32_64.cpp:
22890        (JSC::JIT::privateCompileCTINativeCall):
22891
228922010-06-06  Gavin Barraclough  <barraclough@apple.com>
22893
22894        Reviewed by NOBODY (windows build fix pt 2).
22895
22896        * JavaScriptCore.exp:
22897        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
22898
228992010-06-06  Gavin Barraclough  <barraclough@apple.com>
22900
22901        Reviewed by NOBODY (windows build fix pt 1).
22902
22903        * JavaScriptCore.exp:
22904        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
22905
229062010-06-06  Gavin Barraclough  <barraclough@apple.com>
22907
22908        Reviewed by Sam Weinig.
22909
22910        Bug 40214 - Clean up error construction / throwing in JSC.
22911        
22912        The one egregious insanity here is that creating an error requires
22913        a VM-entry-esqe-host call (the string argument is wrapped as a JS
22914        object & pushed on the RegisterFile, then unwrapped back to a
22915        UString).  Changing this also means you only require a global
22916        object, not an ExecState, to create an error.
22917
22918        The methods to create error objects are also parameterized
22919        requiring a switch on the type, which can be made cleaner and
22920        faster by moving to a separate method per error type.  Code to add
22921        divot information to error had been duplicated, and is coalesced
22922        back into a single function.
22923
22924        Convenience methods added to create & throw type & syntax error
22925        with a default error message, since this is a common case.
22926
22927        Also, errors are currently thrown either using
22928        "throwError(exec, error)" or "exec->setException(error)" - unify
22929        on the former, since this is more commonly used.  Add
22930        "throwVMError(exec, error)" equivalents, as a convenience for
22931        cases where the result was being wrapped in "JSValue::encode(...)".
22932
22933        * API/JSCallbackConstructor.cpp:
22934        (JSC::constructJSCallback):
22935        * API/JSCallbackFunction.cpp:
22936        (JSC::JSCallbackFunction::call):
22937        * API/JSCallbackObjectFunctions.h:
22938        (JSC::::getOwnPropertySlot):
22939        (JSC::::put):
22940        (JSC::::deleteProperty):
22941        (JSC::::construct):
22942        (JSC::::hasInstance):
22943        (JSC::::call):
22944        (JSC::::toNumber):
22945        (JSC::::toString):
22946        (JSC::::staticValueGetter):
22947        (JSC::::staticFunctionGetter):
22948        (JSC::::callbackGetter):
22949        * API/JSObjectRef.cpp:
22950        (JSObjectMakeError):
22951        * JavaScriptCore.exp:
22952        * bytecompiler/BytecodeGenerator.cpp:
22953        (JSC::BytecodeGenerator::emitNewError):
22954        (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
22955        * bytecompiler/BytecodeGenerator.h:
22956        * bytecompiler/NodesCodegen.cpp:
22957        (JSC::ThrowableExpressionData::emitThrowError):
22958        (JSC::RegExpNode::emitBytecode):
22959        (JSC::PostfixErrorNode::emitBytecode):
22960        (JSC::PrefixErrorNode::emitBytecode):
22961        (JSC::AssignErrorNode::emitBytecode):
22962        (JSC::ForInNode::emitBytecode):
22963        (JSC::ContinueNode::emitBytecode):
22964        (JSC::BreakNode::emitBytecode):
22965        (JSC::ReturnNode::emitBytecode):
22966        (JSC::LabelNode::emitBytecode):
22967        * interpreter/CallFrame.h:
22968        * interpreter/Interpreter.cpp:
22969        (JSC::Interpreter::throwException):
22970        (JSC::Interpreter::privateExecute):
22971        * jit/JITStubs.cpp:
22972        (JSC::DEFINE_STUB_FUNCTION):
22973        * jsc.cpp:
22974        (functionRun):
22975        (functionLoad):
22976        (functionCheckSyntax):
22977        * parser/Nodes.h:
22978        * runtime/ArrayConstructor.cpp:
22979        (JSC::constructArrayWithSizeQuirk):
22980        * runtime/ArrayPrototype.cpp:
22981        (JSC::arrayProtoFuncToString):
22982        (JSC::arrayProtoFuncToLocaleString):
22983        (JSC::arrayProtoFuncJoin):
22984        (JSC::arrayProtoFuncFilter):
22985        (JSC::arrayProtoFuncMap):
22986        (JSC::arrayProtoFuncEvery):
22987        (JSC::arrayProtoFuncForEach):
22988        (JSC::arrayProtoFuncSome):
22989        (JSC::arrayProtoFuncReduce):
22990        (JSC::arrayProtoFuncReduceRight):
22991        * runtime/BooleanPrototype.cpp:
22992        (JSC::booleanProtoFuncToString):
22993        (JSC::booleanProtoFuncValueOf):
22994        * runtime/DatePrototype.cpp:
22995        (JSC::dateProtoFuncToString):
22996        (JSC::dateProtoFuncToUTCString):
22997        (JSC::dateProtoFuncToISOString):
22998        (JSC::dateProtoFuncToDateString):
22999        (JSC::dateProtoFuncToTimeString):
23000        (JSC::dateProtoFuncToLocaleString):
23001        (JSC::dateProtoFuncToLocaleDateString):
23002        (JSC::dateProtoFuncToLocaleTimeString):
23003        (JSC::dateProtoFuncGetTime):
23004        (JSC::dateProtoFuncGetFullYear):
23005        (JSC::dateProtoFuncGetUTCFullYear):
23006        (JSC::dateProtoFuncToGMTString):
23007        (JSC::dateProtoFuncGetMonth):
23008        (JSC::dateProtoFuncGetUTCMonth):
23009        (JSC::dateProtoFuncGetDate):
23010        (JSC::dateProtoFuncGetUTCDate):
23011        (JSC::dateProtoFuncGetDay):
23012        (JSC::dateProtoFuncGetUTCDay):
23013        (JSC::dateProtoFuncGetHours):
23014        (JSC::dateProtoFuncGetUTCHours):
23015        (JSC::dateProtoFuncGetMinutes):
23016        (JSC::dateProtoFuncGetUTCMinutes):
23017        (JSC::dateProtoFuncGetSeconds):
23018        (JSC::dateProtoFuncGetUTCSeconds):
23019        (JSC::dateProtoFuncGetMilliSeconds):
23020        (JSC::dateProtoFuncGetUTCMilliseconds):
23021        (JSC::dateProtoFuncGetTimezoneOffset):
23022        (JSC::dateProtoFuncSetTime):
23023        (JSC::setNewValueFromTimeArgs):
23024        (JSC::setNewValueFromDateArgs):
23025        (JSC::dateProtoFuncSetMilliSeconds):
23026        (JSC::dateProtoFuncSetUTCMilliseconds):
23027        (JSC::dateProtoFuncSetSeconds):
23028        (JSC::dateProtoFuncSetUTCSeconds):
23029        (JSC::dateProtoFuncSetMinutes):
23030        (JSC::dateProtoFuncSetUTCMinutes):
23031        (JSC::dateProtoFuncSetHours):
23032        (JSC::dateProtoFuncSetUTCHours):
23033        (JSC::dateProtoFuncSetDate):
23034        (JSC::dateProtoFuncSetUTCDate):
23035        (JSC::dateProtoFuncSetMonth):
23036        (JSC::dateProtoFuncSetUTCMonth):
23037        (JSC::dateProtoFuncSetFullYear):
23038        (JSC::dateProtoFuncSetUTCFullYear):
23039        (JSC::dateProtoFuncSetYear):
23040        (JSC::dateProtoFuncGetYear):
23041        (JSC::dateProtoFuncToJSON):
23042        * runtime/Error.cpp:
23043        (JSC::createError):
23044        (JSC::createEvalError):
23045        (JSC::createRangeError):
23046        (JSC::createReferenceError):
23047        (JSC::createSyntaxError):
23048        (JSC::createTypeError):
23049        (JSC::createURIError):
23050        (JSC::addErrorSourceInfo):
23051        (JSC::addErrorDivotInfo):
23052        (JSC::addErrorInfo):
23053        (JSC::hasErrorInfo):
23054        (JSC::throwError):
23055        (JSC::throwTypeError):
23056        (JSC::throwSyntaxError):
23057        * runtime/Error.h:
23058        (JSC::throwVMError):
23059        (JSC::throwVMTypeError):
23060        * runtime/ErrorConstructor.cpp:
23061        (JSC::constructWithErrorConstructor):
23062        (JSC::callErrorConstructor):
23063        * runtime/ErrorConstructor.h:
23064        * runtime/ErrorInstance.cpp:
23065        (JSC::ErrorInstance::ErrorInstance):
23066        (JSC::ErrorInstance::create):
23067        * runtime/ErrorInstance.h:
23068        * runtime/ErrorPrototype.cpp:
23069        (JSC::ErrorPrototype::ErrorPrototype):
23070        * runtime/ExceptionHelpers.cpp:
23071        (JSC::createStackOverflowError):
23072        (JSC::createUndefinedVariableError):
23073        (JSC::createInvalidParamError):
23074        (JSC::createNotAConstructorError):
23075        (JSC::createNotAFunctionError):
23076        (JSC::createNotAnObjectError):
23077        (JSC::throwOutOfMemoryError):
23078        * runtime/ExceptionHelpers.h:
23079        * runtime/Executable.cpp:
23080        (JSC::EvalExecutable::compile):
23081        (JSC::ProgramExecutable::checkSyntax):
23082        (JSC::ProgramExecutable::compile):
23083        * runtime/FunctionConstructor.cpp:
23084        (JSC::constructFunction):
23085        * runtime/FunctionPrototype.cpp:
23086        (JSC::functionProtoFuncToString):
23087        (JSC::functionProtoFuncApply):
23088        (JSC::functionProtoFuncCall):
23089        * runtime/Identifier.cpp:
23090        (JSC::Identifier::from):
23091        * runtime/Identifier.h:
23092        * runtime/JSArray.cpp:
23093        (JSC::JSArray::put):
23094        * runtime/JSFunction.cpp:
23095        (JSC::callHostFunctionAsConstructor):
23096        * runtime/JSGlobalObjectFunctions.cpp:
23097        (JSC::encode):
23098        (JSC::decode):
23099        (JSC::globalFuncEval):
23100        * runtime/JSONObject.cpp:
23101        (JSC::Stringifier::appendStringifiedValue):
23102        (JSC::Walker::walk):
23103        (JSC::JSONProtoFuncParse):
23104        (JSC::JSONProtoFuncStringify):
23105        * runtime/JSObject.cpp:
23106        (JSC::throwSetterError):
23107        (JSC::JSObject::put):
23108        (JSC::JSObject::putWithAttributes):
23109        (JSC::JSObject::defaultValue):
23110        (JSC::JSObject::hasInstance):
23111        (JSC::JSObject::defineOwnProperty):
23112        * runtime/JSObject.h:
23113        * runtime/JSValue.cpp:
23114        (JSC::JSValue::toObjectSlowCase):
23115        (JSC::JSValue::synthesizeObject):
23116        (JSC::JSValue::synthesizePrototype):
23117        * runtime/NativeErrorConstructor.cpp:
23118        (JSC::constructWithNativeErrorConstructor):
23119        (JSC::callNativeErrorConstructor):
23120        * runtime/NativeErrorConstructor.h:
23121        * runtime/NumberPrototype.cpp:
23122        (JSC::numberProtoFuncToString):
23123        (JSC::numberProtoFuncToLocaleString):
23124        (JSC::numberProtoFuncValueOf):
23125        (JSC::numberProtoFuncToFixed):
23126        (JSC::numberProtoFuncToExponential):
23127        (JSC::numberProtoFuncToPrecision):
23128        * runtime/ObjectConstructor.cpp:
23129        (JSC::objectConstructorGetPrototypeOf):
23130        (JSC::objectConstructorGetOwnPropertyDescriptor):
23131        (JSC::objectConstructorGetOwnPropertyNames):
23132        (JSC::objectConstructorKeys):
23133        (JSC::toPropertyDescriptor):
23134        (JSC::objectConstructorDefineProperty):
23135        (JSC::objectConstructorDefineProperties):
23136        (JSC::objectConstructorCreate):
23137        * runtime/ObjectPrototype.cpp:
23138        (JSC::objectProtoFuncDefineGetter):
23139        (JSC::objectProtoFuncDefineSetter):
23140        * runtime/RegExpConstructor.cpp:
23141        (JSC::constructRegExp):
23142        * runtime/RegExpObject.cpp:
23143        (JSC::RegExpObject::match):
23144        * runtime/RegExpPrototype.cpp:
23145        (JSC::regExpProtoFuncTest):
23146        (JSC::regExpProtoFuncExec):
23147        (JSC::regExpProtoFuncCompile):
23148        (JSC::regExpProtoFuncToString):
23149        * runtime/StringPrototype.cpp:
23150        (JSC::stringProtoFuncToString):
23151
231522010-06-05  Kwang Yul Seo  <skyul@company100.net>
23153
23154        Reviewed by Eric Seidel.
23155
23156        [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
23157        https://bugs.webkit.org/show_bug.cgi?id=39710
23158
23159        Build fix for BREW MP.
23160
23161        * wtf/MathExtras.h:
23162
231632010-06-04  Adam Barth  <abarth@webkit.org>
23164
23165        Reviewed by Darin Adler.
23166
23167        HTML5 parser should be within 1% of old parser performance
23168        https://bugs.webkit.org/show_bug.cgi?id=40172
23169
23170        Fix cast in this operator= to allow for assignment between vectors with
23171        different inline capacities (as clearly intended by its author).
23172
23173        * wtf/Vector.h:
23174        (WTF::::operator):
23175
231762010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23177
23178        Reviewed by Kenneth Rohde Christiansen.
23179
23180        New QtScript API; QScriptValue::instanceOf.
23181
23182        New function create an easy way to check value's prototype hierarchy.
23183
23184        [Qt] QScriptValue should have an instanceOf method
23185        https://bugs.webkit.org/show_bug.cgi?id=40120
23186
23187        * qt/api/qscriptvalue.cpp:
23188        (QScriptValue::instanceOf):
23189        * qt/api/qscriptvalue.h:
23190        * qt/api/qscriptvalue_p.h:
23191        (QScriptValuePrivate::instanceOf):
23192        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
23193        * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
23194        (tst_QScriptValue::instanceOf_initData):
23195        (tst_QScriptValue::instanceOf_makeData):
23196        (tst_QScriptValue::instanceOf_test):
23197
231982010-06-04  Gavin Barraclough  <barraclough@apple.com>
23199
23200        Reviewed by NOBODY (interpreter build fix).
23201
23202        * interpreter/Interpreter.cpp:
23203        (JSC::Interpreter::privateExecute):
23204
232052010-06-04  Mark Rowe  <mrowe@apple.com>
23206
23207        Silence some warnings seen on the build bot.
23208
23209        * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
23210        * JavaScriptCore.JSVALUE32only.exp: Ditto.
23211        * JavaScriptCore.JSVALUE64only.exp: Ditto.
23212        * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
23213        complain about not knowing how to compile them.
23214
232152010-06-04  Gavin Barraclough  <barraclough@apple.com>
23216
23217        Reviewed by Oliver Hunt.
23218
23219        Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
23220
23221        Mostly for consistency, but constructor & args arguments are redundant,
23222        and this will help if we wish to be able to JIT calls to more constructors.
23223
23224        * API/JSCallbackConstructor.cpp:
23225        (JSC::constructJSCallback):
23226        * API/JSCallbackObject.h:
23227        * API/JSCallbackObjectFunctions.h:
23228        (JSC::::construct):
23229        * interpreter/Interpreter.cpp:
23230        (JSC::Interpreter::executeConstruct):
23231        * interpreter/Interpreter.h:
23232        * jit/JITStubs.cpp:
23233        (JSC::DEFINE_STUB_FUNCTION):
23234        * runtime/ArrayConstructor.cpp:
23235        (JSC::constructWithArrayConstructor):
23236        * runtime/BooleanConstructor.cpp:
23237        (JSC::constructWithBooleanConstructor):
23238        * runtime/ConstructData.cpp:
23239        (JSC::construct):
23240        * runtime/ConstructData.h:
23241        * runtime/DateConstructor.cpp:
23242        (JSC::constructWithDateConstructor):
23243        * runtime/Error.cpp:
23244        (JSC::constructNativeError):
23245        (JSC::Error::create):
23246        * runtime/ErrorConstructor.cpp:
23247        (JSC::constructWithErrorConstructor):
23248        * runtime/FunctionConstructor.cpp:
23249        (JSC::constructWithFunctionConstructor):
23250        * runtime/NativeErrorConstructor.cpp:
23251        (JSC::constructWithNativeErrorConstructor):
23252        * runtime/NativeErrorConstructor.h:
23253        (JSC::NativeErrorConstructor::errorStructure):
23254        * runtime/NumberConstructor.cpp:
23255        (JSC::constructWithNumberConstructor):
23256        * runtime/ObjectConstructor.cpp:
23257        (JSC::constructWithObjectConstructor):
23258        * runtime/RegExpConstructor.cpp:
23259        (JSC::constructWithRegExpConstructor):
23260        * runtime/StringConstructor.cpp:
23261        (JSC::constructWithStringConstructor):
23262
232632010-06-04  Tony Gentilcore  <tonyg@chromium.org>
23264
23265        Reviewed by Adam Barth.
23266
23267        Add a takeFirst() method to Deque and use it where appropriate.
23268        https://bugs.webkit.org/show_bug.cgi?id=40089
23269
23270        * wtf/Deque.h:
23271        (WTF::::takeFirst):
23272        * wtf/MainThread.cpp:
23273        (WTF::dispatchFunctionsFromMainThread):
23274        * wtf/MessageQueue.h:
23275        (WTF::::tryGetMessage):
23276
232772010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23278
23279        Reviewed by Kenneth Rohde Christiansen.
23280
23281        Remove a QEXPECT_FAIL flag from an autotest.
23282
23283        Test tst_QScriptEngine::globalObject pass after 36600 bug
23284        fix have been applied.
23285
23286        [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
23287        https://bugs.webkit.org/show_bug.cgi?id=40114
23288
23289        * qt/tests/qscriptengine/tst_qscriptengine.cpp:
23290        (tst_QScriptEngine::globalObject):
23291
232922010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23293
23294        Reviewed by Kenneth Rohde Christiansen.
23295
23296        Fix QScriptValue::equals.
23297
23298        Handling for a few edge cases were added. Now comparison between
23299        NaN, an invalid objects should works as supposed.
23300
23301        [Qt] QScriptValue::equals problems
23302        https://bugs.webkit.org/show_bug.cgi?id=40110
23303
23304        * qt/api/qscriptvalue.cpp:
23305        (QScriptValue::equals):
23306        * qt/api/qscriptvalue_p.h:
23307        (QScriptValuePrivate::equals):
23308        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
23309        * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
23310        (tst_QScriptValue::equals_initData):
23311        (tst_QScriptValue::equals_makeData):
23312        (tst_QScriptValue::equals_test):
23313
233142010-06-03  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23315
23316        Reviewed by Kenneth Rohde Christiansen.
23317
23318        New states in QScriptValuePrivate.
23319
23320        The CSpecial state was divided into CNull and CUndefined. It simplify
23321        the QScriptValue code by avoiding a few "cast" and "if".
23322        Moreover the MSVS compiler didn't like casting between a double and an
23323        enum which is avoided now.
23324
23325        [Qt] The QScriptValuePrivate::CSpecial is too generic.
23326        https://bugs.webkit.org/show_bug.cgi?id=40067
23327
23328        * qt/api/qscriptvalue_p.h:
23329        (QScriptValuePrivate::):
23330        (QScriptValuePrivate::QScriptValuePrivate):
23331        (QScriptValuePrivate::isNull):
23332        (QScriptValuePrivate::isUndefined):
23333        (QScriptValuePrivate::toString):
23334        (QScriptValuePrivate::toNumber):
23335        (QScriptValuePrivate::toBool):
23336        (QScriptValuePrivate::toObject):
23337        (QScriptValuePrivate::assignEngine):
23338        (QScriptValuePrivate::isNumberBased):
23339
233402010-06-03  Gavin Barraclough  <barraclough@apple.com>
23341
23342        Reviewed by NOBODY (Qt build fix).
23343
23344        * wtf/Platform.h:
23345
233462010-06-03  Gavin Barraclough  <barraclough@apple.com>
23347
23348        Reviewed by Mark Rowe.
23349
23350        Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
23351        This was fixed in bug #40094.
23352
23353        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23354        * wtf/Platform.h:
23355
233562010-06-03  Gavin Barraclough  <barraclough@apple.com>
23357
23358        Reviewed by NOBODY (Interpreter build fix).
23359
23360        * JavaScriptCore.JSVALUE32_64only.exp:
23361        * JavaScriptCore.JSVALUE32only.exp:
23362        * JavaScriptCore.JSVALUE64only.exp:
23363        * interpreter/Interpreter.cpp:
23364        (JSC::Interpreter::privateExecute):
23365
233662010-06-03  Gavin Barraclough  <barraclough@apple.com>
23367
23368        Reviewed by NOBODY (windows build fix II).
23369
23370        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23371
233722010-06-03  Gavin Barraclough  <barraclough@apple.com>
23373
23374        Reviewed by NOBODY (windows build fix).
23375
23376        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23377
233782010-06-02  Gavin Barraclough  <barraclough@apple.com>
23379
23380        Reviewed by Oliver Hunt.
23381
23382        Bug 40094 - The return type of NativeFunction should be EncodedJSValue
23383        On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
23384
23385        * API/JSCallbackFunction.cpp:
23386        (JSC::JSCallbackFunction::call):
23387        * API/JSCallbackFunction.h:
23388        * API/JSCallbackObject.h:
23389        * API/JSCallbackObjectFunctions.h:
23390        (JSC::::call):
23391        * JavaScriptCore.exp:
23392        * interpreter/Interpreter.cpp:
23393        (JSC::Interpreter::executeCall):
23394        * jit/JITStubs.cpp:
23395        (JSC::DEFINE_STUB_FUNCTION):
23396        * jit/JITStubs.h:
23397        * jsc.cpp:
23398        (functionPrint):
23399        (functionDebug):
23400        (functionGC):
23401        (functionVersion):
23402        (functionRun):
23403        (functionLoad):
23404        (functionCheckSyntax):
23405        (functionSetSamplingFlags):
23406        (functionClearSamplingFlags):
23407        (functionReadline):
23408        (functionQuit):
23409        * runtime/ArrayConstructor.cpp:
23410        (JSC::callArrayConstructor):
23411        (JSC::arrayConstructorIsArray):
23412        * runtime/ArrayPrototype.cpp:
23413        (JSC::arrayProtoFuncToString):
23414        (JSC::arrayProtoFuncToLocaleString):
23415        (JSC::arrayProtoFuncJoin):
23416        (JSC::arrayProtoFuncConcat):
23417        (JSC::arrayProtoFuncPop):
23418        (JSC::arrayProtoFuncPush):
23419        (JSC::arrayProtoFuncReverse):
23420        (JSC::arrayProtoFuncShift):
23421        (JSC::arrayProtoFuncSlice):
23422        (JSC::arrayProtoFuncSort):
23423        (JSC::arrayProtoFuncSplice):
23424        (JSC::arrayProtoFuncUnShift):
23425        (JSC::arrayProtoFuncFilter):
23426        (JSC::arrayProtoFuncMap):
23427        (JSC::arrayProtoFuncEvery):
23428        (JSC::arrayProtoFuncForEach):
23429        (JSC::arrayProtoFuncSome):
23430        (JSC::arrayProtoFuncReduce):
23431        (JSC::arrayProtoFuncReduceRight):
23432        (JSC::arrayProtoFuncIndexOf):
23433        (JSC::arrayProtoFuncLastIndexOf):
23434        * runtime/BooleanConstructor.cpp:
23435        (JSC::callBooleanConstructor):
23436        * runtime/BooleanPrototype.cpp:
23437        (JSC::booleanProtoFuncToString):
23438        (JSC::booleanProtoFuncValueOf):
23439        * runtime/CallData.h:
23440        * runtime/DateConstructor.cpp:
23441        (JSC::callDate):
23442        (JSC::dateParse):
23443        (JSC::dateNow):
23444        (JSC::dateUTC):
23445        * runtime/DatePrototype.cpp:
23446        (JSC::dateProtoFuncToString):
23447        (JSC::dateProtoFuncToUTCString):
23448        (JSC::dateProtoFuncToISOString):
23449        (JSC::dateProtoFuncToDateString):
23450        (JSC::dateProtoFuncToTimeString):
23451        (JSC::dateProtoFuncToLocaleString):
23452        (JSC::dateProtoFuncToLocaleDateString):
23453        (JSC::dateProtoFuncToLocaleTimeString):
23454        (JSC::dateProtoFuncGetTime):
23455        (JSC::dateProtoFuncGetFullYear):
23456        (JSC::dateProtoFuncGetUTCFullYear):
23457        (JSC::dateProtoFuncToGMTString):
23458        (JSC::dateProtoFuncGetMonth):
23459        (JSC::dateProtoFuncGetUTCMonth):
23460        (JSC::dateProtoFuncGetDate):
23461        (JSC::dateProtoFuncGetUTCDate):
23462        (JSC::dateProtoFuncGetDay):
23463        (JSC::dateProtoFuncGetUTCDay):
23464        (JSC::dateProtoFuncGetHours):
23465        (JSC::dateProtoFuncGetUTCHours):
23466        (JSC::dateProtoFuncGetMinutes):
23467        (JSC::dateProtoFuncGetUTCMinutes):
23468        (JSC::dateProtoFuncGetSeconds):
23469        (JSC::dateProtoFuncGetUTCSeconds):
23470        (JSC::dateProtoFuncGetMilliSeconds):
23471        (JSC::dateProtoFuncGetUTCMilliseconds):
23472        (JSC::dateProtoFuncGetTimezoneOffset):
23473        (JSC::dateProtoFuncSetTime):
23474        (JSC::dateProtoFuncSetMilliSeconds):
23475        (JSC::dateProtoFuncSetUTCMilliseconds):
23476        (JSC::dateProtoFuncSetSeconds):
23477        (JSC::dateProtoFuncSetUTCSeconds):
23478        (JSC::dateProtoFuncSetMinutes):
23479        (JSC::dateProtoFuncSetUTCMinutes):
23480        (JSC::dateProtoFuncSetHours):
23481        (JSC::dateProtoFuncSetUTCHours):
23482        (JSC::dateProtoFuncSetDate):
23483        (JSC::dateProtoFuncSetUTCDate):
23484        (JSC::dateProtoFuncSetMonth):
23485        (JSC::dateProtoFuncSetUTCMonth):
23486        (JSC::dateProtoFuncSetFullYear):
23487        (JSC::dateProtoFuncSetUTCFullYear):
23488        (JSC::dateProtoFuncSetYear):
23489        (JSC::dateProtoFuncGetYear):
23490        (JSC::dateProtoFuncToJSON):
23491        * runtime/ErrorConstructor.cpp:
23492        (JSC::callErrorConstructor):
23493        * runtime/ErrorPrototype.cpp:
23494        (JSC::errorProtoFuncToString):
23495        * runtime/FunctionConstructor.cpp:
23496        (JSC::callFunctionConstructor):
23497        * runtime/FunctionPrototype.cpp:
23498        (JSC::callFunctionPrototype):
23499        (JSC::functionProtoFuncToString):
23500        (JSC::functionProtoFuncApply):
23501        (JSC::functionProtoFuncCall):
23502        * runtime/JSCell.h:
23503        (JSC::getCallData):
23504        (JSC::getConstructData):
23505        * runtime/JSFunction.cpp:
23506        (JSC::callHostFunctionAsConstructor):
23507        * runtime/JSFunction.h:
23508        * runtime/JSGlobalObjectFunctions.cpp:
23509        (JSC::globalFuncEval):
23510        (JSC::globalFuncParseInt):
23511        (JSC::globalFuncParseFloat):
23512        (JSC::globalFuncIsNaN):
23513        (JSC::globalFuncIsFinite):
23514        (JSC::globalFuncDecodeURI):
23515        (JSC::globalFuncDecodeURIComponent):
23516        (JSC::globalFuncEncodeURI):
23517        (JSC::globalFuncEncodeURIComponent):
23518        (JSC::globalFuncEscape):
23519        (JSC::globalFuncUnescape):
23520        (JSC::globalFuncJSCPrint):
23521        * runtime/JSGlobalObjectFunctions.h:
23522        * runtime/JSONObject.cpp:
23523        (JSC::JSONProtoFuncParse):
23524        (JSC::JSONProtoFuncStringify):
23525        * runtime/JSObject.cpp:
23526        (JSC::callDefaultValueFunction):
23527        * runtime/JSValue.h:
23528        * runtime/MathObject.cpp:
23529        (JSC::mathProtoFuncAbs):
23530        (JSC::mathProtoFuncACos):
23531        (JSC::mathProtoFuncASin):
23532        (JSC::mathProtoFuncATan):
23533        (JSC::mathProtoFuncATan2):
23534        (JSC::mathProtoFuncCeil):
23535        (JSC::mathProtoFuncCos):
23536        (JSC::mathProtoFuncExp):
23537        (JSC::mathProtoFuncFloor):
23538        (JSC::mathProtoFuncLog):
23539        (JSC::mathProtoFuncMax):
23540        (JSC::mathProtoFuncMin):
23541        (JSC::mathProtoFuncPow):
23542        (JSC::mathProtoFuncRandom):
23543        (JSC::mathProtoFuncRound):
23544        (JSC::mathProtoFuncSin):
23545        (JSC::mathProtoFuncSqrt):
23546        (JSC::mathProtoFuncTan):
23547        * runtime/NativeErrorConstructor.cpp:
23548        (JSC::callNativeErrorConstructor):
23549        * runtime/NumberConstructor.cpp:
23550        (JSC::callNumberConstructor):
23551        * runtime/NumberPrototype.cpp:
23552        (JSC::numberProtoFuncToString):
23553        (JSC::numberProtoFuncToLocaleString):
23554        (JSC::numberProtoFuncValueOf):
23555        (JSC::numberProtoFuncToFixed):
23556        (JSC::numberProtoFuncToExponential):
23557        (JSC::numberProtoFuncToPrecision):
23558        * runtime/ObjectConstructor.cpp:
23559        (JSC::callObjectConstructor):
23560        (JSC::objectConstructorGetPrototypeOf):
23561        (JSC::objectConstructorGetOwnPropertyDescriptor):
23562        (JSC::objectConstructorGetOwnPropertyNames):
23563        (JSC::objectConstructorKeys):
23564        (JSC::toPropertyDescriptor):
23565        (JSC::objectConstructorDefineProperty):
23566        (JSC::objectConstructorDefineProperties):
23567        (JSC::objectConstructorCreate):
23568        * runtime/ObjectPrototype.cpp:
23569        (JSC::objectProtoFuncValueOf):
23570        (JSC::objectProtoFuncHasOwnProperty):
23571        (JSC::objectProtoFuncIsPrototypeOf):
23572        (JSC::objectProtoFuncDefineGetter):
23573        (JSC::objectProtoFuncDefineSetter):
23574        (JSC::objectProtoFuncLookupGetter):
23575        (JSC::objectProtoFuncLookupSetter):
23576        (JSC::objectProtoFuncPropertyIsEnumerable):
23577        (JSC::objectProtoFuncToLocaleString):
23578        (JSC::objectProtoFuncToString):
23579        * runtime/ObjectPrototype.h:
23580        * runtime/RegExpConstructor.cpp:
23581        (JSC::callRegExpConstructor):
23582        * runtime/RegExpObject.cpp:
23583        (JSC::callRegExpObject):
23584        * runtime/RegExpPrototype.cpp:
23585        (JSC::regExpProtoFuncTest):
23586        (JSC::regExpProtoFuncExec):
23587        (JSC::regExpProtoFuncCompile):
23588        (JSC::regExpProtoFuncToString):
23589        * runtime/StringConstructor.cpp:
23590        (JSC::stringFromCharCode):
23591        (JSC::callStringConstructor):
23592        * runtime/StringPrototype.cpp:
23593        (JSC::stringProtoFuncReplace):
23594        (JSC::stringProtoFuncToString):
23595        (JSC::stringProtoFuncCharAt):
23596        (JSC::stringProtoFuncCharCodeAt):
23597        (JSC::stringProtoFuncConcat):
23598        (JSC::stringProtoFuncIndexOf):
23599        (JSC::stringProtoFuncLastIndexOf):
23600        (JSC::stringProtoFuncMatch):
23601        (JSC::stringProtoFuncSearch):
23602        (JSC::stringProtoFuncSlice):
23603        (JSC::stringProtoFuncSplit):
23604        (JSC::stringProtoFuncSubstr):
23605        (JSC::stringProtoFuncSubstring):
23606        (JSC::stringProtoFuncToLowerCase):
23607        (JSC::stringProtoFuncToUpperCase):
23608        (JSC::stringProtoFuncLocaleCompare):
23609        (JSC::stringProtoFuncBig):
23610        (JSC::stringProtoFuncSmall):
23611        (JSC::stringProtoFuncBlink):
23612        (JSC::stringProtoFuncBold):
23613        (JSC::stringProtoFuncFixed):
23614        (JSC::stringProtoFuncItalics):
23615        (JSC::stringProtoFuncStrike):
23616        (JSC::stringProtoFuncSub):
23617        (JSC::stringProtoFuncSup):
23618        (JSC::stringProtoFuncFontcolor):
23619        (JSC::stringProtoFuncFontsize):
23620        (JSC::stringProtoFuncAnchor):
23621        (JSC::stringProtoFuncLink):
23622        (JSC::stringProtoFuncTrim):
23623        (JSC::stringProtoFuncTrimLeft):
23624        (JSC::stringProtoFuncTrimRight):
23625
236262010-06-02  Mark Rowe  <mrowe@apple.com>
23627
23628        Reviewed by Gavin Barraclough.
23629
23630        Add value-representation specific sections to the mac export file.
23631
23632        * Configurations/JavaScriptCore.xcconfig:
23633        * DerivedSources.make:
23634        * JavaScriptCore.JSVALUE32_64only.exp: Added.
23635        * JavaScriptCore.JSVALUE32only.exp: Added.
23636        * JavaScriptCore.JSVALUE64only.exp: Added.
23637        * JavaScriptCore.xcodeproj/project.pbxproj:
23638
236392010-06-02  Mark Rowe  <mrowe@apple.com>
23640
23641        Reviewed by Gavin Barraclough.
23642
23643        <rdar://problem/8054988> Work around an LLVM GCC code generation bug that results in crashes inside PCRE.
23644
23645        * pcre/pcre_exec.cpp:
23646        (repeatInformationFromInstructionOffset): Change the type of instructionOffset to int.  There's no good
23647        reason for it to be a short, and using int prevents this code from triggering the LLVM GCC bug.
23648
236492010-06-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23650
23651        Reviewed by Kenneth Rohde Christiansen.
23652
23653        Fix the QScriptValue::strictlyEquals function.
23654
23655        Handling for a few edge cases was added.
23656
23657        New autotest that covers the QScriptValue::strictlyEquals function.
23658
23659        [Qt] QScriptValue::strictlyEquals is broken
23660        https://bugs.webkit.org/show_bug.cgi?id=36600
23661
23662        * qt/api/qscriptvalue.cpp:
23663        (QScriptValue::strictlyEquals):
23664        * qt/api/qscriptvalue_p.h:
23665        (QScriptValuePrivate::strictlyEquals):
23666        * qt/tests/qscriptvalue/qscriptvalue.pro:
23667        * qt/tests/qscriptvalue/tst_qscriptvalue.h:
23668        * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp: Added.
23669        (tst_QScriptValue::strictlyEquals_initData):
23670        (tst_QScriptValue::strictlyEquals_makeData):
23671        (tst_QScriptValue::strictlyEquals_test):
23672
236732010-06-02  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
23674
23675        Reviewed by Kenneth Rohde Christiansen.
23676
23677        New function QScriptEngine::newObject.
23678
23679        The function creates a object of class Object and returns it
23680        as a QScriptValue.
23681
23682        [Qt] QScriptEngine API should contain a newObject function
23683        https://bugs.webkit.org/show_bug.cgi?id=39114
23684
23685        * qt/api/qscriptengine.cpp:
23686        (QScriptEngine::newObject):
23687        * qt/api/qscriptengine.h:
23688        * qt/api/qscriptengine_p.cpp:
23689        (QScriptEnginePrivate::newObject):
23690        * qt/api/qscriptengine_p.h:
23691        * qt/tests/qscriptengine/tst_qscriptengine.cpp:
23692        (tst_QScriptEngine::newObject):
23693
236942010-06-02  Gabor Loki  <loki@webkit.org>
23695
23696        Reviewed by Gavin Barraclough.
23697        https://bugs.webkit.org/show_bug.cgi?id=40011
23698
23699        Thumb-2 build fix: The offset parameter of ldrh should be encoded as an
23700        imm12 immediate constant in load16. If it is not fit in the instruction
23701        a temporary register has to be used.
23702
23703        * assembler/MacroAssemblerARMv7.h:
23704        (JSC::MacroAssemblerARMv7::load16):
23705
237062010-06-02  Sterling Swigart  <sswigart@google.com>
23707
23708        Reviewed by David Levin.
23709
23710        Image Resizer Patch 0: Added compilation argument to conditionally compile pending patches.
23711        https://bugs.webkit.org/show_bug.cgi?id=39906
23712
23713        * Configurations/FeatureDefines.xcconfig:
23714
237152010-06-01  Gavin Barraclough  <barraclough@apple.com>
23716
23717        Reviewed by Sam Weinig.
23718
23719        Bug 40021 - Refactor bytecode generation for calls so that register for this & args are allocated together
23720
23721        This is a useful stepping stone towards reversing argument order.
23722
23723        * bytecompiler/BytecodeGenerator.cpp:
23724        (JSC::BytecodeGenerator::BytecodeGenerator):
23725        (JSC::BytecodeGenerator::addParameter):
23726        (JSC::BytecodeGenerator::emitCall):
23727        (JSC::BytecodeGenerator::emitCallEval):
23728        (JSC::BytecodeGenerator::emitConstruct):
23729        * bytecompiler/BytecodeGenerator.h:
23730        (JSC::CallArguments::thisRegister):
23731        (JSC::CallArguments::argumentRegister):
23732        (JSC::CallArguments::callFrame):
23733        (JSC::CallArguments::count):
23734        (JSC::BytecodeGenerator::shouldEmitProfileHooks):
23735        * bytecompiler/NodesCodegen.cpp:
23736        (JSC::NewExprNode::emitBytecode):
23737        (JSC::CallArguments::CallArguments):
23738        (JSC::EvalFunctionCallNode::emitBytecode):
23739        (JSC::FunctionCallValueNode::emitBytecode):
23740        (JSC::FunctionCallResolveNode::emitBytecode):
23741        (JSC::FunctionCallBracketNode::emitBytecode):
23742        (JSC::FunctionCallDotNode::emitBytecode):
23743        (JSC::CallFunctionCallDotNode::emitBytecode):
23744        (JSC::ApplyFunctionCallDotNode::emitBytecode):
23745
237462010-06-01  Yong Li  <yoli@rim.com>
23747
23748        Reviewed by Darin Adler.
23749
23750        Explicitly use PTHREAD_MUTEX_NORMAL to create pthread mutex.
23751        https://bugs.webkit.org/show_bug.cgi?id=39893
23752
23753        * wtf/ThreadingPthreads.cpp:
23754        (WTF::Mutex::Mutex):
23755
237562010-06-01  Kwang Yul Seo  <skyul@company100.net>
23757
23758        Reviewed by Xan Lopez.
23759
23760        [GTK] Use DEFINE_STATIC_LOCAL for threadMapMutex and threadMap
23761        https://bugs.webkit.org/show_bug.cgi?id=39831
23762
23763        Use DEFINE_STATIC_LOCAL for static local variables.
23764
23765        * wtf/gtk/ThreadingGtk.cpp:
23766        (WTF::threadMapMutex):
23767        (WTF::threadMap):
23768        (WTF::identifierByGthreadHandle):
23769
237702010-06-01  Kent Tamura  <tkent@chromium.org>
23771
23772        Reviewed by Shinichiro Hamaji.
23773
23774        Fix style errors of dtoa
23775        https://bugs.webkit.org/show_bug.cgi?id=39972
23776
23777        Fix all errors reported by check-webkit-style.
23778
23779        * wtf/dtoa.cpp:
23780        * wtf/dtoa.h:
23781
237822010-05-30  Darin Adler  <darin@apple.com>
23783
23784        Reviewed by Sam Weinig.
23785
23786        * wtf/OwnArrayPtr.h:
23787        (WTF::OwnArrayPtr::set): Fix the assertion in here to match the one in OwnPtr.
23788        At some point someone fixed the "asserts when assigning to 0 and the pointer is
23789        already 0" issue in OwnPtr but forgot to do it here.
23790
237912010-05-29  Geoffrey Garen  <ggaren@apple.com>
23792
23793        Windows build fix: Updated exported symbols.
23794        
23795        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23796
237972010-05-29  Geoffrey Garen  <ggaren@apple.com>
23798
23799        Disabled ENABLE_JIT_OPTIMIZE_NATIVE_CALL on Windows for now, until I
23800        can figure out why it's crashing.
23801
23802        * wtf/Platform.h:
23803
238042010-05-29  Geoffrey Garen  <ggaren@apple.com>
23805
23806        Fixed Windows crash seen on buildbot.
23807
23808        * jit/JITOpcodes32_64.cpp:
23809        (JSC::JIT::privateCompileCTINativeCall): __fastcall puts the first
23810        argument in ecx.
23811
238122010-05-28  Geoffrey Garen  <ggaren@apple.com>
23813
23814        Windows build fix: Updated exported symbols.
23815
23816        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23817
238182010-05-28  Geoffrey Garen  <ggaren@apple.com>
23819
23820        Qt build fix: disable a little more stuff when JIT_OPTIMIZE_NATIVE_CALL
23821        is disabled.
23822
23823        * runtime/Lookup.cpp:
23824        (JSC::setUpStaticFunctionSlot):
23825        * runtime/Lookup.h:
23826        * wtf/Platform.h:
23827
238282010-05-28  Geoffrey Garen  <ggaren@apple.com>
23829
23830        Windows build fix: Updated exported symbols.
23831
23832        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
23833
238342010-05-28  Geoffrey Garen  <ggaren@apple.com>
23835
23836        Reviewed by Sam Weinig, Gavin Barraclough, Oliver Hunt.
23837
23838        Simplified the host calling convention.
23839        
23840        22.5% speedup on 32-bit host function calls. 9.5% speedup on 64-bit host
23841        function calls.
23842        
23843        No change on SunSpider.
23844        
23845        All JS calls (but not constructs, yet) now go through the normal JS
23846        calling convention via the RegisterFile. As a result, the host calling
23847        convention, which used to be this
23848
23849            JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*, JSObject*, JSValue thisValue, const ArgList&)
23850            
23851        is now this
23852
23853            JSValue (JSC_HOST_CALL *NativeFunction)(ExecState*)
23854            
23855        Callee, 'this', and argument access all hapen relative to the ExecState*,
23856        which is a pointer into the RegisterFile.
23857        
23858        This patch comes in two parts.
23859        
23860        PART ONE: Functional code changes.
23861        
23862        * wtf/Platform.h: Disabled optimized calls on platforms I didn't test.
23863        We can re-enable once we verify that host calls on these platforms are
23864        correct.
23865
23866        * debugger/DebuggerCallFrame.cpp:
23867        (JSC::DebuggerCallFrame::functionName):
23868        (JSC::DebuggerCallFrame::calculatedFunctionName): Updated for change to
23869        ExecState::callee().
23870
23871        (JSC::DebuggerCallFrame::thisObject): Updated for removal of ExecState::thisValue().
23872
23873        * interpreter/CallFrame.cpp:
23874        * interpreter/CallFrame.h:
23875        (JSC::ExecState::callee):
23876        (JSC::ExecState::scopeChain):
23877        (JSC::ExecState::init): Changed callee() to be JSObject* instead of
23878        JSFunction* -- now, it might be some other callable host object.
23879
23880        (JSC::ExecState::hostThisRegister):
23881        (JSC::ExecState::hostThisValue):
23882        (JSC::ExecState::argumentCount):
23883        (JSC::ExecState::argumentCountIncludingThis):
23884        (JSC::ExecState::argument):
23885        (JSC::ExecState::setArgumentCountIncludingThis):
23886        (JSC::ExecState::setCallee): Added convenient accessors for arguments
23887        from within a host function. Removed thisValue() because it was too
23888        tempting to use incorrectly, and it only had one or two clients, anyway.
23889
23890        * interpreter/Interpreter.cpp:
23891        (JSC::Interpreter::callEval): Updated for removal of ExecState::thisValue().
23892
23893        (JSC::Interpreter::throwException): Be sure to shrink the register file
23894        before invoking the exception handler, to reduce the chances that the
23895        handler will re-throw in the case of stack overflow. (Re-throwing is now
23896        more likely than it used to be, since standardizing the calling convention
23897        implicitly added stack overflow checks to some places where they used to be missing.)
23898
23899        (JSC::Interpreter::execute): Clarified the scope of DynamicGlobalObjectScope.
23900        Updated for CallFrame::init API change.
23901
23902        (JSC::Interpreter::executeCall): Clarified scope of DynamicGlobalObjectScope.
23903        Updated for CallFrame::init API change. Added support for calling a host
23904        function.
23905
23906        (JSC::Interpreter::executeConstruct): Clarified scope of DynamicGlobalObjectScope.
23907        Updated for CallFrame::init API change. 
23908
23909        (JSC::Interpreter::prepareForRepeatCall): Updated for CallFrame::init API change. 
23910
23911        (JSC::Interpreter::privateExecute): Updated for CallFrame::init API change.
23912        Added some explicit JSValue(JSObject*) initialization, since relaxing
23913        the JSFunction* restriction on callee has made register types more ambiguous.
23914        Removed toThisObject() conversion, since all callees do it themselves now.
23915        Updated host function call for new host function signature. Updated for
23916        change to ExecState::argumentCount() API.
23917
23918        * interpreter/Register.h:
23919        (JSC::Register::):
23920        (JSC::Register::operator=):
23921        (JSC::Register::function): Changed callee() to be JSObject* instead of
23922        JSFunction* -- now, it might be some other callable host object.
23923
23924        * jit/JITOpcodes.cpp:
23925        (JSC::JIT::privateCompileCTINativeCall):
23926        * jit/JITOpcodes32_64.cpp:
23927        (JSC::JIT::privateCompileCTINativeCall): Deleted a bunch of code that
23928        set up the arguments to host functions -- all but one of the arguments
23929        are gone now. This is the actual optimization.
23930
23931        * jit/JITStubs.cpp:
23932        (JSC::DEFINE_STUB_FUNCTION): Updated for ExecState and Register API
23933        changes noted above. Removed toThisObject() conversion, since all callees
23934        do it themselves now.
23935        
23936        * runtime/ArgList.h:
23937        (JSC::ArgList::ArgList): ArgList is getting close to unused. Added a
23938        temporary shim for converting from ExecState* to ArgList where it's still
23939        necessary.
23940
23941        * runtime/Arguments.h:
23942        (JSC::Arguments::getArgumentsData):
23943        (JSC::Arguments::Arguments): Updated for ExecState and Register API
23944        changes noted above. 
23945
23946        * runtime/CallData.cpp:
23947        (JSC::call): Changed call always to call Interpreter::executeCall, even
23948        for host functions. This ensures that the normal calling convention is
23949        set up in the RegsiterFile when calling from C++ to host function.
23950
23951        * runtime/CallData.h: Changed host function signature as described above.
23952
23953        * runtime/ConstructData.cpp:
23954        (JSC::construct): Moved JSFunction::construct code here so I could nix
23955        JSFunction::call and JSFunction::call. We want a JSFunction-agnostic
23956        way to call and construct, so that everything works naturally for non-
23957        JSFunction objects. 
23958
23959        * runtime/JSFunction.cpp:
23960        (JSC::callHostFunctionAsConstructor):
23961        * runtime/JSFunction.h: Updated for ExecState and Register API changes
23962        noted above. Nixed JSFunction::call and JSFunction::construct, noted above.
23963 
23964        * runtime/JSGlobalObject.cpp:
23965        (JSC::JSGlobalObject::init): Ditto.
23966
23967        PART TWO: Global search and replace.
23968        
23969        In the areas below, I used global search-and-replace to change
23970            (ExecState*, JSObject*, JSValue, const ArgList&) => (ExecState*)
23971            args.size() => exec->argumentCount()
23972            args.at(i) => exec->argument(i)
23973
23974        * API/JSCallbackFunction.cpp:
23975        (JSC::JSCallbackFunction::call):
23976        * API/JSCallbackFunction.h:
23977        * API/JSCallbackObject.h:
23978        * API/JSCallbackObjectFunctions.h:
23979        (JSC::::call):
23980        * JavaScriptCore.exp:
23981        * jsc.cpp:
23982        (functionPrint):
23983        (functionDebug):
23984        (functionGC):
23985        (functionVersion):
23986        (functionRun):
23987        (functionLoad):
23988        (functionCheckSyntax):
23989        (functionSetSamplingFlags):
23990        (functionClearSamplingFlags):
23991        (functionReadline):
23992        (functionQuit):
23993        * runtime/ArrayConstructor.cpp:
23994        (JSC::callArrayConstructor):
23995        (JSC::arrayConstructorIsArray):
23996        * runtime/ArrayPrototype.cpp:
23997        (JSC::arrayProtoFuncToString):
23998        (JSC::arrayProtoFuncToLocaleString):
23999        (JSC::arrayProtoFuncJoin):
24000        (JSC::arrayProtoFuncConcat):
24001        (JSC::arrayProtoFuncPop):
24002        (JSC::arrayProtoFuncPush):
24003        (JSC::arrayProtoFuncReverse):
24004        (JSC::arrayProtoFuncShift):
24005        (JSC::arrayProtoFuncSlice):
24006        (JSC::arrayProtoFuncSort):
24007        (JSC::arrayProtoFuncSplice):
24008        (JSC::arrayProtoFuncUnShift):
24009        (JSC::arrayProtoFuncFilter):
24010        (JSC::arrayProtoFuncMap):
24011        (JSC::arrayProtoFuncEvery):
24012        (JSC::arrayProtoFuncForEach):
24013        (JSC::arrayProtoFuncSome):
24014        (JSC::arrayProtoFuncReduce):
24015        (JSC::arrayProtoFuncReduceRight):
24016        (JSC::arrayProtoFuncIndexOf):
24017        (JSC::arrayProtoFuncLastIndexOf):
24018        * runtime/BooleanConstructor.cpp:
24019        (JSC::callBooleanConstructor):
24020        * runtime/BooleanPrototype.cpp:
24021        (JSC::booleanProtoFuncToString):
24022        (JSC::booleanProtoFuncValueOf):
24023        * runtime/DateConstructor.cpp:
24024        (JSC::callDate):
24025        (JSC::dateParse):
24026        (JSC::dateNow):
24027        (JSC::dateUTC):
24028        * runtime/DatePrototype.cpp:
24029        (JSC::formatLocaleDate):
24030        (JSC::fillStructuresUsingTimeArgs):
24031        (JSC::fillStructuresUsingDateArgs):
24032        (JSC::dateProtoFuncToString):
24033        (JSC::dateProtoFuncToUTCString):
24034        (JSC::dateProtoFuncToISOString):
24035        (JSC::dateProtoFuncToDateString):
24036        (JSC::dateProtoFuncToTimeString):
24037        (JSC::dateProtoFuncToLocaleString):
24038        (JSC::dateProtoFuncToLocaleDateString):
24039        (JSC::dateProtoFuncToLocaleTimeString):
24040        (JSC::dateProtoFuncGetTime):
24041        (JSC::dateProtoFuncGetFullYear):
24042        (JSC::dateProtoFuncGetUTCFullYear):
24043        (JSC::dateProtoFuncToGMTString):
24044        (JSC::dateProtoFuncGetMonth):
24045        (JSC::dateProtoFuncGetUTCMonth):
24046        (JSC::dateProtoFuncGetDate):
24047        (JSC::dateProtoFuncGetUTCDate):
24048        (JSC::dateProtoFuncGetDay):
24049        (JSC::dateProtoFuncGetUTCDay):
24050        (JSC::dateProtoFuncGetHours):
24051        (JSC::dateProtoFuncGetUTCHours):
24052        (JSC::dateProtoFuncGetMinutes):
24053        (JSC::dateProtoFuncGetUTCMinutes):
24054        (JSC::dateProtoFuncGetSeconds):
24055        (JSC::dateProtoFuncGetUTCSeconds):
24056        (JSC::dateProtoFuncGetMilliSeconds):
24057        (JSC::dateProtoFuncGetUTCMilliseconds):
24058        (JSC::dateProtoFuncGetTimezoneOffset):
24059        (JSC::dateProtoFuncSetTime):
24060        (JSC::setNewValueFromTimeArgs):
24061        (JSC::setNewValueFromDateArgs):
24062        (JSC::dateProtoFuncSetMilliSeconds):
24063        (JSC::dateProtoFuncSetUTCMilliseconds):
24064        (JSC::dateProtoFuncSetSeconds):
24065        (JSC::dateProtoFuncSetUTCSeconds):
24066        (JSC::dateProtoFuncSetMinutes):
24067        (JSC::dateProtoFuncSetUTCMinutes):
24068        (JSC::dateProtoFuncSetHours):
24069        (JSC::dateProtoFuncSetUTCHours):
24070        (JSC::dateProtoFuncSetDate):
24071        (JSC::dateProtoFuncSetUTCDate):
24072        (JSC::dateProtoFuncSetMonth):
24073        (JSC::dateProtoFuncSetUTCMonth):
24074        (JSC::dateProtoFuncSetFullYear):
24075        (JSC::dateProtoFuncSetUTCFullYear):
24076        (JSC::dateProtoFuncSetYear):
24077        (JSC::dateProtoFuncGetYear):
24078        (JSC::dateProtoFuncToJSON):
24079        * runtime/ErrorConstructor.cpp:
24080        (JSC::callErrorConstructor):
24081        * runtime/ErrorPrototype.cpp:
24082        (JSC::errorProtoFuncToString):
24083        * runtime/FunctionConstructor.cpp:
24084        (JSC::callFunctionConstructor):
24085        * runtime/FunctionPrototype.cpp:
24086        (JSC::callFunctionPrototype):
24087        (JSC::functionProtoFuncToString):
24088        (JSC::functionProtoFuncApply):
24089        (JSC::functionProtoFuncCall):
24090        * runtime/JSGlobalObjectFunctions.cpp:
24091        (JSC::encode):
24092        (JSC::decode):
24093        (JSC::globalFuncEval):
24094        (JSC::globalFuncParseInt):
24095        (JSC::globalFuncParseFloat):
24096        (JSC::globalFuncIsNaN):
24097        (JSC::globalFuncIsFinite):
24098        (JSC::globalFuncDecodeURI):
24099        (JSC::globalFuncDecodeURIComponent):
24100        (JSC::globalFuncEncodeURI):
24101        (JSC::globalFuncEncodeURIComponent):
24102        (JSC::globalFuncEscape):
24103        (JSC::globalFuncUnescape):
24104        (JSC::globalFuncJSCPrint):
24105        * runtime/JSGlobalObjectFunctions.h:
24106        * runtime/JSONObject.cpp:
24107        (JSC::JSONProtoFuncParse):
24108        (JSC::JSONProtoFuncStringify):
24109        * runtime/JSString.h:
24110        * runtime/MathObject.cpp:
24111        (JSC::mathProtoFuncAbs):
24112        (JSC::mathProtoFuncACos):
24113        (JSC::mathProtoFuncASin):
24114        (JSC::mathProtoFuncATan):
24115        (JSC::mathProtoFuncATan2):
24116        (JSC::mathProtoFuncCeil):
24117        (JSC::mathProtoFuncCos):
24118        (JSC::mathProtoFuncExp):
24119        (JSC::mathProtoFuncFloor):
24120        (JSC::mathProtoFuncLog):
24121        (JSC::mathProtoFuncMax):
24122        (JSC::mathProtoFuncMin):
24123        (JSC::mathProtoFuncPow):
24124        (JSC::mathProtoFuncRandom):
24125        (JSC::mathProtoFuncRound):
24126        (JSC::mathProtoFuncSin):
24127        (JSC::mathProtoFuncSqrt):
24128        (JSC::mathProtoFuncTan):
24129        * runtime/NativeErrorConstructor.cpp:
24130        (JSC::callNativeErrorConstructor):
24131        * runtime/NumberConstructor.cpp:
24132        (JSC::callNumberConstructor):
24133        * runtime/NumberPrototype.cpp:
24134        (JSC::numberProtoFuncToString):
24135        (JSC::numberProtoFuncToLocaleString):
24136        (JSC::numberProtoFuncValueOf):
24137        (JSC::numberProtoFuncToFixed):
24138        (JSC::numberProtoFuncToExponential):
24139        (JSC::numberProtoFuncToPrecision):
24140        * runtime/ObjectConstructor.cpp:
24141        (JSC::callObjectConstructor):
24142        (JSC::objectConstructorGetPrototypeOf):
24143        (JSC::objectConstructorGetOwnPropertyDescriptor):
24144        (JSC::objectConstructorGetOwnPropertyNames):
24145        (JSC::objectConstructorKeys):
24146        (JSC::objectConstructorDefineProperty):
24147        (JSC::objectConstructorDefineProperties):
24148        (JSC::objectConstructorCreate):
24149        * runtime/ObjectPrototype.cpp:
24150        (JSC::objectProtoFuncValueOf):
24151        (JSC::objectProtoFuncHasOwnProperty):
24152        (JSC::objectProtoFuncIsPrototypeOf):
24153        (JSC::objectProtoFuncDefineGetter):
24154        (JSC::objectProtoFuncDefineSetter):
24155        (JSC::objectProtoFuncLookupGetter):
24156        (JSC::objectProtoFuncLookupSetter):
24157        (JSC::objectProtoFuncPropertyIsEnumerable):
24158        (JSC::objectProtoFuncToLocaleString):
24159        (JSC::objectProtoFuncToString):
24160        * runtime/ObjectPrototype.h:
24161        * runtime/Operations.h:
24162        (JSC::jsString):
24163        * runtime/RegExpConstructor.cpp:
24164        (JSC::callRegExpConstructor):
24165        * runtime/RegExpObject.cpp:
24166        (JSC::RegExpObject::test):
24167        (JSC::RegExpObject::exec):
24168        (JSC::callRegExpObject):
24169        (JSC::RegExpObject::match):
24170        * runtime/RegExpObject.h:
24171        * runtime/RegExpPrototype.cpp:
24172        (JSC::regExpProtoFuncTest):
24173        (JSC::regExpProtoFuncExec):
24174        (JSC::regExpProtoFuncCompile):
24175        (JSC::regExpProtoFuncToString):
24176        * runtime/StringConstructor.cpp:
24177        (JSC::stringFromCharCodeSlowCase):
24178        (JSC::stringFromCharCode):
24179        (JSC::callStringConstructor):
24180        * runtime/StringPrototype.cpp:
24181        (JSC::stringProtoFuncReplace):
24182        (JSC::stringProtoFuncToString):
24183        (JSC::stringProtoFuncCharAt):
24184        (JSC::stringProtoFuncCharCodeAt):
24185        (JSC::stringProtoFuncConcat):
24186        (JSC::stringProtoFuncIndexOf):
24187        (JSC::stringProtoFuncLastIndexOf):
24188        (JSC::stringProtoFuncMatch):
24189        (JSC::stringProtoFuncSearch):
24190        (JSC::stringProtoFuncSlice):
24191        (JSC::stringProtoFuncSplit):
24192        (JSC::stringProtoFuncSubstr):
24193        (JSC::stringProtoFuncSubstring):
24194        (JSC::stringProtoFuncToLowerCase):
24195        (JSC::stringProtoFuncToUpperCase):
24196        (JSC::stringProtoFuncLocaleCompare):
24197        (JSC::stringProtoFuncBig):
24198        (JSC::stringProtoFuncSmall):
24199        (JSC::stringProtoFuncBlink):
24200        (JSC::stringProtoFuncBold):
24201        (JSC::stringProtoFuncFixed):
24202        (JSC::stringProtoFuncItalics):
24203        (JSC::stringProtoFuncStrike):
24204        (JSC::stringProtoFuncSub):
24205        (JSC::stringProtoFuncSup):
24206        (JSC::stringProtoFuncFontcolor):
24207        (JSC::stringProtoFuncFontsize):
24208        (JSC::stringProtoFuncAnchor):
24209        (JSC::stringProtoFuncLink):
24210        (JSC::stringProtoFuncTrim):
24211        (JSC::stringProtoFuncTrimLeft):
24212        (JSC::stringProtoFuncTrimRight):
24213
242142010-05-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
24215
24216        Reviewed by Geoffrey Garen.
24217
24218        Fix the JSObjectSetPrototype function.
24219
24220        A cycle in a prototype chain can cause an application hang or
24221        even crash.
24222        A check for a prototype chain cycles was added to
24223        the JSObjectSetPrototype.
24224
24225        JSObjectSetPrototype doesn't check for cycle in prototype chain.
24226        https://bugs.webkit.org/show_bug.cgi?id=39360
24227
24228        * API/JSObjectRef.cpp:
24229        (JSObjectSetPrototype):
24230        * API/tests/testapi.c:
24231        (assertTrue):
24232        (checkForCycleInPrototypeChain):
24233        (main):
24234        * runtime/JSObject.cpp:
24235        (JSC::JSObject::put):
24236        * runtime/JSObject.h:
24237        (JSC::JSObject::setPrototypeWithCycleCheck):
24238
242392010-05-28  Chao-ying Fu  <fu@mips.com>
24240
24241        Reviewed by Eric Seidel.
24242
24243        Fix MIPS JIT DoubleGreaterThanOrEqual Operands
24244        https://bugs.webkit.org/show_bug.cgi?id=39504
24245
24246        Swapped two operands of left and right for DoubleGreaterThanOrEqual.
24247        This patch fixed two layout tests as follows.
24248        fast/js/comparison-operators-greater.html
24249        fast/js/comparison-operators-less.html
24250
24251        * assembler/MacroAssemblerMIPS.h:
24252        (JSC::MacroAssemblerMIPS::branchDouble):
24253
242542010-05-28  Gavin Barraclough  <barraclough@apple.com>
24255
24256        Reviewed by Geoff Garen.
24257
24258        Move jit compilation from linking thunks into cti_vm_lazyLink methods.
24259
24260        * jit/JITOpcodes.cpp:
24261        (JSC::JIT::privateCompileCTIMachineTrampolines):
24262        * jit/JITOpcodes32_64.cpp:
24263        (JSC::JIT::privateCompileCTIMachineTrampolines):
24264        * jit/JITStubs.cpp:
24265        (JSC::DEFINE_STUB_FUNCTION):
24266
242672010-05-28  Gavin Barraclough  <barraclough@apple.com>
24268
24269        Reviewed by Sam Weinig.
24270
24271        Bug 39898 - Move arity check into callee.
24272        
24273        We can reduce the size of the virtual call trampolines by moving the arity check
24274        into the callee functions.  As a following step we will be able to remove the
24275        check for native function / codeblocks by performing translation in a lazy stub.
24276        
24277        * interpreter/CallFrame.h:
24278        (JSC::ExecState::init):
24279        (JSC::ExecState::setReturnPC):
24280        * jit/JIT.cpp:
24281        (JSC::JIT::privateCompile):
24282        (JSC::JIT::linkCall):
24283        (JSC::JIT::linkConstruct):
24284        * jit/JIT.h:
24285        (JSC::JIT::compile):
24286        * jit/JITOpcodes.cpp:
24287        (JSC::JIT::privateCompileCTIMachineTrampolines):
24288        * jit/JITOpcodes32_64.cpp:
24289        (JSC::JIT::privateCompileCTIMachineTrampolines):
24290        * jit/JITStubs.cpp:
24291        (JSC::DEFINE_STUB_FUNCTION):
24292        * runtime/Executable.cpp:
24293        (JSC::FunctionExecutable::generateJITCodeForCall):
24294        (JSC::FunctionExecutable::generateJITCodeForConstruct):
24295        (JSC::FunctionExecutable::reparseExceptionInfo):
24296        * runtime/Executable.h:
24297        (JSC::NativeExecutable::NativeExecutable):
24298        (JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
24299        (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
24300
243012010-05-27  Luiz Agostini  <luiz.agostini@openbossa.org>
24302
24303        Reviewed by Darin Adler.
24304
24305        UTF-16 code points compare() for String objects
24306        https://bugs.webkit.org/show_bug.cgi?id=39701
24307
24308        Moving compare() implementation from UString to StringImpl for it to be shared
24309        with String. Adding overloaded free functions codePointCompare() in StringImpl
24310        and WTFString. Renaming function compare in UString to codePointCompare to be
24311        consistent.
24312
24313        * runtime/JSArray.cpp:
24314        (JSC::compareByStringPairForQSort):
24315        * runtime/UString.cpp:
24316        * runtime/UString.h:
24317        (JSC::codePointCompare):
24318        * wtf/text/StringImpl.cpp:
24319        (WebCore::codePointCompare):
24320        * wtf/text/StringImpl.h:
24321        * wtf/text/WTFString.cpp:
24322        (WebCore::codePointCompare):
24323        * wtf/text/WTFString.h:
24324
243252010-05-26  Darin Adler  <darin@apple.com>
24326
24327        Reviewed by Kent Tamura.
24328
24329        Null characters handled incorrectly in ToNumber conversion
24330        https://bugs.webkit.org/show_bug.cgi?id=38088
24331
24332        * runtime/JSGlobalObjectFunctions.cpp:
24333        (JSC::parseInt): Changed code to use UTF8String().data() instead of
24334        ascii() to fix the thread safety issue. Code path is covered by existing
24335        tests in run-javascriptcore-tests.
24336        (JSC::parseFloat): Moved comment to UString::toDouble since the issue
24337        affects all clients, not just parseFloat. Specifically, this also affects
24338        standard JavaScript numeric conversion, ToNumber.
24339
24340        * runtime/UString.cpp:
24341        (JSC::UString::toDouble): Added a comment about incorrect space skipping.
24342        Changed trailing junk check to use the length of the CString instead of
24343        checking for a null character. Also got rid of a little unneeded logic
24344        in the case where we tolerate trailing junk.
24345
243462010-05-27  Nathan Lawrence  <nlawrence@apple.com>
24347
24348        Reviewed by Geoffrey Garen.
24349
24350        Search for the new allocation one word at a time.  Improves
24351        performance on SunSpider by approximately 1%.
24352        http://bugs.webkit.org/show_bug.cgi?id=39758
24353
24354        * runtime/Collector.cpp:
24355        (JSC::Heap::allocate):
24356        * runtime/Collector.h:
24357        (JSC::CollectorBitmap::advanceToNextPossibleFreeCell):
24358
243592010-05-27  Kevin Ollivier  <kevino@theolliviers.com>
24360
24361        [wx] Build fixes for Windows after recent changes.
24362
24363        * wscript:
24364
243652010-05-27  Gustavo Noronha Silva  <gns@gnome.org>
24366
24367        More build fixage for make dist.
24368
24369        * GNUmakefile.am:
24370
243712010-05-27  Kwang Yul Seo  <skyul@company100.net>
24372
24373        Reviewed by Darin Adler.
24374
24375        RVCT does not have strnstr.
24376        https://bugs.webkit.org/show_bug.cgi?id=39719
24377
24378        Add COMPILER(RVCT) guard to strnstr in StringExtras.h as RVCT does not provide strnstr.
24379
24380        * wtf/StringExtras.h:
24381
243822010-05-26  Gavin Barraclough  <barraclough@apple.com>
24383
24384        Reviewed by Oliver Hunt.
24385
24386        Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
24387        (relanding r60267)
24388
24389        If the last item in a main disjunction is a quantified set of parentheses,
24390        this is easier to code generate for than the general case for quantified
24391        parentheses. This is because we never need to backtrack into the parentheses
24392        - the first match will be the final and accepted match.
24393
24394        This patch also somewhat reverts a recent change to when fallback to PCRE
24395        occurs. At the minute the compiler is tracking on patterns which will
24396        require JIT fallback. This is handy from a performance perspective (it saves
24397        the failed attempt at JIT compilation), but it means introducing knowledge
24398        of the JITs capabilities into the other layers of the regex compilers. For
24399        the specific feature of back-references, add a flag tracking their presence
24400        on the pattern, and make these expressions fallback without attempting to
24401        JIT. For parentheses, return to detecting which cases are have or have not
24402        been handled during JIT compilation.
24403
24404        18% progression on tagcloud, ~1.5% overall on sunspidey.
24405
24406        * yarr/RegexCompiler.cpp:
24407        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
24408        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
24409        * yarr/RegexJIT.cpp:
24410        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
24411        (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
24412        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
24413        (JSC::Yarr::RegexGenerator::generateTerm):
24414        (JSC::Yarr::RegexGenerator::RegexGenerator):
24415        (JSC::Yarr::RegexGenerator::shouldFallBack):
24416        (JSC::Yarr::jitCompileRegex):
24417        * yarr/RegexPattern.h:
24418        (JSC::Yarr::RegexPattern::RegexPattern):
24419        (JSC::Yarr::RegexPattern::reset):
24420
244212010-05-26  Gavin Barraclough  <barraclough@apple.com>
24422
24423        Reviewed by NOBODY (revert).
24424
24425        Temporarily rolling out r60267, I appear to have hoesed perf at the last minute. :-/ Fixing.
24426
24427        * yarr/RegexCompiler.cpp:
24428        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
24429        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
24430        * yarr/RegexJIT.cpp:
24431        (JSC::Yarr::RegexGenerator::TermGenerationState::term):
24432        (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
24433        (JSC::Yarr::RegexGenerator::generateTerm):
24434        (JSC::Yarr::RegexGenerator::RegexGenerator):
24435        (JSC::Yarr::jitCompileRegex):
24436        * yarr/RegexPattern.h:
24437        (JSC::Yarr::RegexPattern::RegexPattern):
24438        (JSC::Yarr::RegexPattern::reset):
24439
244402010-05-26  Gustavo Noronha Silva  <gns@gnome.org>
24441
24442        Build fixes for make distcheck.
24443
24444        * GNUmakefile.am:
24445
244462010-05-26  Gavin Barraclough  <barraclough@apple.com>
24447
24448        Reviewed by Oliver Hunt.
24449
24450        Bug 39795 - Add support for YARR JIT generation of greedy quantified parens at the end of the main disjunction.
24451
24452        If the last item in a main disjunction is a quantified set of parentheses,
24453        this is easier to code generate for than the general case for quantified
24454        parentheses. This is because we never need to backtrack into the parentheses
24455        - the first match will be the final and accepted match.
24456
24457        This patch also somewhat reverts a recent change to when fallback to PCRE
24458        occurs. At the minute the compiler is tracking on patterns which will
24459        require JIT fallback. This is handy from a performance perspective (it saves
24460        the failed attempt at JIT compilation), but it means introducing knowledge
24461        of the JITs capabilities into the other layers of the regex compilers. For
24462        the specific feature of back-references, add a flag tracking their presence
24463        on the pattern, and make these expressions fallback without attempting to
24464        JIT. For parentheses, return to detecting which cases are have or have not
24465        been handled during JIT compilation.
24466
24467        18% progression on tagcloud, ~1.5% overall on sunspidey.
24468
24469        * yarr/RegexCompiler.cpp:
24470        (JSC::Yarr::RegexPatternConstructor::atomBackReference):
24471        (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
24472        * yarr/RegexJIT.cpp:
24473        (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
24474        (JSC::Yarr::RegexGenerator::TermGenerationState::isMainDisjunction):
24475        (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
24476        (JSC::Yarr::RegexGenerator::generateTerm):
24477        (JSC::Yarr::RegexGenerator::RegexGenerator):
24478        (JSC::Yarr::RegexGenerator::shouldFallBack):
24479        (JSC::Yarr::jitCompileRegex):
24480        * yarr/RegexPattern.h:
24481        (JSC::Yarr::RegexPattern::RegexPattern):
24482        (JSC::Yarr::RegexPattern::reset):
24483
244842010-05-26  Geoffrey Garen  <ggaren@apple.com>
24485
24486        Reviewed by Sam Weinig.
24487
24488        Fixed a crash seen on the Leopard bot, caused by merge.
24489
24490        * jit/JITStubs.cpp:
24491        (JSC::DEFINE_STUB_FUNCTION): Get the return address from the callframe,
24492        since it's no longer passed to us as an argument.
24493
244942010-05-25  Geoffrey Garen  <ggaren@apple.com>
24495
24496        Fixed build failure caused by merge.
24497
24498        * jit/JITStubs.cpp:
24499        (JSC::DEFINE_STUB_FUNCTION): On error, return a single value, since this
24500        function no longer returns a pair.
24501
245022010-05-25  Geoffrey Garen  <ggaren@apple.com>
24503
24504        Reviewed by Oliver Hunt.
24505
24506        <rdar://problem/8020221>
24507        
24508        Fixed a crash seen on Windows when calling a function with too many
24509        arguments.
24510        
24511        SunSpider reports no change.
24512        
24513        No test because the ASSERT I added fires in existing tests.
24514
24515        * jit/JITStubs.cpp:
24516        (JSC::DEFINE_STUB_FUNCTION): Make sure to grow the registerFile when too
24517        many arguments have been provided, since the caller only allocated enough
24518        registerFile space for the arguments it provided, not enough for the extra
24519        copy of arguments we're going to need.
24520
245212010-05-25  Kwang Yul Seo  <skyul@company100.net>
24522
24523        Reviewed by Darin Adler.
24524
24525        Build fix for JSFunction
24526        https://bugs.webkit.org/show_bug.cgi?id=39658
24527
24528        MSVC can't compile one of JSFunction constructors when JIT is disabled.
24529        "PassRefPtr<NativeExecutable>" causes the compile error as NativeExecutable is not defined. 
24530        Add ENABLE(JIT) guard to the constructor.
24531
24532        * runtime/JSFunction.cpp:
24533        (JSC::JSFunction::JSFunction):
24534        * runtime/JSFunction.h:
24535
245362010-05-24  Gavin Barraclough  <barraclough@apple.com>
24537
24538        Reviewed by Sam Weinig.
24539
24540        Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.
24541
24542        Presently, as soon as op-call strays off the hot path we set up a set of values on
24543        the stack to be passed as arguments to cti functions, in case any should be called.
24544
24545        Instead, hoist the setup of the callframe to happen slightly sooner, and make the
24546        cti functions to compile & check arity read these values from the callframe. This
24547        allows up to remove the deprecated methods to manually set up cti arguments, rather
24548        than using JITStubCall.h.
24549
24550        * interpreter/CallFrame.h:
24551        * jit/JIT.h:
24552        * jit/JITCall.cpp:
24553        (JSC::JIT::compileOpCallInitializeCallFrame):
24554        (JSC::JIT::compileOpCallVarargs):
24555        (JSC::JIT::compileOpCallVarargsSlowCase):
24556        (JSC::JIT::compileOpCall):
24557        (JSC::JIT::compileOpCallSlowCase):
24558        * jit/JITCall32_64.cpp:
24559        (JSC::JIT::compileOpCallInitializeCallFrame):
24560        (JSC::JIT::compileOpCallVarargs):
24561        (JSC::JIT::compileOpCallVarargsSlowCase):
24562        (JSC::JIT::compileOpCall):
24563        (JSC::JIT::compileOpCallSlowCase):
24564        * jit/JITInlineMethods.h:
24565        * jit/JITOpcodes.cpp:
24566        (JSC::JIT::privateCompileCTIMachineTrampolines):
24567        * jit/JITOpcodes32_64.cpp:
24568        (JSC::JIT::privateCompileCTIMachineTrampolines):
24569        * jit/JITStubs.cpp:
24570        (JSC::DEFINE_STUB_FUNCTION):
24571        * jit/JITStubs.h:
24572        (JSC::):
24573
245742010-05-24  Gavin Barraclough  <barraclough@apple.com>
24575
24576        Reviewed by Sam Weinig.
24577        Relanding r60075.
24578
24579        * bytecode/CodeBlock.cpp:
24580        (JSC::CodeBlock::dump):
24581        (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
24582        * bytecode/CodeBlock.h:
24583        * bytecode/Opcode.h:
24584        * bytecompiler/BytecodeGenerator.cpp:
24585        (JSC::BytecodeGenerator::BytecodeGenerator):
24586        (JSC::BytecodeGenerator::emitConstruct):
24587        * bytecompiler/BytecodeGenerator.h:
24588        (JSC::BytecodeGenerator::emitGetByIdExceptionInfo):
24589        * interpreter/Interpreter.cpp:
24590        (JSC::Interpreter::privateExecute):
24591        * jit/JIT.cpp:
24592        (JSC::JIT::privateCompileMainPass):
24593        * jit/JIT.h:
24594        * jit/JITCall.cpp:
24595        (JSC::JIT::compileOpCall):
24596        (JSC::JIT::compileOpCallSlowCase):
24597        * jit/JITCall32_64.cpp:
24598        (JSC::JIT::compileOpCall):
24599        (JSC::JIT::compileOpCallSlowCase):
24600        * jit/JITOpcodes.cpp:
24601        (JSC::JIT::privateCompileCTIMachineTrampolines):
24602        (JSC::JIT::privateCompileCTINativeCall):
24603        (JSC::JIT::emit_op_neq_null):
24604        (JSC::JIT::emit_op_convert_this):
24605        (JSC::JIT::emit_op_get_callee):
24606        (JSC::JIT::emit_op_create_this):
24607        * jit/JITOpcodes32_64.cpp:
24608        (JSC::JIT::privateCompileCTIMachineTrampolines):
24609        (JSC::JIT::privateCompileCTINativeCall):
24610        (JSC::JIT::emit_op_get_callee):
24611        (JSC::JIT::emit_op_create_this):
24612        * jit/JITStubs.cpp:
24613        (JSC::DEFINE_STUB_FUNCTION):
24614        (JSC::JITThunks::hostFunctionStub):
24615        * jit/JITStubs.h:
24616        (JSC::JITThunks::ctiNativeConstruct):
24617        (JSC::):
24618        * runtime/ExceptionHelpers.cpp:
24619        (JSC::createNotAnObjectError):
24620        * runtime/Executable.h:
24621        (JSC::NativeExecutable::create):
24622        (JSC::NativeExecutable::NativeExecutable):
24623        * runtime/JSFunction.cpp:
24624        (JSC::callHostFunctionAsConstructor):
24625        * runtime/JSFunction.h:
24626        * wtf/Platform.h:
24627
24628== Rolled over to ChangeLog-2010-05-24 ==
24629