• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
12011-04-19  Oliver Hunt  <oliver@apple.com>
2
3        Reviewed by Gavin Barraclough.
4
5        Remove unneeded deprecated methods from MarkStack
6        https://bugs.webkit.org/show_bug.cgi?id=58853
7
8        Remove deprecated methods
9
10        * heap/MarkStack.h:
11
122011-04-19  Mark Rowe  <mrowe@apple.com>
13
14        Things work best when the Xcode project refers to the file at a path that exists.
15
16        * JavaScriptCore.xcodeproj/project.pbxproj:
17
182011-04-19  Renata Hodovan  <reni@webkit.org>
19
20        Reviewed by Eric Seidel.
21
22        Move the alignment related macros in Vector.h to new Alignment.h.
23        https://bugs.webkit.org/show_bug.cgi?id=56000
24
25        * JavaScriptCore.gypi:
26        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
27        * JavaScriptCore.xcodeproj/project.pbxproj:
28        * wtf/Alignment.h: Added.
29        * wtf/CMakeLists.txt:
30        * wtf/Vector.h:
31
322011-04-19  Oliver Hunt  <oliver@apple.com>
33
34        Reviewed by Gavin Barraclough.
35
36        Remove DeprecatedPtr
37        https://bugs.webkit.org/show_bug.cgi?id=58718
38
39        Remove the class an all functions that still exist to support it.
40
41        * heap/MarkStack.h:
42        (JSC::MarkStack::append):
43        * runtime/JSValue.h:
44        * runtime/WriteBarrier.h:
45
462011-04-19  Jungshik Shin  <jshin@chromium.org>
47
48        Reviewed by David Levin
49
50        Add U+FEFF (Zero width no-break space) to CharacterNames.h.
51        It's added to the list of characters to treat as zero-width
52        in WebCore.
53
54        https://bugs.webkit.org/show_bug.cgi?id=48860
55
56        * wtf/unicode/CharacterNames.h:
57
582011-04-19  Csaba Osztrogonác  <ossy@webkit.org>
59
60        [Qt] REGRESSION(84176): http/tests/xmlhttprequest/event-listener-gc.html fails
61        https://bugs.webkit.org/show_bug.cgi?id=58871
62
63        Unreviewed, rolling out r84176, r84178, r84186, r84212 and r84231.
64        http://trac.webkit.org/changeset/84176 (original patch)
65        http://trac.webkit.org/changeset/84178 (original patch - part 2)
66        http://trac.webkit.org/changeset/84186 (build fix)
67        http://trac.webkit.org/changeset/84212
68        http://trac.webkit.org/changeset/84231 (skip failing test)
69
70        original bugs:
71         - https://bugs.webkit.org/show_bug.cgi?id=58718
72         - https://bugs.webkit.org/show_bug.cgi?id=58853
73
74        * heap/MarkStack.h:
75        (JSC::MarkStack::deprecatedAppendValues):
76        (JSC::MarkStack::append):
77        (JSC::MarkStack::deprecatedAppend):
78        * runtime/JSValue.h:
79        * runtime/WriteBarrier.h:
80        (JSC::DeprecatedPtr::DeprecatedPtr):
81        (JSC::DeprecatedPtr::get):
82        (JSC::DeprecatedPtr::operator*):
83        (JSC::DeprecatedPtr::operator->):
84        (JSC::DeprecatedPtr::slot):
85        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
86        (JSC::DeprecatedPtr::operator!):
87        (JSC::operator==):
88
892011-04-18  Oliver Hunt  <oliver@apple.com>
90
91        Reviewed by Gavin Barraclough.
92
93        Remove unneeded deprecated methods from MarkStack
94        https://bugs.webkit.org/show_bug.cgi?id=58853
95
96        Remove deprecated methods
97
98        * heap/MarkStack.h:
99
1002011-04-18  Oliver Hunt  <oliver@apple.com>
101
102        Reviewed by Adam Roben.
103
104        Off by one initialising repeat callframe
105        https://bugs.webkit.org/show_bug.cgi?id=58838
106        <rdar://problem/8756810>
107
108        If the end of a callframe made for a repeat call landed on
109        a page boundary the following page may not have been committed
110        which means that the off by one could lead to a crash.  However
111        it could only happen in this case and only on windows which is
112        why it was so hard to repro.  Alas given the steps needed to
113        reproduce are such that it's not really possible to make a
114        testcase.
115
116        This fix makes the code a little less squirrely by not trying
117        to avoid the unnecessary initialisation of |this|.
118
119        * interpreter/Interpreter.cpp:
120        (JSC::Interpreter::prepareForRepeatCall):
121
1222011-04-18  Gavin Barraclough  <barraclough@apple.com>
123
124        Reviewed by Geoff Garen.
125
126        Bug 58829 - DFG JIT - Optimize add/sub immediate, multiply.
127
128        Add code generation for add/subtract instruction with immediate operands
129        (where a child is a constant), and don't bail to non-speculative if an
130        integer multiple results in a +0 result (only if it should be generating -0).
131
132        * dfg/DFGSpeculativeJIT.cpp:
133        (JSC::DFG::SpeculativeJIT::compile):
134        * dfg/DFGSpeculativeJIT.h:
135        (JSC::DFG::SpeculativeJIT::isDoubleConstantWithInt32Value):
136
1372011-04-18  Gavin Barraclough  <barraclough@apple.com>
138
139        Reviewed by Geoff Garen.
140
141        Bug 58817 - DFG JIT - if speculative compilation fails, throw away code.
142
143        If we detect a logical conflict, throw away generated code,
144        and only compile through the NonSpeculativeJIT.
145
146        * assembler/AbstractMacroAssembler.h:
147        (JSC::AbstractMacroAssembler::rewindToLabel):
148        * assembler/AssemblerBuffer.h:
149        (JSC::AssemblerBuffer::rewindToOffset):
150        * assembler/MacroAssemblerX86Common.h:
151        (JSC::MacroAssemblerX86Common::branchAdd32):
152        (JSC::MacroAssemblerX86Common::branchSub32):
153        * assembler/X86Assembler.h:
154        (JSC::X86Assembler::rewindToLabel):
155        (JSC::X86Assembler::X86InstructionFormatter::rewindToLabel):
156        * dfg/DFGJITCompiler.cpp:
157        (JSC::DFG::JITCompiler::linkSpeculationChecks):
158        (JSC::DFG::JITCompiler::compileFunction):
159        * dfg/DFGNode.h:
160        * dfg/DFGNonSpeculativeJIT.cpp:
161        (JSC::DFG::NonSpeculativeJIT::compile):
162        * dfg/DFGSpeculativeJIT.cpp:
163        (JSC::DFG::SpeculativeJIT::compile):
164        * dfg/DFGSpeculativeJIT.h:
165        (JSC::DFG::SpeculationCheckIndexIterator::SpeculationCheckIndexIterator):
166
1672011-04-18  Oliver Hunt  <oliver@apple.com>
168
169        Reviewed by Gavin Barraclough.
170
171        Remove DeprecatedPtr
172        https://bugs.webkit.org/show_bug.cgi?id=58718
173
174        As simple as it sounds.
175
176        * runtime/JSValue.h:
177        * runtime/WriteBarrier.h:
178
1792011-04-17  Cameron Zwarich  <zwarich@apple.com>
180
181        Reviewed by Dan Bernstein.
182
183        JSC no longer builds with Clang due to -Woverloaded-virtual warning
184        https://bugs.webkit.org/show_bug.cgi?id=58760
185
186        Rename Structure's specificValue overload of put to putSpecificValue to avoid
187        Clang's warning for overloading a virtual function.
188
189        * runtime/Structure.cpp:
190        (JSC::Structure::addPropertyTransition):
191        (JSC::Structure::addPropertyWithoutTransition):
192        (JSC::Structure::putSpecificValue):
193        * runtime/Structure.h:
194
1952011-04-17  Patrick Gansterer  <paroga@webkit.org>
196
197        Reviewed by Adam Barth.
198
199        Remove WTF_PLATFORM_SGL
200        https://bugs.webkit.org/show_bug.cgi?id=58743
201
202        WTF_PLATFORM_SGL and PLATFORM(SGL) are not used in the code anywhere.
203
204        * wtf/Platform.h:
205
2062011-04-17  Patrick Gansterer  <paroga@webkit.org>
207
208        Reviewed by Adam Barth.
209
210        Rename PLATFORM(CA) to USE(CA)
211        https://bugs.webkit.org/show_bug.cgi?id=58742
212
213        * wtf/Platform.h:
214
2152011-04-17  Patrick Gansterer  <paroga@webkit.org>
216
217        Reviewed by Adam Barth.
218
219        Rename PLATFORM(CG) to USE(CG)
220        https://bugs.webkit.org/show_bug.cgi?id=58729
221
222        * wtf/Platform.h:
223
2242011-04-16  Patrick Gansterer  <paroga@webkit.org>
225
226        Reviewed by Eric Seidel.
227
228        Rename PLATFORM(CAIRO) to USE(CAIRO)
229        https://bugs.webkit.org/show_bug.cgi?id=55192
230
231        * wtf/Platform.h:
232        * wtf/gobject/GTypedefs.h:
233
2342011-04-15  Sheriff Bot  <webkit.review.bot@gmail.com>
235
236        Unreviewed, rolling out r84067.
237        http://trac.webkit.org/changeset/84067
238        https://bugs.webkit.org/show_bug.cgi?id=58724
239
240        qt build are failing. (Requested by loislo2 on #webkit).
241
242        * heap/MarkStack.h:
243        (JSC::MarkStack::append):
244        * runtime/JSValue.h:
245        * runtime/WriteBarrier.h:
246        (JSC::DeprecatedPtr::DeprecatedPtr):
247        (JSC::DeprecatedPtr::get):
248        (JSC::DeprecatedPtr::operator*):
249        (JSC::DeprecatedPtr::operator->):
250        (JSC::DeprecatedPtr::slot):
251        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
252        (JSC::DeprecatedPtr::operator!):
253        (JSC::operator==):
254
2552011-04-15  Shishir Agrawal  <shishir@chromium.org>
256
257        Reviewed by James Robinson.
258
259        Add a flag to guard Page Visibility API changes.
260        https://bugs.webkit.org/show_bug.cgi?id=58464
261
262        * Configurations/FeatureDefines.xcconfig:
263
2642011-04-15  Gavin Barraclough  <barraclough@apple.com>
265
266        Errrk! - build fix from !x86-64.
267
268        * dfg/DFGNode.h:
269
2702011-04-15  David Levin  <levin@chromium.org>
271
272        Revert of r83974.
273
274        JavaScriptCore shouldn't depend on ../ThirdParty/gtest/xcode/gtest.xcodeproj
275        https://bugs.webkit.org/show_bug.cgi?id=58716
276
277        * JavaScriptCore.xcodeproj/project.pbxproj:
278        * wtf/tests/RunAllWtfTests.cpp: Removed.
279        * wtf/tests/StringTests.cpp: Removed.
280
2812011-04-15  Oliver Hunt  <oliver@apple.com>
282
283        Reviewed by Gavin Barraclough.
284
285        Remove DeprecatedPtr
286        https://bugs.webkit.org/show_bug.cgi?id=58718
287
288        As simple as it sounds.
289
290        * heap/MarkStack.h:
291        (JSC::MarkStack::append):
292        * runtime/JSValue.h:
293        * runtime/WriteBarrier.h:
294
2952011-04-15  Gavin Barraclough  <barraclough@apple.com>
296
297        Reviewed by Oliver Hunt.
298
299        Add a simple tool to gather statistics on whether functions
300        are completed through the new or old JIT.
301
302        * dfg/DFGNode.h:
303        * dfg/DFGNonSpeculativeJIT.cpp:
304        (JSC::DFG::NonSpeculativeJIT::compile):
305        * dfg/DFGSpeculativeJIT.cpp:
306        (JSC::DFG::SpeculativeJIT::compile):
307        * jit/JIT.cpp:
308        (JSC::JIT::privateCompile):
309
3102011-04-15  Oliver Hunt  <oliver@apple.com>
311
312        GC allocate Structure
313        https://bugs.webkit.org/show_bug.cgi?id=58483
314
315        Rolling r83894 r83827 r83810 r83809 r83808 back in with
316        a workaround for the gcc bug seen by the gtk bots
317
318        * API/JSCallbackConstructor.cpp:
319        (JSC::JSCallbackConstructor::JSCallbackConstructor):
320        * API/JSCallbackConstructor.h:
321        (JSC::JSCallbackConstructor::createStructure):
322        * API/JSCallbackFunction.h:
323        (JSC::JSCallbackFunction::createStructure):
324        * API/JSCallbackObject.h:
325        (JSC::JSCallbackObject::createStructure):
326        * API/JSCallbackObjectFunctions.h:
327        (JSC::::JSCallbackObject):
328        * API/JSContextRef.cpp:
329        * JavaScriptCore.JSVALUE32_64only.exp:
330        * JavaScriptCore.JSVALUE64only.exp:
331        * JavaScriptCore.exp:
332        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
333        * bytecode/CodeBlock.cpp:
334        (JSC::CodeBlock::~CodeBlock):
335        (JSC::CodeBlock::markStructures):
336        (JSC::CodeBlock::markAggregate):
337        * bytecode/CodeBlock.h:
338        (JSC::MethodCallLinkInfo::setSeen):
339        (JSC::GlobalResolveInfo::GlobalResolveInfo):
340        * bytecode/Instruction.h:
341        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
342        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
343        (JSC::PolymorphicAccessStructureList::markAggregate):
344        (JSC::Instruction::Instruction):
345        * bytecode/StructureStubInfo.cpp:
346        (JSC::StructureStubInfo::deref):
347        (JSC::StructureStubInfo::markAggregate):
348        * bytecode/StructureStubInfo.h:
349        (JSC::StructureStubInfo::initGetByIdSelf):
350        (JSC::StructureStubInfo::initGetByIdProto):
351        (JSC::StructureStubInfo::initGetByIdChain):
352        (JSC::StructureStubInfo::initPutByIdTransition):
353        (JSC::StructureStubInfo::initPutByIdReplace):
354        * debugger/DebuggerActivation.cpp:
355        (JSC::DebuggerActivation::DebuggerActivation):
356        * debugger/DebuggerActivation.h:
357        (JSC::DebuggerActivation::createStructure):
358        * heap/Handle.h:
359        * heap/MarkStack.cpp:
360        (JSC::MarkStack::markChildren):
361        (JSC::MarkStack::drain):
362        * heap/MarkedBlock.cpp:
363        (JSC::MarkedBlock::MarkedBlock):
364        (JSC::MarkedBlock::sweep):
365        * heap/Strong.h:
366        (JSC::Strong::Strong):
367        (JSC::Strong::set):
368        * interpreter/Interpreter.cpp:
369        (JSC::Interpreter::resolveGlobal):
370        (JSC::Interpreter::resolveGlobalDynamic):
371        (JSC::Interpreter::tryCachePutByID):
372        (JSC::Interpreter::uncachePutByID):
373        (JSC::Interpreter::tryCacheGetByID):
374        (JSC::Interpreter::uncacheGetByID):
375        (JSC::Interpreter::privateExecute):
376        * jit/JIT.h:
377        * jit/JITPropertyAccess.cpp:
378        (JSC::JIT::privateCompilePutByIdTransition):
379        (JSC::JIT::patchMethodCallProto):
380        (JSC::JIT::privateCompileGetByIdProto):
381        (JSC::JIT::privateCompileGetByIdSelfList):
382        (JSC::JIT::privateCompileGetByIdProtoList):
383        (JSC::JIT::privateCompileGetByIdChainList):
384        (JSC::JIT::privateCompileGetByIdChain):
385        * jit/JITPropertyAccess32_64.cpp:
386        (JSC::JIT::privateCompilePutByIdTransition):
387        (JSC::JIT::patchMethodCallProto):
388        (JSC::JIT::privateCompileGetByIdProto):
389        (JSC::JIT::privateCompileGetByIdSelfList):
390        (JSC::JIT::privateCompileGetByIdProtoList):
391        (JSC::JIT::privateCompileGetByIdChainList):
392        (JSC::JIT::privateCompileGetByIdChain):
393        * jit/JITStubs.cpp:
394        (JSC::JITThunks::tryCachePutByID):
395        (JSC::JITThunks::tryCacheGetByID):
396        (JSC::DEFINE_STUB_FUNCTION):
397        (JSC::getPolymorphicAccessStructureListSlot):
398        * jit/JSInterfaceJIT.h:
399        (JSC::JSInterfaceJIT::storePtrWithWriteBarrier):
400        * jsc.cpp:
401        (cleanupGlobalData):
402        * runtime/Arguments.h:
403        (JSC::Arguments::createStructure):
404        (JSC::Arguments::Arguments):
405        (JSC::JSActivation::copyRegisters):
406        * runtime/ArrayConstructor.cpp:
407        (JSC::ArrayConstructor::ArrayConstructor):
408        (JSC::constructArrayWithSizeQuirk):
409        * runtime/ArrayConstructor.h:
410        * runtime/ArrayPrototype.cpp:
411        (JSC::ArrayPrototype::ArrayPrototype):
412        (JSC::arrayProtoFuncSplice):
413        * runtime/ArrayPrototype.h:
414        (JSC::ArrayPrototype::createStructure):
415        * runtime/BatchedTransitionOptimizer.h:
416        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
417        * runtime/BooleanConstructor.cpp:
418        (JSC::BooleanConstructor::BooleanConstructor):
419        * runtime/BooleanConstructor.h:
420        * runtime/BooleanObject.cpp:
421        (JSC::BooleanObject::BooleanObject):
422        * runtime/BooleanObject.h:
423        (JSC::BooleanObject::createStructure):
424        * runtime/BooleanPrototype.cpp:
425        (JSC::BooleanPrototype::BooleanPrototype):
426        * runtime/BooleanPrototype.h:
427        * runtime/DateConstructor.cpp:
428        (JSC::DateConstructor::DateConstructor):
429        * runtime/DateConstructor.h:
430        * runtime/DateInstance.cpp:
431        (JSC::DateInstance::DateInstance):
432        * runtime/DateInstance.h:
433        (JSC::DateInstance::createStructure):
434        * runtime/DatePrototype.cpp:
435        (JSC::DatePrototype::DatePrototype):
436        * runtime/DatePrototype.h:
437        (JSC::DatePrototype::createStructure):
438        * runtime/Error.cpp:
439        (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
440        * runtime/ErrorConstructor.cpp:
441        (JSC::ErrorConstructor::ErrorConstructor):
442        * runtime/ErrorConstructor.h:
443        * runtime/ErrorInstance.cpp:
444        (JSC::ErrorInstance::ErrorInstance):
445        (JSC::ErrorInstance::create):
446        * runtime/ErrorInstance.h:
447        (JSC::ErrorInstance::createStructure):
448        * runtime/ErrorPrototype.cpp:
449        (JSC::ErrorPrototype::ErrorPrototype):
450        * runtime/ErrorPrototype.h:
451        * runtime/ExceptionHelpers.cpp:
452        (JSC::InterruptedExecutionError::InterruptedExecutionError):
453        (JSC::TerminatedExecutionError::TerminatedExecutionError):
454        * runtime/Executable.cpp:
455        * runtime/Executable.h:
456        (JSC::ExecutableBase::ExecutableBase):
457        (JSC::ExecutableBase::createStructure):
458        (JSC::NativeExecutable::createStructure):
459        (JSC::NativeExecutable::NativeExecutable):
460        (JSC::ScriptExecutable::ScriptExecutable):
461        (JSC::EvalExecutable::createStructure):
462        (JSC::ProgramExecutable::createStructure):
463        (JSC::FunctionExecutable::createStructure):
464        * runtime/FunctionConstructor.cpp:
465        (JSC::FunctionConstructor::FunctionConstructor):
466        * runtime/FunctionConstructor.h:
467        * runtime/FunctionPrototype.cpp:
468        (JSC::FunctionPrototype::FunctionPrototype):
469        * runtime/FunctionPrototype.h:
470        (JSC::FunctionPrototype::createStructure):
471        * runtime/GetterSetter.h:
472        (JSC::GetterSetter::GetterSetter):
473        (JSC::GetterSetter::createStructure):
474        * runtime/InitializeThreading.cpp:
475        (JSC::initializeThreadingOnce):
476        * runtime/InternalFunction.cpp:
477        (JSC::InternalFunction::InternalFunction):
478        * runtime/InternalFunction.h:
479        (JSC::InternalFunction::createStructure):
480        * runtime/JSAPIValueWrapper.h:
481        (JSC::JSAPIValueWrapper::createStructure):
482        (JSC::JSAPIValueWrapper::JSAPIValueWrapper):
483        * runtime/JSActivation.cpp:
484        (JSC::JSActivation::JSActivation):
485        * runtime/JSActivation.h:
486        (JSC::JSActivation::createStructure):
487        * runtime/JSArray.cpp:
488        (JSC::JSArray::JSArray):
489        * runtime/JSArray.h:
490        (JSC::JSArray::createStructure):
491        * runtime/JSByteArray.cpp:
492        (JSC::JSByteArray::JSByteArray):
493        (JSC::JSByteArray::createStructure):
494        * runtime/JSByteArray.h:
495        (JSC::JSByteArray::JSByteArray):
496        * runtime/JSCell.cpp:
497        (JSC::isZombie):
498        * runtime/JSCell.h:
499        (JSC::JSCell::JSCell::JSCell):
500        (JSC::JSCell::JSCell::addressOfStructure):
501        (JSC::JSCell::JSCell::structure):
502        (JSC::JSCell::JSCell::markChildren):
503        (JSC::JSCell::JSValue::isZombie):
504        * runtime/JSFunction.cpp:
505        (JSC::JSFunction::JSFunction):
506        * runtime/JSFunction.h:
507        (JSC::JSFunction::createStructure):
508        * runtime/JSGlobalData.cpp:
509        (JSC::JSGlobalData::storeVPtrs):
510        (JSC::JSGlobalData::JSGlobalData):
511        (JSC::JSGlobalData::clearBuiltinStructures):
512        (JSC::JSGlobalData::createLeaked):
513        * runtime/JSGlobalData.h:
514        (JSC::allocateGlobalHandle):
515        * runtime/JSGlobalObject.cpp:
516        (JSC::JSGlobalObject::reset):
517        (JSC::JSGlobalObject::markChildren):
518        (JSC::JSGlobalObject::copyGlobalsFrom):
519        * runtime/JSGlobalObject.h:
520        (JSC::JSGlobalObject::JSGlobalObject):
521        (JSC::JSGlobalObject::createStructure):
522        (JSC::Structure::prototypeChain):
523        (JSC::Structure::isValid):
524        (JSC::constructEmptyArray):
525        * runtime/JSNotAnObject.h:
526        (JSC::JSNotAnObject::JSNotAnObject):
527        (JSC::JSNotAnObject::createStructure):
528        * runtime/JSONObject.cpp:
529        (JSC::JSONObject::JSONObject):
530        * runtime/JSONObject.h:
531        (JSC::JSONObject::createStructure):
532        * runtime/JSObject.cpp:
533        (JSC::JSObject::defineGetter):
534        (JSC::JSObject::defineSetter):
535        (JSC::JSObject::seal):
536        (JSC::JSObject::freeze):
537        (JSC::JSObject::preventExtensions):
538        (JSC::JSObject::removeDirect):
539        (JSC::JSObject::createInheritorID):
540        * runtime/JSObject.h:
541        (JSC::JSObject::createStructure):
542        (JSC::JSObject::JSObject):
543        (JSC::JSNonFinalObject::createStructure):
544        (JSC::JSNonFinalObject::JSNonFinalObject):
545        (JSC::JSFinalObject::create):
546        (JSC::JSFinalObject::createStructure):
547        (JSC::JSFinalObject::JSFinalObject):
548        (JSC::constructEmptyObject):
549        (JSC::createEmptyObjectStructure):
550        (JSC::JSObject::~JSObject):
551        (JSC::JSObject::setPrototype):
552        (JSC::JSObject::setStructure):
553        (JSC::JSObject::inheritorID):
554        (JSC::JSObject::putDirectInternal):
555        (JSC::JSObject::transitionTo):
556        (JSC::JSObject::markChildrenDirect):
557        * runtime/JSObjectWithGlobalObject.cpp:
558        (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
559        * runtime/JSObjectWithGlobalObject.h:
560        (JSC::JSObjectWithGlobalObject::createStructure):
561        (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
562        * runtime/JSPropertyNameIterator.cpp:
563        (JSC::JSPropertyNameIterator::JSPropertyNameIterator):
564        (JSC::JSPropertyNameIterator::create):
565        (JSC::JSPropertyNameIterator::get):
566        * runtime/JSPropertyNameIterator.h:
567        (JSC::JSPropertyNameIterator::createStructure):
568        (JSC::JSPropertyNameIterator::setCachedStructure):
569        (JSC::Structure::setEnumerationCache):
570        * runtime/JSStaticScopeObject.h:
571        (JSC::JSStaticScopeObject::JSStaticScopeObject):
572        (JSC::JSStaticScopeObject::createStructure):
573        * runtime/JSString.h:
574        (JSC::RopeBuilder::JSString):
575        (JSC::RopeBuilder::createStructure):
576        * runtime/JSType.h:
577        * runtime/JSTypeInfo.h:
578        (JSC::TypeInfo::TypeInfo):
579        * runtime/JSValue.h:
580        * runtime/JSVariableObject.h:
581        (JSC::JSVariableObject::createStructure):
582        (JSC::JSVariableObject::JSVariableObject):
583        (JSC::JSVariableObject::copyRegisterArray):
584        * runtime/JSWrapperObject.h:
585        (JSC::JSWrapperObject::createStructure):
586        (JSC::JSWrapperObject::JSWrapperObject):
587        * runtime/JSZombie.cpp:
588        * runtime/JSZombie.h:
589        (JSC::JSZombie::JSZombie):
590        (JSC::JSZombie::createStructure):
591        * runtime/MathObject.cpp:
592        (JSC::MathObject::MathObject):
593        * runtime/MathObject.h:
594        (JSC::MathObject::createStructure):
595        * runtime/NativeErrorConstructor.cpp:
596        (JSC::NativeErrorConstructor::NativeErrorConstructor):
597        (JSC::NativeErrorConstructor::markChildren):
598        (JSC::constructWithNativeErrorConstructor):
599        * runtime/NativeErrorConstructor.h:
600        (JSC::NativeErrorConstructor::createStructure):
601        * runtime/NativeErrorPrototype.cpp:
602        (JSC::NativeErrorPrototype::NativeErrorPrototype):
603        * runtime/NativeErrorPrototype.h:
604        * runtime/NumberConstructor.cpp:
605        (JSC::NumberConstructor::NumberConstructor):
606        * runtime/NumberConstructor.h:
607        (JSC::NumberConstructor::createStructure):
608        * runtime/NumberObject.cpp:
609        (JSC::NumberObject::NumberObject):
610        * runtime/NumberObject.h:
611        (JSC::NumberObject::createStructure):
612        * runtime/NumberPrototype.cpp:
613        (JSC::NumberPrototype::NumberPrototype):
614        * runtime/NumberPrototype.h:
615        * runtime/ObjectConstructor.cpp:
616        (JSC::ObjectConstructor::ObjectConstructor):
617        * runtime/ObjectConstructor.h:
618        (JSC::ObjectConstructor::createStructure):
619        * runtime/ObjectPrototype.cpp:
620        (JSC::ObjectPrototype::ObjectPrototype):
621        * runtime/ObjectPrototype.h:
622        * runtime/PropertyMapHashTable.h:
623        (JSC::PropertyTable::PropertyTable):
624        * runtime/RegExpConstructor.cpp:
625        (JSC::RegExpConstructor::RegExpConstructor):
626        (JSC::RegExpMatchesArray::RegExpMatchesArray):
627        * runtime/RegExpConstructor.h:
628        (JSC::RegExpConstructor::createStructure):
629        * runtime/RegExpObject.cpp:
630        (JSC::RegExpObject::RegExpObject):
631        * runtime/RegExpObject.h:
632        (JSC::RegExpObject::createStructure):
633        * runtime/RegExpPrototype.cpp:
634        (JSC::RegExpPrototype::RegExpPrototype):
635        * runtime/RegExpPrototype.h:
636        * runtime/ScopeChain.h:
637        (JSC::ScopeChainNode::ScopeChainNode):
638        (JSC::ScopeChainNode::createStructure):
639        * runtime/StrictEvalActivation.cpp:
640        (JSC::StrictEvalActivation::StrictEvalActivation):
641        * runtime/StringConstructor.cpp:
642        (JSC::StringConstructor::StringConstructor):
643        * runtime/StringConstructor.h:
644        * runtime/StringObject.cpp:
645        (JSC::StringObject::StringObject):
646        * runtime/StringObject.h:
647        (JSC::StringObject::createStructure):
648        * runtime/StringObjectThatMasqueradesAsUndefined.h:
649        (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
650        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
651        * runtime/StringPrototype.cpp:
652        (JSC::StringPrototype::StringPrototype):
653        * runtime/StringPrototype.h:
654        (JSC::StringPrototype::createStructure):
655        * runtime/Structure.cpp:
656        (JSC::StructureTransitionTable::remove):
657        (JSC::StructureTransitionTable::add):
658        (JSC::Structure::Structure):
659        (JSC::Structure::~Structure):
660        (JSC::Structure::materializePropertyMap):
661        (JSC::Structure::addPropertyTransitionToExistingStructure):
662        (JSC::Structure::addPropertyTransition):
663        (JSC::Structure::removePropertyTransition):
664        (JSC::Structure::changePrototypeTransition):
665        (JSC::Structure::despecifyFunctionTransition):
666        (JSC::Structure::getterSetterTransition):
667        (JSC::Structure::toDictionaryTransition):
668        (JSC::Structure::toCacheableDictionaryTransition):
669        (JSC::Structure::toUncacheableDictionaryTransition):
670        (JSC::Structure::sealTransition):
671        (JSC::Structure::freezeTransition):
672        (JSC::Structure::preventExtensionsTransition):
673        (JSC::Structure::flattenDictionaryStructure):
674        (JSC::Structure::copyPropertyTable):
675        (JSC::Structure::put):
676        (JSC::Structure::markChildren):
677        * runtime/Structure.h:
678        (JSC::Structure::create):
679        (JSC::Structure::setPrototypeWithoutTransition):
680        (JSC::Structure::createStructure):
681        (JSC::JSCell::createDummyStructure):
682        (JSC::StructureTransitionTable::keyForWeakGCMapFinalizer):
683        * runtime/StructureChain.cpp:
684        (JSC::StructureChain::StructureChain):
685        (JSC::StructureChain::markChildren):
686        * runtime/StructureChain.h:
687        (JSC::StructureChain::create):
688        (JSC::StructureChain::head):
689        (JSC::StructureChain::createStructure):
690        * runtime/StructureTransitionTable.h:
691        (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::finalizerContextFor):
692        (JSC::StructureTransitionTable::WeakGCMapFinalizerCallback::keyForFinalizer):
693        (JSC::StructureTransitionTable::~StructureTransitionTable):
694        (JSC::StructureTransitionTable::slot):
695        (JSC::StructureTransitionTable::setMap):
696        (JSC::StructureTransitionTable::singleTransition):
697        (JSC::StructureTransitionTable::clearSingleTransition):
698        (JSC::StructureTransitionTable::setSingleTransition):
699        * runtime/WeakGCMap.h:
700        (JSC::DefaultWeakGCMapFinalizerCallback::finalizerContextFor):
701        (JSC::DefaultWeakGCMapFinalizerCallback::keyForFinalizer):
702        (JSC::WeakGCMap::contains):
703        (JSC::WeakGCMap::find):
704        (JSC::WeakGCMap::remove):
705        (JSC::WeakGCMap::add):
706        (JSC::WeakGCMap::set):
707        (JSC::WeakGCMap::finalize):
708        * runtime/WriteBarrier.h:
709        (JSC::writeBarrier):
710        (JSC::WriteBarrierBase::set):
711        (JSC::WriteBarrierBase::operator*):
712        (JSC::WriteBarrierBase::operator->):
713        (JSC::WriteBarrierBase::setWithoutWriteBarrier):
714
7152011-04-15  Fridrich Strba  <fridrich.strba@bluewin.ch>
716
717        Reviewed by Gavin Barraclough.
718
719        Correctly prefix symbols. Since gcc 4.5.0, Windows x64 symbols
720        are not prefixed by underscore anymore. This is consistent with
721        what MSVC does.
722        https://bugs.webkit.org/show_bug.cgi?id=58573
723
724        * jit/JITStubs.cpp:
725
7262011-04-15  Gavin Barraclough  <barraclough@apple.com>
727
728        Reviewed by Geoff Garen.
729
730        Bug 58705 - DFG JIT Add support for flow control (branch, jump).
731
732        Add support for control flow by breaking the CodeBlock up into multiple
733        basic blocks, generating code for each basic block in turn through the
734        speculative JIT & then the non-speculative JIT.
735
736        * dfg/DFGByteCodeParser.cpp:
737        (JSC::DFG::ByteCodeParser::setTemporary):
738        (JSC::DFG::ByteCodeParser::addToGraph):
739        (JSC::DFG::ByteCodeParser::parseBlock):
740        (JSC::DFG::ByteCodeParser::parse):
741        * dfg/DFGGraph.cpp:
742        (JSC::DFG::Graph::dump):
743        * dfg/DFGGraph.h:
744        (JSC::DFG::BasicBlock::BasicBlock):
745        (JSC::DFG::BasicBlock::getBytecodeOffset):
746        (JSC::DFG::Graph::blockIndexForBytecodeOffset):
747        * dfg/DFGJITCodeGenerator.h:
748        (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
749        (JSC::DFG::JITCodeGenerator::addBranch):
750        (JSC::DFG::JITCodeGenerator::linkBranches):
751        (JSC::DFG::JITCodeGenerator::BranchRecord::BranchRecord):
752        * dfg/DFGNode.h:
753        (JSC::DFG::Node::Node):
754        (JSC::DFG::Node::isJump):
755        (JSC::DFG::Node::isBranch):
756        (JSC::DFG::Node::takenBytecodeOffset):
757        (JSC::DFG::Node::notTakenBytecodeOffset):
758        * dfg/DFGNonSpeculativeJIT.cpp:
759        (JSC::DFG::NonSpeculativeJIT::compile):
760        * dfg/DFGNonSpeculativeJIT.h:
761        * dfg/DFGSpeculativeJIT.cpp:
762        (JSC::DFG::SpeculativeJIT::compile):
763        * dfg/DFGSpeculativeJIT.h:
764
7652011-04-15  Gavin Barraclough  <barraclough@apple.com>
766
767        Reviewed by Geoff Garen.
768
769        Bug 58701 - DFG JIT - add GetLocal/SetLocal nodes
770
771        Use these for both access to arguments & local variables, adds ability
772        to set locals, such that values will persist between basic blocks.
773
774        * dfg/DFGByteCodeParser.cpp:
775        (JSC::DFG::ByteCodeParser::ByteCodeParser):
776        (JSC::DFG::ByteCodeParser::get):
777        (JSC::DFG::ByteCodeParser::set):
778        (JSC::DFG::ByteCodeParser::getVariable):
779        (JSC::DFG::ByteCodeParser::setVariable):
780        (JSC::DFG::ByteCodeParser::getArgument):
781        (JSC::DFG::ByteCodeParser::setArgument):
782        (JSC::DFG::ByteCodeParser::getThis):
783        (JSC::DFG::ByteCodeParser::setThis):
784        (JSC::DFG::ByteCodeParser::VariableRecord::VariableRecord):
785        (JSC::DFG::ByteCodeParser::parseBlock):
786        * dfg/DFGGraph.cpp:
787        (JSC::DFG::Graph::dump):
788        (JSC::DFG::Graph::derefChildren):
789        * dfg/DFGGraph.h:
790        (JSC::DFG::Graph::ref):
791        (JSC::DFG::Graph::deref):
792        * dfg/DFGNode.h:
793        (JSC::DFG::Node::hasLocal):
794        (JSC::DFG::Node::local):
795        * dfg/DFGNonSpeculativeJIT.cpp:
796        (JSC::DFG::NonSpeculativeJIT::compile):
797        * dfg/DFGSpeculativeJIT.cpp:
798        (JSC::DFG::SpeculativeJIT::compile):
799
8002011-04-15  Gavin Barraclough  <barraclough@apple.com>
801
802        Reviewed by Sam Weinig.
803
804        Bug 58696 - DFG JIT split handling of vars/temporaries
805
806        Presently all callee registers are treated as having single block scope,
807        since the DFG JIT can only compile single block functions. In order to
808        expand the JIT to support control flow we will need to change to retaining
809        locals (but not temporaries) across basic block boundaries.
810
811        * dfg/DFGByteCodeParser.cpp:
812        (JSC::DFG::ByteCodeParser::ByteCodeParser):
813        (JSC::DFG::ByteCodeParser::get):
814        (JSC::DFG::ByteCodeParser::set):
815        (JSC::DFG::ByteCodeParser::getVariable):
816        (JSC::DFG::ByteCodeParser::setVariable):
817        (JSC::DFG::ByteCodeParser::getTemporary):
818        (JSC::DFG::ByteCodeParser::setTemporary):
819        (JSC::DFG::ByteCodeParser::getArgument):
820        (JSC::DFG::ByteCodeParser::getInt32Constant):
821        (JSC::DFG::ByteCodeParser::getDoubleConstant):
822        (JSC::DFG::ByteCodeParser::getJSConstant):
823        (JSC::DFG::ByteCodeParser::constantUndefined):
824        (JSC::DFG::ByteCodeParser::constantNull):
825        (JSC::DFG::ByteCodeParser::one):
826        (JSC::DFG::ByteCodeParser::parseBlock):
827        (JSC::DFG::ByteCodeParser::parse):
828        (JSC::DFG::parse):
829        * dfg/DFGNode.h:
830        * dfg/DFGScoreBoard.h:
831        (JSC::DFG::ScoreBoard::ScoreBoard):
832        (JSC::DFG::ScoreBoard::~ScoreBoard):
833        (JSC::DFG::ScoreBoard::allocate):
834        (JSC::DFG::ScoreBoard::use):
835
8362011-04-15  Michael Saboff  <msaboff@apple.com>
837
838        Reviewed by Oliver Hunt.
839
840        globalObject moved to JSObjectWithGlobalObject.cpp inhibits inlining
841        https://bugs.webkit.org/show_bug.cgi?id=58677
842
843        Moved JSObjectWithGlobalObject::globalObject() to
844        runtime/JSObjectWithGlobalObject.h to allow the compiler to inline
845        it for a performance benefit.  An equivalent instance had been in
846        a header file before r60057.
847
848        * JavaScriptCore.exp:
849        * runtime/JSObjectWithGlobalObject.cpp:
850        * runtime/JSObjectWithGlobalObject.h:
851        (JSC::JSObjectWithGlobalObject::globalObject):
852
8532011-04-14  Oliver Hunt  <oliver@apple.com>
854
855        Reviewed by Geoffrey Garen.
856
857        Make JSNodeFilterCondition handle its lifetime correctly
858        https://bugs.webkit.org/show_bug.cgi?id=58622
859
860        Add export
861
862        * JavaScriptCore.exp:
863
8642011-04-14  Alexey Proskuryakov  <ap@apple.com>
865
866        Reviewed by Dan Bernstein.
867
868        WebKit2: Password field input does not switch to ASCII-compatible source
869        https://bugs.webkit.org/show_bug.cgi?id=58583
870        <rdar://problem/9059651>
871
872        * wtf/Platform.h: Removed WTF_USE_CARBON_SECURE_INPUT_MODE. It's now only used by Chromium,
873        and shouldn't be enabled on any other platforms, so there is no reason to make it
874        configurable via Platform.h.
875
8762011-04-15  Dmitry Lomov  <dslomov@google.com>
877
878        Reviewed by David Levin.
879
880        Add a sample test case for GTest framework
881        https://bugs.webkit.org/show_bug.cgi?id=58509
882
883        Add an example of GTest testcase, complete with a runner, to JavaScriptCore.
884
885        * JavaScriptCore.xcodeproj/project.pbxproj:
886        * wtf/tests/RunAllWtfTests.cpp: Added.
887        (main):
888        * wtf/tests/StringTests.cpp: Added.
889
8902011-04-15  Anna Cavender  <annacc@chromium.org>
891
892        Reviewed by Eric Carlson.
893
894        Renaming TRACK feature define to VIDEO_TRACK
895        https://bugs.webkit.org/show_bug.cgi?id=53556
896
897        * Configurations/FeatureDefines.xcconfig:
898
8992011-04-14  Gavin Barraclough  <barraclough@apple.com>
900
901        Rubber stamped by Geoffrey Garen.
902
903        Hide DFG_JIT_RESTRICTIONS behind ARITHMETIC_OP() macro, and rename
904        m_regressionGuard to m_parseFailed, such that it can be reused for
905        other failure cases.
906
907        * dfg/DFGByteCodeParser.cpp:
908        (JSC::DFG::ByteCodeParser::ByteCodeParser):
909        (JSC::DFG::ByteCodeParser::parse):
910
9112011-04-14  Gavin Barraclough  <barraclough@apple.com>
912
913        Reviewed by Geoffrey Garen.
914
915        Bug 58620 - DFG JIT - loading of arguments should not be lazy
916
917        This optimization is overly simplistic. It only works because we never
918        write out definitions to arguments (since we currently only compile
919        single block functions). Revert this for now, we may want to reintroduce
920        something like this again in the future, but it will need to be aware
921        how to schedule definitions to arguments versus lazy loads that have not
922        yet been performed.
923
924        * dfg/DFGGenerationInfo.h:
925        (JSC::DFG::GenerationInfo::needsSpill):
926        * dfg/DFGGraph.cpp:
927        (JSC::DFG::Graph::dump):
928        * dfg/DFGGraph.h:
929        * dfg/DFGJITCodeGenerator.cpp:
930        (JSC::DFG::JITCodeGenerator::fillInteger):
931        (JSC::DFG::JITCodeGenerator::fillDouble):
932        (JSC::DFG::JITCodeGenerator::fillJSValue):
933        * dfg/DFGJITCodeGenerator.h:
934        (JSC::DFG::JITCodeGenerator::initConstantInfo):
935        * dfg/DFGJITCompiler.cpp:
936        (JSC::DFG::JITCompiler::fillNumericToDouble):
937        (JSC::DFG::JITCompiler::fillInt32ToInteger):
938        (JSC::DFG::JITCompiler::fillToJS):
939        * dfg/DFGNonSpeculativeJIT.cpp:
940        (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
941        (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
942        (JSC::DFG::NonSpeculativeJIT::compile):
943        * dfg/DFGSpeculativeJIT.cpp:
944        (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
945        (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
946        (JSC::DFG::SpeculativeJIT::compile):
947
9482011-04-14  Gavin Barraclough  <barraclough@apple.com>
949
950        Reviewed by Geoffrey Garen.
951
952        Bug 58600 - DFG JIT bugs in ValueToInt, PutByVal
953
954        The bug in PutByVal is that an operand is in JSValueOperand - when this
955        locks an integer into a register it will always retag the value without
956        checking if the register is already locked. This is a problem where the
957        value being stored by a PutByVal is the same as the subscript.
958        The subscript is locked into a register first, as a strict integer.
959        Locking the value results in the subscript being modified.
960
961        The bug in ValueToInt related to the function of sillentFillAllRegisters.
962        The problem is that this method will restore all register values from
963        prior to the call, overwriting the result of the call out. Allow a
964        register to be passed to specifically be excluded from being preserved.
965
966        * assembler/ARMAssembler.h:
967        (JSC::ARMAssembler::debugOffset):
968        * assembler/ARMv7Assembler.h:
969        (JSC::ARMv7Assembler::ARMInstructionFormatter::debugOffset):
970        * assembler/AbstractMacroAssembler.h:
971        (JSC::AbstractMacroAssembler::debugOffset):
972        * assembler/AssemblerBuffer.h:
973        (JSC::AssemblerBuffer::debugOffset):
974        * assembler/LinkBuffer.h:
975        (JSC::LinkBuffer::debugAddress):
976        * assembler/MIPSAssembler.h:
977        (JSC::MIPSAssembler::debugOffset):
978        * assembler/MacroAssemblerX86_64.h:
979        (JSC::MacroAssemblerX86_64::orPtr):
980        * assembler/X86Assembler.h:
981        (JSC::X86Assembler::debugOffset):
982        (JSC::X86Assembler::X86InstructionFormatter::debugOffset):
983        * dfg/DFGByteCodeParser.cpp:
984        (JSC::DFG::ByteCodeParser::parse):
985        * dfg/DFGGenerationInfo.h:
986        * dfg/DFGJITCodeGenerator.cpp:
987        (JSC::DFG::JITCodeGenerator::fillJSValue):
988        * dfg/DFGJITCodeGenerator.h:
989        (JSC::DFG::JITCodeGenerator::isConstant):
990        * dfg/DFGJITCompiler.cpp:
991        (JSC::DFG::JITCompiler::compileFunction):
992        * dfg/DFGJITCompiler.h:
993        (JSC::DFG::JITCompiler::isConstant):
994        * dfg/DFGNonSpeculativeJIT.cpp:
995        (JSC::DFG::NonSpeculativeJIT::valueToNumber):
996        (JSC::DFG::NonSpeculativeJIT::valueToInt32):
997        (JSC::DFG::NonSpeculativeJIT::numberToInt32):
998        (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
999        (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
1000        (JSC::DFG::NonSpeculativeJIT::compile):
1001        * dfg/DFGNonSpeculativeJIT.h:
1002        (JSC::DFG::NonSpeculativeJIT::silentSpillGPR):
1003        (JSC::DFG::NonSpeculativeJIT::silentSpillFPR):
1004        (JSC::DFG::NonSpeculativeJIT::silentFillGPR):
1005        (JSC::DFG::NonSpeculativeJIT::silentFillFPR):
1006        (JSC::DFG::NonSpeculativeJIT::silentSpillAllRegisters):
1007        (JSC::DFG::NonSpeculativeJIT::silentFillAllRegisters):
1008        * dfg/DFGSpeculativeJIT.cpp:
1009        (JSC::DFG::SpeculativeJIT::compile):
1010
10112011-04-14  Geoffrey Garen  <ggaren@apple.com>
1012
1013        Reviewed by Oliver Hunt.
1014
1015        Drain the mark stack while marking weak handles, not after.
1016        https://bugs.webkit.org/show_bug.cgi?id=58574
1017
1018        Otherwise, items that would have caused more weak handle marking are
1019        processed after all weak handle marking has finished, and referenced
1020        weak handles get recycled.
1021
1022        * heap/HandleHeap.cpp:
1023        (JSC::HandleHeap::markWeakHandles): Removed looping from here, since we
1024        want Heap::markRoots to be responsible for draining the mark stack.
1025
1026        * heap/Heap.cpp:
1027        (JSC::Heap::markRoots): Moved looping to here, as explained above.
1028
1029        For efficiency's sake, drain the mark stack before starting to mark weak
1030        handles. Otherwise, items drained while marking weak handles may force
1031        an extra trip through the weak handle list.
1032
1033        For correctness's sake, drain the mark stack each time through the weak
1034        handle list. Otherwise, opaque roots that would make weak handles reachable
1035        are not discovered until after weak handle marking is over.
1036
10372011-04-14  Oliver Hunt  <oliver@apple.com>
1038
1039        Reviewed by Geoffrey Garen.
1040
1041        Make protected object list in caches window reflect reality
1042        https://bugs.webkit.org/show_bug.cgi?id=58565
1043
1044        Make sure the heap includes objects protected by Strong handles
1045        in its list of protected objects.
1046
1047        * heap/HandleHeap.h:
1048        * heap/Heap.cpp:
1049        (JSC::HandleHeap::protectedObjectTypeCounts):
1050
10512011-04-14  Satish Sampath  <satish@chromium.org>
1052
1053        Reviewed by Anders Carlsson.
1054
1055        Don't emit RegExp tables for chromium where they are not used
1056        https://bugs.webkit.org/show_bug.cgi?id=58544
1057
1058        * JavaScriptCore.gyp/JavaScriptCore.gyp:
1059        * create_regex_tables: Added the "--notables" command line argument.
1060
10612011-04-13  Geoffrey Garen  <ggaren@apple.com>
1062
1063        Try to fix ASSERTs seen on Windows bots.
1064
1065        * wtf/HashTable.h:
1066        (WTF::hashTableSwap): Force MSVC to use the right version of swap.
1067
10682011-04-13  Ryuan Choi  <ryuan.choi@samsung.com>
1069
1070        Reviewed by Kenneth Rohde Christiansen.
1071
1072        [CMAKE] Separate DerivedSources.
1073        https://bugs.webkit.org/show_bug.cgi?id=58427
1074
1075        * CMakeLists.txt: Change DERIVED_SOURCES_DIR to DERIVED_SOURCES_JAVASCRIPTCORE_DIR.
1076
10772011-04-13  Geoffrey Garen  <ggaren@apple.com>
1078
1079        Reviewed by Oliver Hunt.
1080
1081        Switched DOM wrappers to use HashMap of Weak<T> instead of WeakGCMap<T>
1082        https://bugs.webkit.org/show_bug.cgi?id=58482
1083
1084        This will allow wrappers to make individual decisions about their lifetimes.
1085
1086        * heap/HandleHeap.h:
1087        (JSC::HandleHeap::copyWeak): New function for copying a weak handle.
1088        It's wasn't previously possible to perform this operation using HandleHeap
1089        API because the HandleHeap doesn't expose its underlying Node structure.
1090
1091        * heap/Local.h:
1092        (JSC::::set):
1093        * heap/Strong.h:
1094        (JSC::Strong::set): Added ASSERTs to verify that dead objects are not
1095        resurrected by placement into handles.
1096
1097        (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
1098        is efficient.
1099
1100        * heap/Weak.h:
1101        (JSC::Weak::Weak): Fixed a bug where copying a weak pointer would not
1102        copy its weak callback and context.
1103
1104        (JSC::Weak::operator=): Added an assignment operator, since the default
1105        C++ assignment operator did the wrong thing.
1106
1107        (JSC::Weak::set): Added ASSERTs to verify that dead objects are not
1108        resurrected by placement into handles.
1109
1110        (JSC::swap): Added a swap helper, so use of Strong<T> inside a hash table
1111        is efficient, and can be done without copying, which is illegal during
1112        the handle finalization phase.
1113
11142011-04-13  Oliver Hunt  <oliver@apple.com>
1115
1116        Reviewed by Gavin Barraclough.
1117
1118        Make PropertyMapEntry use a WriteBarrier for specificValue
1119        https://bugs.webkit.org/show_bug.cgi?id=58407
1120
1121        Make PropertyMapEntry use a WriteBarrier for specificValue, and then
1122        propagate the required JSGlobalData through all the methods it ends
1123        up being needed.
1124
1125        * API/JSClassRef.cpp:
1126        (OpaqueJSClass::prototype):
1127        * API/JSContextRef.cpp:
1128        * API/JSObjectRef.cpp:
1129        (JSObjectMake):
1130        (JSObjectSetPrototype):
1131        * JavaScriptCore.exp:
1132        * bytecompiler/BytecodeGenerator.cpp:
1133        (JSC::BytecodeGenerator::BytecodeGenerator):
1134        * interpreter/Interpreter.cpp:
1135        (JSC::appendSourceToError):
1136        (JSC::Interpreter::tryCacheGetByID):
1137        (JSC::Interpreter::privateExecute):
1138        * jit/JITStubs.cpp:
1139        (JSC::JITThunks::tryCacheGetByID):
1140        (JSC::DEFINE_STUB_FUNCTION):
1141        * runtime/BatchedTransitionOptimizer.h:
1142        (JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer):
1143        * runtime/InternalFunction.cpp:
1144        (JSC::InternalFunction::name):
1145        (JSC::InternalFunction::displayName):
1146        * runtime/JSActivation.cpp:
1147        (JSC::JSActivation::getOwnPropertySlot):
1148        * runtime/JSFunction.cpp:
1149        (JSC::JSFunction::name):
1150        (JSC::JSFunction::displayName):
1151        (JSC::JSFunction::getOwnPropertySlot):
1152        * runtime/JSGlobalObject.cpp:
1153        (JSC::JSGlobalObject::putWithAttributes):
1154        (JSC::JSGlobalObject::reset):
1155        (JSC::JSGlobalObject::resetPrototype):
1156        * runtime/JSGlobalObject.h:
1157        * runtime/JSObject.cpp:
1158        (JSC::JSObject::put):
1159        (JSC::JSObject::deleteProperty):
1160        (JSC::JSObject::defineGetter):
1161        (JSC::JSObject::defineSetter):
1162        (JSC::JSObject::lookupGetter):
1163        (JSC::JSObject::lookupSetter):
1164        (JSC::JSObject::getPropertySpecificValue):
1165        (JSC::JSObject::getOwnPropertyNames):
1166        (JSC::JSObject::seal):
1167        (JSC::JSObject::freeze):
1168        (JSC::JSObject::preventExtensions):
1169        (JSC::JSObject::removeDirect):
1170        (JSC::JSObject::getOwnPropertyDescriptor):
1171        (JSC::JSObject::defineOwnProperty):
1172        * runtime/JSObject.h:
1173        (JSC::JSObject::getDirect):
1174        (JSC::JSObject::getDirectLocation):
1175        (JSC::JSObject::isSealed):
1176        (JSC::JSObject::isFrozen):
1177        (JSC::JSObject::setPrototypeWithCycleCheck):
1178        (JSC::JSObject::setPrototype):
1179        (JSC::JSObject::inlineGetOwnPropertySlot):
1180        (JSC::JSObject::putDirectInternal):
1181        (JSC::JSObject::putDirectWithoutTransition):
1182        (JSC::JSObject::putDirectFunctionWithoutTransition):
1183        * runtime/Lookup.cpp:
1184        (JSC::setUpStaticFunctionSlot):
1185        * runtime/ObjectConstructor.cpp:
1186        (JSC::objectConstructorCreate):
1187        (JSC::objectConstructorSeal):
1188        (JSC::objectConstructorFreeze):
1189        (JSC::objectConstructorPreventExtensions):
1190        (JSC::objectConstructorIsSealed):
1191        (JSC::objectConstructorIsFrozen):
1192        * runtime/Operations.h:
1193        (JSC::normalizePrototypeChain):
1194        * runtime/PropertyMapHashTable.h:
1195        (JSC::PropertyMapEntry::PropertyMapEntry):
1196        (JSC::PropertyTable::PropertyTable):
1197        (JSC::PropertyTable::copy):
1198        * runtime/Structure.cpp:
1199        (JSC::Structure::materializePropertyMap):
1200        (JSC::Structure::despecifyDictionaryFunction):
1201        (JSC::Structure::addPropertyTransition):
1202        (JSC::Structure::removePropertyTransition):
1203        (JSC::Structure::changePrototypeTransition):
1204        (JSC::Structure::despecifyFunctionTransition):
1205        (JSC::Structure::getterSetterTransition):
1206        (JSC::Structure::toDictionaryTransition):
1207        (JSC::Structure::toCacheableDictionaryTransition):
1208        (JSC::Structure::toUncacheableDictionaryTransition):
1209        (JSC::Structure::sealTransition):
1210        (JSC::Structure::freezeTransition):
1211        (JSC::Structure::preventExtensionsTransition):
1212        (JSC::Structure::isSealed):
1213        (JSC::Structure::isFrozen):
1214        (JSC::Structure::addPropertyWithoutTransition):
1215        (JSC::Structure::removePropertyWithoutTransition):
1216        (JSC::Structure::copyPropertyTable):
1217        (JSC::Structure::get):
1218        (JSC::Structure::despecifyFunction):
1219        (JSC::Structure::despecifyAllFunctions):
1220        (JSC::Structure::put):
1221        (JSC::Structure::getPropertyNames):
1222        * runtime/Structure.h:
1223        (JSC::Structure::get):
1224        (JSC::Structure::materializePropertyMapIfNecessary):
1225
12262011-04-13  Paul Knight  <pknight@apple.com>
1227
1228        Reviewed by Gavin Barraclough.
1229
1230        BACKTRACE() macro should check for Debug configuration in macro, not WTFReportBacktrace definition
1231        https://bugs.webkit.org/show_bug.cgi?id=58405
1232
1233        The BACKTRACE() macro requires JavaScriptCore be built with a Debug
1234        configuration in order for it to be enabled. Move the NDEBUG check to
1235        the header so it will be enabled when the calling framework or
1236        application is built with a Debug configuration, similar to how
1237        ASSERT() and friends work.
1238
1239        * wtf/Assertions.cpp:
1240        * wtf/Assertions.h:
1241
12422011-04-12  Ben Taylor  <bentaylor.solx86@gmail.com>
1243
1244        Reviewed by Alexey Proskuryakov.
1245
1246        https://bugs.webkit.org/show_bug.cgi?id=58131
1247
1248        Provide a workaround for an obscure Studio 12 compiler bug, which
1249        couldn't call src->~T() on a const T *src.
1250
1251        * wtf/Vector.h:
1252
12532011-04-12  Gavin Barraclough  <barraclough@apple.com>
1254
1255        Reviewed by Oliver Hunt.
1256
1257        https://bugs.webkit.org/show_bug.cgi?id=58395
1258        Exceptions thrown from property getters called from Array prototype functions can be missed
1259
1260        This is caught by an ASSERT in the top of Interpreter::executeCall.
1261        Check for exceptions after accessing properties that could be getters.
1262
1263        * runtime/ArrayPrototype.cpp:
1264        (JSC::arrayProtoFuncSort):
1265        (JSC::arrayProtoFuncFilter):
1266        (JSC::arrayProtoFuncMap):
1267        (JSC::arrayProtoFuncEvery):
1268        (JSC::arrayProtoFuncForEach):
1269        (JSC::arrayProtoFuncSome):
1270        (JSC::arrayProtoFuncReduce):
1271        (JSC::arrayProtoFuncReduceRight):
1272            - Add exception checks.
1273
12742011-04-12  Oliver Hunt  <oliver@apple.com>
1275
1276        Reviewed by Geoffrey Garen.
1277
1278        Make API callback objects use weak handles to run their finalizers
1279        https://bugs.webkit.org/show_bug.cgi?id=58389
1280
1281        Make the API object's private data struct act as a finalizer for
1282        an api object if the callback object has a API defined finalizer.
1283
1284        * API/JSCallbackObject.cpp:
1285        (JSC::JSCallbackObjectData::finalize):
1286        * API/JSCallbackObject.h:
1287        * API/JSCallbackObjectFunctions.h:
1288        (JSC::::init):
1289        * heap/Handle.h:
1290
12912011-04-12  Geoffrey Garen  <ggaren@apple.com>
1292
1293        Reviewed by Geoffrey Garen.
1294
1295        Cleaned up hash traits, and added hash traits for handles
1296        https://bugs.webkit.org/show_bug.cgi?id=58381
1297
1298        * heap/Handle.h:
1299        (JSC::HandleBase::swap):
1300        (JSC::Handle::Handle):
1301        (JSC::Handle::swap): Implemented swap, so we can rehash efficiently, and
1302        without creating new handles (which is not allowed during handle finalization).
1303
1304        * heap/Strong.h:
1305        (JSC::Strong::swap): Use new SimpleClassHashTraits to avoid duplication.
1306
1307        * heap/Weak.h:
1308        (JSC::Weak::isHashTableDeletedValue):
1309        (JSC::Weak::Weak):
1310        (JSC::Weak::swap):
1311        (JSC::Weak::hashTableDeletedValue): Ditto.
1312
1313        * wtf/HashTraits.h:
1314        (WTF::SimpleClassHashTraits::constructDeletedValue):
1315        (WTF::SimpleClassHashTraits::isDeletedValue): Added SimpleClassHashTraits,
1316        which are analogous to SimpleClassVectorTraits, since they are used in a
1317        bunch of places.
1318
1319        * wtf/RetainPtr.h: Use new SimpleClassHashTraits to avoid duplication.
1320
1321        * wtf/text/StringHash.h: Use new SimpleClassHashTraits to avoid duplication.
1322
13232011-04-12  Geoffrey Garen  <ggaren@apple.com>
1324
1325        Reviewed by Sam Weinig.
1326
1327        Cleaned up some Vector traits, and added missing Vector traits for handles
1328        https://bugs.webkit.org/show_bug.cgi?id=58372
1329
1330        * heap/Local.h: Inherit from SimpleClassVectorTraits to avoid duplication.
1331
1332        * heap/Strong.h: Ditto.
1333
1334        * heap/Weak.h: Ditto.
1335
1336        * parser/JSParser.cpp: Fixed a traits error. No test case because this
1337        particular trait is not currently exercised by the parser.
1338
1339        * runtime/UString.h: No need to override canInitializeWithMemset, since
1340        our base class sets it to true.
1341
1342        * wtf/VectorTraits.h: Inherit from VectorTraitsBase to avoid duplication.
1343
1344        * wtf/text/WTFString.h: No need to override canInitializeWithMemset, since
1345        our base class sets it to true.
1346
13472011-04-12  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1348
1349        Reviewed by Eric Seidel.
1350
1351        [Qt] Enable JIT build for SH4 platforms.
1352        https://bugs.webkit.org/show_bug.cgi?id=58317
1353        enable JIT build for QT backend  for SH4 platforms.
1354
1355        * JavaScriptCore.pro:
1356        * wtf/Platform.h:
1357
13582011-04-11  Ben Taylor  <bentaylor.solx86@gmail.com>
1359
1360        Reviewed by Alexey Proskuryakov.
1361
1362        https://bugs.webkit.org/show_bug.cgi?id=58289
1363
1364        Fix compilation on Solaris/Studio 12 C++ in wtf/FastMalloc.cpp,
1365        WTF::TCMalloc_PageHeap::runScavengerThread(void*) expected to return a value.
1366
1367        * wtf/FastMalloc.cpp:
1368        (WTF::TCMalloc_PageHeap::runScavengerThread):
1369
13702011-04-11  Mark Rowe  <mrowe@apple.com>
1371
1372        Fix the build.
1373
1374        * JavaScriptCore.xcodeproj/project.pbxproj: Headers used outside of JavaScriptCore need to be marked as private.
1375
13762011-04-11  Anna Cavender  <annacc@chromium.org>
1377
1378        Reviewed by Eric Carlson.
1379
1380        Setup ENABLE(TRACK) feature define
1381        https://bugs.webkit.org/show_bug.cgi?id=53556
1382
1383
1384        * Configurations/FeatureDefines.xcconfig:
1385
13862011-04-11  Geoffrey Garen  <ggaren@apple.com>
1387
1388        Try to fix a few builds.
1389
1390        Updated a few more build configurations for file moves.
1391
1392        * CMakeListsWinCE.txt:
1393
13942011-04-11  Gavin Barraclough  <barraclough@apple.com>
1395
1396        Reviewed by Sam Weinig.
1397
1398        Bug 58263 - Use EncodedValueDescriptor on both JSVALUE32_64, JSVALUE64
1399
1400        The JSJITInterface already uses EncodedValueDescriptor to access the tag/payload
1401        separately on JSVALUE64, even though EncodedValueDescriptor is not used in
1402        JSVALUE64's implementation of JSValue. Remove the separate definition for m_ptr
1403        on X86_64. Using the union allows us to remove a layer of makeImmediate()/
1404        immedaiteValue() methods.
1405
1406        * dfg/DFGNonSpeculativeJIT.cpp:
1407        (JSC::DFG::NonSpeculativeJIT::compile):
1408        * dfg/DFGSpeculativeJIT.cpp:
1409        (JSC::DFG::SpeculativeJIT::compile):
1410        * jit/JITInlineMethods.h:
1411        (JSC::JIT::emitTagAsBoolImmediate):
1412        * jit/JITOpcodes.cpp:
1413        (JSC::JIT::emit_op_not):
1414        (JSC::JIT::emit_op_jeq_null):
1415        (JSC::JIT::emit_op_jneq_null):
1416        (JSC::JIT::emit_op_get_pnames):
1417        (JSC::JIT::emit_op_eq_null):
1418        (JSC::JIT::emit_op_neq_null):
1419        (JSC::JIT::emitSlow_op_not):
1420        * runtime/JSCell.h:
1421        * runtime/JSValue.h:
1422        * runtime/JSValueInlineMethods.h:
1423        (JSC::JSValue::encode):
1424        (JSC::JSValue::decode):
1425        (JSC::JSValue::operator==):
1426        (JSC::JSValue::operator!=):
1427        (JSC::JSValue::JSValue):
1428        (JSC::JSValue::operator bool):
1429        (JSC::JSValue::asInt32):
1430        (JSC::JSValue::isUndefinedOrNull):
1431        (JSC::JSValue::isBoolean):
1432        (JSC::JSValue::isCell):
1433        (JSC::JSValue::isInt32):
1434        (JSC::JSValue::asDouble):
1435        (JSC::JSValue::isNumber):
1436        (JSC::JSValue::asCell):
1437
14382011-04-11  Geoffrey Garen  <ggaren@apple.com>
1439
1440        Try to fix a few builds.
1441
1442        Updated a few more build configurations for file moves.
1443
1444        * CMakeListsEfl.txt:
1445        * wscript:
1446
14472011-04-11  Geoffrey Garen  <ggaren@apple.com>
1448
1449        Build fix: Updated a file name.
1450
1451        * CMakeLists.txt:
1452
14532011-04-11  Geoffrey Garen  <ggaren@apple.com>
1454
1455        Rubber-stamped by Sam Weinig.
1456
1457        Moved remaining heap implementation files to the heap folder.
1458
1459        * Android.mk:
1460        * CMakeLists.txt:
1461        * GNUmakefile.list.am:
1462        * JavaScriptCore.gypi:
1463        * JavaScriptCore.pro:
1464        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1465        * JavaScriptCore.xcodeproj/project.pbxproj:
1466        * heap/ConservativeRoots.cpp: Copied from runtime/ConservativeSet.cpp.
1467        * heap/ConservativeRoots.h: Copied from runtime/ConservativeSet.h.
1468        * heap/Handle.h:
1469        * heap/Heap.cpp:
1470        * heap/MachineStackMarker.cpp: Copied from runtime/MachineStackMarker.cpp.
1471        * heap/MachineStackMarker.h: Copied from runtime/MachineStackMarker.h.
1472        * heap/MarkStack.cpp: Copied from runtime/MarkStack.cpp.
1473        * heap/MarkStack.h: Copied from runtime/MarkStack.h.
1474        * heap/MarkStackPosix.cpp: Copied from runtime/MarkStackPosix.cpp.
1475        * heap/MarkStackSymbian.cpp: Copied from runtime/MarkStackSymbian.cpp.
1476        * heap/MarkStackWin.cpp: Copied from runtime/MarkStackWin.cpp.
1477        * heap/MarkedBlock.cpp: Copied from runtime/MarkedBlock.cpp.
1478        * heap/MarkedBlock.h: Copied from runtime/MarkedBlock.h.
1479        * heap/MarkedSpace.cpp: Copied from runtime/MarkedSpace.cpp.
1480        * heap/MarkedSpace.h: Copied from runtime/MarkedSpace.h.
1481        * interpreter/RegisterFile.cpp:
1482        * runtime/ConservativeSet.cpp: Removed.
1483        * runtime/ConservativeSet.h: Removed.
1484        * runtime/MachineStackMarker.cpp: Removed.
1485        * runtime/MachineStackMarker.h: Removed.
1486        * runtime/MarkStack.cpp: Removed.
1487        * runtime/MarkStack.h: Removed.
1488        * runtime/MarkStackPosix.cpp: Removed.
1489        * runtime/MarkStackSymbian.cpp: Removed.
1490        * runtime/MarkStackWin.cpp: Removed.
1491        * runtime/MarkedBlock.cpp: Removed.
1492        * runtime/MarkedBlock.h: Removed.
1493        * runtime/MarkedSpace.cpp: Removed.
1494        * runtime/MarkedSpace.h: Removed.
1495
14962011-04-11  Gavin Barraclough  <barraclough@apple.com>
1497
1498        Windows build fix.
1499
1500        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1501
15022011-04-09  Gavin Barraclough  <barraclough@apple.com>
1503
1504        Reviewed by Sam Weinig.
1505
1506        Bug 58198 - Clean up JSValue implementation for JSVALUE64
1507
1508        Remove JSNumberCell, JSImmediate, unify some methods between JSVALUE32_64/JSVALUE64
1509
1510        JSNumberCell.h largely just contained the constructors for JSValue on JSVALUE64,
1511        which should not have been here.  JSImmediate mostly contained uncalled methods,
1512        along with the internal implementation of the JSValue constructors split unnecessarily
1513        across a number of layers of function calls. These could largely be merged back
1514        together. Many methods and constructors from JSVALUE32_64 and JSVALUE64 can by unified.
1515
1516        The .cpp files were empty.
1517
1518        Moving all these methods into JSValue.h seems to be a repro measurable regression, so
1519        I have kept these methods in a separate JSValueInlineMethods.h. Adding the 64-bit tag
1520        values as static const members of JSValue also measures as a repro regression, so I
1521        have made these #defines.
1522
1523        * Android.mk:
1524        * CMakeLists.txt:
1525        * GNUmakefile.list.am:
1526        * JavaScriptCore.exp:
1527        * JavaScriptCore.gypi:
1528        * JavaScriptCore.pro:
1529        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1530        * JavaScriptCore.xcodeproj/project.pbxproj:
1531            - Removed JSImmediate.h, JSNumberCell.h.
1532        * bytecompiler/BytecodeGenerator.cpp:
1533        (JSC::BytecodeGenerator::emitLoad):
1534            - Removed class JSImmediate.
1535        * dfg/DFGNonSpeculativeJIT.cpp:
1536        (JSC::DFG::NonSpeculativeJIT::compile):
1537            - Removed class JSImmediate.
1538        * dfg/DFGSpeculativeJIT.cpp:
1539        (JSC::DFG::SpeculativeJIT::compile):
1540            - Removed class JSImmediate.
1541        * jit/JITArithmetic.cpp:
1542        (JSC::JIT::compileBinaryArithOpSlowCase):
1543            - Removed class JSImmediate.
1544        * jit/JITInlineMethods.h:
1545        (JSC::JIT::emitJumpIfJSCell):
1546        (JSC::JIT::emitJumpIfNotJSCell):
1547        (JSC::JIT::emitJumpIfImmediateInteger):
1548        (JSC::JIT::emitJumpIfNotImmediateInteger):
1549        (JSC::JIT::emitFastArithDeTagImmediate):
1550        (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
1551        (JSC::JIT::emitFastArithReTagImmediate):
1552        (JSC::JIT::emitTagAsBoolImmediate):
1553            - Removed class JSImmediate.
1554        * jit/JITOpcodes.cpp:
1555        (JSC::JIT::emit_op_not):
1556        (JSC::JIT::emit_op_jeq_null):
1557        (JSC::JIT::emit_op_jneq_null):
1558        (JSC::JIT::emit_op_get_pnames):
1559        (JSC::JIT::emit_op_eq_null):
1560        (JSC::JIT::emit_op_neq_null):
1561        (JSC::JIT::emitSlow_op_not):
1562            - Removed class JSImmediate.
1563        * jit/JSInterfaceJIT.h:
1564            - Removed class JSImmediate.
1565        * runtime/JSCell.h:
1566            - Removed JSImmediate.h, JSNumberCell.h.
1567        * runtime/JSImmediate.cpp: Removed.
1568        * runtime/JSImmediate.h: Removed.
1569        * runtime/JSNumberCell.cpp: Removed.
1570        * runtime/JSNumberCell.h: Removed.
1571            - Removed.
1572        * runtime/JSObject.h:
1573            - Removed JSImmediate.h, JSNumberCell.h.
1574        * runtime/JSString.h:
1575            - Removed JSImmediate.h, JSNumberCell.h.
1576        * runtime/JSValue.h:
1577            - Added tags for JSVALUE64, moved out some JSVALUE32_64 methods, unified with JSVALUE64.
1578        * runtime/JSValueInlineMethods.h: Added.
1579        (JSC::JSValue::toInt32):
1580        (JSC::JSValue::toUInt32):
1581        (JSC::JSValue::isUInt32):
1582        (JSC::JSValue::asUInt32):
1583        (JSC::JSValue::uncheckedGetNumber):
1584        (JSC::JSValue::toJSNumber):
1585        (JSC::jsNaN):
1586        (JSC::JSValue::getNumber):
1587        (JSC::JSValue::getBoolean):
1588        (JSC::JSValue::JSValue):
1589        (JSC::JSValue::encode):
1590        (JSC::JSValue::decode):
1591        (JSC::JSValue::operator bool):
1592        (JSC::JSValue::operator==):
1593        (JSC::JSValue::operator!=):
1594        (JSC::JSValue::isUndefined):
1595        (JSC::JSValue::isNull):
1596        (JSC::JSValue::isUndefinedOrNull):
1597        (JSC::JSValue::isCell):
1598        (JSC::JSValue::isInt32):
1599        (JSC::JSValue::isDouble):
1600        (JSC::JSValue::isTrue):
1601        (JSC::JSValue::isFalse):
1602        (JSC::JSValue::tag):
1603        (JSC::JSValue::payload):
1604        (JSC::JSValue::asInt32):
1605        (JSC::JSValue::asDouble):
1606        (JSC::JSValue::asCell):
1607        (JSC::JSValue::isNumber):
1608        (JSC::JSValue::isBoolean):
1609        (JSC::JSValue::makeImmediate):
1610        (JSC::JSValue::immediateValue):
1611        (JSC::reinterpretDoubleToIntptr):
1612        (JSC::reinterpretIntptrToDouble):
1613            - Methods moved here from JSImmediate.h/JSNumberCell.h/JSValue.h.
1614        * runtime/Operations.h:
1615            - Removed JSImmediate.h, JSNumberCell.h.
1616        * wtf/StdLibExtras.h:
1617            - Export bitwise_cast.
1618
16192011-04-11  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1620
1621        Reviewed by Oliver Hunt.
1622
1623        SH4 JIT SUPPORT.
1624        https://bugs.webkit.org/show_bug.cgi?id=44329
1625
1626        Add JIT remaining part for SH4 platforms.
1627
1628        * assembler/MacroAssemblerSH4.h:
1629        * jit/JIT.h:
1630        * jit/JITInlineMethods.h:
1631        * jit/JITOpcodes32_64.cpp:
1632        * jit/JITPropertyAccess32_64.cpp:
1633        * jit/JITStubs.cpp:
1634        * jit/JITStubs.h:
1635        * jit/JSInterfaceJIT.h:
1636
16372011-04-10  Geoffrey Garen  <ggaren@apple.com>
1638
1639        Rubber-stamped by Beth Dakin.
1640
1641        Moved Heap.h and Heap.cpp to the heap folder, because anything less
1642        would be uncivilized.
1643
1644        * Android.mk:
1645        * CMakeLists.txt:
1646        * GNUmakefile.list.am:
1647        * JavaScriptCore.gypi:
1648        * JavaScriptCore.pro:
1649        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1650        * JavaScriptCore.xcodeproj/project.pbxproj:
1651        * heap/Heap.cpp: Copied from JavaScriptCore/runtime/Heap.cpp.
1652        * heap/Heap.h: Copied from JavaScriptCore/runtime/Heap.h.
1653        * runtime/Heap.cpp: Removed.
1654        * runtime/Heap.h: Removed.
1655
16562011-04-10  Patrick Gansterer  <paroga@webkit.org>
1657
1658        Reviewed by Darin Adler.
1659
1660        Remove duplicated code from AtomicString::fromUTF8()
1661        https://bugs.webkit.org/show_bug.cgi?id=53711
1662
1663        * JavaScriptCore.exp:
1664        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1665        * wtf/text/AtomicString.cpp:
1666        (WTF::AtomicString::fromUTF8Internal):
1667        * wtf/text/AtomicString.h:
1668        (WTF::AtomicString::fromUTF8):
1669        * wtf/unicode/UTF8.cpp:
1670        (WTF::Unicode::calculateStringHashAndLengthFromUTF8):
1671        * wtf/unicode/UTF8.h:
1672
16732011-04-10  Maciej Stachowiak  <mjs@apple.com>
1674
1675        Not reviewed.
1676
1677        Fix build (at least on Lion) by adding some newish header files to
1678        PrivateHeaders.
1679
1680        * JavaScriptCore.xcodeproj/project.pbxproj:
1681
16822011-04-09  Geoffrey Garen  <ggaren@apple.com>
1683
1684        Not reviewed.
1685
1686        Try recommitting some things svn left out of its last commit.
1687
1688        * heap/Handle.h:
1689        (JSC::HandleBase::operator!):
1690        (JSC::HandleBase::HandleBase):
1691        (JSC::HandleBase::slot):
1692        (JSC::HandleBase::setSlot):
1693        (JSC::Handle::Handle):
1694        * heap/HandleHeap.cpp:
1695        (JSC::HandleHeap::markWeakHandles):
1696        (JSC::HandleHeap::finalizeWeakHandles):
1697        (JSC::HandleHeap::isValidWeakNode):
1698        * heap/HandleHeap.h:
1699        (JSC::HandleHeap::globalData):
1700
17012011-04-08  Geoffrey Garen  <ggaren@apple.com>
1702
1703        Reviewed by Oliver Hunt.
1704
1705        A few heap-related renames and file moves.
1706
1707        WeakGCPtr<T> => Weak<T>
1708        Global<T> => Strong<T>
1709        collector/ => heap/
1710        collector/* => heap/*
1711        runtime/WeakGCPtr.h => heap/Weak.h
1712
1713        (Eventually, even more files should move into the heap directory. Like
1714        Heap.h and Heap.cpp, for example.)
1715
1716        * API/JSClassRef.h:
1717        * CMakeLists.txt:
1718        * GNUmakefile.am:
1719        * GNUmakefile.list.am:
1720        * JavaScriptCore.gypi:
1721        * JavaScriptCore.pri:
1722        * JavaScriptCore.pro:
1723        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1724        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1725        * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd:
1726        * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1727        * JavaScriptCore.xcodeproj/project.pbxproj:
1728        * bytecode/SamplingTool.h:
1729        * bytecompiler/BytecodeGenerator.h:
1730        * collector: Removed.
1731        * collector/handles: Removed.
1732        * collector/handles/Global.h: Removed.
1733        * collector/handles/Handle.h: Removed.
1734        * collector/handles/HandleHeap.cpp: Removed.
1735        * collector/handles/HandleHeap.h: Removed.
1736        * collector/handles/HandleStack.cpp: Removed.
1737        * collector/handles/HandleStack.h: Removed.
1738        * collector/handles/Local.h: Removed.
1739        * collector/handles/LocalScope.h: Removed.
1740        * heap: Copied from collector.
1741        * heap/Handle.h: Copied from collector/handles/Handle.h.
1742        * heap/HandleHeap.cpp: Copied from collector/handles/HandleHeap.cpp.
1743        * heap/HandleHeap.h: Copied from collector/handles/HandleHeap.h.
1744        * heap/HandleStack.cpp: Copied from collector/handles/HandleStack.cpp.
1745        * heap/HandleStack.h: Copied from collector/handles/HandleStack.h.
1746        * heap/Local.h: Copied from collector/handles/Local.h.
1747        * heap/LocalScope.h: Copied from collector/handles/LocalScope.h.
1748        * heap/Strong.h: Copied from collector/handles/Global.h.
1749        (JSC::Strong::Strong):
1750        (JSC::Strong::~Strong):
1751        (JSC::Strong::operator=):
1752        * heap/Weak.h: Copied from runtime/WeakGCPtr.h.
1753        (JSC::Weak::Weak):
1754        (JSC::Weak::~Weak):
1755        * heap/handles: Removed.
1756        * interpreter/RegisterFile.h:
1757        * jit/JITStubs.cpp:
1758        (JSC::JITThunks::hostFunctionStub):
1759        * jit/JITStubs.h:
1760        * runtime/Structure.h:
1761        * runtime/WeakGCPtr.h: Removed.
1762
17632011-04-08  Alpha Lam  <hclam@chromium.org>
1764
1765        Unreviewed, rolling out r83335.
1766        http://trac.webkit.org/changeset/83335
1767        https://bugs.webkit.org/show_bug.cgi?id=53556
1768
1769        GTK and QT bots are broken
1770
1771        * Configurations/FeatureDefines.xcconfig:
1772
17732011-04-08  Gavin Barraclough  <barraclough@apple.com>
1774
1775        Ooops, typo, build fix.
1776
1777        * dfg/DFGByteCodeParser.cpp:
1778        (JSC::DFG::ByteCodeParser::parse):
1779
17802011-04-08  Gavin Barraclough  <barraclough@apple.com>
1781
1782        Reviewed by Oliver Hunt.
1783
1784        Bug 58154 - Add support for comparison operators to the DFG JIT.
1785
1786        Add support for <, <=, ==, ===, and also !.  Add support for all corresponding
1787        bytecode ops, including the not- and -null forms.  Initially add functionally
1788        correct support, we'll revisit the performance.
1789
1790        * dfg/DFGByteCodeParser.cpp:
1791        (JSC::DFG::ByteCodeParser::ByteCodeParser):
1792        (JSC::DFG::ByteCodeParser::constantNull):
1793        (JSC::DFG::ByteCodeParser::parse):
1794            - Add support for parsing of bytecode opcodes,
1795        * dfg/DFGJITCodeGenerator.h:
1796        (JSC::DFG::JITCodeGenerator::callOperation):
1797            - Add new operation call types, return bool values.
1798        * dfg/DFGNode.h:
1799            - Add new node types.
1800        * dfg/DFGNonSpeculativeJIT.cpp:
1801        (JSC::DFG::NonSpeculativeJIT::compile):
1802            - Add code generation for new nodes.
1803        * dfg/DFGOperations.cpp:
1804        (JSC::DFG::operationCompareLess):
1805        (JSC::DFG::operationCompareLessEq):
1806        (JSC::DFG::operationCompareEq):
1807        (JSC::DFG::operationCompareStrictEq):
1808        (JSC::DFG::dfgConvertJSValueToBoolean):
1809        * dfg/DFGOperations.h:
1810            - Add operation callbacks to implement new ops.
1811        * dfg/DFGSpeculativeJIT.cpp:
1812        (JSC::DFG::SpeculativeJIT::compile):
1813            - Add code generation for new nodes.
1814        * jit/JITOpcodes.cpp:
1815        (JSC::JIT::privateCompileCTIMachineTrampolines):
1816            - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
1817        * jit/JITPropertyAccess.cpp:
1818        (JSC::JIT::privateCompilePatchGetArrayLength):
1819            - Switched to a simpler <0 check, rather than relying on an internal value in JSImmediate.
1820        * runtime/JSImmediate.h:
1821            - Make tag values public, rather than relying on a friend - this matches JSVALUE32_64.
1822
18232011-04-07  Anna Cavender  <annacc@chromium.org>
1824
1825        Reviewed by Eric Carlson.
1826
1827        Setup ENABLE(TRACK) feature define
1828        https://bugs.webkit.org/show_bug.cgi?id=53556
1829
1830
1831        * Configurations/FeatureDefines.xcconfig:
1832
18332011-04-07  Balazs Kelemen  <kbalazs@webkit.org>
1834
1835        Reviewed by Kenneth Rohde Christiansen.
1836
1837        [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
1838        https://bugs.webkit.org/show_bug.cgi?id=58030
1839
1840        * wtf/Platform.h: Introduce USE(UNIX_DOMAIN_SOCKETS) for WebKit2.
1841
18422011-04-08  Adam Roben  <aroben@apple.com>
1843
1844        Clean build fix
1845
1846        * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Don't try to delete directories that
1847        don't exist. Also switched from del /s to rmdir /s, which has the benefit of deleting the
1848        directory itself in addition to the files it contains.
1849
18502011-04-07  Geoffrey Garen  <ggaren@apple.com>
1851
1852        Reviewed by Maciej Stachowiak.
1853
1854        Some Handle<T> cleanup
1855        https://bugs.webkit.org/show_bug.cgi?id=58109
1856
1857        * bytecode/SamplingTool.h: Sorted alphabetically because that's the
1858        WebKit style. Added a Global.h #include that was previously missing
1859        but harmless.
1860
1861        * collector/handles/Global.h:
1862        (JSC::Global::Global): Added a null constructor. No need for a special
1863        tag, and the tag is incompatible with some data structures.
1864
1865        (JSC::Global::isHashTableDeletedValue):
1866        (JSC::Global::~Global):
1867        (JSC::Global::set):
1868        (JSC::Global::operator=):
1869        (JSC::Global::clear):
1870        (JSC::Global::hashTableDeletedValue): Reordered constructors to be near
1871        each other.
1872
1873        (JSC::Global::setWithWriteBarrier): Renamed internalSet to
1874        setWithWriteBarrier for clarity, and funneled more code into using set
1875        and setWithWriteBarrier to reduce duplication.
1876
1877        * collector/handles/Handle.h:
1878        (JSC::HandleBase::operator!):
1879        (JSC::HandleBase::HandleBase): Removed isEmpty(), since we already have
1880        boolean and ! operators.
1881
1882        (JSC::HandleBase::slot):
1883        (JSC::HandleBase::setSlot):
1884        (JSC::Handle::Handle): Added general support for null Handles. This was
1885        previously outlawed by ASSERTs, but our code has grown to support and
1886        rely on null Handles.
1887
1888        * collector/handles/HandleHeap.cpp:
1889        (JSC::HandleHeap::markWeakHandles):
1890        (JSC::HandleHeap::finalizeWeakHandles):
1891        (JSC::HandleHeap::isValidWeakNode): Migrated from isValidWeakHandle,
1892        and beefed this up a bit.
1893
1894        * collector/handles/HandleHeap.h:
1895        (JSC::HandleHeap::globalData): Added accessor, used by some new set functions.
1896
1897        * collector/handles/Local.h: Moved hash traits to the bottom of the file,
1898        since this file is about the Local class, not the traits.
1899
1900        (JSC::::Local): Updated for removal of invalidate().
1901
1902        (JSC::::operator): Deployed "using" to avoid a lot of this->
1903        template funny business.
1904
1905        (JSC::::setWithSlotCheck): Renamed from internalSet, more specific now.
1906
1907        * interpreter/RegisterFile.h:
1908        (JSC::RegisterFile::RegisterFile): Updated to use null constructor.
1909
1910        * jit/JITStubs.cpp:
1911        (JSC::JITThunks::hostFunctionStub):
1912
1913        * runtime/JSPropertyNameIterator.h:
1914        (JSC::Structure::setEnumerationCache):
1915        * runtime/Structure.h: Removed clearEnumerationCache
1916        because it was an unused holdover from when the enumeration cache was
1917        not a handle.
1918
1919        * runtime/WeakGCMap.h:
1920        (JSC::WeakGCMap::set): Finish initializing our handle before putting it
1921        in the table. This seemed more logical, and at one point was required
1922        to avoid triggering an ASSERT.
1923
1924        * runtime/WeakGCPtr.h: Inherit from Handle instead of rolling our own
1925        handle-like behavior, to avoid duplication.
1926
1927        (JSC::WeakGCPtr::WeakGCPtr):
1928        (JSC::WeakGCPtr::~WeakGCPtr):
1929        (JSC::WeakGCPtr::get):
1930        (JSC::WeakGCPtr::clear):
1931        (JSC::WeakGCPtr::set):
1932        (JSC::WeakGCPtr::setWithWriteBarrier): Removed duplicate code and
1933        standardized on Handle idioms.
1934
19352011-04-07  Adam Barth  <abarth@webkit.org>
1936
1937        Reviewed by Martin Robinson.
1938
1939        Refactor Gtk build system to separate list of files
1940        https://bugs.webkit.org/show_bug.cgi?id=58090
1941
1942        This is the first step towards generating part of the GTK build system
1943        using GYP.  In the first iteration, our plan is to just generate the
1944        list of files.  This patch is the first step, which is to separate out
1945        the part of JavaScriptCore build system that we intend to generate from
1946        the rest of the build system.
1947
1948        * GNUmakefile.am:
1949        * GNUmakefile.list.am: Added.
1950
19512011-04-07  Zoltan Herczeg  <zherczeg@webkit.org>
1952
1953        Reviewed by Gavin Barraclough.
1954
1955        Mapping booleans the same way as integers
1956        https://bugs.webkit.org/show_bug.cgi?id=56913
1957
1958        Instead of having a seperate tag field for booleans,
1959        the logical values are stored in the payload field
1960        (for JSValue32_64 representation).
1961
1962        1.007x speedup on SunSpider.
1963
1964        * jit/JIT.h:
1965        * jit/JITInlineMethods.h:
1966        (JSC::JIT::emitStoreBool):
1967        * jit/JITOpcodes32_64.cpp:
1968        (JSC::JIT::emit_op_instanceof):
1969        (JSC::JIT::emit_op_not):
1970        (JSC::JIT::emit_op_jfalse):
1971        (JSC::JIT::emitSlow_op_jfalse):
1972        (JSC::JIT::emit_op_jtrue):
1973        (JSC::JIT::emitSlow_op_jtrue):
1974        (JSC::JIT::emit_op_jeq_null):
1975        (JSC::JIT::emit_op_jneq_null):
1976        (JSC::JIT::emit_op_eq):
1977        (JSC::JIT::emitSlow_op_eq):
1978        (JSC::JIT::emit_op_neq):
1979        (JSC::JIT::emitSlow_op_neq):
1980        (JSC::JIT::compileOpStrictEq):
1981        (JSC::JIT::emit_op_eq_null):
1982        (JSC::JIT::emit_op_neq_null):
1983        * jit/JSInterfaceJIT.h:
1984        * runtime/JSValue.h:
1985        (JSC::JSValue::JSValue):
1986        (JSC::JSValue::isTrue):
1987        (JSC::JSValue::isFalse):
1988        (JSC::JSValue::getBoolean):
1989
19902011-04-07  Eric Seidel  <eric@webkit.org>
1991
1992        Reviewed by Adam Barth.
1993
1994        Add stub support for generating Gtk build system from gyp
1995        https://bugs.webkit.org/show_bug.cgi?id=58086
1996
1997        This does not produce a buildable JavaScriptCore, but it
1998        does allow running gyp/configure --port=gtk and having
1999        it generate a gtk.Makefile which we can use for testing
2000        the rest of the plumbing.
2001
2002        * gyp/gtk.gyp: Added.
2003
20042011-04-07  Andrew Scherkus  <scherkus@chromium.org>
2005
2006        Revert ENABLE_TRACK patch due to compile failures.
2007
2008        * Configurations/FeatureDefines.xcconfig:
2009
20102011-04-07  Adam Barth  <abarth@webkit.org>
2011
2012        Fix whitespace in GNUmakefile.am.
2013
2014        * GNUmakefile.am:
2015
20162011-04-07  Gavin Barraclough  <barraclough@apple.com>
2017
2018        Fix a couple of typos in comments that Darin spotted.
2019
2020        * jit/JITOpcodes.cpp:
2021        (JSC::JIT::emit_op_not):
2022        * runtime/JSImmediate.h:
2023
20242011-04-06  Gavin Barraclough  <barraclough@apple.com>
2025
2026        Reviewed by Geoff Garen.
2027        Bug 58057 - Store boolean payload in low bit of JSImmediate
2028
2029        And remove some uncalled functions from JSImmediate.h
2030
2031        * jit/JITInlineMethods.h:
2032        (JSC::JIT::emitTagAsBoolImmediate):
2033        * jit/JITOpcodes.cpp:
2034        (JSC::JIT::emit_op_not):
2035        * runtime/JSImmediate.h:
2036        (JSC::JSImmediate::makeInt):
2037        (JSC::JSImmediate::makeBool):
2038        (JSC::JSImmediate::intValue):
2039        (JSC::JSImmediate::boolValue):
2040        (JSC::JSImmediate::asInt32):
2041        (JSC::JSImmediate::toDouble):
2042        (JSC::JSValue::asInt32):
2043        (JSC::JSValue::isUInt32):
2044        (JSC::JSValue::asUInt32):
2045
20462011-04-07  Liang Qi  <liang.qi@nokia.com>
2047
2048        Reviewed by Laszlo Gombos.
2049
2050        [Qt][Symbian] Enable webkit build with GCCE on Symbian.
2051        https://bugs.webkit.org/show_bug.cgi?id=57841
2052
2053        * wtf/MathExtras.h: GCCE compiler doesn't support those std static functions.
2054
20552011-04-06  Dai Mikurube  <dmikurube@chromium.org>
2056
2057        Reviewed by David Levin.
2058
2059        Add QUOTA build flag for unified quota API
2060        https://bugs.webkit.org/show_bug.cgi?id=57918
2061
2062        * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
2063
20642011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
2065
2066        Reviewed by Darin Adler.
2067
2068        Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
2069
2070        https://bugs.webkit.org/show_bug.cgi?id=27551
2071
2072        * config.h:
2073
20742011-04-06  Oliver Hunt  <oliver@apple.com>
2075
2076        Reviewed by Gavin Barraclough.
2077
2078        Stop JSObject::isUsingInlineStorage() from using the structure
2079        https://bugs.webkit.org/show_bug.cgi?id=57986
2080
2081        Make the isUsingInlineStorage() implementation just look at
2082        whether the property storage is inside the object.
2083
2084        * runtime/JSObject.h:
2085        (JSC::JSObject::isUsingInlineStorage):
2086        (JSC::JSObject::JSObject):
2087
20882011-04-06  Gavin Barraclough  <barraclough@apple.com>
2089
2090        Rubber stamped by Geoff Garen.
2091
2092        Update comments documenting JSVALUE64/JSVALUE32_64 JSValue representations.
2093
2094        * runtime/JSImmediate.h:
2095        * runtime/JSValue.h:
2096
20972011-04-06  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2098
2099        cmake: Fix build for ARMv7
2100
2101        * CMakeLists.txt: add missing file.
2102
21032011-04-06  Liang Qi  <liang.qi@nokia.com>
2104
2105        Reviewed by Benjamin Poulain.
2106
2107        Correct a include file name.
2108        https://bugs.webkit.org/show_bug.cgi?id=57839
2109
2110        * wtf/PageAllocatorSymbian.h: It should be case sensitive. This fix
2111        builds on Unix hosts.
2112
21132011-04-06  Adam Roben  <aroben@apple.com>
2114
2115        Build fix after r83056
2116
2117        * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Added property svn:executable.
2118
21192011-04-06  Adam Roben  <aroben@apple.com>
2120
2121        Move JavaScriptCoreGenerated's file-copying logic out to a new script
2122
2123        Hopefully this will make it easier to modify this logic in the future. I also made the
2124        script much quieter than the old logic, since it didn't seem helpful to see long lists of
2125        filenames during the copying phase.
2126
2127        If we like this new style, we could copy it for our other projects.
2128
2129        Fixes <http://webkit.org/b/57950> JavaScriptCoreGenerated's file-copying logic is hard to
2130        modify and noisy
2131
2132        Reviewed by Steve Falkenburg.
2133
2134        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Moved logic to copy
2135        files from here...
2136        * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: ...to here. (Added.)
2137
2138        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Added copy-files.cmd
2139        for convenience.
2140
21412011-04-05  Geoffrey Garen  <ggaren@apple.com>
2142
2143        Try to fix the Windows build.
2144
2145        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Who likes export files? I do!
2146
21472011-04-05  Geoffrey Garen  <ggaren@apple.com>
2148
2149        Reviewed by Oliver Hunt.
2150
2151        Introduced the concept of opaque roots, in preparation for marking the DOM with them
2152        https://bugs.webkit.org/show_bug.cgi?id=57903
2153
2154        * JavaScriptCore.exp: Who likes export files? I do!
2155
2156        * collector/handles/HandleHeap.cpp:
2157        (JSC::isValidWeakHandle): Factored out a helper function for ASSERTs.
2158
2159        (JSC::WeakHandleOwner::~WeakHandleOwner): Moved from header to avoid
2160        weak linkage problems.
2161
2162        (JSC::WeakHandleOwner::isReachableFromOpaqueRoots): New callback.
2163        Currently unused.
2164
2165        (JSC::WeakHandleOwner::finalize): Switched from pure virtual to a
2166        default empty implementation, since not all clients necessarily want
2167        or need non-trivial finalizers.
2168
2169        (JSC::HandleHeap::markWeakHandles): Split updateWeakHandles into two
2170        passes. The first pass marks all reachable weak handles. The second pass
2171        finalizes all unreachable weak handles. This must be two passes because
2172        we don't know the set of finalizable weak handles until we're done
2173        marking all weak handles.
2174
2175        (JSC::HandleHeap::finalizeWeakHandles): Use new helper function.
2176
2177        * collector/handles/HandleHeap.h: Ditto.
2178
2179        * runtime/Heap.cpp:
2180        (JSC::Heap::destroy):
2181        (JSC::Heap::markRoots):
2182        (JSC::Heap::reset): Split out handle marking from handle finalization.
2183
2184        * runtime/MarkStack.cpp:
2185        (JSC::MarkStack::reset):
2186        * runtime/MarkStack.h:
2187        (JSC::MarkStack::addOpaqueRoot):
2188        (JSC::MarkStack::containsOpaqueRoot):
2189        (JSC::MarkStack::opaqueRootCount):
2190        (JSC::HeapRootMarker::markStack): New helper functions for managing the
2191        set of opaque roots.
2192
2193        * runtime/WeakGCMap.h:
2194        (JSC::WeakGCMap::finalize): Renamed to match parent class declaration.
2195
21962011-04-05  Balazs Kelemen  <kbalazs@webkit.org>
2197
2198        Reviewed by Darin Adler.
2199
2200        Build fix for YarrParser.h
2201        https://bugs.webkit.org/show_bug.cgi?id=57822
2202
2203        * yarr/YarrParser.h:
2204        (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
2205
22062011-04-05  Steve Falkenburg  <sfalken@apple.com>
2207
2208        Follow-up Windows build fix.
2209        Don't skip react-to-vsprops-changes.py for all production builds,
2210        only those initiated via JavaScriptCore.make.
2211
2212        * JavaScriptCore.vcproj/JavaScriptCore.make:
2213        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2214
22152011-04-05  Oliver Hunt  <oliver@apple.com>
2216
2217        Reviewed by Darin Adler.
2218
2219        REGRESSION (r82849): 85,000+ JSC-related leaks seen on SnowLeopard Intel Leaks
2220        https://bugs.webkit.org/show_bug.cgi?id=57857
2221
2222        Whoops, accidentally removed a deref().
2223
2224        * bytecode/StructureStubInfo.cpp:
2225        (JSC::StructureStubInfo::deref):
2226
22272011-04-05  Steve Falkenburg  <sfalken@apple.com>
2228
2229        Windows build fix.
2230
2231        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Add per-configuration vsprops files.
2232        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed inheritance from common.vsprops.
2233        Set production environment variable before calling make.
2234        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Added.
2235        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Added.
2236        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Added.
2237        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Added.
2238        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Added.
2239        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Added.
2240        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Added.
2241
22422011-04-05  Oliver Hunt  <oliver@apple.com>
2243
2244        Reviewed by Gavin Barraclough.
2245
2246        Make caches window show more info about non-jsobject GC values
2247        https://bugs.webkit.org/show_bug.cgi?id=57874
2248
2249        Add ClassInfo to the various internal JS types that currently
2250        don't have any, and make the text for caches window show the
2251        classname for non-JSObject instances.
2252
2253        * runtime/Executable.cpp:
2254        * runtime/Executable.h:
2255        (JSC::ExecutableBase::createStructure):
2256        (JSC::NativeExecutable::createStructure):
2257        (JSC::NativeExecutable::NativeExecutable):
2258        (JSC::EvalExecutable::createStructure):
2259        (JSC::ProgramExecutable::createStructure):
2260        (JSC::FunctionExecutable::createStructure):
2261        * runtime/Heap.cpp:
2262        (JSC::TypeCounter::typeName):
2263        * runtime/JSGlobalData.cpp:
2264        (JSC::JSGlobalData::JSGlobalData):
2265        * runtime/JSGlobalData.h:
2266        * runtime/ScopeChain.cpp:
2267        * runtime/ScopeChain.h:
2268        (JSC::ScopeChainNode::createStructure):
2269        * runtime/StructureChain.cpp:
2270        * runtime/StructureChain.h:
2271        (JSC::StructureChain::createStructure):
2272
22732011-04-05  Nikolas Zimmermann  <nzimmermann@rim.com>
2274
2275        Reviewed by Andreas Kling.
2276
2277        Cleanup StringConcatenate
2278        https://bugs.webkit.org/show_bug.cgi?id=57836
2279
2280        Don't use PassRefPtr in local variables, properly store in RefPtrs and release on return.
2281        Add a makeString() variant taking 9 arguments, needed by a follow-up patch.
2282
2283        * wtf/text/StringConcatenate.h:
2284        (WTF::tryMakeString):
2285        (WTF::makeString):
2286
22872011-04-04  Sheriff Bot  <webkit.review.bot@gmail.com>
2288
2289        Unreviewed, rolling out r82876.
2290        http://trac.webkit.org/changeset/82876
2291        https://bugs.webkit.org/show_bug.cgi?id=57816
2292
2293        Caused a lot of test crashes (Requested by tkent on #webkit).
2294
2295        * JavaScriptCore.exp:
2296        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2297        * wtf/FastMalloc.cpp:
2298        (WTF::tryFastMalloc):
2299        (WTF::fastMalloc):
2300        (WTF::tryFastCalloc):
2301        (WTF::fastCalloc):
2302        (WTF::fastFree):
2303        (WTF::tryFastRealloc):
2304        (WTF::fastRealloc):
2305        (WTF::fastMallocSize):
2306        (WTF::TCMalloc_PageHeap::isScavengerSuspended):
2307        (WTF::TCMalloc_PageHeap::scheduleScavenger):
2308        (WTF::TCMalloc_PageHeap::suspendScavenger):
2309        (WTF::TCMalloc_PageHeap::signalScavenger):
2310        (WTF::TCMallocStats::malloc):
2311        (WTF::TCMallocStats::free):
2312        (WTF::TCMallocStats::fastCalloc):
2313        (WTF::TCMallocStats::tryFastCalloc):
2314        (WTF::TCMallocStats::calloc):
2315        (WTF::TCMallocStats::fastRealloc):
2316        (WTF::TCMallocStats::tryFastRealloc):
2317        (WTF::TCMallocStats::realloc):
2318        (WTF::TCMallocStats::fastMallocSize):
2319        * wtf/FastMalloc.h:
2320        (WTF::Internal::fastMallocMatchValidationType):
2321        (WTF::Internal::fastMallocMatchValidationValue):
2322        (WTF::Internal::setFastMallocMatchValidationType):
2323        (WTF::fastMallocMatchValidateFree):
2324        * wtf/Platform.h:
2325
23262011-04-04  Oliver Hunt  <oliver@apple.com>
2327
2328        Reviewed by Antti Koivisto.
2329
2330        Stop JSCell.h from including Structure.h
2331        https://bugs.webkit.org/show_bug.cgi?id=57809
2332
2333        * runtime/GetterSetter.h:
2334        * runtime/JSAPIValueWrapper.h:
2335        * runtime/JSCell.h:
2336        (JSC::JSCell::JSValue::toThisObject):
2337        * runtime/JSString.h:
2338        * runtime/ScopeChain.h:
2339        * runtime/Structure.h:
2340        (JSC::JSCell::isObject):
2341        (JSC::JSCell::isString):
2342        (JSC::JSCell::classInfo):
2343        (JSC::JSCell::createDummyStructure):
2344        (JSC::JSValue::needsThisConversion):
2345        (JSC::MarkStack::internalAppend):
2346        * runtime/StructureChain.h:
2347
23482011-04-04  Oliver Hunt  <oliver@apple.com>
2349
2350        Fix clang build.
2351
2352        * wtf/FastMalloc.cpp:
2353        (WTF::fastMalloc):
2354        (WTF::fastCalloc):
2355        (WTF::fastRealloc):
2356
23572011-04-04  Oliver Hunt  <oliver@apple.com>
2358
2359        Remove accidental change to Platform.h
2360
2361        * wtf/Platform.h:
2362
23632011-04-04  Geoffrey Garen  <ggaren@apple.com>
2364
2365        Reviewed by Oliver Hunt.
2366
2367        Fixed a weak-handle-related leak in RegisterFile
2368        https://bugs.webkit.org/show_bug.cgi?id=57793
2369
2370        * interpreter/RegisterFile.cpp: Nixed leaky GlobalObjectNotifier.
2371        * interpreter/RegisterFile.h:
2372        (JSC::RegisterFile::GlobalObjectOwner::finalize):
2373        (JSC::RegisterFile::RegisterFile): Replaced GlobalObjectNotifier with
2374        a per-RegisterFile weak handle owner, which does not leak.
2375
2376        * runtime/WeakGCPtr.h:
2377        (JSC::WeakGCPtr::set): Allow set() to take a context argument, since
2378        RegisterFile now needs this. (Seems like it was an accidental omission
2379        all along.)
2380
23812011-04-04  Oliver Hunt  <oliver@apple.com>
2382
2383        Reviewed by Geoffrey Garen.
2384
2385        Make malloc validation useful
2386        https://bugs.webkit.org/show_bug.cgi?id=57502
2387
2388        This patch changes FAST_MALLOC_MATCH_VALIDATION with a general
2389        corruption check that tags the beginning and end of all allocations
2390        to check for write overflows and overwrites the contents of
2391        memory on free in order to (hopefully) show up use-after-free issues
2392        sooner.
2393
2394        We also turn it on by default for debug builds.
2395
2396        * JavaScriptCore.exp:
2397        * wtf/FastMalloc.cpp:
2398        (WTF::tryFastMalloc):
2399        (WTF::fastMalloc):
2400        (WTF::tryFastCalloc):
2401        (WTF::fastCalloc):
2402        (WTF::fastFree):
2403        (WTF::tryFastRealloc):
2404        (WTF::fastRealloc):
2405        (WTF::TCMalloc_PageHeap::isScavengerSuspended):
2406        (WTF::TCMalloc_PageHeap::scheduleScavenger):
2407        (WTF::TCMalloc_PageHeap::suspendScavenger):
2408        (WTF::TCMalloc_PageHeap::signalScavenger):
2409        (WTF::TCMallocStats::malloc):
2410        (WTF::TCMallocStats::free):
2411        (WTF::TCMallocStats::fastCalloc):
2412        (WTF::TCMallocStats::tryFastCalloc):
2413        (WTF::TCMallocStats::calloc):
2414        (WTF::TCMallocStats::fastRealloc):
2415        (WTF::TCMallocStats::tryFastRealloc):
2416        (WTF::TCMallocStats::realloc):
2417        * wtf/FastMalloc.h:
2418        (WTF::Internal::fastMallocValidationHeader):
2419        (WTF::Internal::fastMallocValidationSuffix):
2420        (WTF::Internal::fastMallocMatchValidationType):
2421        (WTF::Internal::setFastMallocMatchValidationType):
2422        (WTF::fastMallocMatchValidateFree):
2423        (WTF::fastMallocValidate):
2424        * wtf/Platform.h:
2425
24262011-04-04  Geoffrey Garen  <ggaren@apple.com>
2427
2428        Reviewed by Oliver Hunt.
2429
2430        Renamed clearWeakPointers => updateWeakHandles and removed misleading comment
2431        https://bugs.webkit.org/show_bug.cgi?id=57790
2432
2433        * collector/handles/HandleHeap.cpp:
2434        (JSC::HandleHeap::updateWeakHandles): Updated for rename.
2435
2436        * collector/handles/HandleHeap.h: Removed comment claiming that this
2437        function should only be called during teardown, because it's actually
2438        called after every GC pass.
2439
2440        * runtime/Heap.cpp:
2441        (JSC::Heap::destroy):
2442        (JSC::Heap::markRoots): Updated for rename.
2443
24442011-04-04  Geoffrey Garen  <ggaren@apple.com>
2445
2446        Reviewed by Oliver Hunt.
2447
2448        Standardized handling of handles for immediate values
2449        https://bugs.webkit.org/show_bug.cgi?id=57788
2450
2451        * collector/handles/HandleHeap.cpp:
2452        (JSC::HandleHeap::clearWeakPointers): Don't check for null or non-cell
2453        values here, because our write barrier guarantees that such values are
2454        not in the weak list.
2455
2456        (JSC::HandleHeap::writeBarrier): Standardized on checking for null before
2457        checking for cell, and on using early return instead of if/else.
2458
2459        * collector/handles/HandleHeap.h:
2460        (JSC::HandleHeap::deallocate):
2461        (JSC::HandleHeap::makeWeak): Ditto.
2462
24632011-04-04  Geoffrey Garen  <ggaren@apple.com>
2464
2465        Not reviewed.
2466
2467        Removed a redundant variable from HandleHeap
2468        https://bugs.webkit.org/show_bug.cgi?id=57786
2469
2470        Forgot to commit the file that actually removes the data member!
2471
2472        * collector/handles/HandleHeap.h:
2473
24742011-04-04  Geoffrey Garen  <ggaren@apple.com>
2475
2476        Reviewed by Oliver Hunt.
2477
2478        Removed a redundant variable from HandleHeap
2479        https://bugs.webkit.org/show_bug.cgi?id=57786
2480
2481        We don't need a specific variable to indicate that we're in the middle
2482        of the finalization phase, since m_nextToFinalize already does this.
2483
2484        * collector/handles/HandleHeap.cpp:
2485        (JSC::HandleHeap::HandleHeap):
2486        (JSC::HandleHeap::clearWeakPointers):
2487        (JSC::HandleHeap::writeBarrier):
2488
24892011-04-04  Geoffrey Garen  <ggaren@apple.com>
2490
2491        Reviewed by Oliver Hunt.
2492
2493        Renamed Finalizer => WeakHandleOwner (in preparation for adding a reachability callback)
2494        https://bugs.webkit.org/show_bug.cgi?id=57775
2495
2496        Also renamed noFinalizer => emptyWeakOwner, since this is really an
2497        optimization for a weak owner with empty callbacks.
2498
2499        * collector/handles/HandleHeap.cpp:
2500        (JSC::HandleHeap::clearWeakPointers): Updated for renames. Removed
2501        redundant initialization of m_nextToFinalize. Moved deletion check inside
2502        weak owner check, since the weak owner can't delete the node if there is
2503        no weak owner!
2504
2505        * collector/handles/HandleHeap.h:
2506        (JSC::WeakHandleOwner::~WeakHandleOwner):
2507        (JSC::HandleHeap::makeWeak): Updated for renames.
2508
2509        (JSC::HandleHeap::hasWeakOwner): Changed getFinalizer to hasWeakOwner,
2510        to clarify this function's role in assertions.
2511
2512        (JSC::HandleHeap::Node::Node):
2513        (JSC::HandleHeap::Node::makeWeak):
2514        (JSC::HandleHeap::Node::isWeak):
2515        (JSC::HandleHeap::Node::weakOwner):
2516        (JSC::HandleHeap::Node::weakOwnerContext):
2517        (JSC::HandleHeap::Node::emptyWeakOwner):
2518        * interpreter/RegisterFile.cpp:
2519        (JSC::RegisterFile::globalObjectCollectedNotifier):
2520        * interpreter/RegisterFile.h:
2521        * runtime/WeakGCMap.h:
2522        * runtime/WeakGCPtr.h:
2523        (JSC::WeakGCPtr::WeakGCPtr):
2524        (JSC::WeakGCPtr::set): Updated for renames.
2525
25262011-04-04  Oliver Hunt  <oliver@apple.com>
2527
2528        Fix WinCE build.
2529
2530        * bytecode/Instruction.h:
2531        * interpreter/Interpreter.cpp:
2532        (JSC::Interpreter::tryCachePutByID):
2533        (JSC::Interpreter::tryCacheGetByID):
2534
25352011-04-04  Adam Roben  <aroben@apple.com>
2536
2537        Delete mt.dep files when doing a clean build due to .vsprops file changes
2538
2539        Apparently this is yet another file that Visual Studio can't figure out it needs to rebuild.
2540
2541        Fixes <http://webkit.org/b/57777> r82850 failed to build on Windows Debug (Build)
2542
2543        Reviewed by Brian Weinstein.
2544
2545        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
2546        (main): Added dep to the list of extensions we look for when choosing files to delete.
2547
25482011-04-01  Oliver Hunt  <oliver@apple.com>
2549
2550        Reviewed by Geoffrey Garen.
2551
2552        Make StructureChain GC allocated
2553        https://bugs.webkit.org/show_bug.cgi?id=56695
2554
2555        Make StructureChain GC allocated, and make the various owners
2556        mark it correctly.
2557
2558        * JavaScriptCore.exp:
2559        * bytecode/CodeBlock.cpp:
2560        (JSC::CodeBlock::dump):
2561        (JSC::CodeBlock::derefStructures):
2562        (JSC::CodeBlock::refStructures):
2563        (JSC::CodeBlock::markAggregate):
2564        * bytecode/Instruction.h:
2565        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2566        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2567        (JSC::PolymorphicAccessStructureList::derefStructures):
2568        (JSC::PolymorphicAccessStructureList::markAggregate):
2569        (JSC::Instruction::Instruction):
2570        * bytecode/StructureStubInfo.cpp:
2571        (JSC::StructureStubInfo::deref):
2572        (JSC::StructureStubInfo::markAggregate):
2573        * bytecode/StructureStubInfo.h:
2574        (JSC::StructureStubInfo::initGetByIdChain):
2575        (JSC::StructureStubInfo::initPutByIdTransition):
2576        * bytecompiler/BytecodeGenerator.cpp:
2577        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2578        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2579        * collector/handles/Handle.h:
2580        (JSC::HandleConverter::operator->):
2581        (JSC::HandleConverter::operator*):
2582        * interpreter/Interpreter.cpp:
2583        (JSC::Interpreter::privateExecute):
2584        * jit/JITOpcodes.cpp:
2585        (JSC::JIT::emit_op_jneq_ptr):
2586        * jit/JITOpcodes32_64.cpp:
2587        (JSC::JIT::emit_op_jneq_ptr):
2588        * jit/JITPropertyAccess.cpp:
2589        (JSC::JIT::privateCompileGetByIdChainList):
2590        * jit/JITPropertyAccess32_64.cpp:
2591        (JSC::JIT::privateCompileGetByIdChainList):
2592        * jit/JITStubs.cpp:
2593        (JSC::JITThunks::tryCachePutByID):
2594        (JSC::JITThunks::tryCacheGetByID):
2595        (JSC::getPolymorphicAccessStructureListSlot):
2596        (JSC::DEFINE_STUB_FUNCTION):
2597        * runtime/JSCell.h:
2598        * runtime/JSGlobalData.cpp:
2599        (JSC::JSGlobalData::JSGlobalData):
2600        * runtime/JSGlobalData.h:
2601        * runtime/JSGlobalObject.cpp:
2602        (JSC::markIfNeeded):
2603        * runtime/JSGlobalObject.h:
2604        (JSC::Structure::prototypeChain):
2605        * runtime/JSObject.h:
2606        (JSC::JSObject::putDirectInternal):
2607        (JSC::JSObject::markChildrenDirect):
2608        * runtime/JSPropertyNameIterator.cpp:
2609        (JSC::JSPropertyNameIterator::create):
2610        (JSC::JSPropertyNameIterator::get):
2611        (JSC::JSPropertyNameIterator::markChildren):
2612        * runtime/JSPropertyNameIterator.h:
2613        (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2614        * runtime/JSZombie.cpp:
2615        (JSC::JSZombie::leakedZombieStructure):
2616        * runtime/JSZombie.h:
2617        * runtime/MarkStack.h:
2618        (JSC::MarkStack::append):
2619        * runtime/MarkedBlock.cpp:
2620        (JSC::MarkedBlock::sweep):
2621        * runtime/Structure.cpp:
2622        (JSC::Structure::addPropertyTransition):
2623        * runtime/Structure.h:
2624        (JSC::Structure::markAggregate):
2625        * runtime/StructureChain.cpp:
2626        (JSC::StructureChain::StructureChain):
2627        (JSC::StructureChain::~StructureChain):
2628        (JSC::StructureChain::markChildren):
2629        * runtime/StructureChain.h:
2630        (JSC::StructureChain::create):
2631        (JSC::StructureChain::createStructure):
2632        * runtime/WriteBarrier.h:
2633        (JSC::WriteBarrierBase::get):
2634        (JSC::WriteBarrierBase::operator*):
2635        (JSC::WriteBarrierBase::operator->):
2636
26372011-04-01  Geoffrey Garen  <ggaren@apple.com>
2638
2639        Reviewed by Oliver Hunt.
2640
2641        Removed some complexity from HandleHeap
2642        https://bugs.webkit.org/show_bug.cgi?id=57650
2643
2644        Eliminated pointer-tagging flags.
2645
2646        Tied being weak to having a finalizer (or at least a finalizer sentinel).
2647
2648        * collector/handles/HandleHeap.cpp:
2649        (JSC::HandleHeap::clearWeakPointers): Removed the special self-destroying
2650        flag. It was unused. If we bring it back, we'll probably use a shared
2651        autodeallocating finalizer instead.
2652
2653        * collector/handles/HandleHeap.h:
2654        (JSC::HandleHeap::makeWeak): makeWeak and adding a finalizer are now
2655        a single, atomic operation -- this makes the relationship between
2656        finalizers and weak pointers clearer, and impossible to get wrong.
2657
2658        (JSC::HandleHeap::Node::Node):
2659        (JSC::HandleHeap::Node::handleHeap): No more flags.
2660
2661        (JSC::HandleHeap::Node::makeWeak):
2662        (JSC::HandleHeap::Node::isWeak): Ditto above. We use a special sentienl
2663        value in the finalizer slot to indicate that a handle is weak but doesn't
2664        require an external function call for finalization.
2665
26662011-04-01  Geoffrey Garen  <ggaren@apple.com>
2667
2668        Reviewed by Oliver Hunt.
2669
2670        Removed WeakGCMap::deprecatedRemove because it was deprecated and unused
2671        https://bugs.webkit.org/show_bug.cgi?id=57648
2672
2673        * runtime/WeakGCMap.h:
2674
26752011-04-01  Adam Roben  <aroben@apple.com>
2676
2677        Maintain the invariant that Lexer::m_current is set to -1 when at the end of the code buffer
2678
2679        Covered by existing tests.
2680
2681        Fixes <http://webkit.org/b/56699>.
2682
2683        Reviewed by Oliver Hunt.
2684
2685        * parser/Lexer.h:
2686        (JSC::Lexer::setOffset): Copied code from Lexer::shift to update m_current, because
2687        supposedly the idiom that function uses is fast.
2688
26892011-03-31  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
2690
2691        Reviewed by Oliver Hunt.
2692
2693        SH4 JIT SUPPORT.
2694        https://bugs.webkit.org/show_bug.cgi?id=44329
2695
2696        Add YARR support for SH4 platforms (disabled by default).
2697
2698        * GNUmakefile.am:
2699        * assembler/MacroAssembler.h:
2700        * assembler/MacroAssemblerSH4.cpp: Added.
2701        * assembler/MacroAssemblerSH4.h: Added.
2702        * assembler/SH4Assembler.h: Added.
2703        * yarr/YarrJIT.cpp:
2704
27052011-03-30  Adam Roben  <aroben@apple.com>
2706
2707        Clean build fix
2708
2709        * JavaScriptCore.vcproj/JavaScriptCore.sln: Serialized project dependencies so projects
2710        don't try to build in parallel (which doesn't mesh with our buildfailed mechanism).
2711
27122011-03-30  Oliver Hunt  <oliver@apple.com>
2713
2714        Rollout r82500
2715
2716        * bytecode/CodeBlock.cpp:
2717        (JSC::CodeBlock::dump):
2718        (JSC::CodeBlock::derefStructures):
2719        (JSC::CodeBlock::refStructures):
2720        (JSC::CodeBlock::markAggregate):
2721        * bytecode/Instruction.h:
2722        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2723        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2724        (JSC::PolymorphicAccessStructureList::derefStructures):
2725        (JSC::Instruction::Instruction):
2726        * bytecode/StructureStubInfo.cpp:
2727        (JSC::StructureStubInfo::deref):
2728        * bytecode/StructureStubInfo.h:
2729        (JSC::StructureStubInfo::initGetByIdChain):
2730        (JSC::StructureStubInfo::initPutByIdTransition):
2731        * bytecompiler/BytecodeGenerator.cpp:
2732        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2733        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2734        * interpreter/Interpreter.cpp:
2735        (JSC::Interpreter::privateExecute):
2736        * jit/JITOpcodes.cpp:
2737        (JSC::JIT::emit_op_jneq_ptr):
2738        * jit/JITOpcodes32_64.cpp:
2739        (JSC::JIT::emit_op_jneq_ptr):
2740        * jit/JITPropertyAccess.cpp:
2741        (JSC::JIT::privateCompileGetByIdChainList):
2742        * jit/JITPropertyAccess32_64.cpp:
2743        (JSC::JIT::privateCompileGetByIdChainList):
2744        * jit/JITStubs.cpp:
2745        (JSC::getPolymorphicAccessStructureListSlot):
2746        (JSC::DEFINE_STUB_FUNCTION):
2747        * runtime/JSCell.h:
2748        * runtime/JSGlobalData.cpp:
2749        (JSC::JSGlobalData::JSGlobalData):
2750        * runtime/JSGlobalData.h:
2751        * runtime/JSGlobalObject.cpp:
2752        (JSC::markIfNeeded):
2753        * runtime/JSGlobalObject.h:
2754        (JSC::Structure::prototypeChain):
2755        * runtime/JSObject.h:
2756        (JSC::JSObject::markChildrenDirect):
2757        * runtime/JSPropertyNameIterator.cpp:
2758        (JSC::JSPropertyNameIterator::create):
2759        (JSC::JSPropertyNameIterator::get):
2760        (JSC::JSPropertyNameIterator::markChildren):
2761        * runtime/JSPropertyNameIterator.h:
2762        (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2763        * runtime/MarkStack.h:
2764        (JSC::MarkStack::append):
2765        * runtime/Structure.h:
2766        * runtime/StructureChain.cpp:
2767        (JSC::StructureChain::StructureChain):
2768        * runtime/StructureChain.h:
2769        (JSC::StructureChain::create):
2770
27712011-03-29  Matthew Delaney  <mdelaney@apple.com>
2772
2773        Reviewed by Simon Fraser.
2774
2775        Use the Accelerate vImage vectorized (un)premultiplyImageData functions for ImageBufferCG
2776
2777        https://bugs.webkit.org/show_bug.cgi?id=53134
2778
2779        * wtf/Platform.h: Added in WTF flag for using the Accelerate framework
2780
27812011-03-30  Steve Falkenburg  <sfalken@apple.com>
2782
2783        Reviewed by Adam Roben.
2784
2785        Share most vsprops between Release and Production builds in releaseproduction.vsprops
2786        https://bugs.webkit.org/show_bug.cgi?id=57508
2787
2788        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
2789        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops:
2790        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops:
2791        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
2792        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
2793        * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
2794        * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops:
2795        * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops:
2796        * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
2797        * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
2798        * JavaScriptCore.vcproj/jsc/jscRelease.vsprops:
2799        * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops:
2800        * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
2801        * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
2802        * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops:
2803        * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops:
2804
28052011-03-30  Mark Rowe  <mrowe@apple.com>
2806
2807        Reviewed by Adam Roben.
2808
2809        Explicitly prevent testapi and minidom from being installed rather than relying
2810        on Xcode's current behavior of not installing if INSTALL_PATH is not explicitly
2811        set at the target level.
2812
2813        <rdar://problem/9206357>
2814
2815        * JavaScriptCore.xcodeproj/project.pbxproj:
2816
28172011-03-30  Timur Iskhodzhanov  <timurrrr@google.com>
2818
2819        Reviewed by Alexey Proskuryakov.
2820
2821        Add some dynamic annotations to JavaScriptCore/wtf
2822        https://bugs.webkit.org/show_bug.cgi?id=53747
2823
2824        By using these annotations we can improve the precision of finding
2825        WebKit errors using dynamic analysis tools like ThreadSanitizer and Valgrind.
2826        These annotations don't affect the compiled binaries unless USE(DYNAMIC_ANNOTATIONS) is "1".
2827
2828        These files don't add new functionality, so don't need extra tests.
2829
2830        * GNUmakefile.am:
2831        * JavaScriptCore.gypi:
2832        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2833        * JavaScriptCore.xcodeproj/project.pbxproj:
2834        * wtf/CMakeLists.txt:
2835        * wtf/DynamicAnnotations.cpp: Added.
2836        (WTFAnnotateBenignRaceSized):
2837        (WTFAnnotateHappensBefore):
2838        (WTFAnnotateHappensAfter):
2839        * wtf/DynamicAnnotations.h: Added.
2840        * wtf/ThreadSafeRefCounted.h:
2841        (WTF::ThreadSafeRefCountedBase::derefBase):
2842        * wtf/text/StringStatics.cpp:
2843        (WTF::StringImpl::empty):
2844
28452011-03-30  Oliver Hunt  <oliver@apple.com>
2846
2847        Reviewed by Geoffrey Garen.
2848
2849        Make StructureChain GC allocated
2850        https://bugs.webkit.org/show_bug.cgi?id=56695
2851
2852        Make StructureChain GC allocated, and make the various owners
2853        mark it correctly.
2854
2855        * bytecode/CodeBlock.cpp:
2856        (JSC::CodeBlock::dump):
2857        (JSC::CodeBlock::derefStructures):
2858        (JSC::CodeBlock::refStructures):
2859        (JSC::CodeBlock::markAggregate):
2860        * bytecode/Instruction.h:
2861        (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
2862        (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
2863        (JSC::PolymorphicAccessStructureList::derefStructures):
2864        (JSC::PolymorphicAccessStructureList::markAggregate):
2865        (JSC::Instruction::Instruction):
2866        * bytecode/StructureStubInfo.cpp:
2867        (JSC::StructureStubInfo::deref):
2868        (JSC::StructureStubInfo::markAggregate):
2869        * bytecode/StructureStubInfo.h:
2870        (JSC::StructureStubInfo::initGetByIdChain):
2871        (JSC::StructureStubInfo::initPutByIdTransition):
2872        * bytecompiler/BytecodeGenerator.cpp:
2873        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
2874        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
2875        * interpreter/Interpreter.cpp:
2876        (JSC::Interpreter::privateExecute):
2877        * jit/JITOpcodes.cpp:
2878        (JSC::JIT::emit_op_jneq_ptr):
2879        * jit/JITOpcodes32_64.cpp:
2880        (JSC::JIT::emit_op_jneq_ptr):
2881        * jit/JITPropertyAccess.cpp:
2882        (JSC::JIT::privateCompileGetByIdChainList):
2883        * jit/JITPropertyAccess32_64.cpp:
2884        (JSC::JIT::privateCompileGetByIdChainList):
2885        * jit/JITStubs.cpp:
2886        (JSC::getPolymorphicAccessStructureListSlot):
2887        (JSC::DEFINE_STUB_FUNCTION):
2888        * runtime/JSCell.h:
2889        * runtime/JSGlobalData.cpp:
2890        (JSC::JSGlobalData::JSGlobalData):
2891        * runtime/JSGlobalData.h:
2892        * runtime/JSGlobalObject.cpp:
2893        (JSC::markIfNeeded):
2894        * runtime/JSGlobalObject.h:
2895        (JSC::Structure::prototypeChain):
2896        * runtime/JSObject.h:
2897        (JSC::JSObject::markChildrenDirect):
2898        * runtime/JSPropertyNameIterator.cpp:
2899        (JSC::JSPropertyNameIterator::create):
2900        (JSC::JSPropertyNameIterator::get):
2901        (JSC::JSPropertyNameIterator::markChildren):
2902        * runtime/JSPropertyNameIterator.h:
2903        (JSC::JSPropertyNameIterator::setCachedPrototypeChain):
2904        * runtime/MarkStack.h:
2905        (JSC::MarkStack::append):
2906        * runtime/Structure.h:
2907        (JSC::Structure::cachedPrototypeChainSlot):
2908        * runtime/StructureChain.cpp:
2909        (JSC::StructureChain::StructureChain):
2910        * runtime/StructureChain.h:
2911        (JSC::StructureChain::create):
2912        (JSC::StructureChain::createStructure):
2913
29142011-03-30  Steve Falkenburg  <sfalken@apple.com>
2915
2916        Reviewed by Adam Roben.
2917
2918        Update Windows production build logic for new production configurations
2919        https://bugs.webkit.org/show_bug.cgi?id=57494
2920
2921        * JavaScriptCore.vcproj/JavaScriptCore.make:
2922        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops:
2923        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops:
2924        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops:
2925        * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops:
2926        * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops:
2927        * JavaScriptCore.vcproj/jsc/jscProduction.vsprops:
2928        * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops:
2929        * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops:
2930
29312011-03-30  Steve Falkenburg  <sfalken@apple.com>
2932
2933        Reviewed by Adam Roben.
2934
2935        Rename Windows configuration Release_LTCG to Production for clarity
2936        https://bugs.webkit.org/show_bug.cgi?id=57465
2937
2938        * JavaScriptCore.vcproj/JavaScriptCore.sln:
2939        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2940        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2941        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops.
2942        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Removed.
2943        * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
2944        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2945        * JavaScriptCore.vcproj/WTF/WTFProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops.
2946        * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Removed.
2947        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2948        * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops.
2949        * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Removed.
2950        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2951        * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Copied from Source/JavaScriptCore/JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops.
2952        * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Removed.
2953
29542011-03-30  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
2955
2956        Reviewed by Maciej Stachowiak.
2957
2958        Add the NEXT_OPCODE() macro to the DFG-JIT parser
2959        https://bugs.webkit.org/show_bug.cgi?id=57322
2960
2961        In JavaScriptCore we use macros to jump to the next opcode
2962        (both in interpreter and JIT). This macro is added to the
2963        DFG-JIT parser as well.
2964
2965        * dfg/DFGByteCodeParser.cpp:
2966        (JSC::DFG::ByteCodeParser::parse):
2967
29682011-03-29  Geoffrey Garen  <ggaren@apple.com>
2969
2970        Reviewed by Darin Adler.
2971
2972        ~25% regression on v8-splay in the SunSpider harness
2973        https://bugs.webkit.org/show_bug.cgi?id=56128
2974
2975        I'm not sure if this is the root cause of the regression Stephanie
2976        measured, but it seems to get us back to previous v8-splay times.
2977
2978        SunSpider reports no change. v8-splay says 41% faster.
2979
2980        * runtime/Heap.cpp:
2981        (JSC::Heap::reset): Make marking proportional to 1X the size of the heap,
2982        not .5X the size of the heap. When the heap is large, this makes a big
2983        difference. (Our old heap growth policy matched this. You can see by
2984        looking at resizeBlocks in revisions prior to r77699.)
2985
29862011-03-29  Steve Falkenburg  <sfalken@apple.com>
2987
2988        Reviewed by Darin Adler.
2989
2990        Use per-configuration vsprops in JavaScriptCore to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
2991        https://bugs.webkit.org/show_bug.cgi?id=57350
2992
2993        Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
2994        InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
2995        the IDE. To avoid this, add a separate vsprops file for each project configuration that
2996        contains the required inherited property sheets.
2997
2998        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2999        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Added.
3000        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Added.
3001        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Added.
3002        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Added.
3003        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Added.
3004        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseLTCG.vsprops: Added.
3005        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Added.
3006        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Added.
3007        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3008        * JavaScriptCore.vcproj/WTF/WTFDebug.vsprops: Added.
3009        * JavaScriptCore.vcproj/WTF/WTFDebugAll.vsprops: Added.
3010        * JavaScriptCore.vcproj/WTF/WTFDebugCairoCFLite.vsprops: Added.
3011        * JavaScriptCore.vcproj/WTF/WTFRelease.vsprops: Added.
3012        * JavaScriptCore.vcproj/WTF/WTFReleaseCairoCFLite.vsprops: Added.
3013        * JavaScriptCore.vcproj/WTF/WTFReleaseLTCG.vsprops: Added.
3014        * JavaScriptCore.vcproj/WTF/WTFReleasePGO.vsprops: Added.
3015        * JavaScriptCore.vcproj/jsc/jsc.vcproj:
3016        * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Added.
3017        * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Added.
3018        * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Added.
3019        * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Added.
3020        * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Added.
3021        * JavaScriptCore.vcproj/jsc/jscReleaseLTCG.vsprops: Added.
3022        * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Added.
3023        * JavaScriptCore.vcproj/testapi/testapi.vcproj:
3024        * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Added.
3025        * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Added.
3026        * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Added.
3027        * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Added.
3028        * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Added.
3029        * JavaScriptCore.vcproj/testapi/testapiReleaseLTCG.vsprops: Added.
3030
30312011-03-29  Oliver Hunt  <oliver@apple.com>
3032
3033        Reviewed by Eric Seidel.
3034
3035        REGRESSION(r82173): Causes assertion and test failures in run-javascriptcore-tests on Windows (Requested by aroben on #webkit).
3036        https://bugs.webkit.org/show_bug.cgi?id=57333
3037
3038        constructDate now takes the global object explicitly as it may be called
3039        by functions other than the constructor itself.
3040
3041        * API/JSObjectRef.cpp:
3042        (JSObjectMakeDate):
3043        * runtime/DateConstructor.cpp:
3044        (JSC::constructDate):
3045        (JSC::constructWithDateConstructor):
3046        * runtime/DateConstructor.h:
3047
30482011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
3049
3050        Reviewed by Benjamin Poulain.
3051
3052        https://bugs.webkit.org/show_bug.cgi?id=41953
3053
3054        Fix compile error on Solaris 10/Sun Studio 12 CC emanating from MathExtras.h
3055
3056        * wtf/MathExtras.h:
3057
30582011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
3059
3060        Reviewed by Darin Adler.
3061
3062        https://bugs.webkit.org/show_bug.cgi?id=57231
3063        Add conditional for SUNCC supporting alignment macros
3064
3065        Compile fix for Solaris 10/Sun Studio 12 CC
3066
3067        * wtf/Vector.h:
3068
30692011-03-29  Ben Taylor  <bentaylor.solx86@gmail.com>
3070
3071        Reviewed by Darin Adler.
3072
3073        https://bugs.webkit.org/show_bug.cgi?id=57256
3074
3075        Fix crash on misaligned reads on Solaris 10/Sparc
3076
3077        * wtf/text/AtomicString.cpp:
3078        (WTF::equal):
3079
30802011-03-28  Oliver Hunt  <oliver@apple.com>
3081
3082        Reviewed by Geoffrey Garen.
3083
3084        instanceof Array test fails when using iframes
3085        https://bugs.webkit.org/show_bug.cgi?id=17250
3086
3087        This is a problem with all built in constructors, the use of
3088        lexicalGlobalObject rather than the constructors own
3089        global object reference means that a builtin will always use
3090        the prototype from the lexical global object rather than that
3091        of the constructors origin.
3092
3093        * API/JSObjectRef.cpp:
3094        (JSObjectMakeFunction):
3095        (JSObjectMakeRegExp):
3096        * JavaScriptCore.exp:
3097        * runtime/ArrayConstructor.cpp:
3098        (JSC::constructArrayWithSizeQuirk):
3099        * runtime/BooleanConstructor.cpp:
3100        (JSC::constructBoolean):
3101        (JSC::constructBooleanFromImmediateBoolean):
3102        * runtime/BooleanConstructor.h:
3103        * runtime/DateConstructor.cpp:
3104        (JSC::constructDate):
3105        * runtime/DateInstance.cpp:
3106        * runtime/DateInstance.h:
3107        * runtime/ErrorConstructor.cpp:
3108        (JSC::constructWithErrorConstructor):
3109        (JSC::callErrorConstructor):
3110        * runtime/FunctionConstructor.cpp:
3111        (JSC::constructWithFunctionConstructor):
3112        (JSC::callFunctionConstructor):
3113        (JSC::constructFunction):
3114        * runtime/FunctionConstructor.h:
3115        * runtime/JSCell.cpp:
3116        (JSC::JSCell::getOwnPropertySlot):
3117        (JSC::JSCell::put):
3118        (JSC::JSCell::deleteProperty):
3119        (JSC::JSCell::toThisObject):
3120        (JSC::JSCell::toObject):
3121        * runtime/JSCell.h:
3122        (JSC::JSCell::JSValue::toObject):
3123        * runtime/JSNotAnObject.cpp:
3124        (JSC::JSNotAnObject::toObject):
3125        * runtime/JSNotAnObject.h:
3126        * runtime/JSObject.cpp:
3127        (JSC::JSObject::toObject):
3128        * runtime/JSObject.h:
3129        * runtime/JSString.cpp:
3130        (JSC::StringObject::create):
3131        (JSC::JSString::toObject):
3132        (JSC::JSString::toThisObject):
3133        * runtime/JSString.h:
3134        * runtime/JSValue.cpp:
3135        (JSC::JSValue::toObjectSlowCase):
3136        (JSC::JSValue::toThisObjectSlowCase):
3137        (JSC::JSValue::synthesizeObject):
3138        * runtime/JSValue.h:
3139        * runtime/NumberConstructor.cpp:
3140        (JSC::constructWithNumberConstructor):
3141        * runtime/NumberObject.cpp:
3142        (JSC::constructNumber):
3143        * runtime/NumberObject.h:
3144        * runtime/ObjectConstructor.cpp:
3145        (JSC::constructObject):
3146        (JSC::constructWithObjectConstructor):
3147        (JSC::callObjectConstructor):
3148        * runtime/RegExpConstructor.cpp:
3149        (JSC::constructRegExp):
3150        (JSC::constructWithRegExpConstructor):
3151        (JSC::callRegExpConstructor):
3152        * runtime/RegExpConstructor.h:
3153        * runtime/StringConstructor.cpp:
3154        (JSC::constructWithStringConstructor):
3155        * runtime/StringObject.h:
3156
31572011-03-28  Geoffrey Garen  <ggaren@apple.com>
3158
3159        Reviewed by Oliver Hunt.
3160
3161        REGRESSION [r78794-r79249] Allocation of memory is slow when number of active objects is large
3162        https://bugs.webkit.org/show_bug.cgi?id=56823
3163
3164        Partial fix for most of the problem. (TOT still shows a regression, though.)
3165
3166        * runtime/Heap.cpp:
3167        (JSC::Heap::reportExtraMemoryCostSlowCase): Use highWaterMark(), instead of
3168        capacity(), since capacity() is O(n) relative to the size of the heap.
3169
3170        In limited circumstances, capacity() is also worse than highWaterMark()
3171        for measuring extra cost relative to heap size, since capacity() only
3172        measures the *current* capacity of the heap, but the heap will grow if
3173        necessary to attain highWaterMark().
3174
31752011-03-28  Oliver Hunt  <oliver@apple.com>
3176
3177        REGRESSION(r82130): It made all tests crash (Requested by Ossy on #webkit).
3178        https://bugs.webkit.org/show_bug.cgi?id=57251
3179
3180        Build fix, had remnant of another patch in r82130
3181
3182        * jit/JITPropertyAccess.cpp:
3183        (JSC::JIT::privateCompileGetByIdChainList):
3184
31852011-03-27  Oliver Hunt  <oliver@apple.com>
3186
3187        Reviewed by Maciej Stachowiak.
3188
3189        Add additional immediate types to allow us to distinguish the source of a JIT immediate
3190        https://bugs.webkit.org/show_bug.cgi?id=57190
3191
3192        Allow us to distinguish whether a JIT immediate is a value that we
3193        control (TrustedImm32 and TrustedImmPtr) vs. ones that can be controlled
3194        or influenced by code we are compiling.  Currently we do nothing with this
3195        information -- this change is large and mechanical but would obscure any
3196        logic changes that we would have made.
3197
3198        * assembler/AbstractMacroAssembler.h:
3199        (JSC::AbstractMacroAssembler::TrustedImmPtr::TrustedImmPtr):
3200        (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
3201        (JSC::AbstractMacroAssembler::TrustedImm32::TrustedImm32):
3202        (JSC::AbstractMacroAssembler::Imm32::Imm32):
3203        * assembler/MacroAssembler.h:
3204        (JSC::MacroAssembler::pop):
3205        (JSC::MacroAssembler::poke):
3206        (JSC::MacroAssembler::branchPtr):
3207        (JSC::MacroAssembler::branch32):
3208        (JSC::MacroAssembler::addPtr):
3209        (JSC::MacroAssembler::andPtr):
3210        (JSC::MacroAssembler::orPtr):
3211        (JSC::MacroAssembler::subPtr):
3212        (JSC::MacroAssembler::xorPtr):
3213        (JSC::MacroAssembler::setPtr):
3214        (JSC::MacroAssembler::storePtr):
3215        (JSC::MacroAssembler::branchTestPtr):
3216        (JSC::MacroAssembler::branchSubPtr):
3217        (JSC::MacroAssembler::branchTest8):
3218        * assembler/MacroAssemblerARM.h:
3219        (JSC::MacroAssemblerARM::add32):
3220        (JSC::MacroAssemblerARM::and32):
3221        (JSC::MacroAssemblerARM::lshift32):
3222        (JSC::MacroAssemblerARM::mul32):
3223        (JSC::MacroAssemblerARM::or32):
3224        (JSC::MacroAssemblerARM::rshift32):
3225        (JSC::MacroAssemblerARM::urshift32):
3226        (JSC::MacroAssemblerARM::sub32):
3227        (JSC::MacroAssemblerARM::xor32):
3228        (JSC::MacroAssemblerARM::store32):
3229        (JSC::MacroAssemblerARM::push):
3230        (JSC::MacroAssemblerARM::move):
3231        (JSC::MacroAssemblerARM::branch8):
3232        (JSC::MacroAssemblerARM::branch32):
3233        (JSC::MacroAssemblerARM::branch32WithUnalignedHalfWords):
3234        (JSC::MacroAssemblerARM::branch16):
3235        (JSC::MacroAssemblerARM::branchTest8):
3236        (JSC::MacroAssemblerARM::branchTest32):
3237        (JSC::MacroAssemblerARM::branchAdd32):
3238        (JSC::MacroAssemblerARM::branchMul32):
3239        (JSC::MacroAssemblerARM::branchSub32):
3240        (JSC::MacroAssemblerARM::set32Compare32):
3241        (JSC::MacroAssemblerARM::set8Compare32):
3242        (JSC::MacroAssemblerARM::set32Test32):
3243        (JSC::MacroAssemblerARM::set32Test8):
3244        (JSC::MacroAssemblerARM::moveWithPatch):
3245        (JSC::MacroAssemblerARM::branchPtrWithPatch):
3246        (JSC::MacroAssemblerARM::storePtrWithPatch):
3247        * assembler/MacroAssemblerARMv7.h:
3248        (JSC::MacroAssemblerARMv7::add32):
3249        (JSC::MacroAssemblerARMv7::and32):
3250        (JSC::MacroAssemblerARMv7::lshift32):
3251        (JSC::MacroAssemblerARMv7::mul32):
3252        (JSC::MacroAssemblerARMv7::or32):
3253        (JSC::MacroAssemblerARMv7::rshift32):
3254        (JSC::MacroAssemblerARMv7::urshift32):
3255        (JSC::MacroAssemblerARMv7::sub32):
3256        (JSC::MacroAssemblerARMv7::xor32):
3257        (JSC::MacroAssemblerARMv7::load32):
3258        (JSC::MacroAssemblerARMv7::load32WithAddressOffsetPatch):
3259        (JSC::MacroAssemblerARMv7::load16):
3260        (JSC::MacroAssemblerARMv7::store32WithAddressOffsetPatch):
3261        (JSC::MacroAssemblerARMv7::store32):
3262        (JSC::MacroAssemblerARMv7::loadDouble):
3263        (JSC::MacroAssemblerARMv7::storeDouble):
3264        (JSC::MacroAssemblerARMv7::push):
3265        (JSC::MacroAssemblerARMv7::move):
3266        (JSC::MacroAssemblerARMv7::compare32):
3267        (JSC::MacroAssemblerARMv7::test32):
3268        (JSC::MacroAssemblerARMv7::branch32):
3269        (JSC::MacroAssemblerARMv7::branch32WithUnalignedHalfWords):
3270        (JSC::MacroAssemblerARMv7::branch16):
3271        (JSC::MacroAssemblerARMv7::branch8):
3272        (JSC::MacroAssemblerARMv7::branchTest32):
3273        (JSC::MacroAssemblerARMv7::branchTest8):
3274        (JSC::MacroAssemblerARMv7::branchAdd32):
3275        (JSC::MacroAssemblerARMv7::branchMul32):
3276        (JSC::MacroAssemblerARMv7::branchSub32):
3277        (JSC::MacroAssemblerARMv7::nearCall):
3278        (JSC::MacroAssemblerARMv7::call):
3279        (JSC::MacroAssemblerARMv7::set32Compare32):
3280        (JSC::MacroAssemblerARMv7::set8Compare32):
3281        (JSC::MacroAssemblerARMv7::set32Test32):
3282        (JSC::MacroAssemblerARMv7::set32Test8):
3283        (JSC::MacroAssemblerARMv7::moveWithPatch):
3284        (JSC::MacroAssemblerARMv7::branchPtrWithPatch):
3285        (JSC::MacroAssemblerARMv7::storePtrWithPatch):
3286        (JSC::MacroAssemblerARMv7::tailRecursiveCall):
3287        (JSC::MacroAssemblerARMv7::makeJump):
3288        (JSC::MacroAssemblerARMv7::makeBranch):
3289        (JSC::MacroAssemblerARMv7::setupArmAddress):
3290        (JSC::MacroAssemblerARMv7::makeBaseIndexBase):
3291        (JSC::MacroAssemblerARMv7::moveFixedWidthEncoding):
3292        * assembler/MacroAssemblerMIPS.h:
3293        (JSC::MacroAssemblerMIPS::add32):
3294        (JSC::MacroAssemblerMIPS::and32):
3295        (JSC::MacroAssemblerMIPS::lshift32):
3296        (JSC::MacroAssemblerMIPS::mul32):
3297        (JSC::MacroAssemblerMIPS::or32):
3298        (JSC::MacroAssemblerMIPS::rshift32):
3299        (JSC::MacroAssemblerMIPS::urshift32):
3300        (JSC::MacroAssemblerMIPS::sub32):
3301        (JSC::MacroAssemblerMIPS::xor32):
3302        (JSC::MacroAssemblerMIPS::load32):
3303        (JSC::MacroAssemblerMIPS::load32WithAddressOffsetPatch):
3304        (JSC::MacroAssemblerMIPS::store32WithAddressOffsetPatch):
3305        (JSC::MacroAssemblerMIPS::store32):
3306        (JSC::MacroAssemblerMIPS::push):
3307        (JSC::MacroAssemblerMIPS::move):
3308        (JSC::MacroAssemblerMIPS::branch8):
3309        (JSC::MacroAssemblerMIPS::branch32):
3310        (JSC::MacroAssemblerMIPS::branch32WithUnalignedHalfWords):
3311        (JSC::MacroAssemblerMIPS::branch16):
3312        (JSC::MacroAssemblerMIPS::branchTest32):
3313        (JSC::MacroAssemblerMIPS::branchTest8):
3314        (JSC::MacroAssemblerMIPS::branchAdd32):
3315        (JSC::MacroAssemblerMIPS::branchMul32):
3316        (JSC::MacroAssemblerMIPS::branchSub32):
3317        (JSC::MacroAssemblerMIPS::set8Compare32):
3318        (JSC::MacroAssemblerMIPS::set32Compare32):
3319        (JSC::MacroAssemblerMIPS::set32Test8):
3320        (JSC::MacroAssemblerMIPS::set32Test32):
3321        (JSC::MacroAssemblerMIPS::moveWithPatch):
3322        (JSC::MacroAssemblerMIPS::branchPtrWithPatch):
3323        (JSC::MacroAssemblerMIPS::storePtrWithPatch):
3324        (JSC::MacroAssemblerMIPS::tailRecursiveCall):
3325        (JSC::MacroAssemblerMIPS::loadDouble):
3326        (JSC::MacroAssemblerMIPS::storeDouble):
3327        (JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32):
3328        * assembler/MacroAssemblerX86.h:
3329        (JSC::MacroAssemblerX86::add32):
3330        (JSC::MacroAssemblerX86::addWithCarry32):
3331        (JSC::MacroAssemblerX86::and32):
3332        (JSC::MacroAssemblerX86::or32):
3333        (JSC::MacroAssemblerX86::sub32):
3334        (JSC::MacroAssemblerX86::store32):
3335        (JSC::MacroAssemblerX86::branch32):
3336        (JSC::MacroAssemblerX86::moveWithPatch):
3337        (JSC::MacroAssemblerX86::branchPtrWithPatch):
3338        (JSC::MacroAssemblerX86::storePtrWithPatch):
3339        * assembler/MacroAssemblerX86Common.h:
3340        (JSC::MacroAssemblerX86Common::add32):
3341        (JSC::MacroAssemblerX86Common::and32):
3342        (JSC::MacroAssemblerX86Common::lshift32):
3343        (JSC::MacroAssemblerX86Common::mul32):
3344        (JSC::MacroAssemblerX86Common::or32):
3345        (JSC::MacroAssemblerX86Common::rshift32):
3346        (JSC::MacroAssemblerX86Common::urshift32):
3347        (JSC::MacroAssemblerX86Common::sub32):
3348        (JSC::MacroAssemblerX86Common::xor32):
3349        (JSC::MacroAssemblerX86Common::store32):
3350        (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
3351        (JSC::MacroAssemblerX86Common::push):
3352        (JSC::MacroAssemblerX86Common::move):
3353        (JSC::MacroAssemblerX86Common::branch8):
3354        (JSC::MacroAssemblerX86Common::branch32):
3355        (JSC::MacroAssemblerX86Common::branch32WithUnalignedHalfWords):
3356        (JSC::MacroAssemblerX86Common::branch16):
3357        (JSC::MacroAssemblerX86Common::branchTest32):
3358        (JSC::MacroAssemblerX86Common::branchTest8):
3359        (JSC::MacroAssemblerX86Common::branchAdd32):
3360        (JSC::MacroAssemblerX86Common::branchMul32):
3361        (JSC::MacroAssemblerX86Common::branchSub32):
3362        (JSC::MacroAssemblerX86Common::set8Compare32):
3363        (JSC::MacroAssemblerX86Common::set32Compare32):
3364        (JSC::MacroAssemblerX86Common::set32Test8):
3365        (JSC::MacroAssemblerX86Common::set32Test32):
3366        * assembler/MacroAssemblerX86_64.h:
3367        (JSC::MacroAssemblerX86_64::add32):
3368        (JSC::MacroAssemblerX86_64::and32):
3369        (JSC::MacroAssemblerX86_64::or32):
3370        (JSC::MacroAssemblerX86_64::sub32):
3371        (JSC::MacroAssemblerX86_64::loadDouble):
3372        (JSC::MacroAssemblerX86_64::addDouble):
3373        (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
3374        (JSC::MacroAssemblerX86_64::store32):
3375        (JSC::MacroAssemblerX86_64::call):
3376        (JSC::MacroAssemblerX86_64::tailRecursiveCall):
3377        (JSC::MacroAssemblerX86_64::makeTailRecursiveCall):
3378        (JSC::MacroAssemblerX86_64::addPtr):
3379        (JSC::MacroAssemblerX86_64::andPtr):
3380        (JSC::MacroAssemblerX86_64::orPtr):
3381        (JSC::MacroAssemblerX86_64::subPtr):
3382        (JSC::MacroAssemblerX86_64::xorPtr):
3383        (JSC::MacroAssemblerX86_64::storePtr):
3384        (JSC::MacroAssemblerX86_64::setPtr):
3385        (JSC::MacroAssemblerX86_64::branchPtr):
3386        (JSC::MacroAssemblerX86_64::branchTestPtr):
3387        (JSC::MacroAssemblerX86_64::branchSubPtr):
3388        (JSC::MacroAssemblerX86_64::moveWithPatch):
3389        (JSC::MacroAssemblerX86_64::branchPtrWithPatch):
3390        (JSC::MacroAssemblerX86_64::storePtrWithPatch):
3391        (JSC::MacroAssemblerX86_64::branchTest8):
3392        * dfg/DFGJITCodeGenerator.h:
3393        (JSC::DFG::JITCodeGenerator::callOperation):
3394        * dfg/DFGJITCompiler.cpp:
3395        (JSC::DFG::JITCompiler::jitAssertIsInt32):
3396        (JSC::DFG::JITCompiler::emitCount):
3397        * dfg/DFGJITCompiler.h:
3398        (JSC::DFG::JITCompiler::emitPutImmediateToCallFrameHeader):
3399        * dfg/DFGNonSpeculativeJIT.cpp:
3400        (JSC::DFG::NonSpeculativeJIT::compile):
3401        * dfg/DFGSpeculativeJIT.cpp:
3402        (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
3403        (JSC::DFG::SpeculativeJIT::compile):
3404        * jit/JIT.cpp:
3405        (JSC::JIT::emitTimeoutCheck):
3406        (JSC::JIT::privateCompile):
3407        * jit/JIT.h:
3408        * jit/JITArithmetic.cpp:
3409        (JSC::JIT::emit_op_urshift):
3410        (JSC::JIT::emitSlow_op_urshift):
3411        (JSC::JIT::emit_op_post_inc):
3412        (JSC::JIT::emit_op_post_dec):
3413        (JSC::JIT::emit_op_pre_inc):
3414        (JSC::JIT::emit_op_pre_dec):
3415        (JSC::JIT::emit_op_mod):
3416        * jit/JITArithmetic32_64.cpp:
3417        (JSC::JIT::emit_op_negate):
3418        (JSC::JIT::emit_op_jnless):
3419        (JSC::JIT::emit_op_jless):
3420        (JSC::JIT::emit_op_jlesseq):
3421        (JSC::JIT::emit_op_lshift):
3422        (JSC::JIT::emitRightShift):
3423        (JSC::JIT::emitRightShiftSlowCase):
3424        (JSC::JIT::emit_op_bitand):
3425        (JSC::JIT::emit_op_bitor):
3426        (JSC::JIT::emit_op_bitxor):
3427        (JSC::JIT::emit_op_bitnot):
3428        (JSC::JIT::emit_op_post_inc):
3429        (JSC::JIT::emit_op_post_dec):
3430        (JSC::JIT::emitSlow_op_post_dec):
3431        (JSC::JIT::emit_op_pre_inc):
3432        (JSC::JIT::emit_op_pre_dec):
3433        (JSC::JIT::emit_op_add):
3434        (JSC::JIT::emitAdd32Constant):
3435        (JSC::JIT::emit_op_sub):
3436        (JSC::JIT::emitSub32Constant):
3437        (JSC::JIT::emitBinaryDoubleOp):
3438        (JSC::JIT::emit_op_mul):
3439        (JSC::JIT::emitSlow_op_mul):
3440        (JSC::JIT::emit_op_div):
3441        (JSC::JIT::emit_op_mod):
3442        * jit/JITCall.cpp:
3443        (JSC::JIT::compileOpCallVarargs):
3444        (JSC::JIT::compileOpCall):
3445        (JSC::JIT::compileOpCallSlowCase):
3446        * jit/JITCall32_64.cpp:
3447        (JSC::JIT::compileOpCallVarargs):
3448        (JSC::JIT::emit_op_ret_object_or_this):
3449        (JSC::JIT::compileOpCall):
3450        (JSC::JIT::compileOpCallSlowCase):
3451        * jit/JITInlineMethods.h:
3452        (JSC::JIT::emitPutCellToCallFrameHeader):
3453        (JSC::JIT::emitPutIntToCallFrameHeader):
3454        (JSC::JIT::emitPutImmediateToCallFrameHeader):
3455        (JSC::JIT::emitLoadCharacterString):
3456        (JSC::JIT::restoreArgumentReferenceForTrampoline):
3457        (JSC::JIT::checkStructure):
3458        (JSC::JIT::setSamplingFlag):
3459        (JSC::JIT::clearSamplingFlag):
3460        (JSC::JIT::emitCount):
3461        (JSC::JIT::sampleInstruction):
3462        (JSC::JIT::sampleCodeBlock):
3463        (JSC::JIT::emitStoreInt32):
3464        (JSC::JIT::emitStoreCell):
3465        (JSC::JIT::emitStoreBool):
3466        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
3467        (JSC::JIT::emitInitRegister):
3468        (JSC::JIT::emitJumpIfJSCell):
3469        (JSC::JIT::emitJumpIfNotJSCell):
3470        (JSC::JIT::emitJumpIfImmediateInteger):
3471        (JSC::JIT::emitJumpIfNotImmediateInteger):
3472        (JSC::JIT::emitFastArithDeTagImmediate):
3473        (JSC::JIT::emitFastArithDeTagImmediateJumpIfZero):
3474        (JSC::JIT::emitFastArithReTagImmediate):
3475        (JSC::JIT::emitTagAsBoolImmediate):
3476        * jit/JITOpcodes.cpp:
3477        (JSC::JIT::privateCompileCTIMachineTrampolines):
3478        (JSC::JIT::privateCompileCTINativeCall):
3479        (JSC::JIT::emit_op_check_has_instance):
3480        (JSC::JIT::emit_op_instanceof):
3481        (JSC::JIT::emit_op_ret_object_or_this):
3482        (JSC::JIT::emit_op_resolve):
3483        (JSC::JIT::emit_op_to_primitive):
3484        (JSC::JIT::emit_op_resolve_base):
3485        (JSC::JIT::emit_op_ensure_property_exists):
3486        (JSC::JIT::emit_op_resolve_skip):
3487        (JSC::JIT::emit_op_resolve_global):
3488        (JSC::JIT::emitSlow_op_resolve_global):
3489        (JSC::JIT::emit_op_not):
3490        (JSC::JIT::emit_op_jfalse):
3491        (JSC::JIT::emit_op_jeq_null):
3492        (JSC::JIT::emit_op_jneq_null):
3493        (JSC::JIT::emit_op_jneq_ptr):
3494        (JSC::JIT::emit_op_jsr):
3495        (JSC::JIT::emit_op_resolve_with_base):
3496        (JSC::JIT::emit_op_new_func_exp):
3497        (JSC::JIT::emit_op_jtrue):
3498        (JSC::JIT::emit_op_get_pnames):
3499        (JSC::JIT::emit_op_next_pname):
3500        (JSC::JIT::emit_op_to_jsnumber):
3501        (JSC::JIT::emit_op_push_new_scope):
3502        (JSC::JIT::emit_op_catch):
3503        (JSC::JIT::emit_op_eq_null):
3504        (JSC::JIT::emit_op_neq_null):
3505        (JSC::JIT::emit_op_init_lazy_reg):
3506        (JSC::JIT::emit_op_convert_this):
3507        (JSC::JIT::emit_op_convert_this_strict):
3508        (JSC::JIT::emitSlow_op_not):
3509        (JSC::JIT::emitSlow_op_neq):
3510        (JSC::JIT::emit_op_get_arguments_length):
3511        (JSC::JIT::emitSlow_op_get_arguments_length):
3512        (JSC::JIT::emit_op_get_argument_by_val):
3513        (JSC::JIT::emitSlow_op_resolve_global_dynamic):
3514        (JSC::JIT::emit_op_new_regexp):
3515        (JSC::JIT::emit_op_load_varargs):
3516        (JSC::JIT::emitSlow_op_load_varargs):
3517        (JSC::JIT::emit_op_new_func):
3518        * jit/JITOpcodes32_64.cpp:
3519        (JSC::JIT::privateCompileCTIMachineTrampolines):
3520        (JSC::JIT::privateCompileCTINativeCall):
3521        (JSC::JIT::emit_op_loop_if_lesseq):
3522        (JSC::JIT::emit_op_check_has_instance):
3523        (JSC::JIT::emit_op_instanceof):
3524        (JSC::JIT::emit_op_get_scoped_var):
3525        (JSC::JIT::emit_op_put_scoped_var):
3526        (JSC::JIT::emit_op_tear_off_activation):
3527        (JSC::JIT::emit_op_tear_off_arguments):
3528        (JSC::JIT::emit_op_resolve):
3529        (JSC::JIT::emit_op_to_primitive):
3530        (JSC::JIT::emit_op_resolve_base):
3531        (JSC::JIT::emit_op_ensure_property_exists):
3532        (JSC::JIT::emit_op_resolve_skip):
3533        (JSC::JIT::emit_op_resolve_global):
3534        (JSC::JIT::emitSlow_op_resolve_global):
3535        (JSC::JIT::emit_op_not):
3536        (JSC::JIT::emit_op_jfalse):
3537        (JSC::JIT::emit_op_jtrue):
3538        (JSC::JIT::emit_op_jeq_null):
3539        (JSC::JIT::emit_op_jneq_null):
3540        (JSC::JIT::emit_op_jneq_ptr):
3541        (JSC::JIT::emit_op_jsr):
3542        (JSC::JIT::emit_op_eq):
3543        (JSC::JIT::emitSlow_op_eq):
3544        (JSC::JIT::emit_op_neq):
3545        (JSC::JIT::emitSlow_op_neq):
3546        (JSC::JIT::compileOpStrictEq):
3547        (JSC::JIT::emit_op_eq_null):
3548        (JSC::JIT::emit_op_neq_null):
3549        (JSC::JIT::emit_op_resolve_with_base):
3550        (JSC::JIT::emit_op_new_func_exp):
3551        (JSC::JIT::emit_op_get_pnames):
3552        (JSC::JIT::emit_op_next_pname):
3553        (JSC::JIT::emit_op_to_jsnumber):
3554        (JSC::JIT::emit_op_push_new_scope):
3555        (JSC::JIT::emit_op_catch):
3556        (JSC::JIT::emit_op_create_activation):
3557        (JSC::JIT::emit_op_create_arguments):
3558        (JSC::JIT::emit_op_convert_this):
3559        (JSC::JIT::emit_op_convert_this_strict):
3560        (JSC::JIT::emit_op_get_arguments_length):
3561        (JSC::JIT::emitSlow_op_get_arguments_length):
3562        (JSC::JIT::emit_op_get_argument_by_val):
3563        (JSC::JIT::softModulo):
3564        * jit/JITPropertyAccess.cpp:
3565        (JSC::JIT::stringGetByValStubGenerator):
3566        (JSC::JIT::emit_op_get_by_val):
3567        (JSC::JIT::emitSlow_op_get_by_val):
3568        (JSC::JIT::emit_op_get_by_pname):
3569        (JSC::JIT::emit_op_put_by_val):
3570        (JSC::JIT::emit_op_put_by_index):
3571        (JSC::JIT::emit_op_put_getter):
3572        (JSC::JIT::emit_op_put_setter):
3573        (JSC::JIT::emit_op_del_by_id):
3574        (JSC::JIT::emit_op_get_by_id):
3575        (JSC::JIT::emit_op_put_by_id):
3576        (JSC::JIT::emit_op_method_check):
3577        (JSC::JIT::compileGetByIdHotPath):
3578        (JSC::JIT::compileGetByIdSlowCase):
3579        (JSC::JIT::emitSlow_op_put_by_id):
3580        (JSC::JIT::testPrototype):
3581        (JSC::JIT::privateCompilePutByIdTransition):
3582        (JSC::JIT::privateCompilePatchGetArrayLength):
3583        (JSC::JIT::privateCompileGetByIdProto):
3584        (JSC::JIT::privateCompileGetByIdSelfList):
3585        (JSC::JIT::privateCompileGetByIdProtoList):
3586        (JSC::JIT::privateCompileGetByIdChainList):
3587        (JSC::JIT::privateCompileGetByIdChain):
3588        * jit/JITPropertyAccess32_64.cpp:
3589        (JSC::JIT::emit_op_put_getter):
3590        (JSC::JIT::emit_op_put_setter):
3591        (JSC::JIT::emit_op_del_by_id):
3592        (JSC::JIT::emit_op_get_by_id):
3593        (JSC::JIT::emit_op_put_by_id):
3594        (JSC::JIT::emit_op_method_check):
3595        (JSC::JIT::stringGetByValStubGenerator):
3596        (JSC::JIT::emit_op_get_by_val):
3597        (JSC::JIT::emitSlow_op_get_by_val):
3598        (JSC::JIT::emit_op_put_by_val):
3599        (JSC::JIT::compileGetByIdHotPath):
3600        (JSC::JIT::compileGetByIdSlowCase):
3601        (JSC::JIT::emitSlow_op_put_by_id):
3602        (JSC::JIT::testPrototype):
3603        (JSC::JIT::privateCompilePutByIdTransition):
3604        (JSC::JIT::privateCompilePatchGetArrayLength):
3605        (JSC::JIT::privateCompileGetByIdProto):
3606        (JSC::JIT::privateCompileGetByIdSelfList):
3607        (JSC::JIT::privateCompileGetByIdProtoList):
3608        (JSC::JIT::privateCompileGetByIdChainList):
3609        (JSC::JIT::privateCompileGetByIdChain):
3610        (JSC::JIT::emit_op_get_by_pname):
3611        * jit/JITStubCall.h:
3612        (JSC::JITStubCall::addArgument):
3613        * jit/JITStubs.cpp:
3614        (JSC::getPolymorphicAccessStructureListSlot):
3615        (JSC::DEFINE_STUB_FUNCTION):
3616        * jit/JSInterfaceJIT.h:
3617        (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
3618        (JSC::JSInterfaceJIT::emitLoadInt32):
3619        (JSC::JSInterfaceJIT::emitLoadDouble):
3620        * jit/SpecializedThunkJIT.h:
3621        (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
3622        (JSC::SpecializedThunkJIT::loadJSStringArgument):
3623        (JSC::SpecializedThunkJIT::tagReturnAsInt32):
3624        (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
3625        * jit/ThunkGenerators.cpp:
3626        (JSC::charToString):
3627        (JSC::powThunkGenerator):
3628        * yarr/YarrJIT.cpp:
3629        (JSC::Yarr::YarrGenerator::matchCharacterClass):
3630        (JSC::Yarr::YarrGenerator::storeToFrame):
3631        (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
3632        (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
3633        (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
3634        (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
3635        (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
3636        (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
3637        (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
3638        (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
3639        (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
3640        (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
3641        (JSC::Yarr::YarrGenerator::generateDisjunction):
3642
36432011-03-28  Andras Becsi  <abecsi@webkit.org>
3644
3645        Reviewed by Csaba Osztrogonác.
3646
3647        [Qt] Fix the linking of jsc with MinGW after r81963.
3648
3649        * jsc.pro: add -l and remove the lib suffix.
3650
36512011-03-27  Ben Taylor  <bentaylor.solx86@gmail.com>
3652
3653        Reviewed by Alexey Proskuryakov.
3654
3655        https://bugs.webkit.org/show_bug.cgi?id=57170  Fix last elements
3656        in an enum to remove a trailing comma. Sun Studio 12 CC errors out.
3657
3658        Compile fix only, no actual code change.
3659
3660        * wtf/MessageQueue.h:
3661
36622011-03-25  Oliver Hunt  <oliver@apple.com>
3663
3664        Reviewed by Darin Adler.
3665
3666        Allow defineOwnProperty to work on DOMObjects
3667        https://bugs.webkit.org/show_bug.cgi?id=57129
3668
3669        Fix a couple of places where we uses getter()/setter() rather
3670        than [gs]etterPresent().
3671
3672        * runtime/JSObject.cpp:
3673        (JSC::JSObject::defineOwnProperty):
3674
36752011-03-25  Geoffrey Garen  <ggaren@apple.com>
3676
3677        Reviewed by Oliver Hunt.
3678
3679        Crash when paused at a breakpoint caused by inaccurate Activation records.
3680        https://bugs.webkit.org/show_bug.cgi?id=57120
3681
3682        * runtime/JSActivation.cpp:
3683        (JSC::JSActivation::symbolTableGet):
3684        (JSC::JSActivation::symbolTablePut):
3685        (JSC::JSActivation::getOwnPropertyNames):
3686        (JSC::JSActivation::symbolTablePutWithAttributes):
3687
36882011-03-24  Geoffrey Garen  <ggaren@apple.com>
3689
3690        Reviewed by Oliver Hunt.
3691
3692        Crash in debugger beneath MarkStack::drain @ me.com, ibm.com
3693        https://bugs.webkit.org/show_bug.cgi?id=57080
3694        <rdar://problem/8525907>
3695
3696        The crash was caused by changes in the executable after recompilation.
3697
3698        The fix is for the activation to copy the data it needs instead of
3699        relying on the data in the executable.
3700
3701        SunSpider and v8 report no change.
3702
3703        * runtime/Arguments.h:
3704        (JSC::JSActivation::copyRegisters): Use our own data members instead of
3705        reading data out of the executable.
3706
3707        * runtime/JSActivation.cpp:
3708        (JSC::JSActivation::JSActivation): Initialize our data members.
3709
3710        (JSC::JSActivation::markChildren):
3711        (JSC::JSActivation::symbolTableGet):
3712        (JSC::JSActivation::symbolTablePut):
3713        (JSC::JSActivation::getOwnPropertyNames):
3714        (JSC::JSActivation::symbolTablePutWithAttributes):
3715        (JSC::JSActivation::isDynamicScope):
3716        (JSC::JSActivation::argumentsGetter): Use our own data members instead of
3717        reading data out of the executable.
3718
3719        * runtime/JSActivation.h: Added new data members to track data previously
3720        tracked by the executable. Since I've removed the executable pointer,
3721        on a 64bit system, I've only made activations bigger by an int.
3722
37232011-03-25  David Kilzer  <ddkilzer@apple.com>
3724
3725        Remove duplicate entry from JavaScriptCore.exp
3726
3727        JSC::createStackOverflowError(JSC::ExecState*) was originally
3728        exported in r60057, then duplicated in r60392.
3729
3730        * JavaScriptCore.exp: Removed duplicate entry.
3731
37322011-03-25  Jarred Nicholls  <jarred@sencha.com>
3733
3734        Reviewed by Ariya Hidayat.
3735
3736        [Qt] MSVC Build Error - need to link advapi32.lib for jsc.exe
3737        https://bugs.webkit.org/show_bug.cgi?id=56098
3738
3739        Need to link advapi32.lib for jsc.exe since wtf/OSRandomSource.cpp uses the Win32 Crypto API
3740
3741        * jsc.pro:
3742
37432011-03-24  Nikolas Zimmermann  <nzimmermann@rim.com>
3744
3745        Reviewed by Darin Adler.
3746
3747        Introduce WTF HexNumber.h
3748        https://bugs.webkit.org/show_bug.cgi?id=56099
3749
3750        Introduce a set of functions that ease converting from a bye or a number to a hex string,
3751        replacing several of these conversions and String::format("%x") usages all over WebCore.
3752
3753        * GNUmakefile.am: Add HexNumber.h to build.
3754        * JavaScriptCore.exp: Export StringBuilder::reserveCapacity.
3755        * JavaScriptCore.gypi: Add HexNumber.h to build.
3756        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export StringBuilder::reserveCapacity.
3757        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add HexNumber.h to build.
3758        * JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
3759        * wtf/CMakeLists.txt: Ditto.
3760        * wtf/HexNumber.h: Added.
3761        (WTF::Internal::hexDigitsForMode): Internal helper.
3762        (WTF::appendByteAsHex): Free function, that appends a byte as hex string into a destination.
3763        (WTF::placeByteAsHex): Ditto, but places the result using *foo++ = '..' or foo[index++] = '..'
3764        (WTF::appendUnsignedAsHex): Free function, that appends a number as hex string into a destination.
3765
37662011-03-24  Geoffrey Garen  <ggaren@apple.com>
3767
3768        Windows build fix take 2: Add new symobl.
3769
3770        (I should have used the EWS bots for this!)
3771
3772        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3773
37742011-03-24  Geoffrey Garen  <ggaren@apple.com>
3775
3776        Windows build fix take 1: Removed old symobl.
3777
3778        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3779
37802011-03-24  Geoffrey Garen  <ggaren@apple.com>
3781
3782        Reviewed by Oliver Hunt.
3783
3784        Ensure that all compilation takes place within a dynamic global object scope
3785        https://bugs.webkit.org/show_bug.cgi?id=57054
3786        <rdar://problem/9083011>
3787
3788        Otherwise, entry to the global object scope might throw away the code
3789        we just compiled, causing a crash.
3790
3791        * JavaScriptCore.exp: Updated for signature change.
3792
3793        * debugger/Debugger.cpp:
3794        (JSC::evaluateInGlobalCallFrame):
3795        * debugger/DebuggerCallFrame.cpp:
3796        (JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls
3797        here because (a) they took place outside a dynamic global object scope
3798        and (b) they were redundant.
3799
3800        * interpreter/CachedCall.h:
3801        (JSC::CachedCall::CachedCall): Updated for signature change.
3802
3803        * interpreter/Interpreter.cpp:
3804        (JSC::Interpreter::execute):
3805        (JSC::Interpreter::executeCall):
3806        (JSC::Interpreter::executeConstruct): Declare our dynamic global object
3807        scope earlier, to ensure that compilation takes place within it.
3808
3809        * runtime/Completion.cpp:
3810        (JSC::evaluate): Removed explicit compilation calls here because (a)
3811        they took place outside a dynamic global object scope and (b) they were
3812        redundant.
3813
3814        * runtime/Executable.h:
3815        (JSC::EvalExecutable::compile):
3816        (JSC::ProgramExecutable::compile):
3817        (JSC::FunctionExecutable::compileForCall):
3818        (JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to
3819        verify our new invariant that all compilation takes place within a
3820        dynamic global object scope.
3821
3822        * runtime/JSGlobalObject.cpp:
3823        (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
3824        * runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope
3825        to require a JSGlobalData instead of an ExecState* since it is often
3826        easier to provide the former, and the latter was not necessary.
3827
38282011-03-24  Oliver Hunt  <oliver@apple.com>
3829
3830        Reviewed by Geoffrey Garen.
3831
3832        REGRESSION (r79987-r80210): Crash in JSWeakObjectMapClear
3833        https://bugs.webkit.org/show_bug.cgi?id=55671
3834
3835        This is no longer necessary, and it seems that with the new weakmap
3836        model it's simply unsafe, so this reduces it to a no-op.
3837
3838        * API/JSWeakObjectMapRefPrivate.cpp:
3839
38402011-03-24  Ben Taylor  <bentaylor.solx86@gmail.com>
3841
3842        Reviewed by Darin Adler.
3843
3844        https://bugs.webkit.org/show_bug.cgi?id=20302
3845        Correct implementation of signbit on Solaris
3846
3847        * wtf/MathExtras.h:
3848        (signbit):
3849
38502011-03-23  Mark Rowe  <mrowe@apple.com>
3851
3852        Reviewed by Darin Adler.
3853
3854        <rdar://problem/7959320> Threads that use APIs above the BSD layer must be registered with the Obj-C GC.
3855
3856        * wtf/ThreadingPthreads.cpp:
3857        (WTF::initializeCurrentThreadInternal):
3858
38592011-03-23  Mark Rowe  <mrowe@apple.com>
3860
3861        Stop setting OTHER_OPTIONS in JavaScriptCore's Makefile.
3862
3863        It's not necessary to pass "-target All" as xcodebuild always builds the
3864        first target in the project unless otherwise specified. The presence of
3865        that option also breaks "make clean" since that results in both the
3866        -target and -alltargets options being passed to xcodebuild.
3867
3868        * Makefile:
3869
38702011-03-23  Pavel Feldman  <pfeldman@chromium.org>
3871
3872        Not reviewed: bring back Vector::contains that was removed as a part of roll back.
3873
3874        * wtf/Vector.h:
3875        (WTF::::contains):
3876
38772011-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3878
3879        Unreviewed, rolling out r81686.
3880        http://trac.webkit.org/changeset/81686
3881        https://bugs.webkit.org/show_bug.cgi?id=56914
3882
3883        Breaks webkit_tests in Chromium again. (Requested by pfeldman
3884        on #webkit).
3885
3886        * wtf/Vector.h:
3887
38882011-03-23  Adam Barth  <abarth@webkit.org>
3889
3890        Reviewed by Eric Seidel.
3891
3892        JavaScriptCore GYP build should work on a case-sensitive file system
3893        https://bugs.webkit.org/show_bug.cgi?id=56911
3894
3895        The issue is that there are two UString.h headers, one named UString.h
3896        and one named ustring.h.  This patch excludes ustring.h from the header
3897        map to avoid confusion.  While I was editing this part of the GYP file,
3898        I cleaned up the exclude rules to be more modern.
3899
3900        * gyp/JavaScriptCore.gyp:
3901
39022011-03-22  Geoffrey Garen  <ggaren@apple.com>
3903
3904        Reviewed by Maciej Stachowiak.
3905
3906        REGRESSION (r78382): No scripts appear in the Web Inspector's Scripts
3907        panel on Windows, and many inspector regression tests are failing
3908        https://bugs.webkit.org/show_bug.cgi?id=54490
3909
3910        The bug was caused by two different classes using the same name (Recompiler).
3911
3912        * debugger/Debugger.cpp:
3913        * runtime/JSGlobalData.cpp:
3914        (WTF::Recompiler::operator()): Put Recompiler in an anonymous namespace,
3915        so our two recompilers' inline functions don't stomp each other at
3916        link time.
3917
39182011-03-22  Sam Weinig  <sam@webkit.org>
3919
3920        Reviewed by Mark Rowe.
3921
3922        Remove USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
3923        <rdar://problem/8944718>
3924
3925        * DerivedSources.make:
3926        Remove generation of USE_WK_SCROLLBAR_PAINTER_AND_CONTROLLER.
3927
39282011-03-22  Gabor Loki  <loki@webkit.org>
3929
3930        Reviewed by Csaba Osztrogonác.
3931
3932        [Qt] Add DFG module to build system (disabled by default).
3933        https://bugs.webkit.org/show_bug.cgi?id=56845
3934
3935        * JavaScriptCore.pri:
3936        * JavaScriptCore.pro:
3937
39382011-03-22  Eric Seidel  <eric@webkit.org>
3939
3940        Reviewed by Adam Barth.
3941
3942        Add support to build-webkit for building with gyp-generated project files
3943        https://bugs.webkit.org/show_bug.cgi?id=56877
3944
3945        Found a couple missing Private headers while trying to make WebCore build.
3946
3947        * JavaScriptCore.gypi:
3948
39492011-03-22  Eric Seidel  <eric@webkit.org>
3950
3951        Reviewed by Adam Barth.
3952
3953        Make it possible to build JavaScriptCore and WebCore gyp builds outside of Source
3954        https://bugs.webkit.org/show_bug.cgi?id=56867
3955
3956        This should make it possible to build the gyp-generated JavaScriptCore.xcodeproj
3957        from a JavaScriptCore directory outside of Source.
3958
3959        * gyp/JavaScriptCore.gyp:
3960        * gyp/run-if-exists.sh: Added.
3961        * gyp/update-info-plist.sh: Added.
3962
39632011-03-22  Eric Seidel  <eric@webkit.org>
3964
3965        Reviewed by Adam Barth.
3966
3967        Add Profiling Configuration to JavaScriptCore gyp build
3968        https://bugs.webkit.org/show_bug.cgi?id=56862
3969
3970        It appears this is identical to Release, but I suspect
3971        there is someone/thing who uses the Profiling target
3972        so we're adding it for completeness.
3973
3974        * gyp/JavaScriptCore.gyp:
3975
39762011-03-22  Adam Barth  <abarth@webkit.org>
3977
3978        Reviewed by Eric Seidel.
3979
3980        Remove os_win32_files variable from the GYP build
3981        https://bugs.webkit.org/show_bug.cgi?id=56804
3982
3983        Now that our understanding of GYP is sufficiently advanced, we don't
3984        need os_win32_files any more.  (Turns out Eric was right, as he always
3985        is.)
3986
3987        * JavaScriptCore.gypi:
3988
39892011-03-22  Adam Barth  <abarth@webkit.org>
3990
3991        Reviewed by Eric Seidel.
3992
3993        GYP build of JavaScriptCore should be able to link from an empty WebKitBuild directory
3994        https://bugs.webkit.org/show_bug.cgi?id=56803
3995
3996        Previously, we thought we should generate the derived source files in
3997        the shared intermediate build products directory, but there are
3998        assumptions built into other parts of the Mac build system that the
3999        derived source files will be generated in a particular subdirectory of
4000        the build products directory.
4001
4002        This patch is a partial revert of the change that moved the derived
4003        source files to the shared intermediate directory.  After this patch,
4004        the GYP build can build JavaScriptCore without help from the main
4005        normal build system.
4006
4007        * JavaScriptCore.gypi:
4008        * gyp/JavaScriptCore.gyp:
4009        * gyp/generate-derived-sources.sh:
4010        * gyp/generate-dtrace-header.sh:
4011
40122011-03-22  Jay Civelli  <jcivelli@chromium.org>
4013
4014        Reviewed by David Levin.
4015
4016        Adding a contains method to Vector.
4017        https://bugs.webkit.org/show_bug.cgi?id=55859
4018
4019        * wtf/Vector.h:
4020        (WTF::Vector::contains):
4021
40222011-03-22  Gabor Loki  <loki@webkit.org>
4023
4024        Reviewed by Alexey Proskuryakov.
4025
4026        Fix a bunch of typos in DFG.
4027        https://bugs.webkit.org/show_bug.cgi?id=56813
4028
4029        * dfg/DFGByteCodeParser.cpp:
4030        (JSC::DFG::parse):
4031        * dfg/DFGGenerationInfo.h:
4032        (JSC::DFG::GenerationInfo::setSpilled):
4033        * dfg/DFGGraph.cpp:
4034        (JSC::DFG::Graph::dump):
4035        * dfg/DFGGraph.h:
4036        * dfg/DFGJITCodeGenerator.h:
4037        (JSC::DFG::JITCodeGenerator::setupStubArguments):
4038        * dfg/DFGJITCompiler.cpp:
4039        (JSC::DFG::JITCompiler::compileFunction):
4040        * dfg/DFGJITCompiler.h:
4041        * dfg/DFGNode.h:
4042        * dfg/DFGNonSpeculativeJIT.h:
4043        * dfg/DFGOperations.h:
4044        * dfg/DFGRegisterBank.h:
4045        (JSC::DFG::RegisterBank::allocate):
4046        * dfg/DFGScoreBoard.h:
4047        (JSC::DFG::ScoreBoard::~ScoreBoard):
4048        (JSC::DFG::ScoreBoard::allocate):
4049        * dfg/DFGSpeculativeJIT.cpp:
4050        (JSC::DFG::SpeculativeJIT::compile):
4051        * dfg/DFGSpeculativeJIT.h:
4052
40532011-03-22  Adam Barth  <abarth@webkit.org>
4054
4055        Reviewed by Eric Seidel.
4056
4057        Production configuration in GYP isn&apos;t set up correctly
4058        https://bugs.webkit.org/show_bug.cgi?id=56786
4059
4060        Update JavaScriptCore.gyp with information mined from
4061        JavaScriptCore.xcodeproj.
4062
4063        * JavaScriptCore.gypi:
4064        * gyp/JavaScriptCore.gyp:
4065
40662011-03-22  Kent Tamura  <tkent@chromium.org>
4067
4068        Reviewed by Eric Seidel.
4069
4070        REGRESSION(r80096): Number type input unexpectedly rounds fractional values
4071        https://bugs.webkit.org/show_bug.cgi?id=56367
4072
4073        Introduce clampToInteger(unsigned).
4074
4075        * wtf/MathExtras.h:
4076        (clampToInteger): Added.
4077
40782011-03-21  Adam Barth  <abarth@webkit.org>
4079
4080        Reviewed by Eric Seidel.
4081
4082        GYP build should not have include paths that point within the source tree
4083        https://bugs.webkit.org/show_bug.cgi?id=56788
4084
4085        Turns out we don't need these include paths anymore now that we have
4086        header maps working properly.
4087
4088        * gyp/JavaScriptCore.gyp:
4089            - Also, remove jsc.cpp from the excluded list because it's not part
4090              of the jsc_files variable instead of the javascriptcore_files
4091              variable.
4092
40932011-03-21  Adam Barth  <abarth@webkit.org>
4094
4095        Reviewed by Eric Seidel.
4096
4097        Solve the Assertions.cpp / -Wno-missing-format-attribute mystery
4098        https://bugs.webkit.org/show_bug.cgi?id=56780
4099
4100        The reason we couldn't resolve this warning in the GYP build was that
4101        the normal build disables this warning specifically for this file.
4102        This patch takes the same approach as the previous patch to
4103        WebCoreObjCExtras.mm in that it uses a pragma to suppress the warning
4104        (rather than a build system configuration).
4105
4106        * JavaScriptCore.xcodeproj/project.pbxproj:
4107            - Remove the special-case for this file.
4108        * gyp/JavaScriptCore.gyp:
4109            - Remove the work-around for this issue.
4110        * wtf/Assertions.cpp:
4111            - Add a pragma disabling this warning for this file.
4112
41132011-03-21  Adam Barth  <abarth@webkit.org>
4114
4115        Reviewed by Dimitri Glazkov.
4116
4117        WebCore GYP build shouldn't crash on startup
4118        https://bugs.webkit.org/show_bug.cgi?id=56776
4119
4120        Debug builds shouldn't define NDEBUG.  This same logic exists in the
4121        project.pbxproj file.
4122
4123        * gyp/JavaScriptCore.gyp:
4124
41252011-03-21  Robert Kroeger  <rjkroege@chromium.org>
4126
4127        Reviewed by Antonio Gomes.
4128
4129        Flag to enable/disable a GestureReocognizer framework
4130
4131        https://bugs.webkit.org/show_bug.cgi?id=49345
4132
4133        * wtf/Platform.h:
4134
41352011-03-21  Adam Barth  <abarth@webkit.org>
4136
4137        Reviewed by Dimitri Glazkov.
4138
4139        Add new files to JavaScriptCore.gypi
4140        https://bugs.webkit.org/show_bug.cgi?id=56766
4141
4142        * JavaScriptCore.gypi:
4143
41442011-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
4145
4146        Unreviewed, rolling out r81377.
4147        http://trac.webkit.org/changeset/81377
4148        https://bugs.webkit.org/show_bug.cgi?id=56765
4149
4150        WebPageSerializerTest.MultipleFrames is broken (Requested by
4151        simonjam on #webkit).
4152
4153        * wtf/Vector.h:
4154
41552011-03-21  Gabor Loki  <loki@webkit.org>
4156
4157        Reviewed by Csaba Osztrogonác.
4158
4159        Extend constant pool to be able to store 16 bit instructions with a constant
4160        https://bugs.webkit.org/show_bug.cgi?id=46796
4161
4162        The putShortWithConstantInt function inserts a 16 bit instruction which
4163        refers a 32 bits constant or literal. This is a vital function for those
4164        target which loads a PC relative value with a 16 bit instruction (like
4165        Thumb-2 instruction set and SH4 architecture).
4166
4167        * assembler/AssemblerBuffer.h:
4168        (JSC::AssemblerBuffer::putIntegral):
4169        (JSC::AssemblerBuffer::putIntegralUnchecked):
4170        * assembler/AssemblerBufferWithConstantPool.h:
4171
41722011-03-21  Philippe Normand  <pnormand@igalia.com>
4173
4174        Unreviewed, GTK distcheck build fix.
4175
4176        * GNUmakefile.am:
4177
41782011-03-20  Bill Budge  <bbudge@chromium.org>
4179
4180        Reviewed by Adam Barth.
4181
4182        Rename ThreadSafeShared to ThreadSafeRefCounted
4183        https://bugs.webkit.org/show_bug.cgi?id=56714
4184
4185        No new tests. Exposes no new functionality.
4186
4187        * API/JSClassRef.h:
4188        * API/OpaqueJSString.h:
4189        * GNUmakefile.am:
4190        * JavaScriptCore.gypi:
4191        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
4192        * JavaScriptCore.xcodeproj/project.pbxproj:
4193        * wtf/Atomics.h:
4194        * wtf/CMakeLists.txt:
4195        * wtf/CrossThreadRefCounted.h:
4196        (WTF::CrossThreadRefCounted::CrossThreadRefCounted):
4197        (WTF::::crossThreadCopy):
4198        * wtf/ThreadSafeRefCounted.h: Copied from wtf/ThreadSafeShared.h.
4199        (WTF::ThreadSafeRefCountedBase::ThreadSafeRefCountedBase):
4200        (WTF::ThreadSafeRefCountedBase::ref):
4201        (WTF::ThreadSafeRefCountedBase::refCount):
4202        (WTF::ThreadSafeRefCountedBase::derefBase):
4203        (WTF::ThreadSafeRefCounted::ThreadSafeRefCounted):
4204        * wtf/ThreadSafeShared.h: Removed.
4205        * wtf/Threading.h:
4206
42072011-03-19  Patrick Gansterer  <paroga@webkit.org>
4208
4209        Reviewed by Darin Adler.
4210
4211        Remove StringImpl::computeHash()
4212        https://bugs.webkit.org/show_bug.cgi?id=49894
4213
4214        Replace remainig StringImpl::computeHash with StringImpl::computeHashStringHasher.
4215
4216        * wtf/text/AtomicString.cpp:
4217        (WTF::CStringTranslator::hash):
4218        (WTF::UCharBufferTranslator::hash):
4219        (WTF::HashAndCharactersTranslator::hash):
4220        * wtf/text/StringImpl.h:
4221        (WTF::StringImpl::setHash):
4222        (WTF::StringImpl::hash):
4223
42242011-03-19  Patrick Gansterer  <paroga@webkit.org>
4225
4226        Reviewed by Darin Adler.
4227
4228        Rename WTF::StringHasher methods
4229        https://bugs.webkit.org/show_bug.cgi?id=53532
4230
4231        Rename createHash to computeHash and createBlobHash to hashMemory.
4232        Also add a using WTF::StringHasher in the header file.
4233
4234        * profiler/CallIdentifier.h:
4235        (JSC::CallIdentifier::Hash::hash):
4236        * runtime/Identifier.cpp:
4237        (JSC::IdentifierCStringTranslator::hash):
4238        (JSC::IdentifierUCharBufferTranslator::hash):
4239        * wtf/StringHasher.h:
4240        (WTF::StringHasher::computeHash):
4241        (WTF::StringHasher::hashMemory):
4242        * wtf/text/StringHash.h:
4243        (WTF::CaseFoldingHash::hash):
4244        * wtf/text/StringImpl.h:
4245        (WTF::StringImpl::computeHash):
4246        * wtf/unicode/UTF8.cpp:
4247        (WTF::Unicode::calculateStringHashAndLengthFromUTF8Internal):
4248
42492011-03-18  Geoffrey Garen  <ggaren@apple.com>
4250
4251        Reviewed by Oliver Hunt.
4252
4253        [GTK] JSC crashes in 32bit Release bots after r80743
4254        https://bugs.webkit.org/show_bug.cgi?id=56180
4255
4256        The crash was caused by referencing GC memory from a GC destructor. This
4257        is not safe because destruction time / order is not guaranteed.
4258
4259        * profiler/ProfileGenerator.cpp:
4260        (JSC::ProfileGenerator::create):
4261        (JSC::ProfileGenerator::ProfileGenerator):
4262        (JSC::ProfileGenerator::willExecute):
4263        (JSC::ProfileGenerator::didExecute):
4264        * profiler/ProfileGenerator.h:
4265        (JSC::ProfileGenerator::origin): Made ExecState* the first argument,
4266        to match the rest of this class and JSC.
4267
4268        Use a JSGlobalObject* instead of an ExecState* with an indirect reference
4269        to a JSGlobalObject* to track our origin. This is simpler and more
4270        efficient, and it removes the destruction order dependency that was causing
4271        our crash.
4272
4273        * profiler/Profiler.cpp:
4274        (JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
4275        (JSC::Profiler::stopProfiling): New function for stopping all profiles
4276        for a given global object. This is more straight-forward than multiplexing
4277        through the old function.
4278
4279        (JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
4280        * profiler/Profiler.h: Ditto.
4281
4282        * runtime/JSGlobalObject.cpp:
4283        (JSC::JSGlobalObject::~JSGlobalObject): Ditto.
4284
42852011-03-17  Geoffrey Garen  <ggaren@apple.com>
4286
4287        Reviewed by Oliver Hunt.
4288
4289        1 Structure leaked beneath JSGlobalData::storeVPtrs()
4290        https://bugs.webkit.org/show_bug.cgi?id=56595
4291
4292        * runtime/Executable.cpp:
4293        (JSC::EvalExecutable::EvalExecutable):
4294        (JSC::ProgramExecutable::ProgramExecutable):
4295        (JSC::FunctionExecutable::FunctionExecutable):
4296        * runtime/Executable.h:
4297        (JSC::ExecutableBase::ExecutableBase):
4298        (JSC::NativeExecutable::NativeExecutable):
4299        (JSC::VPtrHackExecutable::VPtrHackExecutable):
4300        (JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
4301        PassRefPtr, like JSString does, since JSGlobalData owns the singleton
4302        exectuable structure.
4303
43042011-03-17  Geoffrey Garen  <ggaren@apple.com>
4305
4306        Reviewed by Mark Rowe.
4307
4308        Fixed some string leaks seen on the buildbot
4309        https://bugs.webkit.org/show_bug.cgi?id=56619
4310
4311        * runtime/PropertyMapHashTable.h:
4312        (JSC::PropertyTable::~PropertyTable): DEref!
4313
43142011-03-17  Oliver Hunt  <oliver@apple.com>
4315
4316        Reviewed by Geoffrey Garen.
4317
4318        Crash in  JSC::MarkStack::drain Under Stress
4319        https://bugs.webkit.org/show_bug.cgi?id=56470
4320
4321        We perform a number of gc allocations while when
4322        we are setting up new globals in a piece of global
4323        code.  We do this by adding new properties to the
4324        symbol table, and then expanding the storage to fit
4325        at the end.
4326
4327        If a GC happens during this time we will report an
4328        incorrect size for the global object's symbol table
4329        storage.
4330
4331        This patch corrects this by growing the storage size
4332        before we starting adding entries to the symbol table.
4333
4334        * bytecompiler/BytecodeGenerator.cpp:
4335        (JSC::BytecodeGenerator::BytecodeGenerator):
4336        * runtime/JSGlobalObject.cpp:
4337        (JSC::JSGlobalObject::resizeRegisters):
4338
43392011-03-17  Geoffrey Garen  <ggaren@apple.com>
4340
4341        Reviewed by Oliver Hunt.
4342
4343        1 Structure leaked beneath JSGlobalData::storeVPtrs()
4344        https://bugs.webkit.org/show_bug.cgi?id=56595
4345
4346        * runtime/JSGlobalData.cpp:
4347        (JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
4348        we're using, since the Executable is not designed to own the Structure.
4349
43502011-03-17  Gavin Barraclough  <barraclough@apple.com>
4351
4352        Rubber Stamped by Sam Weinig.
4353
4354        Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
4355
4356        * assembler/MacroAssemblerX86Common.h:
4357        (JSC::MacroAssemblerX86Common::branchTest8):
4358        * assembler/X86Assembler.h:
4359        (JSC::X86Assembler::testb_rr):
4360
43612011-03-17  Gavin Barraclough  <barraclough@apple.com>
4362
4363        Reviewed by Sam Weinig.
4364
4365        Bug 56603 - DFG JIT related cleanup
4366        Move node generation out to separate function, move binarySearch algorithm out
4367        to StdLibExtras, fix Graph::dump() to print comma between non-node children,
4368        even if there are no node children.
4369
4370        * bytecode/CodeBlock.h:
4371        (JSC::getCallReturnOffset):
4372        (JSC::CodeBlock::getStubInfo):
4373        (JSC::CodeBlock::getCallLinkInfo):
4374        (JSC::CodeBlock::getMethodCallLinkInfo):
4375        (JSC::CodeBlock::bytecodeOffset):
4376            - Move binaryChop to binarySearch in StdLibExtras
4377        * dfg/DFGByteCodeParser.cpp:
4378        (JSC::DFG::ByteCodeParser::ByteCodeParser):
4379        (JSC::DFG::ByteCodeParser::parse):
4380        (JSC::DFG::parse):
4381            - Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
4382        * dfg/DFGByteCodeParser.h:
4383            - Change parse() to not take a start index (always 0).
4384        * dfg/DFGGraph.cpp:
4385        (JSC::DFG::Graph::dump):
4386            - Fix Graph::dump() to print comma between non-node children, even if there are no node children.
4387        * dfg/DFGJITCodeGenerator.h:
4388        (JSC::DFG::JITCodeGenerator::JITCodeGenerator):
4389            - Initialize m_compileIndex in constructor.
4390        * dfg/DFGNonSpeculativeJIT.cpp:
4391        (JSC::DFG::NonSpeculativeJIT::compile):
4392        * dfg/DFGNonSpeculativeJIT.h:
4393            - Spilt out compilation of individual node.
4394        * dfg/DFGOperations.cpp:
4395        (JSC::DFG::operationConvertThis):
4396        * dfg/DFGOperations.h:
4397            - Cleanup parameter name.
4398        * dfg/DFGSpeculativeJIT.cpp:
4399        (JSC::DFG::SpeculativeJIT::compile):
4400        * dfg/DFGSpeculativeJIT.h:
4401            - Spilt out compilation of individual node.
4402        * runtime/Executable.cpp:
4403        (JSC::tryDFGCompile):
4404            - Change parse() to not take a start index (always 0).
4405        * wtf/StdLibExtras.h:
4406        (WTF::binarySearch):
4407            - Move binaryChop to binarySearch in StdLibExtras
4408
44092011-03-17  Anders Carlsson  <andersca@apple.com>
4410
4411        Reviewed by Geoffrey Garen.
4412
4413        Fix clang build.
4414
4415        * runtime/JSGlobalData.cpp:
4416        (JSC::JSGlobalData::storeVPtrs):
4417
44182011-03-17  Geoffrey Garen  <ggaren@apple.com>
4419
4420        Reviewed by Darin Adler.
4421
4422        1 Structure leaked beneath JSGlobalData::storeVPtrs()
4423        https://bugs.webkit.org/show_bug.cgi?id=56595
4424
4425        * JavaScriptCore.xcodeproj/project.pbxproj:
4426        * runtime/JSGlobalData.cpp:
4427        (JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
4428        to explicitly run its destructor.
4429
44302011-03-17  Jeff Miller  <jeffm@apple.com>
4431
4432        Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
4433
4434        *.mode*
4435        *.pbxuser
4436        *.perspective*
4437        project.xcworkspace
4438        xcuserdata
4439
4440        * JavaScriptCore.xcodeproj: Modified property svn:ignore.
4441
44422011-03-17  Gavin Barraclough  <barraclough@apple.com>
4443
4444        Reverting r81197, breaks JIT + INTERPRETER build.
4445
4446        * bytecode/CodeBlock.cpp:
4447        (JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
4448        (JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
4449        * bytecode/CodeBlock.h:
4450        (JSC::CodeBlock::addPropertyAccessInstruction):
4451        (JSC::CodeBlock::addGlobalResolveInstruction):
4452        (JSC::CodeBlock::addStructureStubInfo):
4453        * bytecode/Opcode.h:
4454        * bytecode/StructureStubInfo.h:
4455        * bytecompiler/BytecodeGenerator.cpp:
4456        (JSC::BytecodeGenerator::emitResolve):
4457        (JSC::BytecodeGenerator::emitResolveWithBase):
4458        (JSC::BytecodeGenerator::emitGetById):
4459        (JSC::BytecodeGenerator::emitPutById):
4460        (JSC::BytecodeGenerator::emitDirectPutById):
4461        (JSC::BytecodeGenerator::emitCall):
4462        (JSC::BytecodeGenerator::emitConstruct):
4463        (JSC::BytecodeGenerator::emitCatch):
4464
44652011-03-17  Ben Taylor  <bentaylor.solx86@gmail.com>
4466
4467        Reviewed by Alexey Proskuryakov.
4468
4469        Add a COMPILER(SUNCC) define for Sun Studio 12.
4470        https://bugs.webkit.org/show_bug.cgi?56444
4471        derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
4472
4473        * wtf/Platform.h:
4474
44752011-03-17  Jay Civelli  <jcivelli@chromium.org>
4476
4477        Reviewed by David Levin.
4478
4479        Adding a contains method to Vector.
4480        https://bugs.webkit.org/show_bug.cgi?id=55859
4481
4482        * wtf/Vector.h:
4483        (WTF::::operator):
4484        (WTF::::contains):
4485
44862011-03-17  Patrick Gansterer  <paroga@webkit.org>
4487
4488        Fix the interpreter build.
4489
4490        * interpreter/Interpreter.cpp:
4491        (JSC::Interpreter::privateExecute): Added globalData to inheritorID().
4492
44932011-03-16  Sam Weinig  <sam@webkit.org>
4494
4495        Fix the interpreter build.
4496
4497        * interpreter/Interpreter.cpp:
4498        (JSC::Interpreter::resolve):
4499        (JSC::Interpreter::resolveSkip):
4500        (JSC::Interpreter::resolveGlobal):
4501        (JSC::Interpreter::resolveGlobalDynamic):
4502        (JSC::Interpreter::resolveBaseAndProperty):
4503        (JSC::Interpreter::privateExecute):
4504        Remove .get()s.
4505
45062011-03-16  Adam Barth  <abarth@webkit.org>
4507
4508        Reviewed by James Robinson.
4509
4510        Remove USE(BUILTIN_UTF8_CODEC)
4511        https://bugs.webkit.org/show_bug.cgi?id=56508
4512
4513        We added this recently when we were unsure about the stability of the
4514        built-in UTF-8 codec.  However, the codec seems to be stable, so we
4515        don't need the macro.
4516
4517        * wtf/Platform.h:
4518
45192011-03-16  Daniel Bates  <dbates@rim.com>
4520
4521        Reviewed by Darin Adler.
4522
4523        Make JIT build for ARM Thumb-2 with RVCT
4524        https://bugs.webkit.org/show_bug.cgi?id=56440
4525
4526        Derived from a patch by Dave Tapuska.
4527
4528        Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
4529
4530        * jit/JITStubs.cpp:
4531
45322011-03-16  Chao-ying Fu  <fu@mips.com>
4533
4534        Reviewed by Darin Adler.
4535
4536        Fix MIPS build with const *void
4537        https://bugs.webkit.org/show_bug.cgi?id=56513
4538
4539        * assembler/MacroAssemblerMIPS.h:
4540        (JSC::MacroAssemblerMIPS::load32):
4541        (JSC::MacroAssemblerMIPS::store32):
4542
45432011-03-16  Oliver Hunt  <oliver@apple.com>
4544
4545        Reviewed by Darin Adler.
4546
4547        Remove unnecessary caller tracking shenanigans from CodeBlock
4548        https://bugs.webkit.org/show_bug.cgi?id=56483
4549
4550        This removes some leftover cruft from when we made CodeBlock
4551        mark its callees.  Removing it gives us a 0.7% progression,
4552        reducing the overall regression to ~1.3%.
4553
4554        * bytecode/CodeBlock.cpp:
4555        (JSC::CodeBlock::shrinkToFit):
4556        * bytecode/CodeBlock.h:
4557        (JSC::CallLinkInfo::CallLinkInfo):
4558        * jit/JIT.cpp:
4559        (JSC::JIT::linkCall):
4560        (JSC::JIT::linkConstruct):
4561
45622011-03-15  Oliver Hunt  <oliver@apple.com>
4563
4564        Reviewed by Geoffrey Garen.
4565
4566        Make Structure creation require a JSGlobalData
4567        https://bugs.webkit.org/show_bug.cgi?id=56438
4568
4569        Mechanical change to make Structure::create require JSGlobalData&, and
4570        require all users to provide the globalData.
4571
4572        * API/JSCallbackConstructor.h:
4573        (JSC::JSCallbackConstructor::createStructure):
4574        * API/JSCallbackFunction.h:
4575        (JSC::JSCallbackFunction::createStructure):
4576        * API/JSCallbackObject.h:
4577        (JSC::JSCallbackObject::createStructure):
4578        * API/JSContextRef.cpp:
4579        * JavaScriptCore.exp:
4580        * debugger/DebuggerActivation.cpp:
4581        (JSC::DebuggerActivation::DebuggerActivation):
4582        * debugger/DebuggerActivation.h:
4583        (JSC::DebuggerActivation::createStructure):
4584        * jit/JITStubs.cpp:
4585        (JSC::DEFINE_STUB_FUNCTION):
4586        * jsc.cpp:
4587        (GlobalObject::GlobalObject):
4588        (functionRun):
4589        (jscmain):
4590        * runtime/Arguments.h:
4591        (JSC::Arguments::createStructure):
4592        * runtime/ArrayPrototype.h:
4593        (JSC::ArrayPrototype::createStructure):
4594        * runtime/BooleanObject.h:
4595        (JSC::BooleanObject::createStructure):
4596        * runtime/DateInstance.h:
4597        (JSC::DateInstance::createStructure):
4598        * runtime/DatePrototype.h:
4599        (JSC::DatePrototype::createStructure):
4600        * runtime/ErrorInstance.h:
4601        (JSC::ErrorInstance::createStructure):
4602        * runtime/Executable.h:
4603        (JSC::ExecutableBase::createStructure):
4604        (JSC::EvalExecutable::createStructure):
4605        (JSC::ProgramExecutable::createStructure):
4606        (JSC::FunctionExecutable::createStructure):
4607        * runtime/FunctionPrototype.h:
4608        (JSC::FunctionPrototype::createStructure):
4609        * runtime/GetterSetter.h:
4610        (JSC::GetterSetter::createStructure):
4611        * runtime/InternalFunction.h:
4612        (JSC::InternalFunction::createStructure):
4613        * runtime/JSAPIValueWrapper.h:
4614        (JSC::JSAPIValueWrapper::createStructure):
4615        * runtime/JSActivation.h:
4616        (JSC::JSActivation::createStructure):
4617        * runtime/JSArray.cpp:
4618        (JSC::JSArray::JSArray):
4619        * runtime/JSArray.h:
4620        (JSC::JSArray::createStructure):
4621        * runtime/JSByteArray.cpp:
4622        (JSC::JSByteArray::createStructure):
4623        * runtime/JSByteArray.h:
4624        (JSC::JSByteArray::JSByteArray):
4625        * runtime/JSCell.h:
4626        (JSC::JSCell::JSCell::createDummyStructure):
4627        * runtime/JSFunction.h:
4628        (JSC::JSFunction::createStructure):
4629        * runtime/JSGlobalData.cpp:
4630        (JSC::JSGlobalData::storeVPtrs):
4631        (JSC::JSGlobalData::JSGlobalData):
4632        * runtime/JSGlobalObject.cpp:
4633        (JSC::JSGlobalObject::reset):
4634        * runtime/JSGlobalObject.h:
4635        (JSC::JSGlobalObject::JSGlobalObject):
4636        (JSC::JSGlobalObject::createStructure):
4637        * runtime/JSNotAnObject.h:
4638        (JSC::JSNotAnObject::createStructure):
4639        * runtime/JSONObject.h:
4640        (JSC::JSONObject::createStructure):
4641        * runtime/JSObject.cpp:
4642        (JSC::JSObject::createInheritorID):
4643        * runtime/JSObject.h:
4644        (JSC::JSObject::createStructure):
4645        (JSC::JSNonFinalObject::createStructure):
4646        (JSC::JSFinalObject::createStructure):
4647        (JSC::createEmptyObjectStructure):
4648        (JSC::JSObject::inheritorID):
4649        * runtime/JSObjectWithGlobalObject.h:
4650        (JSC::JSObjectWithGlobalObject::createStructure):
4651        * runtime/JSPropertyNameIterator.h:
4652        (JSC::JSPropertyNameIterator::createStructure):
4653        * runtime/JSStaticScopeObject.h:
4654        (JSC::JSStaticScopeObject::createStructure):
4655        * runtime/JSString.h:
4656        (JSC::RopeBuilder::createStructure):
4657        * runtime/JSVariableObject.h:
4658        (JSC::JSVariableObject::createStructure):
4659        * runtime/JSWrapperObject.h:
4660        (JSC::JSWrapperObject::createStructure):
4661        * runtime/JSZombie.h:
4662        (JSC::JSZombie::createStructure):
4663        * runtime/MathObject.h:
4664        (JSC::MathObject::createStructure):
4665        * runtime/NativeErrorConstructor.cpp:
4666        (JSC::NativeErrorConstructor::NativeErrorConstructor):
4667        * runtime/NativeErrorConstructor.h:
4668        (JSC::NativeErrorConstructor::createStructure):
4669        * runtime/NumberConstructor.h:
4670        (JSC::NumberConstructor::createStructure):
4671        * runtime/NumberObject.h:
4672        (JSC::NumberObject::createStructure):
4673        * runtime/ObjectConstructor.h:
4674        (JSC::ObjectConstructor::createStructure):
4675        * runtime/RegExpConstructor.h:
4676        (JSC::RegExpConstructor::createStructure):
4677        * runtime/RegExpObject.h:
4678        (JSC::RegExpObject::createStructure):
4679        * runtime/ScopeChain.h:
4680        (JSC::ScopeChainNode::createStructure):
4681        * runtime/StringObject.h:
4682        (JSC::StringObject::createStructure):
4683        * runtime/StringObjectThatMasqueradesAsUndefined.h:
4684        (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
4685        * runtime/StringPrototype.h:
4686        (JSC::StringPrototype::createStructure):
4687        * runtime/Structure.h:
4688        (JSC::Structure::create):
4689
46902011-03-16  Geoffrey Garen  <ggaren@apple.com>
4691
4692        Reviewed by Oliver Hunt.
4693
4694        Some conservative root gathering cleanup
4695        https://bugs.webkit.org/show_bug.cgi?id=56447
4696
4697        SunSpider says 0.5% - 1.8% faster.
4698
4699        * interpreter/RegisterFile.cpp:
4700        (JSC::RegisterFile::gatherConservativeRoots):
4701        * interpreter/RegisterFile.h: New helper function for doing the
4702        conservative gathering of the register file. It's still conservative,
4703        since the register file may contain uninitialized values, but it's
4704        moving-safe, because it only visits values tagged as pointers, so there's
4705        no risk of mistaking an integer for a pointer and accidentally changing it.
4706
4707        * runtime/ConservativeSet.cpp:
4708        (JSC::ConservativeRoots::add):
4709        * runtime/ConservativeSet.h: Added a single-value add function, used above.
4710
4711        * runtime/Heap.cpp:
4712        (JSC::Heap::markRoots): Separated machine stack conservative roots from
4713        register file conservative roots because machine stack roots must be
4714        pinned, but register file roots need not be pinned.
4715
4716        Adopted new interface for passing the current stack extent to the machine
4717        stack root gathering routine. This allows us to exclude marking-related
4718        data structures on the stack, and thus avoid double-marking the set of
4719        machine roots.
4720
4721        * runtime/MachineStackMarker.cpp:
4722        (JSC::MachineThreads::gatherFromCurrentThread):
4723        (JSC::MachineThreads::gatherConservativeRoots):
4724        * runtime/MachineStackMarker.h: Added new interface, described above.
4725
4726        * runtime/MarkedBlock.h:
4727        (JSC::MarkedBlock::firstAtom):
4728        * wtf/StdLibExtras.h:
4729        (WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
4730        by MachineStacks.
4731
47322011-03-16  Geoffrey Garen  <ggaren@apple.com>
4733
4734        Reviewed by Oliver Hunt.
4735
4736        A little bit of MarkStack cleanup
4737        https://bugs.webkit.org/show_bug.cgi?id=56443
4738
4739        Moved MarkStack functions into MarkStack.h/.cpp.
4740
4741        SunSpider reports no change.
4742
4743        * runtime/JSArray.h:
4744        * runtime/JSCell.h: Moved from here...
4745        * runtime/MarkStack.cpp:
4746        (JSC::MarkStack::markChildren):
4747        (JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
4748        a huge function, and not called many times.
4749
4750        * runtime/MarkStack.h:
4751        (JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
4752        (JSC::MarkStack::append):
4753        (JSC::MarkStack::deprecatedAppend):
4754        (JSC::MarkStack::internalAppend): Moved to here.
4755
47562011-03-15  Geoffrey Garen  <ggaren@apple.com>
4757
4758        Reviewed by Oliver Hunt.
4759
4760        Removed another deprecatedAppend
4761        https://bugs.webkit.org/show_bug.cgi?id=56429
4762
4763        * collector/handles/HandleHeap.cpp:
4764        (JSC::HandleHeap::markStrongHandles):
4765        * collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
4766        marked directly by the Heap.
4767
4768        * runtime/Heap.cpp:
4769        (JSC::Heap::markRoots): Ditto.
4770
47712011-03-15  Geoffrey Garen  <ggaren@apple.com>
4772
4773        Reviewed by Oliver Hunt.
4774
4775        Removed some more deprecated / unsafe append
4776        https://bugs.webkit.org/show_bug.cgi?id=56428
4777
4778        * collector/handles/HandleStack.cpp:
4779        (JSC::HandleStack::mark):
4780        * collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
4781        marker, since it's a heap root.
4782
4783        * runtime/ArgList.cpp:
4784        (JSC::MarkedArgumentBuffer::markLists):
4785        (JSC::MarkedArgumentBuffer::slowAppend):
4786        * runtime/ArgList.h: Ditto.
4787
4788        * runtime/Heap.cpp:
4789        (JSC::Heap::markRoots): Added a mark call for marking the handle stack.
4790        It seems like Oliver forgot this in his last patch. (!)
4791
4792        * runtime/MarkStack.h: Removed appendSlots, since it would allow an
4793        object to embed JSValues directly instead of using WriteBarrier.
4794
4795        (JSC::MarkStack::append): Added a private append for a list of values.
4796
4797        (JSC::HeapRootMarker::mark): Access to the above.
4798
47992011-03-15  Geoffrey Garen  <ggaren@apple.com>
4800
4801        Reviewed by Oliver Hunt.
4802
4803        Removed a few more deprecatedAppends, and removed HeapRoot<T>
4804        https://bugs.webkit.org/show_bug.cgi?id=56422
4805
4806        Added HeapRootMarker, a privileged class for marking direct heap roots
4807        that are iterated during each garbage collection. This is easier to use
4808        and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
4809
4810        * debugger/Debugger.cpp:
4811        (JSC::evaluateInGlobalCallFrame):
4812        * debugger/DebuggerCallFrame.cpp:
4813        (JSC::DebuggerCallFrame::evaluate):
4814        * interpreter/CallFrame.h:
4815        (JSC::ExecState::exception):
4816        * jit/JITStubs.cpp:
4817        (JSC::DEFINE_STUB_FUNCTION):
4818        * runtime/Completion.cpp:
4819        (JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
4820        call .get() on it.
4821
4822        * runtime/Heap.cpp:
4823        (JSC::Heap::markProtectedObjects):
4824        (JSC::Heap::markTempSortVectors):
4825        (JSC::Heap::markRoots):
4826        * runtime/Heap.h: Updated to use HeapRootMarker.
4827
4828        * runtime/JSCell.h:
4829        (JSC::JSCell::MarkStack::append): Added private functions for
4830        HeapRootMarker to use.
4831
4832        * runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
4833
4834        * runtime/MarkStack.h:
4835        (JSC::HeapRootMarker::HeapRootMarker):
4836        (JSC::HeapRootMarker::mark): Added private functions for
4837        HeapRootMarker to use.
4838
4839        * runtime/SmallStrings.cpp:
4840        (JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
4841
4842        * runtime/SmallStrings.h:
4843        (JSC::SmallStrings::emptyString):
4844        (JSC::SmallStrings::singleCharacterString):
4845        (JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
4846
4847        * runtime/WriteBarrier.h: Removed HeapRoot<T>.
4848
48492011-03-14  Geoffrey Garen  <ggaren@apple.com>
4850
4851        Reviewed by Oliver Hunt.
4852
4853        Made the global object moving-GC-safe
4854        https://bugs.webkit.org/show_bug.cgi?id=56348
4855
4856        SunSpider reports no change.
4857
4858        * runtime/JSGlobalObject.cpp:
4859        (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
4860        suggested we do not need to visit all our references during GC, since
4861        that is not true in a moving GC.
4862
4863        Re-sorted data members by type, removed one duplicate, and added back
4864        the one missing mark I found.
4865
4866        * runtime/JSGlobalObject.h: Re-sorted data members by type.
4867
48682011-03-15  Oliver Hunt  <oliver@apple.com>
4869
4870        Reviewed by Geoffrey Garen.
4871
4872        Introduce Local<T> to allow us to start moving to precise marking of locals
4873        https://bugs.webkit.org/show_bug.cgi?id=56394
4874
4875        Introduce a new handle type, Local<T> and a scoping mechanism
4876        LocalScope to allow us to start moving towards precise marking
4877        of temporaries and local variables.
4878
4879        We also start to use the new Local<> type in the JSON stringifier
4880        so that we can have some coverage of their behaviour in the initial
4881        checkin.
4882
4883        * GNUmakefile.am:
4884        * JavaScriptCore.gypi:
4885        * JavaScriptCore.pro:
4886        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
4887        * JavaScriptCore.xcodeproj/project.pbxproj:
4888        * collector/handles/Handle.h:
4889        (JSC::::asObject):
4890        * collector/handles/HandleStack.cpp: Added.
4891        (JSC::HandleStack::HandleStack):
4892        (JSC::HandleStack::mark):
4893        (JSC::HandleStack::grow):
4894        * collector/handles/HandleStack.h: Added.
4895        (JSC::HandleStack::enterScope):
4896        (JSC::HandleStack::zapTo):
4897        (JSC::HandleStack::leaveScope):
4898        (JSC::HandleStack::push):
4899        * collector/handles/Local.h: Added.
4900        (JSC::Local::internalSet):
4901        (JSC::::Local):
4902        (JSC::::operator):
4903        (JSC::LocalStack::LocalStack):
4904        (JSC::LocalStack::peek):
4905        (JSC::LocalStack::pop):
4906        (JSC::LocalStack::push):
4907        (JSC::LocalStack::isEmpty):
4908        (JSC::LocalStack::size):
4909        * collector/handles/LocalScope.h: Added.
4910        (JSC::LocalScope::LocalScope):
4911        (JSC::LocalScope::~LocalScope):
4912        (JSC::LocalScope::release):
4913        * runtime/Heap.cpp:
4914        (JSC::Heap::markRoots):
4915        * runtime/Heap.h:
4916        (JSC::Heap::allocateLocalHandle):
4917        (JSC::Heap::handleStack):
4918        * runtime/JSCell.h:
4919        (JSC::JSCell::::getString):
4920        * runtime/JSGlobalData.cpp:
4921        (JSC::JSGlobalData::JSGlobalData):
4922        * runtime/JSGlobalData.h:
4923        (JSC::JSGlobalData::allocateLocalHandle):
4924        * runtime/JSONObject.cpp:
4925        (JSC::Stringifier::Stringifier):
4926        (JSC::Stringifier::stringify):
4927        (JSC::Stringifier::appendStringifiedValue):
4928        (JSC::Stringifier::Holder::Holder):
4929        (JSC::Walker::Walker):
4930        (JSC::Walker::walk):
4931        (JSC::JSONProtoFuncParse):
4932        (JSC::JSONProtoFuncStringify):
4933        (JSC::JSONStringify):
4934        * runtime/JSONObject.h:
4935        * runtime/MarkStack.h:
4936        (JSC::MarkStack::appendValues):
4937        (JSC::MarkStack::appendSlots):
4938
49392011-03-15  Gavin Barraclough  <barraclough@apple.com>
4940
4941        Rubber Stamped by Sam Weinig.
4942
4943        Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
4944        Some methods have unnecessary differences in name/arguments for interpreter/JIT.
4945
4946        * bytecode/CodeBlock.cpp:
4947        * bytecode/CodeBlock.h:
4948        (JSC::HandlerInfo::HandlerInfo):
4949        (JSC::CodeBlock::addPropertyAccessInfo):
4950        (JSC::CodeBlock::addGlobalResolveInfo):
4951        (JSC::CodeBlock::addCallLinkInfo):
4952        (JSC::CodeBlock::globalResolveInfo):
4953        * bytecode/Opcode.h:
4954        * bytecode/StructureStubInfo.h:
4955        * bytecompiler/BytecodeGenerator.cpp:
4956        (JSC::BytecodeGenerator::emitResolve):
4957        (JSC::BytecodeGenerator::emitResolveWithBase):
4958        (JSC::BytecodeGenerator::emitGetById):
4959        (JSC::BytecodeGenerator::emitPutById):
4960        (JSC::BytecodeGenerator::emitDirectPutById):
4961        (JSC::BytecodeGenerator::emitCall):
4962        (JSC::BytecodeGenerator::emitConstruct):
4963        (JSC::BytecodeGenerator::emitCatch):
4964
49652011-03-15  Gavin Barraclough  <barraclough@apple.com>
4966
4967        Reviewed by Sam Weinig.
4968
4969        Fix broken assert in new code.
4970
4971        * dfg/DFGAliasTracker.h:
4972        (JSC::DFG::AliasTracker::recordPutByVal):
4973            - recordPutByVal is called for both PutByVal & PutByValAlias.
4974
49752011-03-15  Gavin Barraclough  <barraclough@apple.com>
4976
4977        Rubber stamped by Sam Weinig.
4978
4979        Removed redundant code from BytecodeGenerator.
4980
4981        * bytecompiler/BytecodeGenerator.cpp:
4982        * bytecompiler/BytecodeGenerator.h:
4983            - delete uncalled code missed when reparsing was removed.
4984
49852011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
4986
4987        Reviewed by Darin Adler.
4988
4989        Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
4990        info into the headers rather than in export symbol definition files, but disable it on
4991        all platforms initially so we can deal with port build issues one port at a time.
4992
4993        https://bugs.webkit.org/show_bug.cgi?id=27551
4994
4995        * API/JSBase.h:
4996        * config.h:
4997        * wtf/Assertions.h:
4998        * wtf/ExportMacros.h: Added.
4999        * wtf/Platform.h:
5000
50012011-03-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
5002
5003        Unreviewed build fix.
5004
5005        Buildfix when JIT is not enabled after r81079
5006        https://bugs.webkit.org/show_bug.cgi?id=56361
5007
5008        * runtime/Executable.cpp:
5009
50102011-03-14  Geoffrey Garen  <ggaren@apple.com>
5011
5012        Reviewed by Oliver Hunt.
5013
5014        Made the global object moving-GC-safe
5015        https://bugs.webkit.org/show_bug.cgi?id=56348
5016
5017        SunSpider reports no change.
5018
5019        * runtime/JSGlobalObject.cpp:
5020        (JSC::JSGlobalObject::markChildren): Removed a dubious comment that
5021        suggested we do not need to visit all our references during GC, since
5022        that is not true in a moving GC.
5023
5024        Re-sorted data members by type, removed one duplicate, and added back
5025        the one missing mark I found.
5026
5027        * runtime/JSGlobalObject.h: Re-sorted data members by type.
5028
50292011-03-14  Geoffrey Garen  <ggaren@apple.com>
5030
5031        Reviewed by Oliver Hunt.
5032
5033        Made JSWrapperObject and subclasses moving-GC-safe
5034        https://bugs.webkit.org/show_bug.cgi?id=56346
5035
5036        SunSpider reports no change.
5037
5038        * runtime/BooleanObject.cpp:
5039        (JSC::BooleanObject::BooleanObject):
5040        * runtime/DateInstance.cpp:
5041        (JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
5042        we don't initialize the wrapped value in our constructor.
5043
5044        * runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
5045        we do not in fact override markChildren.
5046
5047        * runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
5048        no longer does so for us. Also added an ASSERT to catch a latent bug,
5049        where DatePrototype stomped on its base class's anonymous slot. Hard-coded
5050        anonymous slots are a plague on our code. This doesn't cause any problems
5051        in our existing code since the base class never reads the anonymous slot
5052        it declares, but it caused crashes when I tried to start using the slot
5053        in an initial version of this patch.
5054
5055        * runtime/JSWrapperObject.h:
5056        (JSC::JSWrapperObject::JSWrapperObject):
5057        (JSC::JSWrapperObject::internalValue):
5058        (JSC::JSWrapperObject::setInternalValue): Resolved a problem where
5059        our internal value was stored in two places: an anonymous slot, and a
5060        data member which was not always visited during GC. Now, we only use the
5061        data member, and we always visit it. (Instead of relying on certain
5062        subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
5063
5064        * runtime/NumberObject.cpp:
5065        (JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
5066        we don't initialize the wrapped value in our constructor.
5067
5068        * runtime/NumberObject.h: Removed meaningless declaration.
5069
5070        * runtime/StringObject.cpp:
5071        (JSC::StringObject::StringObject): No more need for JSGlobalData, since
5072        we don't initialize the wrapped value in our constructor.
5073
5074        * runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
5075        we do not in fact override markChildren.
5076
5077        * runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
5078        no longer does so for us. Also added an ASSERT to catch a latent bug,
5079        where DatePrototype stomped on its base class's anonymous slot. Hard-coded
5080        anonymous slots are a plague on our code.
5081
50822011-03-14  Michael Saboff  <msaboff@apple.com>
5083
5084        Reviewed by Gavin Barraclough.
5085
5086        Look-ahead assertions with back references don’t work as expected
5087        https://bugs.webkit.org/show_bug.cgi?id=56082
5088
5089        Changed parentheses assertion processing to temporarily back out the
5090        number of known characters after the assertion while processing the
5091        assertion.  This was done so that assertions don't fail due to
5092        checking the number of required characters as additional to the
5093        rest of the express since assertions don't "consume" input.
5094        Added a byte code to uncheck characters to support the change.
5095
5096        * yarr/YarrInterpreter.cpp:
5097        (JSC::Yarr::Interpreter::matchDisjunction):
5098        (JSC::Yarr::ByteCompiler::uncheckInput):
5099        (JSC::Yarr::ByteCompiler::emitDisjunction):
5100        * yarr/YarrInterpreter.h:
5101        (JSC::Yarr::ByteTerm::UncheckInput):
5102
51032011-03-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
5104
5105        Reviewed by Laszlo Gombos.
5106
5107        [Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
5108        https://bugs.webkit.org/show_bug.cgi?id=56133
5109
5110        Add condition to not compile webkit internal math round functions on RVCT compiler versions
5111        from 3.0.0 because they are already defined in compiler math library.
5112
5113        * wtf/MathExtras.h:
5114
51152011-03-14  Gavin Barraclough  <barraclough@apple.com>
5116
5117        Reviewed by Geoffrey Garen & Oliver Hunt.
5118
5119        Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
5120
5121        The JSC JIT presently generates code directly from the bytecode used by the interpreter.
5122        This is not an optimal intermediate representation for JIT code generation, since it does
5123        not capture liveness information of values, and provides little opportunity to perform
5124        any static analysis for even primitive types. The JIT currently generates two code paths,
5125        a fast path handling common cases, and a slower path handling less common operand types.
5126        However the slow path jumps back into the fast path, meaning that information arising
5127        from the earlier type checks cannot be propagated to later operations.
5128
5129        This patch adds:
5130            * a dataflow intermediate representation capable of describing a single basic block
5131              of operations,
5132            * a mechanism to convert a simple, single-block bytecode functions to the new IR,
5133            * and a JIT code generator capable of generating code from this representation.
5134
5135        The JIT generates two code paths, with the slower path not reentering the fast path
5136        mid-block, allowing speculative optimizations to be made on the hot path, with type
5137        information arising from these speculative decisions able to be propagated through the
5138        dataflow. Code generation of both speculative and non-speculative paths exploits the type
5139        and liveness information represented in the dataflow graph to attempt to avoid redundant
5140        boxing and type-checking of values, and to remove unnecessary spills of temporary values
5141        to the RegisterFile.
5142
5143        The dataflow JIT currently can only support a subset of bytecode operations, limited to
5144        arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
5145        dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
5146        expanded to include, control-flow, function calls, and then the long-tail of remaining
5147        bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
5148        this only supports x86-64.
5149
5150        The status of the dataflow JIT is currently work-in-progress. Limitations of the present
5151        JIT code generation may cause performance regressions, particularly:
5152            * the policy to only generate arithmetic code on the speculative path using integer
5153              instructions, never using floating point.
5154            * the policy to only generate arithmetic code on the non-speculative path using
5155              floating point instructions, never using integer.
5156            * always generating JSValue adds on the non-speculative path as a call out to a
5157              C-function, never handling this in JIT code.
5158            * always assuming by-Value property accesses on the speculative path to be array
5159              accesses.
5160            * generating all by-Value property accesses from the non-speculative path as a call
5161              out to a C-function.
5162            * generating all by-Indentifer property accesses as a call out to a C-function.
5163        Due to these regressions, the code is landed in a state where it is disabled in most
5164        cases by the ENABLE_DFG_JIT_RESTRICTIONS guard in Platform.h. As these regressions are
5165        addressed, the JIT will be allowed to trigger in more cases.
5166
5167        * JavaScriptCore.xcodeproj/project.pbxproj:
5168            - Added new files to Xcode project.
5169        * dfg: Added.
5170            - Added directory for new code.
5171        * dfg/DFGByteCodeParser.cpp: Added.
5172        * dfg/DFGByteCodeParser.h: Added.
5173            - Contruct a DFG::Graph representation from a bytecode CodeBlock.
5174        * dfg/DFGGenerationInfo.h: Added.
5175            - Track type & register information for VirtualRegisters during JIT code generation.
5176        * dfg/DFGGraph.cpp: Added.
5177        * dfg/DFGGraph.h: Added.
5178            - Dataflow graph intermediate representation for code generation.
5179        * dfg/DFGJITCodeGenerator.cpp: Added.
5180        * dfg/DFGJITCodeGenerator.h: Added.
5181            - Base class for SpeculativeJIT & NonSpeculativeJIT to share common functionality.
5182        * dfg/DFGJITCompiler.cpp: Added.
5183        * dfg/DFGJITCompiler.h: Added.
5184            - Class responsible for driving code generation of speculativeJIT & non-speculative
5185              code paths from the dataflow graph.
5186        * dfg/DFGNonSpeculativeJIT.cpp: Added.
5187        * dfg/DFGNonSpeculativeJIT.h: Added.
5188            - Used to generate the non-speculative code path, this make no assumptions
5189              about operand types.
5190        * dfg/DFGOperations.cpp: Added.
5191        * dfg/DFGOperations.h: Added.
5192            - Helper functions called from the JIT generated code.
5193        * dfg/DFGRegisterBank.h: Added.
5194            - Used to track contents of physical registers during JIT code generation.
5195        * dfg/DFGSpeculativeJIT.cpp: Added.
5196        * dfg/DFGSpeculativeJIT.h: Added.
5197            - Used to generate the speculative code path, this make assumptions about
5198              operand types to enable optimization.
5199        * runtime/Executable.cpp:
5200            - Add code to attempt to use the DFG JIT to compile a function, with fallback
5201              to the existing JIT.
5202        * wtf/Platform.h:
5203            - Added compile guards to enable the DFG JIT.
5204
52052011-03-14  Geoffrey Garen  <ggaren@apple.com>
5206
5207        Reviewed by Oliver Hunt.
5208
5209        Removed more cases of DeprecatedPtr (exception, SmallStrings)
5210        https://bugs.webkit.org/show_bug.cgi?id=56332
5211
5212        * runtime/Identifier.cpp:
5213        (JSC::Identifier::add):
5214        (JSC::Identifier::addSlowCase): Use a variable instead of a hard-coded
5215        constant, to make this code less brittle.
5216
5217        * runtime/JSGlobalData.h: Use HeapRoot instead of DeprecatedPtr because
5218        this reference is owned and managed directly by the heap.
5219
5220        * runtime/JSString.cpp:
5221        (JSC::JSString::substringFromRope):
5222        * runtime/JSString.h:
5223        (JSC::jsSingleCharacterString):
5224        (JSC::jsSingleCharacterSubstring):
5225        (JSC::jsString):
5226        (JSC::jsStringWithFinalizer):
5227        (JSC::jsSubstring):
5228        (JSC::jsOwnedString): Use a variable instead of a hard-coded
5229        constant, to make this code less brittle.
5230
5231        * runtime/SmallStrings.cpp:
5232        (JSC::SmallStringsStorage::rep):
5233        (JSC::SmallStringsStorage::SmallStringsStorage):
5234        (JSC::SmallStrings::SmallStrings):
5235        (JSC::SmallStrings::markChildren):
5236        (JSC::SmallStrings::clear):
5237        (JSC::SmallStrings::count): Use a variable instead of a hard-coded
5238        constant, to make this code less brittle.
5239
5240        * runtime/SmallStrings.h:
5241        (JSC::SmallStrings::singleCharacterString): Use HeapRoot instead of
5242        DeprecatedPtr because these references are owned and managed directly by
5243        the heap.
5244
5245        Stop using FixedArray because we only want a very limited set
5246        of classes to be able to use HeapRoot. (Replaced with manual ASSERTs.)
5247
5248        * runtime/WriteBarrier.h:
5249        (JSC::operator==):
5250        (JSC::WriteBarrier::WriteBarrier):
5251        (JSC::HeapRoot::HeapRoot):
5252        (JSC::HeapRoot::operator=): Added HeapRoot, which is allowed to set
5253        without write barrier because we assume all HeapRoots are scanned during
5254        all GC passes.
5255
52562011-03-14  Brian Weinstein  <bweinstein@apple.com>
5257
5258        Reviewed by Adam Roben and Gavin Barraclough.
5259
5260        FileSystemWin.cpp needs listDirectory() implementation
5261        https://bugs.webkit.org/show_bug.cgi?id=56331
5262        <rdar://problem/9126635>
5263
5264        Give StringConcatenate the ability to deal with const UChar*'s as a String type to append.
5265
5266        * wtf/text/StringConcatenate.h:
5267
52682011-03-14  Mark Rowe  <mrowe@apple.com>
5269
5270        Reviewed by Oliver Hunt.
5271
5272        <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
5273
5274        * API/JSClassRef.cpp:
5275        (OpaqueJSClass::OpaqueJSClass): Don't leak any existing entry for the given name if
5276        the class definition contains duplicates. This also removes what look to be leaks
5277        of the StringImpl instances that are used as keys: the HashMap key type is a RefPtr
5278        which retains / releases the instances at the appropriate time, so explicitly calling
5279        ref is not necessary.
5280
52812011-03-14  Oliver Hunt  <oliver@apple.com>
5282
5283        Fix windows build
5284
5285        * jit/JSInterfaceJIT.h:
5286        (JSC::JSInterfaceJIT::emitLoadInt32):
5287        (JSC::JSInterfaceJIT::tagFor):
5288        (JSC::JSInterfaceJIT::payloadFor):
5289        (JSC::JSInterfaceJIT::intPayloadFor):
5290        (JSC::JSInterfaceJIT::intTagFor):
5291        (JSC::JSInterfaceJIT::addressFor):
5292
52932011-03-11  Oliver Hunt  <oliver@apple.com>
5294
5295        Reviewed by Gavin Barraclough.
5296
5297        Ensure all values are correctly tagged in the registerfile
5298        https://bugs.webkit.org/show_bug.cgi?id=56214
5299
5300        This patch makes sure that all JSCell pointers written to
5301        the registerfile are correctly tagged as JSCells, and replaces
5302        raw int usage with the immediate representation.
5303
5304        For performance, register pressure, and general saneness reasons
5305        I've added abstractions for reading and writing the tag
5306        and payload of integer registers directly for the JSVALUE64
5307        encoding.
5308
5309        * interpreter/Register.h:
5310        (JSC::Register::withInt):
5311        (JSC::Register::withCallee):
5312        (JSC::Register::operator=):
5313        (JSC::Register::i):
5314        (JSC::Register::activation):
5315        (JSC::Register::function):
5316        (JSC::Register::propertyNameIterator):
5317        (JSC::Register::scopeChain):
5318        * jit/JIT.h:
5319        * jit/JITCall.cpp:
5320        (JSC::JIT::compileOpCallInitializeCallFrame):
5321        (JSC::JIT::compileOpCallVarargs):
5322        (JSC::JIT::compileOpCall):
5323        * jit/JITCall32_64.cpp:
5324        (JSC::JIT::compileOpCallInitializeCallFrame):
5325        (JSC::JIT::compileOpCallVarargs):
5326        (JSC::JIT::compileOpCall):
5327        (JSC::JIT::compileOpCallSlowCase):
5328        * jit/JITInlineMethods.h:
5329        (JSC::JIT::emitPutToCallFrameHeader):
5330        (JSC::JIT::emitPutCellToCallFrameHeader):
5331        (JSC::JIT::emitPutIntToCallFrameHeader):
5332        * jit/JITOpcodes.cpp:
5333        (JSC::JIT::privateCompileCTINativeCall):
5334        (JSC::JIT::emit_op_get_pnames):
5335        (JSC::JIT::emit_op_next_pname):
5336        (JSC::JIT::emit_op_load_varargs):
5337        (JSC::JIT::emitSlow_op_load_varargs):
5338        * jit/JITOpcodes32_64.cpp:
5339        (JSC::JIT::privateCompileCTINativeCall):
5340        (JSC::JIT::emit_op_get_pnames):
5341        (JSC::JIT::emit_op_next_pname):
5342        * jit/JSInterfaceJIT.h:
5343        (JSC::JSInterfaceJIT::intPayloadFor):
5344        (JSC::JSInterfaceJIT::intTagFor):
5345        * jit/SpecializedThunkJIT.h:
5346        (JSC::SpecializedThunkJIT::returnJSValue):
5347        (JSC::SpecializedThunkJIT::returnDouble):
5348        (JSC::SpecializedThunkJIT::returnInt32):
5349        (JSC::SpecializedThunkJIT::returnJSCell):
5350
53512011-03-13  Geoffrey Garen  <ggaren@apple.com>
5352
5353        Reviewed by Sam Weinig.
5354
5355        A few Heap-related renames (sans file moves, which should come next)
5356        https://bugs.webkit.org/show_bug.cgi?id=56283
5357
5358        ConservativeSet => ConservativeRoots. "Set" was misleading, since items
5359        are not uniqued. Also, "Roots" is more specific about what's in the set.
5360
5361        MachineStackMarker => MachineThreads. "Threads" is more descriptive of
5362        the fact that this class maintains a set of all threads using JSC.
5363        "Stack" was misleading, since this class traverses stacks and registers.
5364        "Mark" was misleading, since this class doesn't mark anything anymore.
5365
5366        registerThread => addCurrentThread. "Current" is more specific.
5367        unregisterThread => removeCurrentThread. "Current" is more specific.
5368
5369        "currentThreadRegistrar" => threadSpecific. The only point of this data
5370        structure is to register a thread-specific destructor with a pointer to
5371        this.
5372
5373        "mark...Conservatively" => "gather". "Mark" is not true, since these
5374        functions don't mark anything. "Conservatively" is redundant, since they
5375        take "ConservativeRoots" as an argument.
5376
5377        * API/APIShims.h:
5378        (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
5379        * JavaScriptCore.exp:
5380        * runtime/ConservativeSet.cpp:
5381        (JSC::ConservativeRoots::grow):
5382        (JSC::ConservativeRoots::add):
5383        * runtime/ConservativeSet.h:
5384        (JSC::ConservativeRoots::ConservativeRoots):
5385        (JSC::ConservativeRoots::~ConservativeRoots):
5386        (JSC::ConservativeRoots::size):
5387        (JSC::ConservativeRoots::roots):
5388        * runtime/Heap.cpp:
5389        (JSC::Heap::Heap):
5390        (JSC::Heap::markRoots):
5391        * runtime/Heap.h:
5392        (JSC::Heap::machineThreads):
5393        * runtime/JSGlobalData.h:
5394        (JSC::JSGlobalData::makeUsableFromMultipleThreads):
5395        * runtime/MachineStackMarker.cpp:
5396        (JSC::MachineThreads::MachineThreads):
5397        (JSC::MachineThreads::~MachineThreads):
5398        (JSC::MachineThreads::makeUsableFromMultipleThreads):
5399        (JSC::MachineThreads::addCurrentThread):
5400        (JSC::MachineThreads::removeThread):
5401        (JSC::MachineThreads::removeCurrentThread):
5402        (JSC::MachineThreads::gatherFromCurrentThreadInternal):
5403        (JSC::MachineThreads::gatherFromCurrentThread):
5404        (JSC::MachineThreads::gatherFromOtherThread):
5405        (JSC::MachineThreads::gatherConservativeRoots):
5406        * runtime/MachineStackMarker.h:
5407        * runtime/MarkStack.h:
5408        (JSC::MarkStack::append):
5409
54102011-03-13  David Kilzer  <ddkilzer@apple.com>
5411
5412        BUILD FIX for armv7 after r80969
5413
5414        Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
5415        <https://bugs.webkit.org/show_bug.cgi?id=56270>
5416
5417        * assembler/MacroAssemblerARMv7.h:
5418        (JSC::MacroAssemblerARMv7::load32): Made void* address argument
5419        const.
5420        (JSC::MacroAssemblerARMv7::store32): Ditto.
5421
54222011-03-13  Geoffrey Garen  <ggaren@apple.com>
5423
5424        Not reviewed.
5425
5426        Try to fix the Mac build.
5427
5428        * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
5429        ConervativeSet.h, since it's now visible when compiling other projects.
5430
54312011-03-13  Geoffrey Garen  <ggaren@apple.com>
5432
5433        Reviewed by Oliver Hunt.
5434
5435        Removed another case of DeprecatedPtr (ConservativeSet)
5436        https://bugs.webkit.org/show_bug.cgi?id=56281
5437
5438        The ConservativeSet is an internal data structure used during marking,
5439        so direct pointers are fine.
5440
5441        * runtime/ConservativeSet.cpp:
5442        (JSC::ConservativeSet::grow):
5443        * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
5444        (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
5445        the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
5446        sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
5447        (JSC::ConservativeSet::size):
5448        (JSC::ConservativeSet::set): Use direct pointers, as stated above.
5449
5450        * runtime/Heap.cpp:
5451        (JSC::Heap::markRoots):
5452        * runtime/MarkStack.h:
5453        (JSC::MarkStack::append): Created a special case of append for
5454        ConservativeSet. I didn't want to add back a generic "append JSCell*"
5455        function, since other class might start using that wrong. (In the end,
5456        this function might go away, since the Heap will want to do something
5457        slightly more interesting with the conservative set, but this is OK for
5458        now.)
5459
54602011-03-13  Geoffrey Garen  <ggaren@apple.com>
5461
5462        Reviewed by Oliver Hunt.
5463
5464        Removed another case of DeprecatedPtr (PutPropertySlot)
5465        https://bugs.webkit.org/show_bug.cgi?id=56278
5466
5467        * runtime/PutPropertySlot.h:
5468        (JSC::PutPropertySlot::setExistingProperty):
5469        (JSC::PutPropertySlot::setNewProperty):
5470        (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
5471        since it's a stack-allocated temporary.
5472
54732011-03-13  Geoffrey Garen  <ggaren@apple.com>
5474
5475        Reviewed by Oliver Hunt.
5476
5477        Removed one case of DeprecatedPtr (ScopeChainIterator)
5478        https://bugs.webkit.org/show_bug.cgi?id=56277
5479
5480        * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
5481        since it's a stack-allocated temporary.
5482
54832011-03-13  Gavin Barraclough  <barraclough@apple.com>
5484
5485        Reviewed by Sam Weinig.
5486
5487        Bug 56273 - Add three operand forms to MacroAssember operations.
5488
5489        Adding for X86(_64) for now, should be rolled out to other backends as necessary.
5490        These may allow more efficient code generation in some cases, avoiding the need
5491        for unnecessary register-register move instructions.
5492
5493        * assembler/AbstractMacroAssembler.h:
5494        (JSC::AbstractMacroAssembler::Jump::link):
5495        (JSC::AbstractMacroAssembler::Jump::linkTo):
5496            - marked these methods const.
5497        (JSC::AbstractMacroAssembler::Jump::isSet):
5498            - add a method to check whether a Jump object has been set to
5499              reference an instruction, or is in a null, unset state.
5500        * assembler/MacroAssemblerCodeRef.h:
5501        (JSC::FunctionPtr::FunctionPtr):
5502            - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
5503        * assembler/MacroAssemblerX86Common.h:
5504        (JSC::MacroAssemblerX86Common::and32):
5505        (JSC::MacroAssemblerX86Common::lshift32):
5506        (JSC::MacroAssemblerX86Common::or32):
5507        (JSC::MacroAssemblerX86Common::rshift32):
5508        (JSC::MacroAssemblerX86Common::urshift32):
5509        (JSC::MacroAssemblerX86Common::xor32):
5510        (JSC::MacroAssemblerX86Common::moveDouble):
5511        (JSC::MacroAssemblerX86Common::addDouble):
5512        (JSC::MacroAssemblerX86Common::divDouble):
5513        (JSC::MacroAssemblerX86Common::subDouble):
5514        (JSC::MacroAssemblerX86Common::mulDouble):
5515        (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
5516        (JSC::MacroAssemblerX86Common::branchTest32):
5517        (JSC::MacroAssemblerX86Common::branchTest8):
5518        (JSC::MacroAssemblerX86Common::branchAdd32):
5519        (JSC::MacroAssemblerX86Common::branchMul32):
5520        (JSC::MacroAssemblerX86Common::branchSub32):
5521            - add three operand forms of these instructions.
5522        * assembler/MacroAssemblerX86_64.h:
5523        (JSC::MacroAssemblerX86_64::addDouble):
5524        (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
5525        (JSC::MacroAssemblerX86_64::loadPtr):
5526        (JSC::MacroAssemblerX86_64::branchTestPtr):
5527        * assembler/X86Assembler.h:
5528        (JSC::X86Assembler::JmpSrc::isSet):
5529            - add a method to check whether a JmpSrc object has been set to
5530              reference an instruction, or is in a null, unset state.
5531        (JSC::X86Assembler::movsd_rr):
5532            - added FP register-register move.
5533        (JSC::X86Assembler::linkJump):
5534            - Add an assert to check jumps aren't linked more than once.
5535        * jit/JITInlineMethods.h:
5536        (JSC::JIT::emitLoadInt32ToDouble):
5537            - load integers to the FPU via regsiters on x86-64.
5538
55392011-03-13  Gavin Barraclough  <barraclough@apple.com>
5540
5541        ARM build fix.
5542
5543        * assembler/MacroAssemblerARM.h:
5544        (JSC::MacroAssemblerARM::load32):
5545
55462011-03-13  Gavin Barraclough  <barraclough@apple.com>
5547
5548        Reviewed by Sam Weinig.
5549
5550        Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
5551
5552        The JIT need to 'friend' other classes in order to be able to calculate offsets
5553        of various properties, or the absolute addresses of members within specific objects,
5554        in order to JIT generate code that will access members within the class when run.
5555
5556        Instead of using friends in these cases, switch to providing specific accessor
5557        methods to provide this information.  In the case of offsets, these can be static
5558        functions, and in the case of pointers to members within a specific object these can
5559        be const methods returning pointers to const values, to prevent clients from
5560        modifying values otherwise encapsulated within classes.
5561
5562        * bytecode/SamplingTool.h:
5563        * interpreter/Register.h:
5564        * interpreter/RegisterFile.h:
5565        * runtime/JSArray.h:
5566        * runtime/JSCell.h:
5567        * runtime/JSTypeInfo.h:
5568        * runtime/JSVariableObject.h:
5569        * runtime/Structure.h:
5570        * wtf/RefCounted.h:
5571            - Change these classes to no longer friend the JIT, add accessors for member offsets.
5572        * jit/JIT.cpp:
5573        * jit/JITCall32_64.cpp:
5574        * jit/JITInlineMethods.h:
5575        * jit/JITOpcodes.cpp:
5576        * jit/JITOpcodes32_64.cpp:
5577        * jit/JITPropertyAccess.cpp:
5578        * jit/JITPropertyAccess32_64.cpp:
5579            - Change the JIT to use class accessors, rather than taking object ofsets directly.
5580        * assembler/AbstractMacroAssembler.h:
5581        * assembler/MacroAssemblerX86_64.h:
5582        * assembler/X86Assembler.h:
5583            - Since the accessors for objects members return const pointers to retain encapsulation,
5584              methods generating code with absolute addresses must be able to handle const pointers
5585              (the JIT doesn't write to these values, do dies treat the pointer to value as const
5586              from within the C++ code of the JIT, if not at runtime!).
5587
55882011-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
5589
5590        Unreviewed, rolling out r80919.
5591        http://trac.webkit.org/changeset/80919
5592        https://bugs.webkit.org/show_bug.cgi?id=56251
5593
5594        all windows bots failed to compile this change (Requested by
5595        loislo on #webkit).
5596
5597        * JavaScriptCore.xcodeproj/project.pbxproj:
5598        * bytecode/StructureStubInfo.cpp:
5599        * interpreter/Register.h:
5600        (JSC::Register::withInt):
5601        (JSC::Register::withCallee):
5602        (JSC::Register::operator=):
5603        (JSC::Register::i):
5604        (JSC::Register::activation):
5605        (JSC::Register::function):
5606        (JSC::Register::propertyNameIterator):
5607        (JSC::Register::scopeChain):
5608        * jit/JIT.h:
5609        * jit/JITCall.cpp:
5610        (JSC::JIT::compileOpCallInitializeCallFrame):
5611        (JSC::JIT::compileOpCallVarargs):
5612        (JSC::JIT::compileOpCall):
5613        * jit/JITCall32_64.cpp:
5614        (JSC::JIT::compileOpCallInitializeCallFrame):
5615        (JSC::JIT::compileOpCallVarargs):
5616        (JSC::JIT::compileOpCall):
5617        (JSC::JIT::compileOpCallSlowCase):
5618        * jit/JITInlineMethods.h:
5619        (JSC::JIT::emitPutToCallFrameHeader):
5620        * jit/JITOpcodes.cpp:
5621        (JSC::JIT::privateCompileCTINativeCall):
5622        (JSC::JIT::emit_op_get_pnames):
5623        (JSC::JIT::emit_op_next_pname):
5624        (JSC::JIT::emit_op_load_varargs):
5625        (JSC::JIT::emitSlow_op_load_varargs):
5626        * jit/JITOpcodes32_64.cpp:
5627        (JSC::JIT::privateCompileCTINativeCall):
5628        (JSC::JIT::emit_op_get_pnames):
5629        (JSC::JIT::emit_op_next_pname):
5630        * jit/JSInterfaceJIT.h:
5631        (JSC::JSInterfaceJIT::payloadFor):
5632        * jit/SpecializedThunkJIT.h:
5633        (JSC::SpecializedThunkJIT::returnJSValue):
5634        (JSC::SpecializedThunkJIT::returnDouble):
5635        (JSC::SpecializedThunkJIT::returnInt32):
5636        (JSC::SpecializedThunkJIT::returnJSCell):
5637        * runtime/ArgList.cpp:
5638        * runtime/DateConversion.cpp:
5639        * runtime/GCActivityCallbackCF.cpp:
5640        * runtime/Identifier.cpp:
5641        * runtime/JSActivation.h:
5642        (JSC::asActivation):
5643        * runtime/JSLock.cpp:
5644        * runtime/JSNumberCell.cpp:
5645        * runtime/JSObject.h:
5646        * runtime/JSPropertyNameIterator.h:
5647        * runtime/JSValue.h:
5648        * runtime/JSZombie.cpp:
5649        * runtime/MarkedBlock.cpp:
5650        * runtime/MarkedSpace.cpp:
5651        * runtime/PropertyNameArray.cpp:
5652        * runtime/ScopeChain.h:
5653        (JSC::ExecState::globalThisValue):
5654        * wtf/DateMath.cpp:
5655
56562011-03-11  Oliver Hunt  <oliver@apple.com>
5657
5658        Reviewed by Gavin Barraclough.
5659
5660        Ensure all values are correctly tagged in the registerfile
5661        https://bugs.webkit.org/show_bug.cgi?id=56214
5662
5663        This patch makes sure that all JSCell pointers written to
5664        the registerfile are correctly tagged as JSCells, and replaces
5665        raw int usage with the immediate representation.
5666
5667        For performance, register pressure, and general saneness reasons
5668        I've added abstractions for reading and writing the tag
5669        and payload of integer registers directly for the JSVALUE64
5670        encoding.
5671
5672        * interpreter/Register.h:
5673        (JSC::Register::withInt):
5674        (JSC::Register::withCallee):
5675        (JSC::Register::operator=):
5676        (JSC::Register::i):
5677        (JSC::Register::activation):
5678        (JSC::Register::function):
5679        (JSC::Register::propertyNameIterator):
5680        (JSC::Register::scopeChain):
5681        * jit/JIT.h:
5682        * jit/JITCall.cpp:
5683        (JSC::JIT::compileOpCallInitializeCallFrame):
5684        (JSC::JIT::compileOpCallVarargs):
5685        (JSC::JIT::compileOpCall):
5686        * jit/JITCall32_64.cpp:
5687        (JSC::JIT::compileOpCallInitializeCallFrame):
5688        (JSC::JIT::compileOpCallVarargs):
5689        (JSC::JIT::compileOpCall):
5690        (JSC::JIT::compileOpCallSlowCase):
5691        * jit/JITInlineMethods.h:
5692        (JSC::JIT::emitPutToCallFrameHeader):
5693        (JSC::JIT::emitPutCellToCallFrameHeader):
5694        (JSC::JIT::emitPutIntToCallFrameHeader):
5695        * jit/JITOpcodes.cpp:
5696        (JSC::JIT::privateCompileCTINativeCall):
5697        (JSC::JIT::emit_op_get_pnames):
5698        (JSC::JIT::emit_op_next_pname):
5699        (JSC::JIT::emit_op_load_varargs):
5700        (JSC::JIT::emitSlow_op_load_varargs):
5701        * jit/JITOpcodes32_64.cpp:
5702        (JSC::JIT::privateCompileCTINativeCall):
5703        (JSC::JIT::emit_op_get_pnames):
5704        (JSC::JIT::emit_op_next_pname):
5705        * jit/JSInterfaceJIT.h:
5706        (JSC::JSInterfaceJIT::intPayloadFor):
5707        (JSC::JSInterfaceJIT::intTagFor):
5708        * jit/SpecializedThunkJIT.h:
5709        (JSC::SpecializedThunkJIT::returnJSValue):
5710        (JSC::SpecializedThunkJIT::returnDouble):
5711        (JSC::SpecializedThunkJIT::returnInt32):
5712        (JSC::SpecializedThunkJIT::returnJSCell):
5713
57142011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
5715
5716        Reviewed by Eric Seidel.
5717
5718        Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
5719        https://bugs.webkit.org/show_bug.cgi?id=56231
5720
5721        * JavaScriptCore.gypi: Added project_dir variable.
5722        * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
5723        * gyp/generate-dtrace-header.sh: Changed to use project_dir.
5724
57252011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
5726
5727        Reviewed by Adam Barth.
5728
5729        Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
5730        https://bugs.webkit.org/show_bug.cgi?id=56217
5731
5732        * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
5733            to the scripts.
5734        * gyp/generate-derived-sources.sh: Changed to use passed directory.
5735        * gyp/generate-dtrace-header.sh: Ditto.
5736
57372011-03-11  Eric Carlson  <eric.carlson@apple.com>
5738
5739        Reviewed by Sam Weinig.
5740
5741        <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
5742
5743        No new tests, existing media tests cover this.
5744
5745        * JavaScriptCore.exp: Export cancelCallOnMainThread
5746        * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
5747
57482011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
5749
5750        Reviewed by Adam Barth.
5751
5752        Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
5753        https://bugs.webkit.org/show_bug.cgi?id=56207
5754
5755        * JavaScriptCore.gypi: Added Tracing.d to the sources.
5756        * gyp/generate-dtrace-header.sh: Added.
5757        * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
5758            and added DTrace header generating step.
5759
57602011-03-10  Oliver Hunt  <oliver@apple.com>
5761
5762        Reviewed by Gavin Barraclough.
5763
5764        Fix allocation of native function with a cached thunk
5765        https://bugs.webkit.org/show_bug.cgi?id=56127
5766
5767        Fix this race condition found while fixing zombies.
5768
5769        * collector/handles/HandleHeap.cpp:
5770        (JSC::HandleHeap::clearWeakPointers):
5771        * runtime/Heap.cpp:
5772        (JSC::Heap::reset):
5773        * runtime/JSFunction.cpp:
5774        (JSC::JSFunction::JSFunction):
5775        (JSC::JSFunction::markChildren):
5776        * runtime/JSValue.h:
5777        (JSC::JSValue::decode):
5778        * runtime/JSZombie.cpp:
5779        (JSC::JSZombie::leakedZombieStructure):
5780        * runtime/JSZombie.h:
5781        (JSC::JSZombie::createStructure):
5782        * runtime/MarkedBlock.cpp:
5783
57842011-03-10  Luiz Agostini  <luiz.agostini@openbossa.org>
5785
5786        Reviewed by Andreas Kling.
5787
5788        [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
5789        https://bugs.webkit.org/show_bug.cgi?id=33008
5790
5791        Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
5792        Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
5793        it has its own ways to do JSC threading.
5794
5795        Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
5796
5797        * runtime/MachineStackMarker.cpp:
5798        * wtf/Platform.h:
5799
58002011-03-10  Gavin Barraclough  <barraclough@apple.com>
5801
5802        Reviewed by Oliver Hunt.
5803
5804        Bug 56077 - ES5 conformance issues with RegExp.prototype
5805
5806        There are three issues causing test failures in sputnik.
5807
5808        (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
5809        (2) The 'length' property of the test/exec functions should be 1.
5810        (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
5811
5812        * runtime/RegExpObject.cpp:
5813        (JSC::RegExpObject::markChildren):
5814            - Added to mark lastIndex
5815        (JSC::regExpObjectLastIndex):
5816        (JSC::setRegExpObjectLastIndex):
5817            - lastIndex is now stored as a JSValue.
5818        (JSC::RegExpObject::match):
5819            - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
5820        * runtime/RegExpObject.h:
5821        (JSC::RegExpObject::setLastIndex):
5822        (JSC::RegExpObject::setLastIndex):
5823            - Set lastIndex, either from a size_t or a JSValue.
5824        (JSC::RegExpObject::getLastIndex):
5825            - Get lastIndex.
5826        (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
5827            - Initialize as a JSValue.
5828        * runtime/RegExpPrototype.cpp:
5829        (JSC::RegExpPrototype::RegExpPrototype):
5830            - Add test/exec properties with length 1.
5831        * runtime/StringPrototype.cpp:
5832        (JSC::stringProtoFuncMatch):
5833        (JSC::stringProtoFuncSearch):
5834            - Do not read RegExp.input if none is provided.
5835        * tests/mozilla/js1_2/regexp/RegExp_input.js:
5836        * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
5837            - Update these tests (they relied on non-ES5 behaviour).
5838
58392011-03-10  Geoffrey Garen  <ggaren@apple.com>
5840
5841        Reviewed by Oliver Hunt.
5842
5843        Rolled back in 80277 and 80280 with event handler layout test failures fixed.
5844        https://bugs.webkit.org/show_bug.cgi?id=55653
5845
5846        The failures were caused by a last minute typo: assigning to currentEvent
5847        instead of m_currentEvent.
5848
5849        * JavaScriptCore.exp:
5850        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5851        * JavaScriptCore.xcodeproj/project.pbxproj:
5852        * bytecompiler/BytecodeGenerator.cpp:
5853        * jit/JITOpcodes.cpp:
5854        * jit/JITOpcodes32_64.cpp:
5855        * runtime/Arguments.h:
5856        * runtime/JSActivation.cpp:
5857        * runtime/JSActivation.h:
5858        * runtime/JSCell.h:
5859        * runtime/JSGlobalObject.cpp:
5860        * runtime/JSGlobalObject.h:
5861        * runtime/JSObject.cpp:
5862        * runtime/JSStaticScopeObject.cpp:
5863        * runtime/JSStaticScopeObject.h:
5864        * runtime/JSVariableObject.h:
5865        * runtime/MarkedSpace.cpp:
5866        * runtime/MarkedSpace.h:
5867
58682011-03-09  Oliver Hunt  <oliver@apple.com>
5869
5870        Reviewed by Gavin Barraclough.
5871
5872        jquery/manipulation.html fails after r80598
5873        https://bugs.webkit.org/show_bug.cgi?id=56019
5874
5875        When linking a call, codeblock now takes ownership of the linked function
5876        This removes the need for unlinking, and thus the incorrectness that was
5877        showing up in these tests.
5878
5879        * bytecode/CodeBlock.cpp:
5880        (JSC::CodeBlock::~CodeBlock):
5881        (JSC::CodeBlock::markAggregate):
5882        * bytecode/CodeBlock.h:
5883        (JSC::CallLinkInfo::CallLinkInfo):
5884        (JSC::CallLinkInfo::setUnlinked):
5885        (JSC::CodeBlock::addCaller):
5886        * jit/JIT.cpp:
5887        (JSC::JIT::privateCompile):
5888        (JSC::JIT::linkCall):
5889        (JSC::JIT::linkConstruct):
5890        * jit/JIT.h:
5891        * runtime/Executable.cpp:
5892        * runtime/Executable.h:
5893
58942011-03-09  Daniel Bates  <dbates@rim.com>
5895
5896        Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
5897        (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
5898
5899        * interpreter/Interpreter.cpp:
5900        (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
5901
59022011-03-09  Gavin Barraclough  <barraclough@apple.com>
5903
5904        Reviewed by Sam Weinig.
5905
5906        Bug 56041 - RexExp constructor should only accept flags "gim"
5907        Fix for issues introduced in r80667.
5908
5909        Invalid flags to a RegExp literal are a late syntax error!
5910
5911        * bytecode/CodeBlock.h:
5912        (JSC::CodeBlock::addRegExp):
5913            - Pass a PassRefPtr<RegExp>
5914        * bytecompiler/BytecodeGenerator.cpp:
5915        (JSC::BytecodeGenerator::addRegExp):
5916        (JSC::BytecodeGenerator::emitNewRegExp):
5917        * bytecompiler/BytecodeGenerator.h:
5918            - Pass a PassRefPtr<RegExp>
5919        * bytecompiler/NodesCodegen.cpp:
5920        (JSC::RegExpNode::emitBytecode):
5921            - Should not be ASSERTing that the flags are valid - this is a late(er) error.
5922        * interpreter/Interpreter.cpp:
5923        (JSC::Interpreter::privateExecute):
5924            - Need to check for error from RegExp constructor.
5925        * jit/JITStubs.cpp:
5926        (JSC::DEFINE_STUB_FUNCTION):
5927            - Need to check for error from RegExp constructor.
5928        * runtime/RegExp.h:
5929        (JSC::RegExp::isValid):
5930            - Make isValid check that the regexp was created with valid flags.
5931        * runtime/RegExpKey.h:
5932            - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
5933
59342011-03-09  Gavin Barraclough  <barraclough@apple.com>
5935
5936        Windows build fix part 2.
5937
5938        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5939
59402011-03-09  Gavin Barraclough  <barraclough@apple.com>
5941
5942        Windows build fix part 1.
5943
5944        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
5945
59462011-03-09  Gavin Barraclough  <barraclough@apple.com>
5947
5948        Reviewed by Darin Adler.
5949
5950        Bug 56041 - RexExp constructor should only accept flags "gim"
5951        We also should be passing the flags around as a bitfield rather than a string,
5952        and should not have redundant, incompatible code for converting the string to a bitfield!
5953
5954        * JavaScriptCore.exp:
5955        * bytecompiler/NodesCodegen.cpp:
5956        (JSC::RegExpNode::emitBytecode):
5957            - Need to parse flags string to enum.
5958        * runtime/RegExp.cpp:
5959        (JSC::regExpFlags):
5960        (JSC::RegExp::RegExp):
5961        (JSC::RegExp::create):
5962            - Add method to parse flags string to enum, change constructor/create args to take enum.
5963        * runtime/RegExp.h:
5964        (JSC::RegExp::global):
5965        (JSC::RegExp::ignoreCase):
5966        (JSC::RegExp::multiline):
5967            - Change to use new enum values.
5968        * runtime/RegExpCache.cpp:
5969        (JSC::RegExpCache::lookupOrCreate):
5970        (JSC::RegExpCache::create):
5971        * runtime/RegExpCache.h:
5972            - Changed to use regExpFlags enum instead of int/const UString&.
5973        * runtime/RegExpConstructor.cpp:
5974        (JSC::constructRegExp):
5975            - Add use new enum parsing, check for error.
5976        * runtime/RegExpKey.h:
5977        (JSC::RegExpKey::RegExpKey):
5978        * runtime/RegExpPrototype.cpp:
5979        (JSC::RegExpPrototype::RegExpPrototype):
5980            - Pass NoFlags value instead of empty string.
5981        (JSC::regExpProtoFuncCompile):
5982            - Add use new enum parsing, check for error.
5983        * runtime/StringPrototype.cpp:
5984        (JSC::stringProtoFuncMatch):
5985        (JSC::stringProtoFuncSearch):
5986            - Pass NoFlags value instead of empty string.
5987
59882011-03-08  Gavin Barraclough  <barraclough@apple.com>
5989
5990        Reviewed by Sam Weinig
5991
5992        Bug 55994 - Functions on Array.prototype should check length first.
5993        These methods are designed to work on generic objects too, and if 'length'
5994        is a getter that throws an exception, ensure this is correctly thrown
5995        (even if other exceptions would be thrown, too).
5996
5997        Make the length check the first thing we do.
5998        This change shows a progression on SunSpider on my machine, but this is likely bogus.
5999
6000        * runtime/ArrayPrototype.cpp:
6001        (JSC::arrayProtoFuncToString):
6002        (JSC::arrayProtoFuncToLocaleString):
6003        (JSC::arrayProtoFuncJoin):
6004        (JSC::arrayProtoFuncPop):
6005        (JSC::arrayProtoFuncPush):
6006        (JSC::arrayProtoFuncReverse):
6007        (JSC::arrayProtoFuncShift):
6008        (JSC::arrayProtoFuncSlice):
6009        (JSC::arrayProtoFuncSort):
6010        (JSC::arrayProtoFuncSplice):
6011        (JSC::arrayProtoFuncUnShift):
6012        (JSC::arrayProtoFuncFilter):
6013        (JSC::arrayProtoFuncMap):
6014        (JSC::arrayProtoFuncEvery):
6015        (JSC::arrayProtoFuncForEach):
6016        (JSC::arrayProtoFuncSome):
6017        (JSC::arrayProtoFuncReduce):
6018        (JSC::arrayProtoFuncReduceRight):
6019        (JSC::arrayProtoFuncIndexOf):
6020        (JSC::arrayProtoFuncLastIndexOf):
6021
60222011-03-07  Oliver Hunt  <oliver@apple.com>
6023
6024        Reviewed by Gavin Barraclough.
6025
6026        Make CodeBlock GC write barrier safe
6027        https://bugs.webkit.org/show_bug.cgi?id=55910
6028
6029        In order to make CodeBlock WriteBarrier safe it was necessary
6030        to make it have a single GC owner, and for that reason I have
6031        made ExecutableBase a GC allocated object.  This required
6032        updating their creation routines as well as all sites that hold
6033        a reference to them.  GC objects that held Executable's have been
6034        converted to WriteBarriers, and all other sites now use Global<>.
6035
6036        As an added benefit this gets rid of JSGlobalData's list of
6037        GlobalCodeBlocks.
6038
6039        Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
6040        on SunSpider.  Given none of the tests that show regressions
6041        demonstrate a regression on their own, and sampling shows up nothing.
6042        I suspect we're just getting one or two additional gc passes at
6043        the end of the run.
6044
6045        * bytecode/CodeBlock.cpp:
6046        (JSC::CodeBlock::dump):
6047        (JSC::CodeBlock::CodeBlock):
6048        (JSC::EvalCodeCache::markAggregate):
6049        (JSC::CodeBlock::markAggregate):
6050        * bytecode/CodeBlock.h:
6051        (JSC::CodeBlock::ownerExecutable):
6052        (JSC::CodeBlock::addConstant):
6053        (JSC::CodeBlock::constantRegister):
6054        (JSC::CodeBlock::getConstant):
6055        (JSC::CodeBlock::addFunctionDecl):
6056        (JSC::CodeBlock::addFunctionExpr):
6057        (JSC::GlobalCodeBlock::GlobalCodeBlock):
6058        (JSC::ExecState::r):
6059        * bytecode/EvalCodeCache.h:
6060        (JSC::EvalCodeCache::get):
6061        * bytecode/SamplingTool.h:
6062        (JSC::ScriptSampleRecord::ScriptSampleRecord):
6063        * bytecompiler/BytecodeGenerator.cpp:
6064        (JSC::BytecodeGenerator::addConstantValue):
6065        (JSC::BytecodeGenerator::emitEqualityOp):
6066        * bytecompiler/BytecodeGenerator.h:
6067        (JSC::BytecodeGenerator::makeFunction):
6068        * debugger/Debugger.cpp:
6069        (JSC::evaluateInGlobalCallFrame):
6070        * debugger/DebuggerCallFrame.cpp:
6071        (JSC::DebuggerCallFrame::evaluate):
6072        * interpreter/Interpreter.cpp:
6073        (JSC::Interpreter::callEval):
6074        * jit/JITInlineMethods.h:
6075        (JSC::JIT::emitLoadDouble):
6076        (JSC::JIT::emitLoadInt32ToDouble):
6077        * jit/JITStubs.cpp:
6078        (JSC::JITThunks::JITThunks):
6079        (JSC::JITThunks::hostFunctionStub):
6080        (JSC::JITThunks::clearHostFunctionStubs):
6081        * jit/JITStubs.h:
6082        * runtime/Completion.cpp:
6083        (JSC::checkSyntax):
6084        (JSC::evaluate):
6085        * runtime/Executable.cpp:
6086        (JSC::EvalExecutable::EvalExecutable):
6087        (JSC::ProgramExecutable::ProgramExecutable):
6088        (JSC::FunctionExecutable::FunctionExecutable):
6089        (JSC::FunctionExecutable::~FunctionExecutable):
6090        (JSC::EvalExecutable::markChildren):
6091        (JSC::ProgramExecutable::markChildren):
6092        (JSC::FunctionExecutable::markChildren):
6093        (JSC::FunctionExecutable::fromGlobalCode):
6094        * runtime/Executable.h:
6095        (JSC::ExecutableBase::ExecutableBase):
6096        (JSC::ExecutableBase::createStructure):
6097        (JSC::NativeExecutable::create):
6098        (JSC::NativeExecutable::NativeExecutable):
6099        (JSC::VPtrHackExecutable::VPtrHackExecutable):
6100        (JSC::ScriptExecutable::ScriptExecutable):
6101        (JSC::EvalExecutable::create):
6102        (JSC::EvalExecutable::createStructure):
6103        (JSC::ProgramExecutable::create):
6104        (JSC::ProgramExecutable::createStructure):
6105        (JSC::FunctionExecutable::create):
6106        (JSC::FunctionExecutable::createStructure):
6107        * runtime/FunctionConstructor.cpp:
6108        (JSC::constructFunction):
6109        * runtime/Heap.cpp:
6110        (JSC::Heap::destroy):
6111        (JSC::Heap::markRoots):
6112        * runtime/Heap.h:
6113        * runtime/JSActivation.cpp:
6114        (JSC::JSActivation::JSActivation):
6115        (JSC::JSActivation::markChildren):
6116        * runtime/JSActivation.h:
6117        (JSC::JSActivation::JSActivationData::JSActivationData):
6118        * runtime/JSCell.h:
6119        * runtime/JSFunction.cpp:
6120        (JSC::JSFunction::JSFunction):
6121        (JSC::JSFunction::~JSFunction):
6122        (JSC::JSFunction::markChildren):
6123        * runtime/JSFunction.h:
6124        * runtime/JSGlobalData.cpp:
6125        (JSC::JSGlobalData::storeVPtrs):
6126        (JSC::JSGlobalData::JSGlobalData):
6127        (JSC::JSGlobalData::getHostFunction):
6128        * runtime/JSGlobalData.h:
6129        * runtime/JSGlobalObjectFunctions.cpp:
6130        (JSC::globalFuncEval):
6131        * runtime/JSObject.cpp:
6132        * runtime/JSStaticScopeObject.cpp:
6133        (JSC::JSStaticScopeObject::markChildren):
6134        * runtime/JSStaticScopeObject.h:
6135        (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
6136        (JSC::JSStaticScopeObject::JSStaticScopeObject):
6137        * runtime/JSZombie.cpp:
6138        (JSC::JSZombie::leakedZombieStructure):
6139        * runtime/JSZombie.h:
6140        (JSC::JSZombie::createStructure):
6141        * runtime/MarkedSpace.h:
6142
61432011-03-07  Andy Estes  <aestes@apple.com>
6144
6145        Reviewed by Dan Bernstein.
6146
6147        REGRESSION (r79060): Timestamp is missing from tweets in twitter.
6148        https://bugs.webkit.org/show_bug.cgi?id=55228
6149
6150        A change to the date parser to handle the case where the year is
6151        specified before the time zone inadvertently started accepting strings
6152        such as '+0000' as valid years. Those strings actually represent time
6153        zones in an offset of hours and minutes from UTC, not years.
6154
6155        * wtf/DateMath.cpp:
6156        (WTF::parseDateFromNullTerminatedCharacters): If the current character
6157        in dateString is '+' or '-', do not try to parse the next token as a
6158        year.
6159
61602011-03-06  Yuta Kitamura  <yutak@chromium.org>
6161
6162        Reviewed by Kent Tamura.
6163
6164        Add SHA-1 for new WebSocket protocol
6165        https://bugs.webkit.org/show_bug.cgi?id=55039
6166
6167        The code is based on Chromium's portable SHA-1 implementation
6168        (src/base/sha1_portable.cc). Modifications were made in order
6169        to make the code comply with WebKit coding style.
6170
6171        * GNUmakefile.am:
6172        * JavaScriptCore.exp:
6173        * JavaScriptCore.gypi:
6174        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6175        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
6176        * JavaScriptCore.xcodeproj/project.pbxproj:
6177        * wtf/CMakeLists.txt:
6178        * wtf/MD5.cpp:
6179        (WTF::MD5::MD5):
6180        * wtf/SHA1.cpp: Added.
6181        (WTF::testSHA1): This function will be run the first time SHA1
6182        constructor is called. This function computes a few hash values
6183        and checks the results in debug builds. However, constructor is
6184        probably not a good place to run these tests, so we need to find
6185        a good place for it (bug 55853).
6186        (WTF::expectSHA1):
6187        (WTF::f):
6188        (WTF::k):
6189        (WTF::rotateLeft):
6190        (WTF::SHA1::SHA1):
6191        (WTF::SHA1::addBytes):
6192        (WTF::SHA1::computeHash):
6193        (WTF::SHA1::finalize):
6194        (WTF::SHA1::processBlock):
6195        (WTF::SHA1::reset):
6196        * wtf/SHA1.h: Added.
6197        (WTF::SHA1::addBytes):
6198        * wtf/wtf.pri:
6199
62002011-03-05  Adam Barth  <abarth@webkit.org>
6201
6202        Reviewed by Dimitri Glazkov.
6203
6204        Add Derived Sources to WebCore GYP build
6205        https://bugs.webkit.org/show_bug.cgi?id=55813
6206
6207        Rename the action to be friendlier.
6208
6209        * gyp/JavaScriptCore.gyp:
6210
62112011-03-04  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
6212
6213        Reviewed by Laszlo Gombos.
6214
6215        [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
6216        https://bugs.webkit.org/show_bug.cgi?id=55782
6217
6218        Implement Symbian version of cryptographicallyRandomValuesFromOS
6219
6220        * wtf/OSRandomSource.cpp:
6221        (WTF::cryptographicallyRandomValuesFromOS):
6222
62232011-03-04  Gavin Barraclough  <barraclough@apple.com>
6224
6225        Reviewed by Cameron Zwarich.
6226
6227        Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
6228
6229        * runtime/JSObject.cpp:
6230        (JSC::JSObject::defineOwnProperty):
6231            Add missing check.
6232
62332011-03-04  Gavin Barraclough  <barraclough@apple.com>
6234
6235        Rubber stamped by olliej.
6236
6237        Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
6238
6239        * interpreter/Interpreter.cpp:
6240        (JSC::Interpreter::privateExecute):
6241            (1) don't infinite loop.
6242            (2) goto 1.
6243
62442011-03-04  Gavin Barraclough  <barraclough@apple.com>
6245
6246        cmake build fix.
6247
6248        * CMakeLists.txt:
6249
62502011-03-04  Adam Barth  <abarth@webkit.org>
6251
6252        Reviewed by Dimitri Glazkov.
6253
6254        Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
6255        https://bugs.webkit.org/show_bug.cgi?id=55798
6256
6257        * JavaScriptCore.gypi:
6258        * gyp/JavaScriptCore.gyp:
6259
62602011-03-04  Adam Barth  <abarth@webkit.org>
6261
6262        Reviewed by Dimitri Glazkov.
6263
6264        Remove unneeded round-trips through ../Source in the Chromium GYP build
6265        https://bugs.webkit.org/show_bug.cgi?id=55795
6266
6267        * JavaScriptCore.gyp/JavaScriptCore.gyp:
6268
62692011-03-04  Adam Barth  <abarth@webkit.org>
6270
6271        Reviewed by Dimitri Glazkov.
6272
6273        Use target_defaults to reduce boilerplate in GYP build system
6274        https://bugs.webkit.org/show_bug.cgi?id=55790
6275
6276        Instead of setting up the configuration in each target, just defer to
6277        target_defaults.  Also, removed a define that was redundant with the
6278        xcconfig.
6279
6280        * gyp/JavaScriptCore.gyp:
6281
62822011-03-03  Gavin Barraclough  <barraclough@apple.com>
6283
6284        Reviewed by Sam Weinig.
6285
6286        Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
6287        Provide basic functionallity from section 15.2.4 of ECMA-262.
6288        This support will need expanding to cover arrays, too.
6289
6290        Shows a 0.5% progression on SunSpidey, this seems to be due to changing
6291        ObjectConstructor to use a static table.
6292
6293        * DerivedSources.make:
6294        * JavaScriptCore.exp:
6295        * interpreter/CallFrame.h:
6296        (JSC::ExecState::objectConstructorTable):
6297            Add a static table for ObjectConstructor.
6298        * runtime/CommonIdentifiers.h:
6299        * runtime/JSGlobalData.cpp:
6300        (JSC::JSGlobalData::JSGlobalData):
6301        (JSC::JSGlobalData::~JSGlobalData):
6302            Add a static table for ObjectConstructor.
6303        * runtime/JSGlobalData.h:
6304        * runtime/JSGlobalObject.cpp:
6305        (JSC::JSGlobalObject::reset):
6306            Add a static table for ObjectConstructor.
6307        * runtime/JSObject.cpp:
6308        (JSC::JSObject::seal):
6309        (JSC::JSObject::freeze):
6310        (JSC::JSObject::preventExtensions):
6311            Transition the object's structure.
6312        (JSC::JSObject::defineOwnProperty):
6313            Check isExtensible.
6314        * runtime/JSObject.h:
6315        (JSC::JSObject::isSealed):
6316        (JSC::JSObject::isFrozen):
6317        (JSC::JSObject::isExtensible):
6318            These wrap method on structure.
6319        (JSC::JSObject::putDirectInternal):
6320            Check isExtensible.
6321        * runtime/ObjectConstructor.cpp:
6322        (JSC::ObjectConstructor::ObjectConstructor):
6323        (JSC::ObjectConstructor::getOwnPropertySlot):
6324        (JSC::ObjectConstructor::getOwnPropertyDescriptor):
6325            Change ObjectConstructor to use a static table.
6326        (JSC::objectConstructorSeal):
6327        (JSC::objectConstructorFreeze):
6328        (JSC::objectConstructorPreventExtensions):
6329        (JSC::objectConstructorIsSealed):
6330        (JSC::objectConstructorIsFrozen):
6331        (JSC::objectConstructorIsExtensible):
6332            Add new methods on Object.
6333        * runtime/ObjectConstructor.h:
6334        (JSC::ObjectConstructor::createStructure):
6335        * runtime/Structure.cpp:
6336        (JSC::Structure::Structure):
6337            init/propagate  m_preventExtensions
6338        (JSC::Structure::sealTransition):
6339        (JSC::Structure::freezeTransition):
6340        (JSC::Structure::preventExtensionsTransition):
6341            transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
6342        (JSC::Structure::isSealed):
6343        (JSC::Structure::isFrozen):
6344            check attributes to detect if object is sealed/frozen.
6345        * runtime/Structure.h:
6346        (JSC::Structure::isExtensible):
6347            checks the m_preventExtensions flag.
6348
63492011-03-04  Steve Falkenburg  <sfalken@apple.com>
6350
6351        Reviewed by Jon Honeycutt.
6352
6353        Adopt VersionStamper tool for Windows WebKit DLLs
6354        https://bugs.webkit.org/show_bug.cgi?id=55784
6355        <rdar://problem/9021273>
6356
6357        We now use a tool to stamp the version number onto the Apple WebKit DLLs
6358        during the post-build step.
6359
6360        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
6361        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
6362        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
6363        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
6364
63652011-03-04  Adam Barth  <abarth@webkit.org>
6366
6367        Reviewed by Dimitri Glazkov.
6368
6369        JavaScriptCore GYP build should use a header map
6370        https://bugs.webkit.org/show_bug.cgi?id=55712
6371
6372        This patch moves the os-win32 files into their own variable so that we
6373        can use a header map in the Apple Mac Xcode build.  The problem is that
6374        the header map searches the whole project rather than just the files
6375        included in a given target.  Another solution to this problem is to
6376        make GYP smarter about filtering out what files are added to the
6377        project file.
6378
6379        * JavaScriptCore.gypi:
6380        * gyp/JavaScriptCore.gyp:
6381
63822011-03-03  Ryosuke Niwa  <rniwa@webkit.org>
6383
6384        Reviewed by Darin Adler.
6385
6386        Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
6387        https://bugs.webkit.org/show_bug.cgi?id=55554
6388
6389        * runtime/JSGlobalObject.cpp:
6390        (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
6391        (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
6392        * runtime/JSGlobalObject.h:
6393        (JSC::JSGlobalObject::addStaticGlobals): Ditto.
6394        * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
6395        (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
6396
63972011-03-03  Adam Barth  <abarth@webkit.org>
6398
6399        Reviewed by Dimitri Glazkov.
6400
6401        Add jsc to JavaScriptCore GYP build
6402        https://bugs.webkit.org/show_bug.cgi?id=55711
6403
6404        * JavaScriptCore.gypi:
6405            - Move jsc.cpp into jsc_files because it's really part of the jsc
6406              target.
6407        * JavaScriptCore.xcodeproj/project.pbxproj:
6408            - Remove extraneous files from the normal jsc build.  I probably
6409              added these by mistake at some point.
6410        * gyp/JavaScriptCore.gyp:
6411            - Add the jsc target to the GYP file.
6412
64132011-03-03  Adam Barth  <abarth@webkit.org>
6414
6415        Reviewed by Dimitri Glazkov.
6416
6417        Add testapi to JavaScriptCore GYP build
6418        https://bugs.webkit.org/show_bug.cgi?id=55707
6419
6420        The new testapi target is slightly incomplete.  There's a resource
6421        copying step that we don't quite have yet.
6422
6423        This patch also cleans up some of the configuration issues in
6424        JavaScriptCore.xcodeproj.  It seems kind of wordy to repeat these for
6425        each target.  I suspect there's a more compact way of defining the
6426        configurations, but this removes the "Default" configuration, which is
6427        progress.
6428
6429        * JavaScriptCore.gypi:
6430        * gyp/JavaScriptCore.gyp:
6431
64322011-03-03  Adam Barth  <abarth@webkit.org>
6433
6434        Reviewed by Eric Seidel.
6435
6436        Teach JavaScriptCore GYP build about private headers
6437        https://bugs.webkit.org/show_bug.cgi?id=55532
6438
6439        This patch distinguishes between public and private framework headers
6440        so that public headers are copied into the Headers directory and
6441        private headers are copied into the PrivateHeaders directory.
6442
6443        * gyp/JavaScriptCore.gyp:
6444
64452011-03-03  Geoffrey Garen  <ggaren@apple.com>
6446
6447        Rolled out 80277 and 80280 because they caused event handler layout test
6448        failures.
6449
6450        * JavaScriptCore.exp:
6451        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6452        * JavaScriptCore.xcodeproj/project.pbxproj:
6453        * bytecompiler/BytecodeGenerator.cpp:
6454        * jit/JITOpcodes.cpp:
6455        * jit/JITOpcodes32_64.cpp:
6456        * runtime/Arguments.h:
6457        * runtime/JSActivation.cpp:
6458        * runtime/JSActivation.h:
6459        * runtime/JSCell.h:
6460        * runtime/JSGlobalObject.cpp:
6461        * runtime/JSGlobalObject.h:
6462        * runtime/JSObject.cpp:
6463        * runtime/JSStaticScopeObject.cpp:
6464        * runtime/JSStaticScopeObject.h:
6465        * runtime/JSVariableObject.h:
6466        * runtime/MarkedSpace.cpp:
6467        * runtime/MarkedSpace.h:
6468
64692011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
6470
6471        [wx] Build fix. Alter order of headers included to make sure windows.h
6472        is configured by wx, and skip Posix implementation file we don't use on Win.
6473
6474        * wscript:
6475        * wtf/wx/StringWx.cpp:
6476
64772011-03-03  Oliver Hunt  <oliver@apple.com>
6478
6479        Reviewed by Geoffrey Garen.
6480
6481        JSVariableObject needs to use WriteBarrier for symboltable property storage
6482        https://bugs.webkit.org/show_bug.cgi?id=55698
6483
6484        Replace the direct usage of Register in JSVariableObject (and descendents)
6485        with WriteBarrier.  This requires updating the Arguments object to use
6486        WriteBarrier as well.
6487
6488        * interpreter/Interpreter.cpp:
6489        (JSC::Interpreter::unwindCallFrame):
6490        (JSC::Interpreter::privateExecute):
6491        (JSC::Interpreter::retrieveArguments):
6492        * jit/JITStubs.cpp:
6493        (JSC::DEFINE_STUB_FUNCTION):
6494        * runtime/ArgList.h:
6495        (JSC::MarkedArgumentBuffer::initialize):
6496        * runtime/Arguments.cpp:
6497        (JSC::Arguments::markChildren):
6498        (JSC::Arguments::copyToRegisters):
6499        (JSC::Arguments::fillArgList):
6500        (JSC::Arguments::getOwnPropertySlot):
6501        (JSC::Arguments::getOwnPropertyDescriptor):
6502        (JSC::Arguments::put):
6503        * runtime/Arguments.h:
6504        (JSC::Arguments::setActivation):
6505        (JSC::Arguments::Arguments):
6506        (JSC::Arguments::copyRegisters):
6507        (JSC::JSActivation::copyRegisters):
6508        * runtime/JSActivation.cpp:
6509        (JSC::JSActivation::markChildren):
6510        (JSC::JSActivation::symbolTableGet):
6511        (JSC::JSActivation::symbolTablePut):
6512        (JSC::JSActivation::symbolTablePutWithAttributes):
6513        (JSC::JSActivation::put):
6514        (JSC::JSActivation::putWithAttributes):
6515        (JSC::JSActivation::argumentsGetter):
6516        * runtime/JSActivation.h:
6517        * runtime/JSGlobalObject.cpp:
6518        (JSC::JSGlobalObject::put):
6519        (JSC::JSGlobalObject::putWithAttributes):
6520        (JSC::JSGlobalObject::markChildren):
6521        (JSC::JSGlobalObject::copyGlobalsFrom):
6522        (JSC::JSGlobalObject::copyGlobalsTo):
6523        (JSC::JSGlobalObject::resizeRegisters):
6524        * runtime/JSGlobalObject.h:
6525        (JSC::JSGlobalObject::setRegisters):
6526        (JSC::JSGlobalObject::addStaticGlobals):
6527        * runtime/JSStaticScopeObject.cpp:
6528        (JSC::JSStaticScopeObject::put):
6529        (JSC::JSStaticScopeObject::putWithAttributes):
6530        * runtime/JSVariableObject.cpp:
6531        (JSC::JSVariableObject::symbolTableGet):
6532        * runtime/JSVariableObject.h:
6533        (JSC::JSVariableObject::registerAt):
6534        (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
6535        (JSC::JSVariableObject::symbolTableGet):
6536        (JSC::JSVariableObject::symbolTablePut):
6537        (JSC::JSVariableObject::symbolTablePutWithAttributes):
6538        (JSC::JSVariableObject::copyRegisterArray):
6539        (JSC::JSVariableObject::setRegisters):
6540
65412011-03-03  Geoffrey Garen  <ggaren@apple.com>
6542
6543        Try to fix Windows build.
6544
6545        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol.
6546
6547        * runtime/JSStaticScopeObject.cpp:
6548        (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function
6549        inline -- it's virtual.
6550
65512011-03-02  Geoffrey Garen  <ggaren@apple.com>
6552
6553        Reviewed by Darin Adler.
6554
6555        Moved all variable object storage inline -- upping the object size limit to 1K
6556        https://bugs.webkit.org/show_bug.cgi?id=55653
6557
6558        * JavaScriptCore.exp:
6559        * bytecompiler/BytecodeGenerator.cpp:
6560        * jit/JITOpcodes.cpp:
6561        * runtime/Arguments.h:
6562        * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
6563
6564        * runtime/JSCell.h:
6565        (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
6566        to accomodate objects up to 1K.
6567
6568        * runtime/JSGlobalObject.cpp:
6569        * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
6570
6571        * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
6572        object size, since it doesn't anymore.
6573
6574        * runtime/JSStaticScopeObject.cpp:
6575        * runtime/JSStaticScopeObject.h:
6576        * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
6577
6578        * runtime/MarkedSpace.cpp:
6579        (JSC::MarkedSpace::MarkedSpace):
6580        (JSC::MarkedSpace::reset):
6581        * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
6582
65832011-03-03  Timothy Hatcher  <timothy@apple.com>
6584
6585        Make APIShims usable from WebCore.
6586
6587        Reviewed by Oliver Hunt.
6588
6589        * ForwardingHeaders/JavaScriptCore/APIShims.h: Added.
6590        * GNUmakefile.am:
6591        * JavaScriptCore.exp:
6592        * JavaScriptCore.gypi:
6593        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
6594        * JavaScriptCore.xcodeproj/project.pbxproj:
6595
65962011-03-03  Peter Varga  <pvarga@webkit.org>
6597
6598        Reviewed by Oliver Hunt.
6599
6600        Begin Characters Optimization Causes YARR Interpreter Errors
6601        https://bugs.webkit.org/show_bug.cgi?id=55479
6602
6603        The addBeginTerm function is removed because it doesn't correctly handle those
6604        cases when an "invalid" term has been
6605        collected (e.g. CharacterClass). Move the removed function to the
6606        setupAlternativeBeginTerms method's switch-case
6607        where the non-allowed cases are correctly handled.
6608
6609        Reenable the Beginning Character Optimization in the YARR Interpreter again.
6610
6611        * yarr/YarrPattern.cpp:
6612        (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
6613        (JSC::Yarr::YarrPattern::compile):
6614
66152011-03-02  Jessie Berlin  <jberlin@apple.com>
6616
6617        Reviewed by Adam Roben.
6618
6619        WebKit2: Use CFNetwork Sessions API.
6620        https://bugs.webkit.org/show_bug.cgi?id=55435
6621
6622        Add the ability to create a Private Browsing storage session.
6623
6624        * wtf/Platform.h:
6625        Add a new #define for using CF Storage Sessions.
6626
66272011-03-02  Oliver Hunt  <oliver@apple.com>
6628
6629        Reviewed by Gavin Barraclough.
6630
6631        Remove "register slot" concept from PropertySlot
6632        https://bugs.webkit.org/show_bug.cgi?id=55621
6633
6634        PropertySlot had already stopped storing Register "slots"
6635        so this patch is simply removing that api entirely.
6636        This exposed a problem in the ProgramNode constructor for
6637        BytecodeGenerator where it reads from the registerfile
6638        before it has initialised it.
6639
6640        This bug wasn't a problem before as we were merely testing
6641        for property existence rather than the actual value, and
6642        used to work because setRegisterSlot didn't check that the
6643        provided slot contained an initialised value.
6644
6645        To get around this issue we now use symbolTableHasProperty
6646        to do the symbol table check without trying to read the
6647        RegisterFile.
6648
6649        * JavaScriptCore.xcodeproj/project.pbxproj:
6650        * bytecompiler/BytecodeGenerator.cpp:
6651        (JSC::BytecodeGenerator::BytecodeGenerator):
6652        * runtime/Arguments.cpp:
6653        (JSC::Arguments::getOwnPropertySlot):
6654        * runtime/JSActivation.cpp:
6655        (JSC::JSActivation::symbolTableGet):
6656        * runtime/JSGlobalObject.h:
6657        (JSC::JSGlobalObject::symbolTableHasProperty):
6658        * runtime/JSVariableObject.h:
6659        (JSC::JSVariableObject::symbolTableGet):
6660        * runtime/PropertySlot.h:
6661
66622011-03-02  Daniel Cheng  <dcheng@chromium.org>
6663
6664        Reviewed by David Levin.
6665
6666        Add feature define for data transfer items
6667        https://bugs.webkit.org/show_bug.cgi?id=55510
6668
6669        * Configurations/FeatureDefines.xcconfig:
6670        * wtf/Platform.h:
6671
66722011-03-02  Adam Roben  <aroben@apple.com>
6673
6674        Delete old .res files whenever any .vsprops file changes
6675
6676        Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
6677        fail
6678
6679        Reviewed by Tony Chang.
6680
6681        * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
6682        (main): Restructured code to loop over a set of file extensions, deleting any old files that
6683        have that extension. Now deletes .res files, too. (We previously deleted any file matching
6684        *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
6685
66862011-03-02  Adam Barth  <abarth@webkit.org>
6687
6688        Reviewed by Dimitri Glazkov.
6689
6690        Teach JavaScriptCore GYP build how to build minidom
6691        https://bugs.webkit.org/show_bug.cgi?id=55536
6692
6693        * JavaScriptCore.gypi:
6694        * gyp/JavaScriptCore.gyp:
6695
66962011-03-01  Adam Barth  <abarth@webkit.org>
6697
6698        Reviewed by Eric Seidel.
6699
6700        JavaScriptCore GYP build should copy some headers into the target framework
6701        https://bugs.webkit.org/show_bug.cgi?id=55524
6702
6703        After this patch, all the framework headers are exported as public
6704        headers.  We need to teach GYP how to handle private headers.
6705
6706        I struggled to determine how to store the information about whether a
6707        header was public, private, or project (i.e., not exported).
6708        Generally, the GYPI should just list the files, but it seemed siliy to
6709        have an almost duplicated list of files in the GYP file itself.  If
6710        this design doesn't scale, we might have to revisit it in the future.
6711
6712        * JavaScriptCore.gyp/JavaScriptCore.gyp:
6713        * JavaScriptCore.gypi:
6714        * gyp/JavaScriptCore.gyp:
6715
67162011-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
6717
6718        Unreviewed, rolling out r80079.
6719        http://trac.webkit.org/changeset/80079
6720        https://bugs.webkit.org/show_bug.cgi?id=55547
6721
6722        "Broke the Win debug build?" (Requested by dcheng on #webkit).
6723
6724        * wtf/Platform.h:
6725
67262011-03-01  Daniel Cheng  <dcheng@chromium.org>
6727
6728        Reviewed by David Levin.
6729
6730        Add feature define for data transfer items
6731        https://bugs.webkit.org/show_bug.cgi?id=55510
6732
6733        * wtf/Platform.h:
6734
67352011-03-01  Oliver Hunt  <oliver@apple.com>
6736
6737        Reviewed by Joseph Pecoraro.
6738
6739        Misaligned memory access in CloneDeserializer on all ARM arch.
6740        https://bugs.webkit.org/show_bug.cgi?id=48742
6741
6742        Add a CPU class for architectures that need aligned addresses
6743        for memory access.
6744
6745        * wtf/Platform.h:
6746
67472011-03-01  Adam Barth  <abarth@webkit.org>
6748
6749        Reviewed by Dimitri Glazkov.
6750
6751        Add pre- and post-build actions for JavaScriptCore GYP build
6752        https://bugs.webkit.org/show_bug.cgi?id=55507
6753
6754        After this patch, we have all the steps for building the main
6755        JavaScriptCore framework except the "copy headers" step, which I'll do
6756        next.
6757
6758        * gyp/JavaScriptCore.gyp:
6759
67602011-03-01  Geoffrey Garen  <ggaren@apple.com>
6761
6762        Reviewed by Sam Weinig.
6763
6764        Rolled back in r79627 now that the underlying cause for it crashing is fixed.
6765        https://bugs.webkit.org/show_bug.cgi?id=55159
6766
6767        * JavaScriptCore.exp:
6768        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6769        * JavaScriptCore.xcodeproj/project.pbxproj:
6770        * runtime/Heap.cpp:
6771        (JSC::Heap::allocateSlowCase):
6772        * runtime/Heap.h:
6773        * runtime/JSCell.h:
6774        (JSC::JSCell::MarkedSpace::sizeClassFor):
6775        (JSC::JSCell::Heap::allocate):
6776        (JSC::JSCell::JSCell::operator new):
6777        * runtime/MarkedBlock.h:
6778        * runtime/MarkedSpace.cpp:
6779        (JSC::MarkedSpace::MarkedSpace):
6780        (JSC::MarkedSpace::allocateBlock):
6781        (JSC::MarkedSpace::reset):
6782        * runtime/MarkedSpace.h:
6783        (JSC::MarkedSpace::SizeClass::SizeClass):
6784
67852011-03-01  Mark Rowe  <mrowe@apple.com>
6786
6787        Reviewed by Sam Weinig.
6788
6789        Replace two script phases that do nothing but copy files with copy files build phases.
6790
6791        This speeds up the build by a few seconds on high-end Mac Pros.
6792
6793        * JavaScriptCore.xcodeproj/project.pbxproj:
6794
67952011-03-01  David Kilzer  <ddkilzer@apple.com>
6796
6797        Spring cleaning!
6798
6799        Rubber-stamped by Mark Rowe.
6800
6801        * JavaScriptCore.xcodeproj/project.pbxproj:
6802        (Copy Into Framework): Remove "set -x" and its comment.
6803
68042011-03-01  Michael Saboff  <msaboff@apple.com>
6805
6806        Reviewed by Darin Adler.
6807
6808        TinyMCE not working in nightlies
6809        https://bugs.webkit.org/show_bug.cgi?id=54978
6810
6811        Disabling setupBeginChars() to temporarily work arround the test
6812        failure.  Filed https://bugs.webkit.org/show_bug.cgi?id=55479
6813        to track fixing the issue.
6814
6815        * yarr/YarrPattern.cpp:
6816        (JSC::Yarr::YarrPattern::compile):
6817
68182011-02-23  Joseph Pecoraro  <joepeck@webkit.org>
6819
6820        Reviewed by Kenneth Rohde Christiansen.
6821
6822        Viewport parsing no longer accepts "1.0;" value as valid.
6823        https://bugs.webkit.org/show_bug.cgi?id=53705
6824
6825        Include a didReadNumber parameter to String -> float / double
6826        conversion functions. This way, if the "ok" boolean out
6827        parameter is false, you can check to see if there in fact
6828        was a valid number parsed with garbage at the end. Examples
6829        of that would be parsing "123x456" would have ok = false,
6830        but didReadNumber = true.
6831
6832        * JavaScriptCore.exp:
6833        * wtf/text/StringImpl.cpp:
6834        (WTF::StringImpl::toDouble):
6835        (WTF::StringImpl::toFloat):
6836        * wtf/text/StringImpl.h:
6837        * wtf/text/WTFString.cpp:
6838        (WTF::String::toDouble):
6839        (WTF::String::toFloat):
6840        (WTF::charactersToDouble):
6841        (WTF::charactersToFloat):
6842        * wtf/text/WTFString.h:
6843
68442011-02-28  Geoffrey Garen  <ggaren@apple.com>
6845
6846        Reviewed by Gavin Barraclough.
6847
6848        Past-the-end writes in VM exceptions (caused crashes in r79627)
6849        https://bugs.webkit.org/show_bug.cgi?id=55448
6850
6851        Some exceptions had the wrong structures, so they misoverestimated their
6852        inline storage sizes.
6853
6854        * runtime/JSGlobalData.cpp:
6855        (JSC::JSGlobalData::JSGlobalData): Use the right structure.
6856
6857        * runtime/JSObject.h:
6858        (JSC::JSNonFinalObject::JSNonFinalObject):
6859        (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
6860        is correct to verify this doesn't happen again.
6861
68622011-03-01  Andras Becsi  <abecsi@webkit.org>
6863
6864        Reviewed by Csaba Osztrogonác.
6865
6866        [Qt] Clean up the project files and move common options to WebKit.pri.
6867
6868        * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
6869        * JavaScriptCore.pro: Deduplicate options.
6870        * jsc.pro: Ditto.
6871
68722011-03-01  Adam Barth  <abarth@webkit.org>
6873
6874        Reviewed by Eric Seidel.
6875
6876        Teach JavaScriptCore GYP build about DEPTH
6877        https://bugs.webkit.org/show_bug.cgi?id=55425
6878
6879        In addition to teaching the JavaScriptCore GYP build about DEPTH, this
6880        change overrides the GCC warning configuration to disable a warning
6881        that's causing probems in Assertions.cpp.  With that warning disabled,
6882        JavaScriptCore builds again.
6883
6884        * gyp/JavaScriptCore.gyp:
6885
68862011-02-28  Gavin Barraclough  <barraclough@apple.com>
6887
6888        Windows build fix.
6889
6890        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6891
68922011-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
6893
6894        Unreviewed, rolling out r79948.
6895        http://trac.webkit.org/changeset/79948
6896        https://bugs.webkit.org/show_bug.cgi?id=55439
6897
6898        "caused crashes on the SL release bot" (Requested by ggaren on
6899        #webkit).
6900
6901        * runtime/JSGlobalData.h:
6902        * runtime/WriteBarrier.h:
6903
69042011-02-28  Gavin Barraclough  <barraclough@apple.com>
6905
6906        Windows build fix.
6907
6908        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6909
69102011-02-28  Gavin Barraclough  <barraclough@apple.com>
6911
6912        Reviewed by Sam Weinig & Darin Adler.
6913
6914        Bug 55423 - Clean up property tables in Structure
6915
6916        Encapsulate, reduce duplication of table search code,
6917        and reduce the size of the tables (remove the index,
6918        just maintain the tables in the correct order).
6919
6920        Shows a 0.5% - 1% progression on sunspider.
6921
6922        * JavaScriptCore.exp:
6923        * runtime/PropertyMapHashTable.h:
6924        (JSC::isPowerOf2):
6925        (JSC::nextPowerOf2):
6926            bit ops used to calculate table size.
6927        (JSC::PropertyMapEntry::PropertyMapEntry):
6928        (JSC::PropertyTable::ordered_iterator::operator++):
6929        (JSC::PropertyTable::ordered_iterator::operator==):
6930        (JSC::PropertyTable::ordered_iterator::operator!=):
6931        (JSC::PropertyTable::ordered_iterator::operator*):
6932        (JSC::PropertyTable::ordered_iterator::operator->):
6933        (JSC::PropertyTable::ordered_iterator::ordered_iterator):
6934            implementation of the iterator types
6935        (JSC::PropertyTable::PropertyTable):
6936        (JSC::PropertyTable::~PropertyTable):
6937            constructors take an initial capacity for the table,
6938            a table to copy, or both.
6939        (JSC::PropertyTable::begin):
6940        (JSC::PropertyTable::end):
6941            create in-order iterators.
6942        (JSC::PropertyTable::find):
6943            search the hash table
6944        (JSC::PropertyTable::add):
6945            add a value to the hash table
6946        (JSC::PropertyTable::remove):
6947            remove a value from the hash table
6948        (JSC::PropertyTable::size):
6949        (JSC::PropertyTable::isEmpty):
6950            accessors.
6951        (JSC::PropertyTable::propertyStorageSize):
6952        (JSC::PropertyTable::clearDeletedOffsets):
6953        (JSC::PropertyTable::hasDeletedOffset):
6954        (JSC::PropertyTable::getDeletedOffset):
6955        (JSC::PropertyTable::addDeletedOffset):
6956            cache deleted (available) offsets in the property storage array.
6957        (JSC::PropertyTable::copy):
6958            take a copy of the PropertyTable, potentially expanding the capacity.
6959        (JSC::PropertyTable::sizeInMemory):
6960            used for DEBUG build statistics
6961        (JSC::PropertyTable::reinsert):
6962        (JSC::PropertyTable::rehash):
6963        (JSC::PropertyTable::tableCapacity):
6964        (JSC::PropertyTable::deletedEntryIndex):
6965        (JSC::PropertyTable::skipDeletedEntries):
6966        (JSC::PropertyTable::table):
6967        (JSC::PropertyTable::usedCount):
6968        (JSC::PropertyTable::dataSize):
6969        (JSC::PropertyTable::sizeForCapacity):
6970        (JSC::PropertyTable::canInsert):
6971            these methods provide internal implementation.
6972        * runtime/Structure.cpp:
6973        (JSC::Structure::dumpStatistics):
6974        (JSC::Structure::~Structure):
6975        (JSC::Structure::materializePropertyMap):
6976        (JSC::Structure::despecifyDictionaryFunction):
6977        (JSC::Structure::addPropertyTransition):
6978        (JSC::Structure::flattenDictionaryStructure):
6979        (JSC::Structure::copyPropertyTable):
6980        (JSC::Structure::get):
6981        (JSC::Structure::despecifyFunction):
6982        (JSC::Structure::despecifyAllFunctions):
6983        (JSC::Structure::put):
6984        (JSC::Structure::remove):
6985        (JSC::Structure::createPropertyMap):
6986        (JSC::Structure::getPropertyNames):
6987        (JSC::PropertyTable::checkConsistency):
6988        (JSC::Structure::checkConsistency):
6989            factored out code to PropertyMapHashTable.h
6990        * runtime/Structure.h:
6991        (JSC::Structure::propertyStorageSize):
6992        (JSC::Structure::isEmpty):
6993        (JSC::Structure::get):
6994            factored out code to PropertyMapHashTable.h
6995
69962011-02-28  Xan Lopez  <xlopez@igalia.com>
6997
6998        Another fix build :(
6999
7000        Fix typo.
7001
7002        * runtime/MachineStackMarker.cpp:
7003        (JSC::freePlatformThreadRegisters):
7004
70052011-02-28  Xan Lopez  <xlopez@igalia.com>
7006
7007        Unreviewed build fix for Snow Leopard.
7008
7009        * runtime/MachineStackMarker.cpp:
7010        (JSC::freePlatformThreadRegisters):
7011
70122011-02-28  Alejandro G. Castro  <alex@igalia.com>
7013
7014        Unreviewed, fix SnowLeopard compilation after r79952.
7015
7016        * runtime/MachineStackMarker.cpp:
7017        (JSC::freePlatformThreadRegisters):
7018
70192011-02-28  Mark Rowe  <mrowe@apple.com>
7020
7021        Reviewed by Darin Adler.
7022
7023        <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
7024
7025        * wtf/OwnArrayPtr.h:
7026        (WTF::::set): Implement OwnArrayPtr::set.
7027
70282011-02-28  Martin Zoubek  <martin.zoubek@acision.com> and Alejandro G. Castro  <alex@igalia.com>
7029
7030        Reviewed by Martin Robinson.
7031
7032        Multithread support for JSC on UNIX
7033        https://bugs.webkit.org/show_bug.cgi?id=26838
7034
7035        Implement suspendThread() and resumeThread() for systems with
7036        pthread.h using thread signal handler.
7037
7038        * runtime/MachineStackMarker.cpp:
7039        (JSC::pthreadSignalHandlerSuspendResume):
7040        (JSC::MachineStackMarker::Thread::Thread):
7041        (JSC::getCurrentPlatformThread):
7042        (JSC::suspendThread):
7043        (JSC::resumeThread):
7044        (JSC::getPlatformThreadRegisters):
7045        (JSC::otherThreadStackPointer):
7046        (JSC::freePlatformThreadRegisters):
7047        (JSC::MachineStackMarker::markOtherThreadConservatively):
7048        * wtf/Platform.h: Added Gtk port to use
7049        ENABLE_JSC_MULTIPLE_THREADS.
7050
70512011-02-28  Oliver Hunt  <oliver@apple.com>
7052
7053        Reviewed by Darin Adler.
7054
7055        Stop using DeprecatedPtr for the global exception slot
7056        https://bugs.webkit.org/show_bug.cgi?id=55424
7057
7058        Create GCRootPtr to signify that the exception slot is
7059        a gcroot, and so is exempt from the usual writebarrier
7060        restrictions.
7061
7062        * runtime/JSGlobalData.h:
7063        * runtime/WriteBarrier.h:
7064        (JSC::GCRootPtr::GCRootPtr):
7065        (JSC::GCRootPtr::operator=):
7066
70672011-02-28  Adam Barth  <abarth@webkit.org>
7068
7069        Reviewed by Dimitri Glazkov.
7070
7071        Use more xcconfig files in JavaScriptCore gyp build
7072        https://bugs.webkit.org/show_bug.cgi?id=55391
7073
7074        The GYP experts tell me that we have have a total of two xcconfig
7075        files: one for the xcodeproj as a whole and one for each target.  This
7076        patch uses that technique to re-use the existing xcconfig files and
7077        eliminate the duplication.
7078
7079        Technically, this patch introduces some build errors because the
7080        xcconfig files assume that the xcodeproj file is one level higher in
7081        the directory hierarchy.  Specifically, the xcodeproj file can no
7082        longer find the Info.plist or the prefix header.  I plan to fix that in
7083        a subsequent patch.
7084
7085        Also, this patch introduces the Release and Production configurations,
7086        which should work correctly now.
7087
7088        * gyp/JavaScriptCore.gyp:
7089
70902011-02-28  Jon Honeycutt  <jhoneycutt@apple.com>
7091
7092        Windows build fix.
7093
7094        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7095        Add symbol to export.
7096
70972011-02-28  Oliver Hunt  <oliver@apple.com>
7098
7099        Reviewed by Gavin Barraclough.
7100
7101        Make ScopeChainNode GC allocated
7102        https://bugs.webkit.org/show_bug.cgi?id=55283
7103
7104        Simplify lifetime and other issues with the scopechain
7105        by making it gc allocated.  This allows us to simplify
7106        function exit and unwinding, as well as making the
7107        current iterative refcounting go away.
7108
7109        * JavaScriptCore.exp:
7110        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7111        * bytecode/CodeBlock.cpp:
7112        (JSC::CodeBlock::createActivation):
7113        * bytecode/StructureStubInfo.cpp:
7114        * bytecompiler/BytecodeGenerator.cpp:
7115        (JSC::BytecodeGenerator::generate):
7116        (JSC::BytecodeGenerator::BytecodeGenerator):
7117        (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
7118        (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
7119        * bytecompiler/BytecodeGenerator.h:
7120        * debugger/Debugger.cpp:
7121        (JSC::Recompiler::operator()):
7122        * debugger/DebuggerCallFrame.h:
7123        (JSC::DebuggerCallFrame::scopeChain):
7124        * interpreter/CachedCall.h:
7125        (JSC::CachedCall::CachedCall):
7126        * interpreter/CallFrame.h:
7127        * interpreter/Interpreter.cpp:
7128        (JSC::depth):
7129        (JSC::Interpreter::unwindCallFrame):
7130        (JSC::Interpreter::throwException):
7131        (JSC::Interpreter::execute):
7132        (JSC::Interpreter::executeCall):
7133        (JSC::Interpreter::executeConstruct):
7134        (JSC::Interpreter::privateExecute):
7135        * jit/JITCall.cpp:
7136        (JSC::JIT::compileOpCallInitializeCallFrame):
7137        (JSC::JIT::compileOpCall):
7138        * jit/JITCall32_64.cpp:
7139        (JSC::JIT::compileOpCallInitializeCallFrame):
7140        (JSC::JIT::emit_op_ret):
7141        (JSC::JIT::emit_op_ret_object_or_this):
7142        (JSC::JIT::compileOpCall):
7143        * jit/JITOpcodes.cpp:
7144        (JSC::JIT::emit_op_end):
7145        (JSC::JIT::emit_op_ret):
7146        (JSC::JIT::emit_op_ret_object_or_this):
7147        * jit/JITOpcodes32_64.cpp:
7148        (JSC::JIT::emit_op_end):
7149        * jit/JITStubs.cpp:
7150        (JSC::DEFINE_STUB_FUNCTION):
7151        * jit/JITStubs.h:
7152        * runtime/ArgList.cpp:
7153        * runtime/Completion.cpp:
7154        (JSC::evaluate):
7155        * runtime/Completion.h:
7156        * runtime/DateConversion.cpp:
7157        * runtime/Executable.cpp:
7158        (JSC::EvalExecutable::compileInternal):
7159        (JSC::ProgramExecutable::compileInternal):
7160        (JSC::FunctionExecutable::compileForCallInternal):
7161        (JSC::FunctionExecutable::compileForConstructInternal):
7162        * runtime/FunctionConstructor.cpp:
7163        (JSC::constructFunction):
7164        * runtime/GCActivityCallbackCF.cpp:
7165        * runtime/Identifier.cpp:
7166        * runtime/JSCell.h:
7167        * runtime/JSChunk.cpp: Added.
7168        * runtime/JSChunk.h: Added.
7169        * runtime/JSFunction.cpp:
7170        (JSC::JSFunction::JSFunction):
7171        (JSC::JSFunction::markChildren):
7172        (JSC::JSFunction::getCallData):
7173        (JSC::JSFunction::getOwnPropertySlot):
7174        (JSC::JSFunction::getConstructData):
7175        * runtime/JSFunction.h:
7176        (JSC::JSFunction::scope):
7177        (JSC::JSFunction::setScope):
7178        * runtime/JSGlobalData.cpp:
7179        (JSC::JSGlobalData::JSGlobalData):
7180        * runtime/JSGlobalData.h:
7181        * runtime/JSGlobalObject.cpp:
7182        (JSC::JSGlobalObject::init):
7183        (JSC::JSGlobalObject::markChildren):
7184        * runtime/JSGlobalObject.h:
7185        (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
7186        (JSC::JSGlobalObject::globalScopeChain):
7187        * runtime/JSGlobalObjectFunctions.cpp:
7188        (JSC::globalFuncEval):
7189        * runtime/JSLock.cpp:
7190        * runtime/JSNumberCell.cpp:
7191        * runtime/JSZombie.cpp:
7192        * runtime/MarkedBlock.cpp:
7193        * runtime/MarkedSpace.cpp:
7194        * runtime/PropertyNameArray.cpp:
7195        * runtime/ScopeChain.cpp:
7196        (JSC::ScopeChainNode::print):
7197        (JSC::ScopeChainNode::localDepth):
7198        (JSC::ScopeChainNode::markChildren):
7199        * runtime/ScopeChain.h:
7200        (JSC::ScopeChainNode::ScopeChainNode):
7201        (JSC::ScopeChainNode::createStructure):
7202        (JSC::ScopeChainNode::push):
7203        (JSC::ScopeChainNode::pop):
7204        (JSC::ScopeChainIterator::ScopeChainIterator):
7205        (JSC::ScopeChainIterator::operator*):
7206        (JSC::ScopeChainIterator::operator->):
7207        (JSC::ScopeChainIterator::operator++):
7208        (JSC::ScopeChainNode::begin):
7209        (JSC::ScopeChainNode::end):
7210        (JSC::ExecState::globalData):
7211        (JSC::ExecState::lexicalGlobalObject):
7212        (JSC::ExecState::globalThisValue):
7213        * runtime/ScopeChainMark.h:
7214        * wtf/DateMath.cpp:
7215
72162011-02-27  Adam Barth  <abarth@webkit.org>
7217
7218        Reviewed by Eric Seidel.
7219
7220        Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
7221        https://bugs.webkit.org/show_bug.cgi?id=55326
7222
7223        Currently, randomNumber does a bunch of platform-specific work that to
7224        get a cryptographic randomness when available.  Instead, we should use
7225        cryptographicallyRandomNumber, which abstracts this work.
7226        Unfortunately, we can't remove all of the WTF::randomNumber
7227        implementation because not every port has access to cryptographically
7228        random numbers.
7229
7230        * wtf/RandomNumber.cpp:
7231        (WTF::randomNumber):
7232
72332011-02-27  Benjamin Poulain  <ikipou@gmail.com>
7234
7235        Reviewed by Darin Adler.
7236
7237        Eliminate DeprecatedPtrList from RenderBlock
7238        https://bugs.webkit.org/show_bug.cgi?id=54972
7239
7240        Add methods find() and contains() using an adaptor to ListHashSet.
7241        Those method are like the one of HashSet, they allow to find objects
7242        based on a different key than the one used to define the set.
7243
7244        Add convenience methods for direct access to the head and tail of the list.
7245        Those methods are providing similar API/behavior as Vector.
7246
7247        * wtf/ListHashSet.h:
7248        (WTF::::first):
7249        (WTF::::last):
7250        (WTF::::removeLast):
7251        (WTF::ListHashSetTranslatorAdapter::hash):
7252        (WTF::ListHashSetTranslatorAdapter::equal):
7253        (WTF::::find):
7254        (WTF::::contains):
7255
72562011-02-26  Patrick Gansterer  <paroga@webkit.org>
7257
7258        Reviewed by Andreas Kling.
7259
7260        Add support for DragonFly BSD
7261        https://bugs.webkit.org/show_bug.cgi?id=54407
7262
7263        DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
7264
7265        * wtf/Platform.h:
7266
72672011-02-26  Adam Barth  <abarth@webkit.org>
7268
7269        Reviewed by Dimitri Glazkov.
7270
7271        JavaScriptCore should use the xcconfig file instead of importing that information into GYP
7272        https://bugs.webkit.org/show_bug.cgi?id=55282
7273
7274        Technically, this breaks the build because I had removed one of the
7275        warnings in this config file, but this change seems like an
7276        improvement.
7277
7278        * gyp/JavaScriptCore.gyp:
7279
72802011-02-26  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
7281
7282        Reviewed by Nikolas Zimmermann.
7283
7284        SH4 JIT SUPPORT
7285        https://bugs.webkit.org/show_bug.cgi?id=44329
7286
7287        Provide an ExecutableAllocater::cacheFlush() implementation for
7288        Linux/SH4.
7289
7290        * jit/ExecutableAllocator.h:
7291        (JSC::ExecutableAllocator::cacheFlush):
7292
72932011-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
7294
7295        Unreviewed, rolling out r79627.
7296        http://trac.webkit.org/changeset/79627
7297        https://bugs.webkit.org/show_bug.cgi?id=55274
7298
7299        broke worker tests (Requested by olliej on #webkit).
7300
7301        * JavaScriptCore.exp:
7302        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
7303        * runtime/Heap.cpp:
7304        (JSC::Heap::allocate):
7305        * runtime/Heap.h:
7306        * runtime/JSCell.h:
7307        (JSC::JSCell::JSCell::operator new):
7308        (JSC::JSCell::MarkedSpace::sizeClassFor):
7309        (JSC::JSCell::MarkedSpace::allocate):
7310        * runtime/MarkedBlock.h:
7311        * runtime/MarkedSpace.cpp:
7312        (JSC::MarkedSpace::MarkedSpace):
7313        (JSC::MarkedSpace::allocateBlock):
7314        (JSC::MarkedSpace::reset):
7315        * runtime/MarkedSpace.h:
7316        (JSC::MarkedSpace::SizeClass::SizeClass):
7317
73182011-02-25  Michael Saboff  <msaboff@apple.com>
7319
7320        Reviewed by Darin Adler.
7321
7322        Leak in JSParser::Scope of ScopeLabelInfo Vector
7323        https://bugs.webkit.org/show_bug.cgi?id=55249
7324
7325        Changed m_labels to be an OwnPtr<>.  Added VectorTraits
7326        and Scope copy constructor to support this change.
7327
7328        * parser/JSParser.cpp:
7329        (JSC::JSParser::Scope::~Scope):
7330
73312011-02-25  Fumitoshi Ukai  <ukai@chromium.org>
7332
7333        Reviewed by Adam Barth.
7334
7335        WebSocket uses insecure random numbers
7336        https://bugs.webkit.org/show_bug.cgi?id=54714
7337
7338        * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
7339
73402011-02-25  Patrick Gansterer  <paroga@webkit.org>
7341
7342        Reviewed by Adam Roben.
7343
7344        Move timeBeginPeriod into OS(WINDOWS) section
7345        https://bugs.webkit.org/show_bug.cgi?id=55247
7346
7347        * jsc.cpp:
7348        (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
7349
73502011-02-25  Patrick Gansterer  <paroga@webkit.org>
7351
7352        Unreviewed WinCE build fix for r79695.
7353
7354        * jsc.cpp:
7355        (main): SetErrorMode isn't available on WinCE.
7356
73572011-02-25  Adam Roben  <aroben@apple.com>
7358
7359        Work around Cygwin's crash-suppression behavior
7360
7361        Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
7362        inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
7363        invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
7364        when our test apps launch to work around Cygwin's behavior.
7365
7366        Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
7367        debugger) when launched from Cygwin 1.7
7368
7369        Reviewed by Darin Adler.
7370
7371        * API/tests/testapi.c: Added a now-needed #include.
7372        (main):
7373        * jsc.cpp:
7374        (main):
7375        Call ::SetErrorMode(0) to undo Cygwin's folly.
7376
7377        * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
7378        other projects do so that windows.h won't define min/max macros that interfere with
7379        std::numeric_limits<T>::min/max.
7380
73812011-02-24  Adam Barth  <abarth@webkit.org>
7382
7383        Reviewed by Eric Seidel.
7384
7385        Add GYP project for JavaScriptCore
7386        https://bugs.webkit.org/show_bug.cgi?id=55027
7387
7388        Again, this GYP files is very rough, but it succeeds in building
7389        JavaScriptCore.  There's a lot more work to do here, especially in the
7390        area of sharing with JavaScriptGlue.gyp.  This patch is more of a
7391        checkpoint so that other folks can help out if they wish.
7392
7393        * gyp: Added.
7394        * gyp/JavaScriptCore.gyp: Added.
7395        * gyp/generate-derived-sources.sh: Added.
7396
73972011-02-24  Adam Barth  <abarth@webkit.org>
7398
7399        Reviewed by Eric Seidel.
7400
7401        Add missing files to JavaScriptCore.gypi
7402        https://bugs.webkit.org/show_bug.cgi?id=55193
7403
7404        I forgot to add mm files in my previous patch.
7405
7406        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7407        * JavaScriptCore.gypi:
7408
74092011-02-24  Adam Barth  <abarth@webkit.org>
7410
7411        Reviewed by Eric Seidel.
7412
7413        Remove unused parameter name in GCActivityCallback.cpp
7414        https://bugs.webkit.org/show_bug.cgi?id=55194
7415
7416        This change is not strictly required for the GYP-based build system,
7417        but I noticed this error when working on the new build system.
7418
7419        * runtime/GCActivityCallback.cpp:
7420        (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
7421
74222011-02-24  James Robinson  <jamesr@chromium.org>
7423
7424        Reviewed by Darin Fisher.
7425
7426        Add a USE() macro to control use of the built-in UTF8 codec
7427        https://bugs.webkit.org/show_bug.cgi?id=55189
7428
7429        Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi.
7430
7431        * wtf/Platform.h:
7432
74332011-02-24  Geoffrey Garen  <ggaren@apple.com>
7434
7435        Reviewed by Darin Adler.
7436
7437        Variable-sized allocation (but still capped at 64 bytes)
7438        https://bugs.webkit.org/show_bug.cgi?id=55159
7439
7440        SunSpider reports no change.
7441
7442        * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
7443
7444        * runtime/Heap.cpp:
7445        (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
7446        case, so the fast case can inline size class selection and turn it into
7447        a compile-time constant.
7448
7449        Changed the collect-on-every allocation debugging switch to collect only
7450        on every slow allocation, so you can still flip the switch without
7451        recompiling the world. This may also be preferable for debugging purposes,
7452        since collecting after every single allocation can be unusably slow,
7453        and can mask problems by running destructors early.
7454
7455        * runtime/Heap.h: Ditto.
7456
7457        * runtime/JSCell.h:
7458        (JSC::JSCell::MarkedSpace::sizeClassFor):
7459        (JSC::JSCell::Heap::allocate):
7460        (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
7461
7462        * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
7463        multiple size classes, allocating a full 256KB for the first allocation
7464        in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
7465        8KB Windows, would be even better, but that seems to be a peformance
7466        regression for now.)
7467
7468        * runtime/MarkedSpace.cpp:
7469        (JSC::MarkedSpace::MarkedSpace):
7470        (JSC::MarkedSpace::allocateBlock):
7471        (JSC::MarkedSpace::reset): There's more than one size class now, and its
7472        cell size is not constant.
7473
7474        * runtime/MarkedSpace.h:
7475        (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
7476
74772011-02-23  Oliver Hunt  <oliver@apple.com>
7478
7479        Reviewed by Geoffrey Garen.
7480
7481        Make WeakGCMap use new handle infrastructure
7482        https://bugs.webkit.org/show_bug.cgi?id=55100
7483
7484        Remove old WeakGCMap implementation and move over to new handle
7485        based logic.
7486
7487        This has a number of benefits, most notably it makes a WeakGCMap
7488        always reflect the true state of the world by as all entries are
7489        removed at the first gc cycle that makes them dead.  This allows
7490        us to get rid of code in a wide variety of objects where the only
7491        purpose was to remove themselves from maps.
7492
7493        It also means that we no longer need to have special "unchecked"
7494        versions of any functions on WeakGCMap.  Alas in order to maintain
7495        compatibility with the JSWeakObjectMapClear API it is still
7496        necessary to have an api that resembles uncheckedRemove, this is
7497        now deprecatedRemove and will be dealt with in a later patch.
7498
7499        In order to get correct semantics in WeakGCMap we need more
7500        contextual information in the finalizer, so we've added an
7501        abstract class based finaliser and a context parameter to the
7502        calls.
7503
7504        The new an improved WeakGCMap also results in sigificantly more
7505        churn in the weak handle lists so exposed some potential problems
7506        during the post mark phase which have been rectified as well.
7507
7508        * API/JSWeakObjectMapRefPrivate.cpp:
7509        * API/JSWeakObjectMapRefPrivate.h:
7510        * runtime/Heap.cpp:
7511        (JSC::Heap::globalObjectCount):
7512        (JSC::Heap::protectedGlobalObjectCount):
7513        * runtime/JSGlobalData.cpp:
7514        (JSC::JSGlobalData::JSGlobalData):
7515        * runtime/JSGlobalData.h:
7516        * runtime/JSGlobalObject.cpp:
7517        (JSC::JSGlobalObject::~JSGlobalObject):
7518        (JSC::JSGlobalObject::init):
7519        * runtime/WeakGCMap.h:
7520        (JSC::WeakGCMap::iterator::iterator):
7521        (JSC::WeakGCMap::iterator::get):
7522        (JSC::WeakGCMap::iterator::getSlot):
7523        (JSC::WeakGCMap::iterator::operator++):
7524        (JSC::WeakGCMap::iterator::operator==):
7525        (JSC::WeakGCMap::iterator::operator!=):
7526        (JSC::WeakGCMap::WeakGCMap):
7527        (JSC::WeakGCMap::isEmpty):
7528        (JSC::WeakGCMap::clear):
7529        (JSC::WeakGCMap::get):
7530        (JSC::WeakGCMap::getSlot):
7531        (JSC::WeakGCMap::set):
7532        (JSC::WeakGCMap::take):
7533        (JSC::WeakGCMap::size):
7534        (JSC::WeakGCMap::deprecatedRemove):
7535        (JSC::WeakGCMap::begin):
7536        (JSC::WeakGCMap::end):
7537        (JSC::WeakGCMap::~WeakGCMap):
7538        (JSC::WeakGCMap::finalize):
7539        * runtime/WeakGCPtr.h:
7540        (JSC::WeakGCPtr::WeakGCPtr):
7541        (JSC::WeakGCPtr::set):
7542
75432011-02-24  Oliver Hunt  <oliver@apple.com>
7544
7545        Reviewed by Gavin Barraclough.
7546
7547        Make weaklist processing deal with weak handles being removed during the iteration
7548        https://bugs.webkit.org/show_bug.cgi?id=55105
7549
7550        It is possible for the handle heap to end up in a broken state if
7551        a handle's finalizer removes either the current or next handle
7552        to be visited during the post-gc cleanup.  This patch removes that
7553        problem by allowing the deallocate(Node*) routine to update the
7554        iterator if it is called during finalization.
7555
7556        * collector/handles/HandleHeap.cpp:
7557        (JSC::HandleHeap::HandleHeap):
7558        (JSC::HandleHeap::updateAfterMark):
7559        (JSC::HandleHeap::clearWeakPointers):
7560        (JSC::HandleHeap::writeBarrier):
7561        (JSC::HandleHeap::protectedGlobalObjectCount):
7562        * collector/handles/HandleHeap.h:
7563        (JSC::Finalizer::~Finalizer):
7564        (JSC::HandleHeap::getFinalizer):
7565        (JSC::HandleHeap::deallocate):
7566        (JSC::HandleHeap::makeWeak):
7567        (JSC::HandleHeap::makeSelfDestroying):
7568        (JSC::HandleHeap::Node::Node):
7569        (JSC::HandleHeap::Node::setFinalizer):
7570        (JSC::HandleHeap::Node::finalizer):
7571        (JSC::HandleHeap::Node::finalizerContext):
7572        * interpreter/RegisterFile.cpp:
7573        (JSC::RegisterFile::setGlobalObject):
7574        (JSC::GlobalObjectNotifier::finalize):
7575        (JSC::RegisterFile::globalObjectCollectedNotifier):
7576        * interpreter/RegisterFile.h:
7577        (JSC::RegisterFile::RegisterFile):
7578        * runtime/Heap.cpp:
7579        (JSC::Heap::destroy):
7580        * runtime/WeakGCPtr.h:
7581        (JSC::WeakGCPtr::WeakGCPtr):
7582        (JSC::WeakGCPtr::set):
7583
75842011-02-24  Michael Saboff  <msaboff@apple.com>
7585
7586        Reviewed by Oliver Hunt.
7587
7588        PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
7589        https://bugs.webkit.org/show_bug.cgi?id=55156
7590
7591        Added code to delete unneeded PatternAlternative after it is removed
7592        from m_alternatives Vector.
7593
7594        * yarr/YarrPattern.cpp:
7595        (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
7596
75972011-02-24  Eric Seidel  <eric@webkit.org>
7598
7599        Reviewed by Anders Carlsson.
7600
7601        VectorBuffer should not call malloc(0)
7602        https://bugs.webkit.org/show_bug.cgi?id=55091
7603
7604        Turns out the malloc() call which was so hot in:
7605        https://bugs.webkit.org/show_bug.cgi?id=55005
7606        was actually just malloc(0).
7607
7608        We shouldn't be calling malloc(0) anyway, since there is no need to
7609        and it might actually do work on some systems.
7610        I believe on Mac it ends up taking the standard spinlocks (expensive)
7611        and the code on Brew actually does a malloc(1) instead.  Neither is desirable.
7612
7613        * wtf/Vector.h:
7614        (WTF::VectorBufferBase::allocateBuffer):
7615        (WTF::VectorBufferBase::tryAllocateBuffer):
7616
76172011-02-24  Patrick Gansterer  <paroga@webkit.org>
7618
7619        Reviewed by Darin Adler.
7620
7621        Remove obsolete PLATFORM(CI)
7622        https://bugs.webkit.org/show_bug.cgi?id=55082
7623
7624        * wtf/Platform.h:
7625
76262011-02-24  Martin Robinson  <mrobinson@igalia.com>
7627
7628        Reviewed by Xan Lopez.
7629
7630        [GTK] Remove the GFile GOwnPtr specialization
7631        https://bugs.webkit.org/show_bug.cgi?id=55154
7632
7633        Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr
7634        to track GFiles since they are just regular reference-counted GObjects.
7635
7636        * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization.
7637        * wtf/gobject/GOwnPtr.h: Ditto.
7638
76392011-02-24  Patrick Gansterer  <paroga@webkit.org>
7640
7641        Reviewed by Eric Seidel.
7642
7643        Rename PLATFORM(SKIA) to USE(SKIA)
7644        https://bugs.webkit.org/show_bug.cgi?id=55090
7645
7646        * wtf/Platform.h:
7647
76482011-02-24  Patrick Gansterer  <paroga@webkit.org>
7649
7650        Reviewed by Alexey Proskuryakov.
7651
7652        Remove pthreads dependecy for JSLock
7653        https://bugs.webkit.org/show_bug.cgi?id=54832
7654
7655        JSLock is only needed to support an obsolete execution model where JavaScriptCore
7656        automatically protected against concurrent access from multiple threads.
7657        So it's safe to disable it on non-mac platforms where we don't have native pthreads.
7658
7659        * runtime/JSLock.cpp:
7660
76612011-02-24  Chao-ying Fu  <fu@mips.com>
7662
7663        Reviewed by Eric Seidel.
7664
7665        Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values
7666        https://bugs.webkit.org/show_bug.cgi?id=54997
7667
7668        * jit/JIT.h:
7669        * jit/JITStubs.cpp:
7670        (JSC::JITThunks::JITThunks):
7671
76722011-02-24  Andras Becsi  <abecsi@webkit.org>
7673
7674        Reviewed by Laszlo Gombos.
7675
7676        [Qt] MinGW build fails to link
7677        https://bugs.webkit.org/show_bug.cgi?id=55050
7678
7679        Prepend the libraries of subcomponents instead of appending them
7680        to fix the library order according to the dependency of the libraries
7681
7682        * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore
7683        * jsc.pro: ditto
7684
76852011-02-24  Eric Seidel  <eric@webkit.org>
7686
7687        Reviewed by Adam Barth.
7688
7689        Deque<T> should support inline capacity
7690        https://bugs.webkit.org/show_bug.cgi?id=55032
7691
7692        The title says it all.  There are currently no places
7693        which use this code yet, however it's been tested in conjunction
7694        with code for bug 55005.
7695
7696        This also adds an ASSERT that capacity is never 1.  If you were able
7697        to set the capacity equal to 1, the Deque would just get confused
7698        and happily append your item but still think it had size 0.
7699
7700        * wtf/Deque.h:
7701        (WTF::DequeIterator::DequeIterator):
7702        (WTF::DequeConstIterator::DequeConstIterator):
7703        (WTF::DequeReverseIterator::DequeReverseIterator):
7704        (WTF::DequeConstReverseIterator::DequeConstReverseIterator):
7705        (WTF::::checkValidity):
7706        (WTF::::checkIndexValidity):
7707        (WTF::::invalidateIterators):
7708        (WTF::::Deque):
7709        (WTF::deleteAllValues):
7710        (WTF::::operator):
7711        (WTF::::destroyAll):
7712        (WTF::::~Deque):
7713        (WTF::::swap):
7714        (WTF::::clear):
7715        (WTF::::findIf):
7716        (WTF::::expandCapacityIfNeeded):
7717        (WTF::::expandCapacity):
7718        (WTF::::takeFirst):
7719        (WTF::::append):
7720        (WTF::::prepend):
7721        (WTF::::removeFirst):
7722        (WTF::::remove):
7723        (WTF::::addToIteratorsList):
7724        (WTF::::removeFromIteratorsList):
7725        (WTF::::DequeIteratorBase):
7726        (WTF::::~DequeIteratorBase):
7727        (WTF::::isEqual):
7728        (WTF::::increment):
7729        (WTF::::decrement):
7730        (WTF::::after):
7731        (WTF::::before):
7732        * wtf/Vector.h:
7733
77342011-02-22  Adam Barth  <abarth@webkit.org>
7735
7736        Reviewed by Ojan Vafai.
7737
7738        Add missing files to JavaScriptCore.gypi
7739        https://bugs.webkit.org/show_bug.cgi?id=55020
7740
7741        gypi files are supposed to list every file under the sun.  This patch
7742        adds some missing files and sorts the rest.
7743
7744        * JavaScriptCore.gypi:
7745
77462011-02-23  Geoffrey Garen  <ggaren@apple.com>
7747
7748        Reviewed by Darin Adler.
7749
7750        Refactored MarkedSpace to operate in terms of size classes
7751        https://bugs.webkit.org/show_bug.cgi?id=55106
7752
7753        SunSpider reports no change.
7754
7755        * runtime/JSCell.h:
7756        (JSC::JSCell::MarkedSpace::sizeClassFor):
7757        (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
7758        class. Since these functions are inline, the compiler can constant fold
7759        them.
7760
7761        * runtime/MarkedBlock.h:
7762        (JSC::MarkedBlock::cellSize):
7763        (JSC::MarkedBlock::size): Factored out a cellSize() helper.
7764
7765        * runtime/MarkedSpace.cpp:
7766        (JSC::MarkedSpace::allocateBlock):
7767        (JSC::MarkedSpace::allocateFromSizeClass):
7768        (JSC::MarkedSpace::shrink):
7769        (JSC::MarkedSpace::reset):
7770        * runtime/MarkedSpace.h:
7771        (JSC::MarkedSpace::SizeClass::SizeClass):
7772        (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
7773        abstract SizeClass objects, which are independent linked lists of blocks
7774        of a certain size class, instead of a single m_heap object.
7775
77762011-02-23  Adam Barth  <abarth@webkit.org>
7777
7778        Reviewed by James Robinson.
7779
7780        [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox
7781        https://bugs.webkit.org/show_bug.cgi?id=55093
7782
7783        Exclude OSRandomSource.cpp from the Chromium build.  This function is
7784        implemented in WebKit/chromium/src instead.
7785
7786        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7787
77882011-02-23  Oliver Hunt  <oliver@apple.com>
7789
7790        Roll out r64156 as it introduces incorrect behaviour.
7791
7792        * runtime/JSByteArray.h:
7793        (JSC::JSByteArray::setIndex):
7794
77952011-02-23  Geoffrey Garen  <ggaren@apple.com>
7796
7797        Reviewed by Oliver Hunt.
7798
7799        Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
7800        https://bugs.webkit.org/show_bug.cgi?id=55079
7801
7802        SunSpider reports no change.
7803
7804        * runtime/Heap.cpp:
7805        (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
7806        since we want Heap to logically control MarkedSpace. MarkedSpace should
7807        never choose to sweep itself.
7808
7809        * runtime/JSCell.h:
7810        (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
7811        member of MarkedBlock. No need to reset nextAtom to firstAtom() when
7812        we reach the end of a block, since there's now an explicit reset pass
7813        during GC.
7814
7815        * runtime/MarkedBlock.cpp:
7816        (JSC::MarkedBlock::MarkedBlock):
7817        * runtime/MarkedBlock.h:
7818        (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
7819        some data members to improve cache locality.
7820
7821        * runtime/MarkedSpace.cpp:
7822        (JSC::MarkedSpace::MarkedSpace):
7823        (JSC::MarkedSpace::allocate):
7824        (JSC::MarkedSpace::reset):
7825        * runtime/MarkedSpace.h:
7826        (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
7827        explicit reset pass.
7828
78292011-02-23  James Robinson  <jamesr@chromium.org>
7830
7831        Unreviewed, rolling out r79428.
7832        http://trac.webkit.org/changeset/79428
7833        https://bugs.webkit.org/show_bug.cgi?id=54714
7834
7835        Does not work in the Chromium sandbox
7836
7837        * JavaScriptCore.exp:
7838
78392011-02-23  Adam Roben  <aroben@apple.com>
7840
7841        Fix an off-by-one error in JSC::appendSourceToError
7842
7843        Looks like this bug has been around since the code was first added in r35245.
7844
7845        Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError
7846        when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled
7847
7848        Reviewed by Darin Adler.
7849
7850        * interpreter/Interpreter.cpp:
7851        (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the
7852        character at stop-1 rather than at stop. At this point in the code, stop represents the
7853        index just past the end of the characters we care about, and can even be just past the end
7854        of the entire data buffer.
7855
78562011-02-23  Geoffrey Garen  <ggaren@apple.com>
7857
7858        Reviewed by Darin Adler.
7859
7860        Rolled back in r79367 with SnowLeopard Release bot crash fixed.
7861        https://bugs.webkit.org/show_bug.cgi?id=54999
7862
7863        The crash was caused by failure to update the "nextBlock" pointer when
7864        removing a block from the list while shrinking. The fix is to update the
7865        "nextBlock" pointer.
7866
7867        This crash was very rare because it only happened in cases where the very
7868        first block in the heap contained no marked cells.
7869
78702011-02-23  Dan Bernstein  <mitz@apple.com>
7871
7872        Reviewed by Gavin Barraclough.
7873
7874        Include frame numbers in backtraces.
7875        https://bugs.webkit.org/show_bug.cgi?id=55060
7876
7877        * wtf/Assertions.cpp:
7878
78792011-02-23  Xan Lopez  <xlopez@igalia.com>
7880
7881        Reviewed by Gavin Barraclough.
7882
7883        latest jsc for armv7 crashes in sunspider tests
7884        https://bugs.webkit.org/show_bug.cgi?id=54667
7885
7886        Update JIT offset values in ARMv7 after r78732. Fixes crashes in
7887        SunSpider and JavaScript tests.
7888
7889        * jit/JIT.h: update values.
7890
78912011-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
7892
7893        Unreviewed, rolling out r79418.
7894        http://trac.webkit.org/changeset/79418
7895        https://bugs.webkit.org/show_bug.cgi?id=55043
7896
7897        "breaks shlib linux build" (Requested by morrita on #webkit).
7898
7899        * JavaScriptCore.gyp/JavaScriptCore.gyp:
7900        * JavaScriptCore.gypi:
7901
79022011-02-23  Patrick Gansterer  <paroga@webkit.org>
7903
7904        Reviewed by Alexey Proskuryakov.
7905
7906        Use DEFINE_STATIC_LOCAL for ignoreSetMutex in Structure.cpp
7907        https://bugs.webkit.org/show_bug.cgi?id=54831
7908
7909        * runtime/InitializeThreading.cpp:
7910        (JSC::initializeThreadingOnce):
7911        * runtime/Structure.cpp:
7912        (JSC::ignoreSetMutex):
7913        (JSC::Structure::Structure):
7914        (JSC::Structure::~Structure):
7915        (JSC::Structure::initializeThreading):
7916        * runtime/Structure.h:
7917
79182011-02-23  Patrick Gansterer  <paroga@webkit.org>
7919
7920        Reviewed by Darin Adler.
7921
7922        Rename PLATFORM(CF) to USE(CF)
7923        https://bugs.webkit.org/show_bug.cgi?id=53540
7924
7925        * runtime/DatePrototype.cpp:
7926        * runtime/GCActivityCallbackCF.cpp:
7927        * runtime/JSGlobalData.cpp:
7928        (JSC::JSGlobalData::JSGlobalData):
7929        * wtf/CurrentTime.cpp:
7930        * wtf/Platform.h:
7931        * wtf/text/AtomicString.h:
7932        * wtf/text/StringImpl.h:
7933        (WTF::StringImpl::computeHash):
7934        * wtf/text/WTFString.h:
7935        * wtf/unicode/icu/CollatorICU.cpp:
7936        (WTF::Collator::userDefault):
7937
79382011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
7939
7940        Unreviewed build fix for Windows.
7941
7942        WebSocket uses insecure random numbers
7943        https://bugs.webkit.org/show_bug.cgi?id=54714
7944
7945        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export WTF::cryptographicallyRandomNumber()
7946
79472011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
7948
7949        Reviewed by Adam Barth.
7950
7951        WebSocket uses insecure random numbers
7952        https://bugs.webkit.org/show_bug.cgi?id=54714
7953
7954        * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
7955
79562011-02-22  Adam Barth  <abarth@webkit.org>
7957
7958        Reviewed by Ojan Vafai.
7959
7960        Add missing files to JavaScriptCore.gypi
7961        https://bugs.webkit.org/show_bug.cgi?id=55020
7962
7963        gypi files are supposed to list every file under the sun.  This patch
7964        adds some missing files and sorts the rest.
7965
7966        * JavaScriptCore.gypi:
7967
79682011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
7969
7970        Unreviewed, rolling out r79367.
7971        http://trac.webkit.org/changeset/79367
7972        https://bugs.webkit.org/show_bug.cgi?id=55012
7973
7974        all layout tests are crashing on Snow Leopard (Requested by
7975        rniwa on #webkit).
7976
7977        * GNUmakefile.am:
7978        * JavaScriptCore.gypi:
7979        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
7980        * JavaScriptCore.xcodeproj/project.pbxproj:
7981        * runtime/MarkedBlock.cpp:
7982        (JSC::MarkedBlock::MarkedBlock):
7983        * runtime/MarkedBlock.h:
7984        * runtime/MarkedSpace.cpp:
7985        (JSC::MarkedSpace::destroy):
7986        (JSC::MarkedSpace::allocateBlock):
7987        (JSC::MarkedSpace::freeBlock):
7988        (JSC::MarkedSpace::allocate):
7989        (JSC::MarkedSpace::shrink):
7990        (JSC::MarkedSpace::reset):
7991        * runtime/MarkedSpace.h:
7992        (JSC::CollectorHeap::collectorBlock):
7993        * wtf/CMakeLists.txt:
7994        * wtf/DoublyLinkedList.h: Removed.
7995
79962011-02-22  Geoffrey Garen  <ggaren@apple.com>
7997
7998        Reviewed by Oliver Hunt.
7999
8000        Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1)
8001        https://bugs.webkit.org/show_bug.cgi?id=54999
8002
8003        SunSpider reports no change.
8004
8005        * GNUmakefile.am:
8006        * JavaScriptCore.gypi:
8007        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
8008        * JavaScriptCore.xcodeproj/project.pbxproj: So many build systems, so little time.
8009        * wtf/CMakeLists.txt:
8010
8011        * runtime/MarkedBlock.cpp:
8012        (JSC::MarkedBlock::MarkedBlock):
8013        * runtime/MarkedBlock.h:
8014        (JSC::MarkedBlock::setPrev):
8015        (JSC::MarkedBlock::setNext):
8016        (JSC::MarkedBlock::prev):
8017        (JSC::MarkedBlock::next): Added linked list data members and accessors.
8018
8019        * runtime/MarkedSpace.cpp:
8020        (JSC::MarkedSpace::destroy):
8021        (JSC::MarkedSpace::allocateBlock): Stop using vector, since it doesn't exist anymore.
8022
8023        (JSC::MarkedSpace::freeBlocks): New helper function for updating relevant
8024        data structures when freeing blocks.
8025
8026        (JSC::MarkedSpace::allocate): Updated for nextBlock being a pointer and
8027        not a vector index.
8028
8029        (JSC::MarkedSpace::shrink): Construct a temporary list of empties and
8030        then free them, to avoid modifying our hash table while iterating it.
8031        This wasn't a concern before because we were using indirect array
8032        indexing, not direct pointer indexing.
8033
8034        (JSC::MarkedSpace::reset): Updated for nextBlock being a pointer and
8035        not a vector index.
8036
8037        * runtime/MarkedSpace.h:
8038        (JSC::CollectorHeap::CollectorHeap): Changed data type from vector to linked list.
8039
8040        * wtf/DoublyLinkedList.h: Added. New linked list class.
8041        (WTF::::DoublyLinkedList):
8042        (WTF::::isEmpty):
8043        (WTF::::head):
8044        (WTF::::append):
8045        (WTF::::remove):
8046
80472011-02-22  Gavin Barraclough  <barraclough@apple.com>
8048
8049        Windows build fix.
8050
8051        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8052
80532011-02-22  Gavin Barraclough  <barraclough@apple.com>
8054
8055        Reviewed by Sam Weinig.
8056
8057        Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table
8058
8059        The Structure class keeps a table of transitions to derived Structure types. Since
8060        this table commonly contains a single entry we employ an optimization where instead
8061        of holding a map, we may hold a pointer directly to a single instance of the mapped
8062        type. We use an additional bit of data to flag whether the pointer is currently
8063        pointing to a table of transitions, or a singleton transition. Previously we had
8064        commonly used a pattern of storing data in the low bits of pointers, but had moved
8065        away from this since it causes false leaks to be reported by the leaks tool. However
8066        in this case, the entries in the map are weak links - this pointer will never be
8067        responsible for keeping an object alive.  As such we can use this approach provided
8068        that the bit is set when a table is not in use (otherwise the table would appear to
8069        be leaked).
8070
8071        Additionally, the transition table currently allows two entries to exist for a given
8072        key - one specialized to a particular value, and one not specialized. This is
8073        unnecessary, wasteful, and a little inconsistent. (If you create an entry for a
8074        specialized value, then a non-specialized entry, both will exist.  If you create an
8075        entry for a non-specialized value, then try to create a specialized entry, only a
8076        non-specialized form will be allowed.)
8077
8078        This shows a small progression on v8.
8079
8080        * JavaScriptCore.exp:
8081        * runtime/JSObject.h:
8082        (JSC::JSObject::putDirectInternal):
8083        * runtime/Structure.cpp:
8084        (JSC::StructureTransitionTable::contains):
8085        (JSC::StructureTransitionTable::get):
8086        (JSC::StructureTransitionTable::remove):
8087        (JSC::StructureTransitionTable::add):
8088        (JSC::Structure::dumpStatistics):
8089        (JSC::Structure::Structure):
8090        (JSC::Structure::~Structure):
8091        (JSC::Structure::addPropertyTransitionToExistingStructure):
8092        (JSC::Structure::addPropertyTransition):
8093        * runtime/Structure.h:
8094        (JSC::Structure::get):
8095        * runtime/StructureTransitionTable.h:
8096        (JSC::StructureTransitionTable::Hash::hash):
8097        (JSC::StructureTransitionTable::Hash::equal):
8098        (JSC::StructureTransitionTable::HashTraits::emptyValue):
8099        (JSC::StructureTransitionTable::HashTraits::constructDeletedValue):
8100        (JSC::StructureTransitionTable::HashTraits::isDeletedValue):
8101        (JSC::StructureTransitionTable::StructureTransitionTable):
8102        (JSC::StructureTransitionTable::~StructureTransitionTable):
8103        (JSC::StructureTransitionTable::isUsingSingleSlot):
8104        (JSC::StructureTransitionTable::map):
8105        (JSC::StructureTransitionTable::setMap):
8106        (JSC::StructureTransitionTable::singleTransition):
8107        (JSC::StructureTransitionTable::setSingleTransition):
8108
81092011-02-22  Andras Becsi  <abecsi@webkit.org>
8110
8111        Reviewed by Laszlo Gombos.
8112
8113        [Qt] Redesign the build system
8114        https://bugs.webkit.org/show_bug.cgi?id=51339
8115
8116        Part 2.
8117
8118        Build WebCore as a static library, compile the WebKit API and WebKit2 API
8119        in a final step and link to WebKit2, WebCore and JSC libraries to fix
8120        linking issues resulting from stripped away symbols.
8121
8122        * JavaScriptCore.pri: Remove the workaround.
8123
81242011-02-21  Adam Roben  <aroben@apple.com>
8125
8126        Fix linker warning on Windows
8127
8128        r79135 tried to export JSObject::s_info by adding it to JavaScriptCore.def. This is the
8129        obvious way (since it's how we export functions), but unfortunately it doesn't work correct.
8130        r79222 made us export it the right way (using the JS_EXPORTDATA macro), but forgot to remove
8131        it from JavaScriptCore.def. This caused us to get linker warnings about exporting the symbol
8132        multiple times.
8133
8134        Rubber-stamped by Anders Carlsson.
8135
8136        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSObject::s_info.
8137
81382011-02-21  Brian Weinstein  <bweinstein@apple.com>
8139
8140        Reviewed by Adam Roben.
8141
8142        WebResourceCacheManager should be responsible for managing the CFURLCache as well
8143        as the WebCore memory cache.
8144        https://bugs.webkit.org/show_bug.cgi?id=54886
8145        Part of <rdar://problem/8971738>
8146
8147        Add a new use flag for using the CFURLCache.
8148
8149        * wtf/Platform.h:
8150
81512011-02-21  Xan Lopez  <xlopez@igalia.com>
8152
8153        Reviewed by Gavin Barraclough.
8154
8155        Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp
8156        https://bugs.webkit.org/show_bug.cgi?id=54901
8157
8158        * jit/JIT.h: swap actual and expected values in message, they were
8159        reversed.
8160        * jit/JITCall32_64.cpp:
8161        (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of
8162        a simple ASSERT.
8163        * jit/JITPropertyAccess32_64.cpp:
8164        (JSC::JIT::emit_op_method_check): ditto.
8165        (JSC::JIT::compileGetByIdHotPath): ditto.
8166        (JSC::JIT::compileGetByIdSlowCase): ditto.
8167        (JSC::JIT::emit_op_put_by_id): ditto.
8168
81692011-02-21  Gavin Barraclough  <barraclough@apple.com>
8170
8171        Ruber stamped by Sam Weinig
8172
8173        Bug 54899 - Math.LOG10E should be 0.4342944819032518
8174        This value is quoted in section 15.8.1.5 of the spec.
8175
8176        * runtime/MathObject.cpp:
8177        (JSC::MathObject::MathObject):
8178
81792011-02-21  Gavin Barraclough  <barraclough@apple.com>
8180
8181        Reviewed by Sam Weinig.
8182
8183        Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
8184
8185        The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
8186        containing a pointer to its parent class. These links should reflect the inheritance
8187        hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
8188        entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
8189        since intervening C++ classes may not have ClassInfo - but would be a potential bug
8190        were ClassInfo were to be added.
8191
8192        * API/JSCallbackConstructor.cpp:
8193        * API/JSCallbackFunction.cpp:
8194        * API/JSCallbackObjectFunctions.h:
8195        * runtime/Arguments.h:
8196        * runtime/ArrayPrototype.cpp:
8197        * runtime/BooleanObject.cpp:
8198        * runtime/DateInstance.cpp:
8199        * runtime/DatePrototype.cpp:
8200        * runtime/ErrorInstance.cpp:
8201        * runtime/InternalFunction.cpp:
8202        * runtime/JSActivation.cpp:
8203        * runtime/JSArray.cpp:
8204        * runtime/JSFunction.cpp:
8205        * runtime/JSONObject.cpp:
8206        * runtime/JSObject.h:
8207        * runtime/JSZombie.h:
8208        * runtime/MathObject.cpp:
8209        * runtime/NativeErrorConstructor.cpp:
8210        * runtime/NumberConstructor.cpp:
8211        * runtime/NumberObject.cpp:
8212        * runtime/RegExpConstructor.cpp:
8213        * runtime/RegExpObject.cpp:
8214        * runtime/StringObject.cpp:
8215        * runtime/StringPrototype.cpp:
8216
82172011-02-21  Adam Roben  <aroben@apple.com>
8218
8219        Export JSObject::s_info from JavaScriptCore.dll
8220
8221        This matches what we do for all other ClassInfo objects that WebCore needs access to.
8222
8223        Fixes <http://webkit.org/b/54881> REGRESSION (r79132): Lots of tests crashing in
8224        JSCell::inherits on Windows
8225
8226        Reviewed by Sam Weinig.
8227
8228        * runtime/JSObject.h: Added JS_EXPORTDATA to s_info.
8229
82302011-02-21  Kristian Amlie  <kristian.amlie@nokia.com>
8231
8232        Reviewed by Andreas Kling.
8233
8234        Switched to compiler based detection, where the error actually is.
8235
8236        It is not the platform that needs the workaround, it is the compiler.
8237
8238        QtWebKit fails to compile on Windows XP with msvc-2008
8239        https://bugs.webkit.org/show_bug.cgi?id=54746
8240
8241        * bytecode/CodeBlock.h:
8242        * runtime/RegExpObject.h:
8243
82442011-02-20  Gavin Barraclough  <barraclough@apple.com>
8245
8246        Reviewed by Oliver Hunt.
8247
8248        https://bugs.webkit.org/show_bug.cgi?id=54839
8249        Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
8250
8251        Historically, Native functions used to be represented by PrototypeFunctions, however
8252        since introducing call optimizations to the JIT this has used JSFunctions for host
8253        calls too. At the point this change was made, the interpreter continued to use
8254        PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
8255        the interpreter has had to be able to run using host functions represented using
8256        JSFunctions - leading to an unnecessary and redundant divergence in behaviour between
8257        interpreter only builds, and situations where the JIT has fallen back to interpreting.
8258
8259        NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
8260        for wrappers for host functions, and as such can also be removed.
8261
8262        GlobalEvalFunction is a redundant wrapper that happens to be derived from
8263        PrototypeFunction. It existed to hold a reference to the global object - but since all
8264        functions how derive from JSObjectWithGlobalObject, this no longer requires an
8265        additional class to provide this functionality.
8266
8267        * JavaScriptCore.JSVALUE32_64only.exp:
8268        * JavaScriptCore.JSVALUE64only.exp:
8269        * JavaScriptCore.xcodeproj/project.pbxproj:
8270            Removed symbols / references to files.
8271
8272        * runtime/GlobalEvalFunction.cpp: Removed.
8273        * runtime/GlobalEvalFunction.h: Removed.
8274        * runtime/NativeFunctionWrapper.h: Removed.
8275        * runtime/PrototypeFunction.cpp: Removed.
8276        * runtime/PrototypeFunction.h: Removed.
8277            Removed.
8278
8279        * runtime/Executable.cpp:
8280        (JSC::NativeExecutable::~NativeExecutable):
8281        * runtime/Executable.h:
8282        (JSC::NativeExecutable::create):
8283        (JSC::NativeExecutable::NativeExecutable):
8284        (JSC::JSFunction::nativeFunction):
8285        * runtime/JSFunction.cpp:
8286        (JSC::callHostFunctionAsConstructor):
8287        (JSC::JSFunction::JSFunction):
8288        (JSC::JSFunction::getCallData):
8289        * runtime/JSFunction.h:
8290        * runtime/JSGlobalData.cpp:
8291        (JSC::JSGlobalData::getHostFunction):
8292        * runtime/JSGlobalData.h:
8293        (JSC::JSGlobalData::getCTIStub):
8294            Added interpreter-friendly constructors for NativeExecutables.
8295
8296        * bytecompiler/BytecodeGenerator.cpp:
8297        * interpreter/Interpreter.cpp:
8298        * jit/JITStubs.cpp:
8299        * jsc.cpp:
8300        * runtime/ArrayConstructor.cpp:
8301        * runtime/BooleanPrototype.cpp:
8302        * runtime/BooleanPrototype.h:
8303        * runtime/CallData.h:
8304        * runtime/DateConstructor.cpp:
8305        * runtime/DateConstructor.h:
8306        * runtime/ErrorPrototype.cpp:
8307        * runtime/ErrorPrototype.h:
8308        * runtime/FunctionPrototype.cpp:
8309        * runtime/FunctionPrototype.h:
8310        * runtime/JSGlobalObject.cpp:
8311        * runtime/JSGlobalObject.h:
8312        * runtime/JSGlobalObjectFunctions.cpp:
8313        * runtime/Lookup.cpp:
8314        * runtime/NumberPrototype.cpp:
8315        * runtime/NumberPrototype.h:
8316        * runtime/ObjectConstructor.cpp:
8317        * runtime/ObjectConstructor.h:
8318        * runtime/ObjectPrototype.cpp:
8319        * runtime/ObjectPrototype.h:
8320        * runtime/RegExpPrototype.cpp:
8321        * runtime/RegExpPrototype.h:
8322        * runtime/SmallStrings.h:
8323        * runtime/StringConstructor.cpp:
8324        * runtime/StringConstructor.h:
8325            Removed use of redundant classes.
8326
83272011-02-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
8328
8329        Unreviewed build fix for Symbian.
8330
8331        [Symbian] Revert the removal of linking
8332        against hal after r79126.
8333
8334        Dependency on the hal library can not be removed
8335        as it is still used (e.g. in MarkStackSymbian.cpp).
8336
8337        * JavaScriptCore.pri:
8338
83392011-02-19  Gavin Barraclough  <barraclough@apple.com>
8340
8341        Interpreter build fix.
8342
8343        * runtime/ArrayConstructor.cpp:
8344        * runtime/BooleanPrototype.cpp:
8345        * runtime/DateConstructor.cpp:
8346        * runtime/ErrorPrototype.cpp:
8347        * runtime/FunctionPrototype.cpp:
8348        * runtime/Lookup.cpp:
8349        * runtime/NumberPrototype.cpp:
8350        * runtime/ObjectConstructor.cpp:
8351        * runtime/ObjectPrototype.cpp:
8352        * runtime/RegExpPrototype.cpp:
8353        * runtime/StringConstructor.cpp:
8354
83552011-02-19  Gavin Barraclough  <barraclough@apple.com>
8356
8357        Build fix!!
8358
8359        * JavaScriptCore.exp:
8360
83612011-02-19  Gavin Barraclough  <barraclough@apple.com>
8362
8363        Windows build fix!!
8364
8365        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8366
83672011-02-19  Gavin Barraclough  <barraclough@apple.com>
8368
8369        Windows build fix!
8370
8371        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
8372
83732011-02-19  Gavin Barraclough  <barraclough@apple.com>
8374
8375        Build fix!
8376
8377        * JavaScriptCore.exp:
8378
83792011-02-18  Gavin Barraclough  <barraclough@apple.com>
8380
8381        Reviewed by Sam Weinig.
8382
8383        Bug 54786 - Devirtualize JSCell::classInfo()
8384
8385        Instead of making a virtual function call, add a pointer to the ClassInfo
8386        onto Structure.
8387
8388        This removes a virtual function call, and paves the way towards removing all
8389        the createStructure methods, and StructureFlags/AnonymousSlotCount properties
8390        (these should be able to move onto ClassInfo).
8391
8392        Calls to Structure::create must now pass a pointer to the ClassInfo for the
8393        structure. All objects now have a ClassInfo pointer, non-object cell types
8394        still do not.
8395
8396        Changes are most mechanical, involving three steps:
8397            * Remove virtual classInfo() methods.
8398            * Add &s_info parameter to calls to Structure::create.
8399            * Rename ClassInfo static members on classes from 'info' to 's_info',
8400              for consistency.
8401
8402        * API/JSCallbackConstructor.cpp:
8403        * API/JSCallbackConstructor.h:
8404        * API/JSCallbackFunction.cpp:
8405        * API/JSCallbackFunction.h:
8406        * API/JSCallbackObject.cpp:
8407        * API/JSCallbackObject.h:
8408        * API/JSCallbackObjectFunctions.h:
8409        * API/JSObjectRef.cpp:
8410        * API/JSValueRef.cpp:
8411        * API/JSWeakObjectMapRefPrivate.cpp:
8412        * JavaScriptCore.exp:
8413        * debugger/Debugger.cpp:
8414        * debugger/DebuggerActivation.h:
8415        * debugger/DebuggerCallFrame.cpp:
8416        * interpreter/Interpreter.cpp:
8417        * jit/JITCall32_64.cpp:
8418        * jit/JITOpcodes.cpp:
8419        * jit/JITStubs.cpp:
8420        * profiler/Profiler.cpp:
8421        * runtime/Arguments.cpp:
8422        * runtime/Arguments.h:
8423        * runtime/ArrayConstructor.cpp:
8424        * runtime/ArrayPrototype.cpp:
8425        * runtime/ArrayPrototype.h:
8426        * runtime/BooleanObject.cpp:
8427        * runtime/BooleanObject.h:
8428        * runtime/BooleanPrototype.cpp:
8429        * runtime/DateConstructor.cpp:
8430        * runtime/DateInstance.cpp:
8431        * runtime/DateInstance.h:
8432        * runtime/DatePrototype.cpp:
8433        * runtime/DatePrototype.h:
8434        * runtime/ErrorInstance.cpp:
8435        * runtime/ErrorInstance.h:
8436        * runtime/ErrorPrototype.cpp:
8437        * runtime/FunctionPrototype.cpp:
8438        * runtime/FunctionPrototype.h:
8439        * runtime/GetterSetter.h:
8440        * runtime/GlobalEvalFunction.h:
8441        * runtime/InternalFunction.cpp:
8442        * runtime/InternalFunction.h:
8443        * runtime/JSAPIValueWrapper.h:
8444        * runtime/JSActivation.cpp:
8445        * runtime/JSActivation.h:
8446        * runtime/JSArray.cpp:
8447        * runtime/JSArray.h:
8448        * runtime/JSByteArray.cpp:
8449        * runtime/JSByteArray.h:
8450        * runtime/JSCell.cpp:
8451        * runtime/JSCell.h:
8452        * runtime/JSFunction.cpp:
8453        * runtime/JSFunction.h:
8454        * runtime/JSGlobalData.cpp:
8455        * runtime/JSGlobalObject.cpp:
8456        * runtime/JSGlobalObject.h:
8457        * runtime/JSNotAnObject.h:
8458        * runtime/JSONObject.cpp:
8459        * runtime/JSONObject.h:
8460        * runtime/JSObject.cpp:
8461        * runtime/JSObject.h:
8462        * runtime/JSObjectWithGlobalObject.h:
8463        * runtime/JSPropertyNameIterator.h:
8464        * runtime/JSStaticScopeObject.h:
8465        * runtime/JSString.h:
8466        * runtime/JSVariableObject.h:
8467        * runtime/JSWrapperObject.h:
8468        * runtime/JSZombie.cpp:
8469        * runtime/JSZombie.h:
8470        * runtime/Lookup.cpp:
8471        * runtime/MathObject.cpp:
8472        * runtime/MathObject.h:
8473        * runtime/NativeErrorConstructor.cpp:
8474        * runtime/NativeErrorConstructor.h:
8475        * runtime/NumberConstructor.cpp:
8476        * runtime/NumberConstructor.h:
8477        * runtime/NumberObject.cpp:
8478        * runtime/NumberObject.h:
8479        * runtime/NumberPrototype.cpp:
8480        * runtime/ObjectConstructor.cpp:
8481        * runtime/ObjectPrototype.cpp:
8482        * runtime/RegExpConstructor.cpp:
8483        * runtime/RegExpConstructor.h:
8484        * runtime/RegExpObject.cpp:
8485        * runtime/RegExpObject.h:
8486        * runtime/RegExpPrototype.cpp:
8487        * runtime/ScopeChain.cpp:
8488        * runtime/StringConstructor.cpp:
8489        * runtime/StringObject.cpp:
8490        * runtime/StringObject.h:
8491        * runtime/StringObjectThatMasqueradesAsUndefined.h:
8492        * runtime/StringPrototype.cpp:
8493        * runtime/StringPrototype.h:
8494        * runtime/Structure.cpp:
8495        * runtime/Structure.h:
8496
84972011-02-19  David Kilzer  <ddkilzer@apple.com>
8498
8499        <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc
8500
8501        Reviewed by Dan Bernstein.
8502
8503        * Configurations/Base.xcconfig: Added
8504        JAVASCRIPTCORE_FRAMEWORKS_DIR variable.
8505        * Configurations/JavaScriptCore.xcconfig: Used
8506        JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH.
8507        * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH
8508        for Production configuration of jsc target.
8509        (Copy Into Framework): Removed old build phase.
8510        (Fix Framework Reference): Renamed build phase to "Copy Into
8511        Framework".  Added "set -x" call to make the script print the
8512        commands it is running.  Added code to exit early for Production
8513        builds since this was never intended for them.  Added code to
8514        copy jsc into the JavaScriptCore.framework/Resources directory.
8515
85162011-02-19  Siddharth Mathur  <siddharth.mathur@nokia.com>
8517
8518        Reviewed by Laszlo Gombos.
8519
8520        [Symbian] OSAllocator implementation for Symbian OS.
8521        Manages both data and code region requests. V8 and Sunspider tested
8522        OK with interpreter. Not tested with JSC JIT yet as it has unrelated
8523        failures. Also no thread safety yet.
8524        https://bugs.webkit.org/show_bug.cgi?id=51128
8525
8526        * JavaScriptCore.pri: removed HAL linkage
8527        * wtf/Bitmap.h:
8528        (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty
8529        * wtf/OSAllocator.h:
8530        (WTF::OSAllocator::decommitAndRelease): decommit explicitly
8531        * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface
8532        (WTF::allocateCodeChunk): utility for code chunks
8533        (WTF::deallocateCodeChunk): utility for code chunks
8534        (WTF::dataAllocatorInstance): getter for data allocator instance
8535        (WTF::OSAllocator::reserveUncommitted):
8536        (WTF::OSAllocator::releaseDecommitted):
8537        (WTF::OSAllocator::commit):
8538        (WTF::OSAllocator::decommit):
8539        (WTF::OSAllocator::reserveAndCommit):
8540        (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests
8541        to one underlying Symbian chunk
8542        (WTF::PageAllocatorSymbian::~PageAllocatorSymbian):
8543        (WTF::PageAllocatorSymbian::reserve):
8544        (WTF::PageAllocatorSymbian::release):
8545        (WTF::PageAllocatorSymbian::commit):
8546        (WTF::PageAllocatorSymbian::decommit):
8547        (WTF::PageAllocatorSymbian::contains):
8548        * wtf/PageAllocatorSymbian.h: Added.
8549        (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk
8550        (WTF::SymbianChunk::~SymbianChunk):
8551        (WTF::SymbianChunk::contains):
8552
85532011-02-19  Yong Li  <yoli@rim.com>
8554
8555        Reviewed by Eric Seidel.
8556
8557        https://bugs.webkit.org/show_bug.cgi?id=54687
8558        When being built with armcc, "int" bit fields are treated as
8559        unsigned integers, which will fail the comparisons like "m_offset == -1".
8560        Using "signed" fixes the problem.
8561
8562        * assembler/ARMAssembler.h:
8563        * assembler/ARMv7Assembler.h:
8564
85652011-02-18  Geoffrey Garen  <ggaren@apple.com>
8566
8567        Reviewed by Sam Weinig.
8568
8569        Made MarkedSpace block iteration size-class agnostic
8570        https://bugs.webkit.org/show_bug.cgi?id=54792
8571
8572        SunSpider reports no change.
8573
8574        * runtime/MarkedSpace.cpp:
8575        (JSC::MarkedSpace::clearMarks):
8576        (JSC::MarkedSpace::sweep):
8577        (JSC::MarkedSpace::objectCount):
8578        (JSC::MarkedSpace::size):
8579        (JSC::MarkedSpace::capacity):
8580        * runtime/MarkedSpace.h:
8581        (JSC::MarkedSpace::forEach): Iterate blocks in hashing order instead of
8582        size class list order. This is a much simpler convention in a world
8583        of many different size classes.
8584
85852011-02-18  Kristian Amlie  <kristian.amlie@nokia.com>
8586
8587        Reviewed by Andreas Kling.
8588
8589        Added friend exception to Qt platform, which also compiles Windows.
8590
8591        QtWebKit fails to compile on Windows XP with msvc-2008
8592        https://bugs.webkit.org/show_bug.cgi?id=54746
8593
8594        * bytecode/CodeBlock.h:
8595        * runtime/RegExpObject.h:
8596
85972011-02-18  Geoffrey Garen  <ggaren@apple.com>
8598
8599        (Rolled back in r79022 with crash fixed.)
8600
8601        Reviewed by Sam Weinig.
8602
8603        Use hashing instead of linear search in the conservative pointer test
8604        https://bugs.webkit.org/show_bug.cgi?id=54767
8605
8606        SunSpider reports no change.
8607
8608        * runtime/MarkedSpace.cpp:
8609        (JSC::MarkedSpace::destroy): No need to explicitly clear the blocks array,
8610        since freeBlock removes items for us.
8611
8612        (JSC::MarkedSpace::freeBlock): Fixed a typo that always removed the last
8613        block from the block set instead of the block being freed. Changed to
8614        remove a block from our data structures before deallocating it, since
8615        this is slightly cleaner.
8616
8617        * runtime/MarkedSpace.h:
8618        (JSC::MarkedSpace::contains): Variable-sized objects will use more,
8619        smaller blocks, so it's important for the contains check not to be O(n)
8620        in the number of blocks.
8621
86222011-02-18  chris reiss  <christopher.reiss@nokia.com>
8623
8624        Reviewed by Andreas Kling.
8625
8626        REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
8627        https://bugs.webkit.org/show_bug.cgi?id=49989
8628
8629        updated test fast/js/script-tests/date-parse-test.js
8630
8631        * wtf/DateMath.cpp:
8632        (WTF::parseDateFromNullTerminatedCharacters):
8633
86342011-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
8635
8636        Unreviewed, rolling out r79022.
8637        http://trac.webkit.org/changeset/79022
8638        https://bugs.webkit.org/show_bug.cgi?id=54775
8639
8640        It broke the whole world (Requested by Ossy on #webkit).
8641
8642        * runtime/MarkedSpace.h:
8643        (JSC::MarkedSpace::contains):
8644
86452011-02-18  Yael Aharon  <yael.aharon@nokia.com>
8646
8647        Reviewed by Dave Hyatt.
8648
8649        Add support for dir=auto
8650        https://bugs.webkit.org/show_bug.cgi?id=50916
8651
8652        Change defaultWritingDirection() to return if the writing direction
8653        was determined from a letter with strong directionality or not.
8654
8655        * JavaScriptCore.exp:
8656        * JavaScriptCore.order:
8657        * wtf/text/StringImpl.cpp:
8658        (WTF::StringImpl::defaultWritingDirection):
8659        * wtf/text/StringImpl.h:
8660        * wtf/text/WTFString.h:
8661        (WTF::String::defaultWritingDirection):
8662
86632011-02-18  Geoffrey Garen  <ggaren@apple.com>
8664
8665        Reviewed by Sam Weinig.
8666
8667        Use hashing instead of linear search in the conservative pointer test
8668        https://bugs.webkit.org/show_bug.cgi?id=54767
8669
8670        SunSpider reports no change.
8671
8672        * runtime/MarkedSpace.h:
8673        (JSC::MarkedSpace::contains): Variable-sized objects will use more,
8674        smaller blocks, so it's important for the contains check not to be O(n)
8675        in the number of blocks.
8676
86772011-02-18  Geoffrey Garen  <ggaren@apple.com>
8678
8679        Reviewed by Sam Weinig.
8680
8681        Tightened some usage accounting code in MarkedSpace
8682        https://bugs.webkit.org/show_bug.cgi?id=54761
8683
8684        SunSpider reports no change.
8685
8686        * runtime/Heap.cpp:
8687        (JSC::Heap::Heap): Initialize the marked space high water mark on
8688        construction, instead of relying on some implicit subtleties to make
8689        not initializing it work out OK.
8690
8691        * runtime/Heap.h: Fixed up includes.
8692
8693        * runtime/MarkedBlock.h: Made firstAtom() static so clients can call it
8694        even without having allocated a block.
8695
8696        * runtime/MarkedSpace.cpp:
8697        (JSC::MarkedSpace::MarkedSpace): Don't pre-allocate a block, since this
8698        would be prohibitively expensive with multiple size classes.
8699
8700        (JSC::MarkedSpace::allocateBlock):
8701        (JSC::MarkedSpace::freeBlock): Track allocated blocks in a hash set,
8702        since linear search in the contains check will be prohibitively
8703        expensive once we're using lots of smaller blocks.
8704
8705        (JSC::MarkedSpace::allocate): Don't assume that we always have a block
8706        allocated, since we don't anymore. (See above.)
8707
8708        (JSC::MarkedSpace::reset):
8709        * runtime/MarkedSpace.h: Updated for changes mentioned above.
8710
87112011-02-17  Geoffrey Garen  <ggaren@apple.com>
8712
8713        Reviewed by Sam Weinig.
8714
8715        Made object allocation secretly variable-sized (Shhhh!)
8716        https://bugs.webkit.org/show_bug.cgi?id=54721
8717
8718        SunSpider reports no change.
8719
8720        Internally, MarkedBlock now makes variable-sized allocations, even
8721        though MarkedSpace doesn't take advantage of this yet.
8722
8723        * runtime/MarkedBlock.cpp:
8724        (JSC::MarkedBlock::MarkedBlock): No need to ASSERT that allocations are
8725        fixed-sized.
8726
8727        * runtime/MarkedBlock.h: Shrunk the atom size so we can allocate things
8728        that are not multiples of 64 bytes.
8729
87302011-02-17  Geoffrey Garen  <ggaren@apple.com>
8731
8732        Reviewed by Sam Weinig.
8733
8734        Fixed some math errors when when using variable-sized cells
8735        https://bugs.webkit.org/show_bug.cgi?id=54717
8736
8737        SunSpider reports no change.
8738
8739        Computer Science Barbie says, "Math is not so hard afterall!"
8740
8741        * runtime/JSCell.h:
8742        (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
8743        minimum number of atoms required for a cell, since rounding down
8744        will get you splinched.
8745
8746        * runtime/MarkedBlock.cpp:
8747        (JSC::MarkedBlock::MarkedBlock):
8748        (JSC::MarkedBlock::sweep):
8749        * runtime/MarkedBlock.h:
8750        (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
8751        because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
8752        may not hit m_endAtom exactly.
8753
87542011-02-17  Geoffrey Garen  <ggaren@apple.com>
8755
8756        Reviewed by Sam Weinig.
8757
8758        A little more abstraction for MarkedSpace::contains
8759        https://bugs.webkit.org/show_bug.cgi?id=54715
8760
8761        * runtime/MarkedBlock.h:
8762        (JSC::MarkedBlock::contains): Added a contains function, so MarkedSpace
8763        doesn't have to know how MarkedBlock tracks containment internally.
8764
8765        * runtime/MarkedSpace.h:
8766        (JSC::MarkedSpace::contains): Call through to MarkedBlock to figure out
8767        if a cell that seems to be in a block is valid.
8768
87692011-02-17  Geoffrey Garen  <ggaren@apple.com>
8770
8771        Reviewed by Sam Weinig.
8772
8773        Removed the invariant that the last cell in a block is always marked
8774        https://bugs.webkit.org/show_bug.cgi?id=54713
8775
8776        SunSpider reports no change.
8777
8778        This adds one branch to allocation, but simplifies the mark invariant,
8779        especially in a world of variable-sized cells. Now, it really is true
8780        that any cell whose mark bit is set is a valid, live cell whose
8781        constructor has run and whose destructor has not run.
8782
8783        * runtime/JSCell.h:
8784        (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while
8785        since we can no longer rely on a set mark bit to break out of this loop
8786        before it reaches the end of the block.
8787
8788        * runtime/MarkedBlock.cpp:
8789        (JSC::MarkedBlock::MarkedBlock):
8790        (JSC::MarkedBlock::sweep):
8791        * runtime/MarkedBlock.h:
8792        (JSC::MarkedBlock::isEmpty):
8793        (JSC::MarkedBlock::clearMarks):
8794        (JSC::MarkedBlock::markCount):
8795        (JSC::MarkedBlock::forEach): No need to set a special last mark bit.
8796
87972011-02-17  Sheriff Bot  <webkit.review.bot@gmail.com>
8798
8799        Unreviewed, rolling out r78856 and r78907.
8800        http://trac.webkit.org/changeset/78856
8801        http://trac.webkit.org/changeset/78907
8802        https://bugs.webkit.org/show_bug.cgi?id=54705
8803
8804        These seem to break tests on 32-bit builds. (Requested by
8805        aroben on #webkit).
8806
8807        * JavaScriptCore.xcodeproj/project.pbxproj:
8808        * collector/handles/Global.h:
8809        (JSC::Global::internalSet):
8810        * collector/handles/Handle.h:
8811        (JSC::HandleTypes::getFromSlot):
8812        (JSC::HandleTypes::toJSValue):
8813        (JSC::HandleTypes::validateUpcast):
8814        (JSC::HandleConverter::operator->):
8815        (JSC::HandleConverter::operator*):
8816        (JSC::Handle::Handle):
8817        (JSC::Handle::get):
8818        * runtime/JSArray.cpp:
8819        (JSC::JSArray::sortNumeric):
8820        * runtime/JSObject.h:
8821        (JSC::JSObject::inlineGetOwnPropertySlot):
8822        * runtime/SlotAccessor.h: Removed.
8823        * runtime/WeakGCPtr.h:
8824        (JSC::WeakGCPtr::get):
8825        (JSC::WeakGCPtr::internalSet):
8826        * runtime/WriteBarrier.h:
8827        (JSC::DeprecatedPtr::DeprecatedPtr):
8828        (JSC::DeprecatedPtr::get):
8829        (JSC::DeprecatedPtr::operator*):
8830        (JSC::DeprecatedPtr::operator->):
8831        (JSC::DeprecatedPtr::slot):
8832        (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
8833        (JSC::DeprecatedPtr::operator!):
8834        (JSC::WriteBarrierBase::set):
8835        (JSC::WriteBarrierBase::get):
8836        (JSC::WriteBarrierBase::operator*):
8837        (JSC::WriteBarrierBase::operator->):
8838        (JSC::WriteBarrierBase::clear):
8839        (JSC::WriteBarrierBase::slot):
8840        (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
8841        (JSC::WriteBarrierBase::operator!):
8842        (JSC::WriteBarrierBase::setWithoutWriteBarrier):
8843        (JSC::WriteBarrier::WriteBarrier):
8844
88452011-02-17  Csaba Osztrogonác  <ossy@webkit.org>
8846
8847        Unreviewed.
8848
8849        [Qt] Buildfix.
8850
8851        * wtf/RetainPtr.h: Add missing PLATFORM(CF) guard.
8852
88532011-02-17  Geoffrey Garen  <ggaren@apple.com>
8854
8855        Reviewed by Oliver Hunt.
8856
8857        Made MarkedBlock variable-sized
8858        https://bugs.webkit.org/show_bug.cgi?id=54692
8859
8860        SunSpider reports no change.
8861
8862        Each MarkedBlock is now composed of a set of fixed-sized atoms, with one
8863        mark bit per atom. A given cell may be composed of one or more atoms.
8864
8865        * runtime/Heap.cpp:
8866        (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace,
8867        bubbling it up from MarkedBlock, since MarkedBlock now supports variable-
8868        sizedness.
8869
8870        * runtime/JSCell.h:
8871        (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and
8872        (implicit) one constants -- these quantities are not constant anymore.
8873        Updated for switch from cell to atom.
8874
8875        * runtime/MarkedBlock.cpp:
8876        (JSC::MarkedBlock::create):
8877        (JSC::MarkedBlock::destroy):
8878        (JSC::MarkedBlock::MarkedBlock):
8879        (JSC::MarkedBlock::sweep):
8880        * runtime/MarkedBlock.h:
8881        (JSC::MarkedBlock::firstAtom):
8882        (JSC::MarkedBlock::atoms):
8883        (JSC::MarkedBlock::isAtomAligned):
8884        (JSC::MarkedBlock::blockFor):
8885        (JSC::MarkedBlock::isEmpty):
8886        (JSC::MarkedBlock::clearMarks):
8887        (JSC::MarkedBlock::size):
8888        (JSC::MarkedBlock::capacity):
8889        (JSC::MarkedBlock::atomNumber):
8890        (JSC::MarkedBlock::isMarked):
8891        (JSC::MarkedBlock::testAndSetMarked):
8892        (JSC::MarkedBlock::setMarked):
8893        (JSC::MarkedBlock::forEach): Same as above. Also removed use of CELL_SIZE
8894        and BLOCK_SIZE, and switched away from calling arbitrary pointers cells.
8895
8896        * runtime/MarkedSpace.cpp:
8897        (JSC::MarkedSpace::MarkedSpace):
8898        (JSC::MarkedSpace::allocateBlock):
8899        (JSC::MarkedSpace::allocate):
8900        (JSC::MarkedSpace::reset):
8901        * runtime/MarkedSpace.h:
8902        (JSC::CollectorHeap::CollectorHeap):
8903        (JSC::MarkedSpace::contains): Updated for renames. Made fixed-sizedness
8904        a property of MarkedSpace.
8905
89062011-02-17  Oliver Hunt  <oliver@apple.com>
8907
8908        Attempt to fix windows build
8909
8910        * runtime/WriteBarrier.h:
8911
89122011-02-17  Oliver Hunt  <oliver@apple.com>
8913
8914        Reviewed by Geoffrey Garen.
8915
8916        Refactor WriteBarrier and DeprecatedPtr to have less code duplication.
8917        https://bugs.webkit.org/show_bug.cgi?id=54608
8918
8919        Make use of the tricks used for Handle, et al to avoid duplicating all
8920        of the logic for DeprecatedPtr and WriteBarrier simply to support known
8921        vs. unknown types.
8922
8923        * JavaScriptCore.xcodeproj/project.pbxproj:
8924        * collector/handles/Global.h:
8925        (JSC::Global::internalSet):
8926        * collector/handles/Handle.h:
8927        (JSC::Handle::Handle):
8928        (JSC::Handle::get):
8929        * runtime/JSArray.cpp:
8930        (JSC::JSArray::sortNumeric):
8931        * runtime/JSObject.h:
8932        (JSC::JSObject::inlineGetOwnPropertySlot):
8933        * runtime/SlotAccessor.h: Added.
8934        (JSC::SlotTypes::getFromBaseType):
8935        (JSC::SlotTypes::convertToBaseType):
8936        (JSC::SlotTypes::getFromSlot):
8937        (JSC::SlotTypes::toJSValue):
8938        (JSC::SlotTypes::validateUpcast):
8939        (JSC::SlotAccessor::operator->):
8940        (JSC::SlotAccessor::operator*):
8941        * runtime/WeakGCPtr.h:
8942        (JSC::WeakGCPtr::get):
8943        (JSC::WeakGCPtr::internalSet):
8944        * runtime/WriteBarrier.h:
8945        (JSC::DeprecatedPtr::DeprecatedPtr):
8946        (JSC::DeprecatedPtr::get):
8947        (JSC::DeprecatedPtr::slot):
8948        (JSC::DeprecatedPtr::operator=):
8949        (JSC::WriteBarrierTranslator::convertToStorage):
8950        (JSC::WriteBarrierTranslator::convertFromStorage):
8951        (JSC::WriteBarrierBase::set):
8952        (JSC::WriteBarrierBase::get):
8953        (JSC::WriteBarrierBase::clear):
8954        (JSC::WriteBarrierBase::slot):
8955        (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
8956        (JSC::WriteBarrierBase::operator!):
8957        (JSC::WriteBarrierBase::setWithoutWriteBarrier):
8958        (JSC::WriteBarrier::WriteBarrier):
8959
89602011-02-17  Kevin Ollivier  <kevino@theolliviers.com>
8961
8962        [wx] Revert incorrect blind fix and restore previous working code.
8963
8964        * wtf/wx/StringWx.cpp:
8965        (WTF::String::String):
8966
89672011-02-16  Geoffrey Garen  <ggaren@apple.com>
8968
8969        Reviewed by Maciej Stachowiak.
8970
8971        Intermittent crashes beneath MarkStack::drain
8972        https://bugs.webkit.org/show_bug.cgi?id=54614
8973        <rdar://problem/8971070>
8974
8975        The crashes were caused by a GC happening after the global object's
8976        property table had grown (due to compilation), but before the properties
8977        had been fully initialized by program execution.
8978
8979        * bytecompiler/BytecodeGenerator.cpp:
8980        (JSC::BytecodeGenerator::BytecodeGenerator): Explicitly resize the global
8981        object's register storage immediately, without waiting for program
8982        execution to do it for us. This ensures that the global object's count
8983        of global variables is consistent with the size of its global variable
8984        storage at all times, and it ensures that all global variables are
8985        properly initialized from the get-go.
8986
8987        * runtime/JSGlobalObject.cpp:
8988        (JSC::JSGlobalObject::resizeRegisters):
8989        * runtime/JSGlobalObject.h: Added a helper function for growing the
8990        global object's register storage, and initializing new registers.
8991
8992== Rolled over to ChangeLog-2011-02-16 ==
8993