b3c72773bce97db283bdb79c017294cea1fddccb
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
2
3         Not reviewed.
4
5         Try to fix the Mac build.
6
7         * JavaScriptCore.xcodeproj/project.pbxproj: Make sure to forward
8         ConervativeSet.h, since it's now visible when compiling other projects.
9
10 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
11
12         Reviewed by Oliver Hunt.
13
14         Removed another case of DeprecatedPtr (ConservativeSet)
15         https://bugs.webkit.org/show_bug.cgi?id=56281
16         
17         The ConservativeSet is an internal data structure used during marking,
18         so direct pointers are fine.
19
20         * runtime/ConservativeSet.cpp:
21         (JSC::ConservativeSet::grow):
22         * runtime/ConservativeSet.h: Added some accessors, for use by MarkStack::append.
23         (JSC::ConservativeSet::~ConservativeSet): Fixed a typo where we calculated
24         the size of the set based on sizeof(DeprecatedPtr<T>*) instead of
25         sizeof(DeprecatedPtr<T>). I'm not sure if this had real-world implications or not.
26         (JSC::ConservativeSet::size):
27         (JSC::ConservativeSet::set): Use direct pointers, as stated above. 
28
29         * runtime/Heap.cpp:
30         (JSC::Heap::markRoots):
31         * runtime/MarkStack.h:
32         (JSC::MarkStack::append): Created a special case of append for
33         ConservativeSet. I didn't want to add back a generic "append JSCell*"
34         function, since other class might start using that wrong. (In the end,
35         this function might go away, since the Heap will want to do something
36         slightly more interesting with the conservative set, but this is OK for
37         now.)
38
39 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
40
41         Reviewed by Oliver Hunt.
42
43         Removed another case of DeprecatedPtr (PutPropertySlot)
44         https://bugs.webkit.org/show_bug.cgi?id=56278
45
46         * runtime/PutPropertySlot.h:
47         (JSC::PutPropertySlot::setExistingProperty):
48         (JSC::PutPropertySlot::setNewProperty):
49         (JSC::PutPropertySlot::base): Direct pointer is fine for PutPropertySlot,
50         since it's a stack-allocated temporary.
51
52 2011-03-13  Geoffrey Garen  <ggaren@apple.com>
53
54         Reviewed by Oliver Hunt.
55
56         Removed one case of DeprecatedPtr (ScopeChainIterator)
57         https://bugs.webkit.org/show_bug.cgi?id=56277
58
59         * runtime/ScopeChain.h: Direct pointer is fine for ScopeChainIterator,
60         since it's a stack-allocated temporary.
61
62 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
63
64         Reviewed by Sam Weinig.
65
66         Bug 56273 - Add three operand forms to MacroAssember operations.
67
68         Adding for X86(_64) for now, should be rolled out to other backends as necessary.
69         These may allow more efficient code generation in some cases, avoiding the need
70         for unnecessary register-register move instructions.
71
72         * assembler/AbstractMacroAssembler.h:
73         (JSC::AbstractMacroAssembler::Jump::link):
74         (JSC::AbstractMacroAssembler::Jump::linkTo):
75             - marked these methods const.
76         (JSC::AbstractMacroAssembler::Jump::isSet):
77             - add a method to check whether a Jump object has been set to
78               reference an instruction, or is in a null, unset state. 
79         * assembler/MacroAssemblerCodeRef.h:
80         (JSC::FunctionPtr::FunctionPtr):
81             - add non-explicit constructor, for FunctionPtr's to C/C++ functions.
82         * assembler/MacroAssemblerX86Common.h:
83         (JSC::MacroAssemblerX86Common::and32):
84         (JSC::MacroAssemblerX86Common::lshift32):
85         (JSC::MacroAssemblerX86Common::or32):
86         (JSC::MacroAssemblerX86Common::rshift32):
87         (JSC::MacroAssemblerX86Common::urshift32):
88         (JSC::MacroAssemblerX86Common::xor32):
89         (JSC::MacroAssemblerX86Common::moveDouble):
90         (JSC::MacroAssemblerX86Common::addDouble):
91         (JSC::MacroAssemblerX86Common::divDouble):
92         (JSC::MacroAssemblerX86Common::subDouble):
93         (JSC::MacroAssemblerX86Common::mulDouble):
94         (JSC::MacroAssemblerX86Common::branchTruncateDoubleToInt32):
95         (JSC::MacroAssemblerX86Common::branchTest32):
96         (JSC::MacroAssemblerX86Common::branchTest8):
97         (JSC::MacroAssemblerX86Common::branchAdd32):
98         (JSC::MacroAssemblerX86Common::branchMul32):
99         (JSC::MacroAssemblerX86Common::branchSub32):
100             - add three operand forms of these instructions.
101         * assembler/MacroAssemblerX86_64.h:
102         (JSC::MacroAssemblerX86_64::addDouble):
103         (JSC::MacroAssemblerX86_64::convertInt32ToDouble):
104         (JSC::MacroAssemblerX86_64::loadPtr):
105         (JSC::MacroAssemblerX86_64::branchTestPtr):
106         * assembler/X86Assembler.h:
107         (JSC::X86Assembler::JmpSrc::isSet):
108             - add a method to check whether a JmpSrc object has been set to
109               reference an instruction, or is in a null, unset state. 
110         (JSC::X86Assembler::movsd_rr):
111             - added FP register-register move.
112         (JSC::X86Assembler::linkJump):
113             - Add an assert to check jumps aren't linked more than once.
114         * jit/JITInlineMethods.h:
115         (JSC::JIT::emitLoadInt32ToDouble):
116             - load integers to the FPU via regsiters on x86-64.
117
118 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
119
120         ARM build fix.
121
122         * assembler/MacroAssemblerARM.h:
123         (JSC::MacroAssemblerARM::load32):
124
125 2011-03-13  Gavin Barraclough  <barraclough@apple.com>
126
127         Reviewed by Sam Weinig.
128
129         Bug 56270 - The JIT 'friend's many classes in JSC; start unwinding this.
130
131         The JIT need to 'friend' other classes in order to be able to calculate offsets
132         of various properties, or the absolute addresses of members within specific objects,
133         in order to JIT generate code that will access members within the class when run.
134
135         Instead of using friends in these cases, switch to providing specific accessor
136         methods to provide this information.  In the case of offsets, these can be static
137         functions, and in the case of pointers to members within a specific object these can
138         be const methods returning pointers to const values, to prevent clients from
139         modifying values otherwise encapsulated within classes.
140
141         * bytecode/SamplingTool.h:
142         * interpreter/Register.h:
143         * interpreter/RegisterFile.h:
144         * runtime/JSArray.h:
145         * runtime/JSCell.h:
146         * runtime/JSTypeInfo.h:
147         * runtime/JSVariableObject.h:
148         * runtime/Structure.h:
149         * wtf/RefCounted.h:
150             - Change these classes to no longer friend the JIT, add accessors for member offsets.
151         * jit/JIT.cpp:
152         * jit/JITCall32_64.cpp:
153         * jit/JITInlineMethods.h:
154         * jit/JITOpcodes.cpp:
155         * jit/JITOpcodes32_64.cpp:
156         * jit/JITPropertyAccess.cpp:
157         * jit/JITPropertyAccess32_64.cpp:
158             - Change the JIT to use class accessors, rather than taking object ofsets directly.
159         * assembler/AbstractMacroAssembler.h:
160         * assembler/MacroAssemblerX86_64.h:
161         * assembler/X86Assembler.h:
162             - Since the accessors for objects members return const pointers to retain encapsulation,
163               methods generating code with absolute addresses must be able to handle const pointers
164               (the JIT doesn't write to these values, do dies treat the pointer to value as const
165               from within the C++ code of the JIT, if not at runtime!).
166
167 2011-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
168
169         Unreviewed, rolling out r80919.
170         http://trac.webkit.org/changeset/80919
171         https://bugs.webkit.org/show_bug.cgi?id=56251
172
173         all windows bots failed to compile this change (Requested by
174         loislo on #webkit).
175
176         * JavaScriptCore.xcodeproj/project.pbxproj:
177         * bytecode/StructureStubInfo.cpp:
178         * interpreter/Register.h:
179         (JSC::Register::withInt):
180         (JSC::Register::withCallee):
181         (JSC::Register::operator=):
182         (JSC::Register::i):
183         (JSC::Register::activation):
184         (JSC::Register::function):
185         (JSC::Register::propertyNameIterator):
186         (JSC::Register::scopeChain):
187         * jit/JIT.h:
188         * jit/JITCall.cpp:
189         (JSC::JIT::compileOpCallInitializeCallFrame):
190         (JSC::JIT::compileOpCallVarargs):
191         (JSC::JIT::compileOpCall):
192         * jit/JITCall32_64.cpp:
193         (JSC::JIT::compileOpCallInitializeCallFrame):
194         (JSC::JIT::compileOpCallVarargs):
195         (JSC::JIT::compileOpCall):
196         (JSC::JIT::compileOpCallSlowCase):
197         * jit/JITInlineMethods.h:
198         (JSC::JIT::emitPutToCallFrameHeader):
199         * jit/JITOpcodes.cpp:
200         (JSC::JIT::privateCompileCTINativeCall):
201         (JSC::JIT::emit_op_get_pnames):
202         (JSC::JIT::emit_op_next_pname):
203         (JSC::JIT::emit_op_load_varargs):
204         (JSC::JIT::emitSlow_op_load_varargs):
205         * jit/JITOpcodes32_64.cpp:
206         (JSC::JIT::privateCompileCTINativeCall):
207         (JSC::JIT::emit_op_get_pnames):
208         (JSC::JIT::emit_op_next_pname):
209         * jit/JSInterfaceJIT.h:
210         (JSC::JSInterfaceJIT::payloadFor):
211         * jit/SpecializedThunkJIT.h:
212         (JSC::SpecializedThunkJIT::returnJSValue):
213         (JSC::SpecializedThunkJIT::returnDouble):
214         (JSC::SpecializedThunkJIT::returnInt32):
215         (JSC::SpecializedThunkJIT::returnJSCell):
216         * runtime/ArgList.cpp:
217         * runtime/DateConversion.cpp:
218         * runtime/GCActivityCallbackCF.cpp:
219         * runtime/Identifier.cpp:
220         * runtime/JSActivation.h:
221         (JSC::asActivation):
222         * runtime/JSLock.cpp:
223         * runtime/JSNumberCell.cpp:
224         * runtime/JSObject.h:
225         * runtime/JSPropertyNameIterator.h:
226         * runtime/JSValue.h:
227         * runtime/JSZombie.cpp:
228         * runtime/MarkedBlock.cpp:
229         * runtime/MarkedSpace.cpp:
230         * runtime/PropertyNameArray.cpp:
231         * runtime/ScopeChain.h:
232         (JSC::ExecState::globalThisValue):
233         * wtf/DateMath.cpp:
234
235 2011-03-11  Oliver Hunt  <oliver@apple.com>
236
237         Reviewed by Gavin Barraclough.
238
239         Ensure all values are correctly tagged in the registerfile
240         https://bugs.webkit.org/show_bug.cgi?id=56214
241
242         This patch makes sure that all JSCell pointers written to
243         the registerfile are correctly tagged as JSCells, and replaces
244         raw int usage with the immediate representation.
245
246         For performance, register pressure, and general saneness reasons
247         I've added abstractions for reading and writing the tag
248         and payload of integer registers directly for the JSVALUE64
249         encoding.
250
251         * interpreter/Register.h:
252         (JSC::Register::withInt):
253         (JSC::Register::withCallee):
254         (JSC::Register::operator=):
255         (JSC::Register::i):
256         (JSC::Register::activation):
257         (JSC::Register::function):
258         (JSC::Register::propertyNameIterator):
259         (JSC::Register::scopeChain):
260         * jit/JIT.h:
261         * jit/JITCall.cpp:
262         (JSC::JIT::compileOpCallInitializeCallFrame):
263         (JSC::JIT::compileOpCallVarargs):
264         (JSC::JIT::compileOpCall):
265         * jit/JITCall32_64.cpp:
266         (JSC::JIT::compileOpCallInitializeCallFrame):
267         (JSC::JIT::compileOpCallVarargs):
268         (JSC::JIT::compileOpCall):
269         (JSC::JIT::compileOpCallSlowCase):
270         * jit/JITInlineMethods.h:
271         (JSC::JIT::emitPutToCallFrameHeader):
272         (JSC::JIT::emitPutCellToCallFrameHeader):
273         (JSC::JIT::emitPutIntToCallFrameHeader):
274         * jit/JITOpcodes.cpp:
275         (JSC::JIT::privateCompileCTINativeCall):
276         (JSC::JIT::emit_op_get_pnames):
277         (JSC::JIT::emit_op_next_pname):
278         (JSC::JIT::emit_op_load_varargs):
279         (JSC::JIT::emitSlow_op_load_varargs):
280         * jit/JITOpcodes32_64.cpp:
281         (JSC::JIT::privateCompileCTINativeCall):
282         (JSC::JIT::emit_op_get_pnames):
283         (JSC::JIT::emit_op_next_pname):
284         * jit/JSInterfaceJIT.h:
285         (JSC::JSInterfaceJIT::intPayloadFor):
286         (JSC::JSInterfaceJIT::intTagFor):
287         * jit/SpecializedThunkJIT.h:
288         (JSC::SpecializedThunkJIT::returnJSValue):
289         (JSC::SpecializedThunkJIT::returnDouble):
290         (JSC::SpecializedThunkJIT::returnInt32):
291         (JSC::SpecializedThunkJIT::returnJSCell):
292
293 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
294
295         Reviewed by Eric Seidel.
296
297         Introduce project_dir variable and make paths a whole lot saner. Ok, a little bit saner.
298         https://bugs.webkit.org/show_bug.cgi?id=56231
299
300         * JavaScriptCore.gypi: Added project_dir variable.
301         * gyp/JavaScriptCore.gyp: Changed to use project_dir, rather than DEPTH/JavaScriptCore.
302         * gyp/generate-dtrace-header.sh: Changed to use project_dir.
303
304 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
305
306         Reviewed by Adam Barth.
307
308         Start using derived sources correctly and link minidom with JavaScriptCore gyp project.
309         https://bugs.webkit.org/show_bug.cgi?id=56217
310
311         * gyp/JavaScriptCore.gyp: Added derived source files and passing of shared directory
312             to the scripts.
313         * gyp/generate-derived-sources.sh: Changed to use passed directory.
314         * gyp/generate-dtrace-header.sh: Ditto.
315
316 2011-03-11  Eric Carlson  <eric.carlson@apple.com>
317
318         Reviewed by Sam Weinig.
319
320         <rdar://problem/8955589> Adopt AVFoundation media back end on Lion.
321
322         No new tests, existing media tests cover this.
323
324         * JavaScriptCore.exp: Export cancelCallOnMainThread
325         * wtf/Platform.h: Define WTF_USE_AVFOUNDATION.
326
327 2011-03-11  Dimitri Glazkov  <dglazkov@chromium.org>
328
329         Reviewed by Adam Barth.
330
331         Tweak dylib paths and add dtrace header generation action to JavaScriptCore gyp project.
332         https://bugs.webkit.org/show_bug.cgi?id=56207
333
334         * JavaScriptCore.gypi: Added Tracing.d to the sources.
335         * gyp/generate-dtrace-header.sh: Added.
336         * gyp/JavaScriptCore.gyp: Updated dylib paths (now the project can see them),
337             and added DTrace header generating step.
338
339 2011-03-10  Oliver Hunt  <oliver@apple.com>
340
341         Reviewed by Gavin Barraclough.
342
343         Fix allocation of native function with a cached thunk
344         https://bugs.webkit.org/show_bug.cgi?id=56127
345
346         Fix this race condition found while fixing zombies.
347
348         * collector/handles/HandleHeap.cpp:
349         (JSC::HandleHeap::clearWeakPointers):
350         * runtime/Heap.cpp:
351         (JSC::Heap::reset):
352         * runtime/JSFunction.cpp:
353         (JSC::JSFunction::JSFunction):
354         (JSC::JSFunction::markChildren):
355         * runtime/JSValue.h:
356         (JSC::JSValue::decode):
357         * runtime/JSZombie.cpp:
358         (JSC::JSZombie::leakedZombieStructure):
359         * runtime/JSZombie.h:
360         (JSC::JSZombie::createStructure):
361         * runtime/MarkedBlock.cpp:
362
363 2011-03-10  Luiz Agostini  <luiz.agostini@openbossa.org>
364
365         Reviewed by Andreas Kling.
366
367         [Qt] fast/workers/stress-js-execution.html is crashing on Qt bot (intermittently)
368         https://bugs.webkit.org/show_bug.cgi?id=33008
369
370         Defining WTF_USE_PTHREAD_BASED_QT=1 for platforms where QThread uses pthread internally.
371         Symbian is excluded because pthread_kill does not work on it. Mac is excluded because
372         it has its own ways to do JSC threading.
373
374         Defining WTF_USE_PTHREADS inside MachineStackMarker.cpp if USE(PTHREAD_BASED_QT) is true.
375
376         * runtime/MachineStackMarker.cpp:
377         * wtf/Platform.h:
378
379 2011-03-10  Gavin Barraclough  <barraclough@apple.com>
380
381         Reviewed by Oliver Hunt.
382
383         Bug 56077 - ES5 conformance issues with RegExp.prototype
384
385         There are three issues causing test failures in sputnik.
386
387         (1) lastIndex should be converted at the point it is used, not the point it is set (this is visible if valueOf is overridden).
388         (2) The 'length' property of the test/exec functions should be 1.
389         (3) If no input is specified, the input to test()/exec() is "undefined" (i.e. ToString(undefined)) - not RegExp.input.
390
391         * runtime/RegExpObject.cpp:
392         (JSC::RegExpObject::markChildren):
393             - Added to mark lastIndex
394         (JSC::regExpObjectLastIndex):
395         (JSC::setRegExpObjectLastIndex):
396             - lastIndex is now stored as a JSValue.
397         (JSC::RegExpObject::match):
398             - Use accessor methods to get/set lastIndex, add fast case for isUInt32 (don't convert to double).
399         * runtime/RegExpObject.h:
400         (JSC::RegExpObject::setLastIndex):
401         (JSC::RegExpObject::setLastIndex):
402             - Set lastIndex, either from a size_t or a JSValue.
403         (JSC::RegExpObject::getLastIndex):
404             - Get lastIndex.
405         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
406             - Initialize as a JSValue.
407         * runtime/RegExpPrototype.cpp:
408         (JSC::RegExpPrototype::RegExpPrototype):
409             - Add test/exec properties with length 1.
410         * runtime/StringPrototype.cpp:
411         (JSC::stringProtoFuncMatch):
412         (JSC::stringProtoFuncSearch):
413             - Do not read RegExp.input if none is provided.
414         * tests/mozilla/js1_2/regexp/RegExp_input.js:
415         * tests/mozilla/js1_2/regexp/RegExp_input_as_array.js:
416             - Update these tests (they relied on non-ES5 behaviour).
417
418 2011-03-10  Geoffrey Garen  <ggaren@apple.com>
419
420         Reviewed by Oliver Hunt.
421
422         Rolled back in 80277 and 80280 with event handler layout test failures fixed.
423         https://bugs.webkit.org/show_bug.cgi?id=55653        
424
425         The failures were caused by a last minute typo: assigning to currentEvent
426         instead of m_currentEvent.
427
428         * JavaScriptCore.exp:
429         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
430         * JavaScriptCore.xcodeproj/project.pbxproj:
431         * bytecompiler/BytecodeGenerator.cpp:
432         * jit/JITOpcodes.cpp:
433         * jit/JITOpcodes32_64.cpp:
434         * runtime/Arguments.h:
435         * runtime/JSActivation.cpp:
436         * runtime/JSActivation.h:
437         * runtime/JSCell.h:
438         * runtime/JSGlobalObject.cpp:
439         * runtime/JSGlobalObject.h:
440         * runtime/JSObject.cpp:
441         * runtime/JSStaticScopeObject.cpp:
442         * runtime/JSStaticScopeObject.h:
443         * runtime/JSVariableObject.h:
444         * runtime/MarkedSpace.cpp:
445         * runtime/MarkedSpace.h:
446
447 2011-03-09  Oliver Hunt  <oliver@apple.com>
448
449         Reviewed by Gavin Barraclough.
450
451         jquery/manipulation.html fails after r80598
452         https://bugs.webkit.org/show_bug.cgi?id=56019
453
454         When linking a call, codeblock now takes ownership of the linked function
455         This removes the need for unlinking, and thus the incorrectness that was
456         showing up in these tests.
457
458         * bytecode/CodeBlock.cpp:
459         (JSC::CodeBlock::~CodeBlock):
460         (JSC::CodeBlock::markAggregate):
461         * bytecode/CodeBlock.h:
462         (JSC::CallLinkInfo::CallLinkInfo):
463         (JSC::CallLinkInfo::setUnlinked):
464         (JSC::CodeBlock::addCaller):
465         * jit/JIT.cpp:
466         (JSC::JIT::privateCompile):
467         (JSC::JIT::linkCall):
468         (JSC::JIT::linkConstruct):
469         * jit/JIT.h:
470         * runtime/Executable.cpp:
471         * runtime/Executable.h:
472
473 2011-03-09  Daniel Bates  <dbates@rim.com>
474
475         Attempt to fix the WinCE build after changeset 80684 <http://trac.webkit.org/changeset/80684>
476         (Bug #56041<https://bugs.webkit.org/show_bug.cgi?id=56041>).
477
478         * interpreter/Interpreter.cpp:
479         (JSC::Interpreter::privateExecute): Substitute variable callFrame for exec in call to createSyntaxError().
480
481 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
482
483         Reviewed by Sam Weinig.
484
485         Bug 56041 - RexExp constructor should only accept flags "gim"
486         Fix for issues introduced in r80667.
487
488         Invalid flags to a RegExp literal are a late syntax error!
489
490         * bytecode/CodeBlock.h:
491         (JSC::CodeBlock::addRegExp):
492             - Pass a PassRefPtr<RegExp>
493         * bytecompiler/BytecodeGenerator.cpp:
494         (JSC::BytecodeGenerator::addRegExp):
495         (JSC::BytecodeGenerator::emitNewRegExp):
496         * bytecompiler/BytecodeGenerator.h:
497             - Pass a PassRefPtr<RegExp>
498         * bytecompiler/NodesCodegen.cpp:
499         (JSC::RegExpNode::emitBytecode):
500             - Should not be ASSERTing that the flags are valid - this is a late(er) error.
501         * interpreter/Interpreter.cpp:
502         (JSC::Interpreter::privateExecute):
503             - Need to check for error from RegExp constructor.
504         * jit/JITStubs.cpp:
505         (JSC::DEFINE_STUB_FUNCTION):
506             - Need to check for error from RegExp constructor.
507         * runtime/RegExp.h:
508         (JSC::RegExp::isValid):
509             - Make isValid check that the regexp was created with valid flags.
510         * runtime/RegExpKey.h:
511             - Since we'll not create RegExp objects with invalid flags, separate out the deleted value.
512
513 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
514
515         Windows build fix part 2.
516
517         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
518
519 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
520
521         Windows build fix part 1.
522
523         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
524
525 2011-03-09  Gavin Barraclough  <barraclough@apple.com>
526
527         Reviewed by Darin Adler.
528
529         Bug 56041 - RexExp constructor should only accept flags "gim"
530         We also should be passing the flags around as a bitfield rather than a string,
531         and should not have redundant, incompatible code for converting the string to a bitfield!
532
533         * JavaScriptCore.exp:
534         * bytecompiler/NodesCodegen.cpp:
535         (JSC::RegExpNode::emitBytecode):
536             - Need to parse flags string to enum.
537         * runtime/RegExp.cpp:
538         (JSC::regExpFlags):
539         (JSC::RegExp::RegExp):
540         (JSC::RegExp::create):
541             - Add method to parse flags string to enum, change constructor/create args to take enum.
542         * runtime/RegExp.h:
543         (JSC::RegExp::global):
544         (JSC::RegExp::ignoreCase):
545         (JSC::RegExp::multiline):
546             - Change to use new enum values.
547         * runtime/RegExpCache.cpp:
548         (JSC::RegExpCache::lookupOrCreate):
549         (JSC::RegExpCache::create):
550         * runtime/RegExpCache.h:
551             - Changed to use regExpFlags enum instead of int/const UString&.
552         * runtime/RegExpConstructor.cpp:
553         (JSC::constructRegExp):
554             - Add use new enum parsing, check for error.
555         * runtime/RegExpKey.h:
556         (JSC::RegExpKey::RegExpKey):
557         * runtime/RegExpPrototype.cpp:
558         (JSC::RegExpPrototype::RegExpPrototype):
559             - Pass NoFlags value instead of empty string.
560         (JSC::regExpProtoFuncCompile):
561             - Add use new enum parsing, check for error.
562         * runtime/StringPrototype.cpp:
563         (JSC::stringProtoFuncMatch):
564         (JSC::stringProtoFuncSearch):
565             - Pass NoFlags value instead of empty string.
566
567 2011-03-08  Gavin Barraclough  <barraclough@apple.com>
568
569         Reviewed by Sam Weinig
570
571         Bug 55994 - Functions on Array.prototype should check length first.
572         These methods are designed to work on generic objects too, and if 'length'
573         is a getter that throws an exception, ensure this is correctly thrown
574         (even if other exceptions would be thrown, too).
575
576         Make the length check the first thing we do.
577         This change shows a progression on SunSpider on my machine, but this is likely bogus.
578
579         * runtime/ArrayPrototype.cpp:
580         (JSC::arrayProtoFuncToString):
581         (JSC::arrayProtoFuncToLocaleString):
582         (JSC::arrayProtoFuncJoin):
583         (JSC::arrayProtoFuncPop):
584         (JSC::arrayProtoFuncPush):
585         (JSC::arrayProtoFuncReverse):
586         (JSC::arrayProtoFuncShift):
587         (JSC::arrayProtoFuncSlice):
588         (JSC::arrayProtoFuncSort):
589         (JSC::arrayProtoFuncSplice):
590         (JSC::arrayProtoFuncUnShift):
591         (JSC::arrayProtoFuncFilter):
592         (JSC::arrayProtoFuncMap):
593         (JSC::arrayProtoFuncEvery):
594         (JSC::arrayProtoFuncForEach):
595         (JSC::arrayProtoFuncSome):
596         (JSC::arrayProtoFuncReduce):
597         (JSC::arrayProtoFuncReduceRight):
598         (JSC::arrayProtoFuncIndexOf):
599         (JSC::arrayProtoFuncLastIndexOf):
600
601 2011-03-07  Oliver Hunt  <oliver@apple.com>
602
603         Reviewed by Gavin Barraclough.
604
605         Make CodeBlock GC write barrier safe
606         https://bugs.webkit.org/show_bug.cgi?id=55910
607
608         In order to make CodeBlock WriteBarrier safe it was necessary
609         to make it have a single GC owner, and for that reason I have
610         made ExecutableBase a GC allocated object.  This required
611         updating their creation routines as well as all sites that hold
612         a reference to them.  GC objects that held Executable's have been
613         converted to WriteBarriers, and all other sites now use Global<>.
614
615         As an added benefit this gets rid of JSGlobalData's list of
616         GlobalCodeBlocks.
617
618         Perf testing shows a 0.5% progression on v8, vs. a 0.3% regression
619         on SunSpider.  Given none of the tests that show regressions
620         demonstrate a regression on their own, and sampling shows up nothing.
621         I suspect we're just getting one or two additional gc passes at
622         the end of the run.
623
624         * bytecode/CodeBlock.cpp:
625         (JSC::CodeBlock::dump):
626         (JSC::CodeBlock::CodeBlock):
627         (JSC::EvalCodeCache::markAggregate):
628         (JSC::CodeBlock::markAggregate):
629         * bytecode/CodeBlock.h:
630         (JSC::CodeBlock::ownerExecutable):
631         (JSC::CodeBlock::addConstant):
632         (JSC::CodeBlock::constantRegister):
633         (JSC::CodeBlock::getConstant):
634         (JSC::CodeBlock::addFunctionDecl):
635         (JSC::CodeBlock::addFunctionExpr):
636         (JSC::GlobalCodeBlock::GlobalCodeBlock):
637         (JSC::ExecState::r):
638         * bytecode/EvalCodeCache.h:
639         (JSC::EvalCodeCache::get):
640         * bytecode/SamplingTool.h:
641         (JSC::ScriptSampleRecord::ScriptSampleRecord):
642         * bytecompiler/BytecodeGenerator.cpp:
643         (JSC::BytecodeGenerator::addConstantValue):
644         (JSC::BytecodeGenerator::emitEqualityOp):
645         * bytecompiler/BytecodeGenerator.h:
646         (JSC::BytecodeGenerator::makeFunction):
647         * debugger/Debugger.cpp:
648         (JSC::evaluateInGlobalCallFrame):
649         * debugger/DebuggerCallFrame.cpp:
650         (JSC::DebuggerCallFrame::evaluate):
651         * interpreter/Interpreter.cpp:
652         (JSC::Interpreter::callEval):
653         * jit/JITInlineMethods.h:
654         (JSC::JIT::emitLoadDouble):
655         (JSC::JIT::emitLoadInt32ToDouble):
656         * jit/JITStubs.cpp:
657         (JSC::JITThunks::JITThunks):
658         (JSC::JITThunks::hostFunctionStub):
659         (JSC::JITThunks::clearHostFunctionStubs):
660         * jit/JITStubs.h:
661         * runtime/Completion.cpp:
662         (JSC::checkSyntax):
663         (JSC::evaluate):
664         * runtime/Executable.cpp:
665         (JSC::EvalExecutable::EvalExecutable):
666         (JSC::ProgramExecutable::ProgramExecutable):
667         (JSC::FunctionExecutable::FunctionExecutable):
668         (JSC::FunctionExecutable::~FunctionExecutable):
669         (JSC::EvalExecutable::markChildren):
670         (JSC::ProgramExecutable::markChildren):
671         (JSC::FunctionExecutable::markChildren):
672         (JSC::FunctionExecutable::fromGlobalCode):
673         * runtime/Executable.h:
674         (JSC::ExecutableBase::ExecutableBase):
675         (JSC::ExecutableBase::createStructure):
676         (JSC::NativeExecutable::create):
677         (JSC::NativeExecutable::NativeExecutable):
678         (JSC::VPtrHackExecutable::VPtrHackExecutable):
679         (JSC::ScriptExecutable::ScriptExecutable):
680         (JSC::EvalExecutable::create):
681         (JSC::EvalExecutable::createStructure):
682         (JSC::ProgramExecutable::create):
683         (JSC::ProgramExecutable::createStructure):
684         (JSC::FunctionExecutable::create):
685         (JSC::FunctionExecutable::createStructure):
686         * runtime/FunctionConstructor.cpp:
687         (JSC::constructFunction):
688         * runtime/Heap.cpp:
689         (JSC::Heap::destroy):
690         (JSC::Heap::markRoots):
691         * runtime/Heap.h:
692         * runtime/JSActivation.cpp:
693         (JSC::JSActivation::JSActivation):
694         (JSC::JSActivation::markChildren):
695         * runtime/JSActivation.h:
696         (JSC::JSActivation::JSActivationData::JSActivationData):
697         * runtime/JSCell.h:
698         * runtime/JSFunction.cpp:
699         (JSC::JSFunction::JSFunction):
700         (JSC::JSFunction::~JSFunction):
701         (JSC::JSFunction::markChildren):
702         * runtime/JSFunction.h:
703         * runtime/JSGlobalData.cpp:
704         (JSC::JSGlobalData::storeVPtrs):
705         (JSC::JSGlobalData::JSGlobalData):
706         (JSC::JSGlobalData::getHostFunction):
707         * runtime/JSGlobalData.h:
708         * runtime/JSGlobalObjectFunctions.cpp:
709         (JSC::globalFuncEval):
710         * runtime/JSObject.cpp:
711         * runtime/JSStaticScopeObject.cpp:
712         (JSC::JSStaticScopeObject::markChildren):
713         * runtime/JSStaticScopeObject.h:
714         (JSC::JSStaticScopeObject::JSStaticScopeObjectData::JSStaticScopeObjectData):
715         (JSC::JSStaticScopeObject::JSStaticScopeObject):
716         * runtime/JSZombie.cpp:
717         (JSC::JSZombie::leakedZombieStructure):
718         * runtime/JSZombie.h:
719         (JSC::JSZombie::createStructure):
720         * runtime/MarkedSpace.h:
721
722 2011-03-07  Andy Estes  <aestes@apple.com>
723
724         Reviewed by Dan Bernstein.
725
726         REGRESSION (r79060): Timestamp is missing from tweets in twitter.
727         https://bugs.webkit.org/show_bug.cgi?id=55228
728
729         A change to the date parser to handle the case where the year is
730         specified before the time zone inadvertently started accepting strings
731         such as '+0000' as valid years. Those strings actually represent time
732         zones in an offset of hours and minutes from UTC, not years.
733
734         * wtf/DateMath.cpp:
735         (WTF::parseDateFromNullTerminatedCharacters): If the current character
736         in dateString is '+' or '-', do not try to parse the next token as a
737         year.
738
739 2011-03-06  Yuta Kitamura  <yutak@chromium.org>
740
741         Reviewed by Kent Tamura.
742
743         Add SHA-1 for new WebSocket protocol
744         https://bugs.webkit.org/show_bug.cgi?id=55039
745
746         The code is based on Chromium's portable SHA-1 implementation
747         (src/base/sha1_portable.cc). Modifications were made in order
748         to make the code comply with WebKit coding style.
749
750         * GNUmakefile.am:
751         * JavaScriptCore.exp:
752         * JavaScriptCore.gypi:
753         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
754         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
755         * JavaScriptCore.xcodeproj/project.pbxproj:
756         * wtf/CMakeLists.txt:
757         * wtf/MD5.cpp:
758         (WTF::MD5::MD5):
759         * wtf/SHA1.cpp: Added.
760         (WTF::testSHA1): This function will be run the first time SHA1
761         constructor is called. This function computes a few hash values
762         and checks the results in debug builds. However, constructor is
763         probably not a good place to run these tests, so we need to find
764         a good place for it (bug 55853).
765         (WTF::expectSHA1):
766         (WTF::f):
767         (WTF::k):
768         (WTF::rotateLeft):
769         (WTF::SHA1::SHA1):
770         (WTF::SHA1::addBytes):
771         (WTF::SHA1::computeHash):
772         (WTF::SHA1::finalize):
773         (WTF::SHA1::processBlock):
774         (WTF::SHA1::reset):
775         * wtf/SHA1.h: Added.
776         (WTF::SHA1::addBytes):
777         * wtf/wtf.pri:
778
779 2011-03-05  Adam Barth  <abarth@webkit.org>
780
781         Reviewed by Dimitri Glazkov.
782
783         Add Derived Sources to WebCore GYP build
784         https://bugs.webkit.org/show_bug.cgi?id=55813
785
786         Rename the action to be friendlier.
787
788         * gyp/JavaScriptCore.gyp:
789
790 2011-03-04  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
791
792         Reviewed by Laszlo Gombos.
793
794         [Qt] Need symbian version of cryptographicallyRandomValuesFromOS
795         https://bugs.webkit.org/show_bug.cgi?id=55782
796
797         Implement Symbian version of cryptographicallyRandomValuesFromOS
798
799         * wtf/OSRandomSource.cpp:
800         (WTF::cryptographicallyRandomValuesFromOS):
801
802 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
803
804         Reviewed by Cameron Zwarich.
805
806         Bug 55815 - Should throw an exception from JSObject::defineOwnProperty if !isExtensible().
807
808         * runtime/JSObject.cpp:
809         (JSC::JSObject::defineOwnProperty):
810             Add missing check.
811
812 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
813
814         Rubber stamped by olliej.
815
816         Bug 54945 - The web page hangs towards the end of page load in Interpreter enabled javascript code in the latest webkit trunk.
817
818         * interpreter/Interpreter.cpp:
819         (JSC::Interpreter::privateExecute):
820             (1) don't infinite loop.
821             (2) goto 1.
822
823 2011-03-04  Gavin Barraclough  <barraclough@apple.com>
824
825         cmake build fix.
826
827         * CMakeLists.txt:
828
829 2011-03-04  Adam Barth  <abarth@webkit.org>
830
831         Reviewed by Dimitri Glazkov.
832
833         Add Copy Files step to JavaScriptCore GYP build for apitest and minidom
834         https://bugs.webkit.org/show_bug.cgi?id=55798
835
836         * JavaScriptCore.gypi:
837         * gyp/JavaScriptCore.gyp:
838
839 2011-03-04  Adam Barth  <abarth@webkit.org>
840
841         Reviewed by Dimitri Glazkov.
842
843         Remove unneeded round-trips through ../Source in the Chromium GYP build
844         https://bugs.webkit.org/show_bug.cgi?id=55795
845
846         * JavaScriptCore.gyp/JavaScriptCore.gyp:
847
848 2011-03-04  Adam Barth  <abarth@webkit.org>
849
850         Reviewed by Dimitri Glazkov.
851
852         Use target_defaults to reduce boilerplate in GYP build system
853         https://bugs.webkit.org/show_bug.cgi?id=55790
854
855         Instead of setting up the configuration in each target, just defer to
856         target_defaults.  Also, removed a define that was redundant with the
857         xcconfig.
858
859         * gyp/JavaScriptCore.gyp:
860
861 2011-03-03  Gavin Barraclough  <barraclough@apple.com>
862
863         Reviewed by Sam Weinig.
864
865         Bug 55736 - Implement seal/freeze/preventExtensions for normal object types.
866         Provide basic functionallity from section 15.2.4 of ECMA-262.
867         This support will need expanding to cover arrays, too.
868
869         Shows a 0.5% progression on SunSpidey, this seems to be due to changing
870         ObjectConstructor to use a static table.
871
872         * DerivedSources.make:
873         * JavaScriptCore.exp:
874         * interpreter/CallFrame.h:
875         (JSC::ExecState::objectConstructorTable):
876             Add a static table for ObjectConstructor.
877         * runtime/CommonIdentifiers.h:
878         * runtime/JSGlobalData.cpp:
879         (JSC::JSGlobalData::JSGlobalData):
880         (JSC::JSGlobalData::~JSGlobalData):
881             Add a static table for ObjectConstructor.
882         * runtime/JSGlobalData.h:
883         * runtime/JSGlobalObject.cpp:
884         (JSC::JSGlobalObject::reset):
885             Add a static table for ObjectConstructor.
886         * runtime/JSObject.cpp:
887         (JSC::JSObject::seal):
888         (JSC::JSObject::freeze):
889         (JSC::JSObject::preventExtensions):
890             Transition the object's structure.
891         (JSC::JSObject::defineOwnProperty):
892             Check isExtensible.
893         * runtime/JSObject.h:
894         (JSC::JSObject::isSealed):
895         (JSC::JSObject::isFrozen):
896         (JSC::JSObject::isExtensible):
897             These wrap method on structure.
898         (JSC::JSObject::putDirectInternal):
899             Check isExtensible.
900         * runtime/ObjectConstructor.cpp:
901         (JSC::ObjectConstructor::ObjectConstructor):
902         (JSC::ObjectConstructor::getOwnPropertySlot):
903         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
904             Change ObjectConstructor to use a static table.
905         (JSC::objectConstructorSeal):
906         (JSC::objectConstructorFreeze):
907         (JSC::objectConstructorPreventExtensions):
908         (JSC::objectConstructorIsSealed):
909         (JSC::objectConstructorIsFrozen):
910         (JSC::objectConstructorIsExtensible):
911             Add new methods on Object.
912         * runtime/ObjectConstructor.h:
913         (JSC::ObjectConstructor::createStructure):
914         * runtime/Structure.cpp:
915         (JSC::Structure::Structure):
916             init/propagate  m_preventExtensions
917         (JSC::Structure::sealTransition):
918         (JSC::Structure::freezeTransition):
919         (JSC::Structure::preventExtensionsTransition):
920             transition the structure, materializing the property map, setting m_preventExtensions & changing attributes.
921         (JSC::Structure::isSealed):
922         (JSC::Structure::isFrozen):
923             check attributes to detect if object is sealed/frozen.
924         * runtime/Structure.h:
925         (JSC::Structure::isExtensible):
926             checks the m_preventExtensions flag.
927
928 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
929
930         Reviewed by Jon Honeycutt.
931
932         Adopt VersionStamper tool for Windows WebKit DLLs
933         https://bugs.webkit.org/show_bug.cgi?id=55784
934         <rdar://problem/9021273>
935         
936         We now use a tool to stamp the version number onto the Apple WebKit DLLs
937         during the post-build step.
938
939         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Removed.
940         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
941         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
942         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
943
944 2011-03-04  Adam Barth  <abarth@webkit.org>
945
946         Reviewed by Dimitri Glazkov.
947
948         JavaScriptCore GYP build should use a header map
949         https://bugs.webkit.org/show_bug.cgi?id=55712
950
951         This patch moves the os-win32 files into their own variable so that we
952         can use a header map in the Apple Mac Xcode build.  The problem is that
953         the header map searches the whole project rather than just the files
954         included in a given target.  Another solution to this problem is to
955         make GYP smarter about filtering out what files are added to the
956         project file.
957
958         * JavaScriptCore.gypi:
959         * gyp/JavaScriptCore.gyp:
960
961 2011-03-03  Ryosuke Niwa  <rniwa@webkit.org>
962
963         Reviewed by Darin Adler.
964
965         Remove LOOSE_PASS_OWN_ARRAY_PTR from PassOwnArrayPtr.h
966         https://bugs.webkit.org/show_bug.cgi?id=55554
967
968         * runtime/JSGlobalObject.cpp:
969         (JSC::JSGlobalObject::copyGlobalsTo): Pass nullptr instead of 0.
970         (JSC::JSGlobalObject::resizeRegisters): Ditto; also use OwnArrayPtr instead of a raw pointer.
971         * runtime/JSGlobalObject.h:
972         (JSC::JSGlobalObject::addStaticGlobals): Ditto.
973         * wtf/PassOwnArrayPtr.h: Removed #define LOOSE_PASS_OWN_ARRAY_PTR
974         (WTF::PassOwnArrayPtr::PassOwnArrayPtr): Added a constructor that takes nullptr_t.
975
976 2011-03-03  Adam Barth  <abarth@webkit.org>
977
978         Reviewed by Dimitri Glazkov.
979
980         Add jsc to JavaScriptCore GYP build
981         https://bugs.webkit.org/show_bug.cgi?id=55711
982
983         * JavaScriptCore.gypi:
984             - Move jsc.cpp into jsc_files because it's really part of the jsc
985               target.
986         * JavaScriptCore.xcodeproj/project.pbxproj:
987             - Remove extraneous files from the normal jsc build.  I probably
988               added these by mistake at some point.
989         * gyp/JavaScriptCore.gyp:
990             - Add the jsc target to the GYP file.
991
992 2011-03-03  Adam Barth  <abarth@webkit.org>
993
994         Reviewed by Dimitri Glazkov.
995
996         Add testapi to JavaScriptCore GYP build
997         https://bugs.webkit.org/show_bug.cgi?id=55707
998
999         The new testapi target is slightly incomplete.  There's a resource
1000         copying step that we don't quite have yet.
1001
1002         This patch also cleans up some of the configuration issues in
1003         JavaScriptCore.xcodeproj.  It seems kind of wordy to repeat these for
1004         each target.  I suspect there's a more compact way of defining the
1005         configurations, but this removes the "Default" configuration, which is
1006         progress.
1007
1008         * JavaScriptCore.gypi:
1009         * gyp/JavaScriptCore.gyp:
1010
1011 2011-03-03  Adam Barth  <abarth@webkit.org>
1012
1013         Reviewed by Eric Seidel.
1014
1015         Teach JavaScriptCore GYP build about private headers
1016         https://bugs.webkit.org/show_bug.cgi?id=55532
1017
1018         This patch distinguishes between public and private framework headers
1019         so that public headers are copied into the Headers directory and
1020         private headers are copied into the PrivateHeaders directory.
1021
1022         * gyp/JavaScriptCore.gyp:
1023
1024 2011-03-03  Geoffrey Garen  <ggaren@apple.com>
1025
1026         Rolled out 80277 and 80280 because they caused event handler layout test
1027         failures.
1028
1029         * JavaScriptCore.exp:
1030         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1031         * JavaScriptCore.xcodeproj/project.pbxproj:
1032         * bytecompiler/BytecodeGenerator.cpp:
1033         * jit/JITOpcodes.cpp:
1034         * jit/JITOpcodes32_64.cpp:
1035         * runtime/Arguments.h:
1036         * runtime/JSActivation.cpp:
1037         * runtime/JSActivation.h:
1038         * runtime/JSCell.h:
1039         * runtime/JSGlobalObject.cpp:
1040         * runtime/JSGlobalObject.h:
1041         * runtime/JSObject.cpp:
1042         * runtime/JSStaticScopeObject.cpp:
1043         * runtime/JSStaticScopeObject.h:
1044         * runtime/JSVariableObject.h:
1045         * runtime/MarkedSpace.cpp:
1046         * runtime/MarkedSpace.h:
1047
1048 2011-03-03  Kevin Ollivier  <kevino@theolliviers.com>
1049
1050         [wx] Build fix. Alter order of headers included to make sure windows.h
1051         is configured by wx, and skip Posix implementation file we don't use on Win.
1052
1053         * wscript:
1054         * wtf/wx/StringWx.cpp:
1055
1056 2011-03-03  Oliver Hunt  <oliver@apple.com>
1057
1058         Reviewed by Geoffrey Garen.
1059
1060         JSVariableObject needs to use WriteBarrier for symboltable property storage
1061         https://bugs.webkit.org/show_bug.cgi?id=55698
1062
1063         Replace the direct usage of Register in JSVariableObject (and descendents)
1064         with WriteBarrier.  This requires updating the Arguments object to use
1065         WriteBarrier as well.
1066
1067         * interpreter/Interpreter.cpp:
1068         (JSC::Interpreter::unwindCallFrame):
1069         (JSC::Interpreter::privateExecute):
1070         (JSC::Interpreter::retrieveArguments):
1071         * jit/JITStubs.cpp:
1072         (JSC::DEFINE_STUB_FUNCTION):
1073         * runtime/ArgList.h:
1074         (JSC::MarkedArgumentBuffer::initialize):
1075         * runtime/Arguments.cpp:
1076         (JSC::Arguments::markChildren):
1077         (JSC::Arguments::copyToRegisters):
1078         (JSC::Arguments::fillArgList):
1079         (JSC::Arguments::getOwnPropertySlot):
1080         (JSC::Arguments::getOwnPropertyDescriptor):
1081         (JSC::Arguments::put):
1082         * runtime/Arguments.h:
1083         (JSC::Arguments::setActivation):
1084         (JSC::Arguments::Arguments):
1085         (JSC::Arguments::copyRegisters):
1086         (JSC::JSActivation::copyRegisters):
1087         * runtime/JSActivation.cpp:
1088         (JSC::JSActivation::markChildren):
1089         (JSC::JSActivation::symbolTableGet):
1090         (JSC::JSActivation::symbolTablePut):
1091         (JSC::JSActivation::symbolTablePutWithAttributes):
1092         (JSC::JSActivation::put):
1093         (JSC::JSActivation::putWithAttributes):
1094         (JSC::JSActivation::argumentsGetter):
1095         * runtime/JSActivation.h:
1096         * runtime/JSGlobalObject.cpp:
1097         (JSC::JSGlobalObject::put):
1098         (JSC::JSGlobalObject::putWithAttributes):
1099         (JSC::JSGlobalObject::markChildren):
1100         (JSC::JSGlobalObject::copyGlobalsFrom):
1101         (JSC::JSGlobalObject::copyGlobalsTo):
1102         (JSC::JSGlobalObject::resizeRegisters):
1103         * runtime/JSGlobalObject.h:
1104         (JSC::JSGlobalObject::setRegisters):
1105         (JSC::JSGlobalObject::addStaticGlobals):
1106         * runtime/JSStaticScopeObject.cpp:
1107         (JSC::JSStaticScopeObject::put):
1108         (JSC::JSStaticScopeObject::putWithAttributes):
1109         * runtime/JSVariableObject.cpp:
1110         (JSC::JSVariableObject::symbolTableGet):
1111         * runtime/JSVariableObject.h:
1112         (JSC::JSVariableObject::registerAt):
1113         (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
1114         (JSC::JSVariableObject::symbolTableGet):
1115         (JSC::JSVariableObject::symbolTablePut):
1116         (JSC::JSVariableObject::symbolTablePutWithAttributes):
1117         (JSC::JSVariableObject::copyRegisterArray):
1118         (JSC::JSVariableObject::setRegisters):
1119
1120 2011-03-03  Geoffrey Garen  <ggaren@apple.com>
1121
1122         Try to fix Windows build.
1123
1124         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed obsolete symbol.
1125
1126         * runtime/JSStaticScopeObject.cpp:
1127         (JSC::JSStaticScopeObject::getOwnPropertySlot): Don't mark this function
1128         inline -- it's virtual.
1129
1130 2011-03-02  Geoffrey Garen  <ggaren@apple.com>
1131
1132         Reviewed by Darin Adler.
1133
1134         Moved all variable object storage inline -- upping the object size limit to 1K
1135         https://bugs.webkit.org/show_bug.cgi?id=55653
1136
1137         * JavaScriptCore.exp:
1138         * bytecompiler/BytecodeGenerator.cpp:
1139         * jit/JITOpcodes.cpp:
1140         * runtime/Arguments.h:
1141         * runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
1142
1143         * runtime/JSCell.h:
1144         (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class
1145         to accomodate objects up to 1K.
1146
1147         * runtime/JSGlobalObject.cpp:
1148         * runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
1149
1150         * runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum
1151         object size, since it doesn't anymore.
1152
1153         * runtime/JSStaticScopeObject.cpp:
1154         * runtime/JSStaticScopeObject.h:
1155         * runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
1156
1157         * runtime/MarkedSpace.cpp:
1158         (JSC::MarkedSpace::MarkedSpace):
1159         (JSC::MarkedSpace::reset):
1160         * runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.
1161
1162 2011-03-03  Timothy Hatcher  <timothy@apple.com>
1163
1164         Make APIShims usable from WebCore.
1165
1166         Reviewed by Oliver Hunt.
1167
1168         * ForwardingHeaders/JavaScriptCore/APIShims.h: Added.
1169         * GNUmakefile.am:
1170         * JavaScriptCore.exp:
1171         * JavaScriptCore.gypi:
1172         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1173         * JavaScriptCore.xcodeproj/project.pbxproj:
1174
1175 2011-03-03  Peter Varga  <pvarga@webkit.org>
1176
1177         Reviewed by Oliver Hunt.
1178
1179         Begin Characters Optimization Causes YARR Interpreter Errors
1180         https://bugs.webkit.org/show_bug.cgi?id=55479
1181
1182         The addBeginTerm function is removed because it doesn't correctly handle those
1183         cases when an "invalid" term has been
1184         collected (e.g. CharacterClass). Move the removed function to the
1185         setupAlternativeBeginTerms method's switch-case
1186         where the non-allowed cases are correctly handled.
1187
1188         Reenable the Beginning Character Optimization in the YARR Interpreter again.
1189
1190         * yarr/YarrPattern.cpp:
1191         (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
1192         (JSC::Yarr::YarrPattern::compile):
1193
1194 2011-03-02  Jessie Berlin  <jberlin@apple.com>
1195
1196         Reviewed by Adam Roben.
1197
1198         WebKit2: Use CFNetwork Sessions API.
1199         https://bugs.webkit.org/show_bug.cgi?id=55435
1200
1201         Add the ability to create a Private Browsing storage session.
1202
1203         * wtf/Platform.h:
1204         Add a new #define for using CF Storage Sessions.
1205
1206 2011-03-02  Oliver Hunt  <oliver@apple.com>
1207
1208         Reviewed by Gavin Barraclough.
1209
1210         Remove "register slot" concept from PropertySlot
1211         https://bugs.webkit.org/show_bug.cgi?id=55621
1212
1213         PropertySlot had already stopped storing Register "slots"
1214         so this patch is simply removing that api entirely.
1215         This exposed a problem in the ProgramNode constructor for
1216         BytecodeGenerator where it reads from the registerfile
1217         before it has initialised it.
1218
1219         This bug wasn't a problem before as we were merely testing
1220         for property existence rather than the actual value, and
1221         used to work because setRegisterSlot didn't check that the
1222         provided slot contained an initialised value.
1223
1224         To get around this issue we now use symbolTableHasProperty
1225         to do the symbol table check without trying to read the
1226         RegisterFile.
1227
1228         * JavaScriptCore.xcodeproj/project.pbxproj:
1229         * bytecompiler/BytecodeGenerator.cpp:
1230         (JSC::BytecodeGenerator::BytecodeGenerator):
1231         * runtime/Arguments.cpp:
1232         (JSC::Arguments::getOwnPropertySlot):
1233         * runtime/JSActivation.cpp:
1234         (JSC::JSActivation::symbolTableGet):
1235         * runtime/JSGlobalObject.h:
1236         (JSC::JSGlobalObject::symbolTableHasProperty):
1237         * runtime/JSVariableObject.h:
1238         (JSC::JSVariableObject::symbolTableGet):
1239         * runtime/PropertySlot.h:
1240
1241 2011-03-02  Daniel Cheng  <dcheng@chromium.org>
1242
1243         Reviewed by David Levin.
1244
1245         Add feature define for data transfer items
1246         https://bugs.webkit.org/show_bug.cgi?id=55510
1247
1248         * Configurations/FeatureDefines.xcconfig:
1249         * wtf/Platform.h:
1250
1251 2011-03-02  Adam Roben  <aroben@apple.com>
1252
1253         Delete old .res files whenever any .vsprops file changes
1254
1255         Prospective fix for <http://webkit.org/b/55599> r80079 caused incremental Windows builds to
1256         fail
1257
1258         Reviewed by Tony Chang.
1259
1260         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
1261         (main): Restructured code to loop over a set of file extensions, deleting any old files that
1262         have that extension. Now deletes .res files, too. (We previously deleted any file matching
1263         *.manifest*, but that turned out to just be the union of *.manifest and *.res.)
1264
1265 2011-03-02  Adam Barth  <abarth@webkit.org>
1266
1267         Reviewed by Dimitri Glazkov.
1268
1269         Teach JavaScriptCore GYP build how to build minidom
1270         https://bugs.webkit.org/show_bug.cgi?id=55536
1271
1272         * JavaScriptCore.gypi:
1273         * gyp/JavaScriptCore.gyp:
1274
1275 2011-03-01  Adam Barth  <abarth@webkit.org>
1276
1277         Reviewed by Eric Seidel.
1278
1279         JavaScriptCore GYP build should copy some headers into the target framework
1280         https://bugs.webkit.org/show_bug.cgi?id=55524
1281
1282         After this patch, all the framework headers are exported as public
1283         headers.  We need to teach GYP how to handle private headers.
1284
1285         I struggled to determine how to store the information about whether a
1286         header was public, private, or project (i.e., not exported).
1287         Generally, the GYPI should just list the files, but it seemed siliy to
1288         have an almost duplicated list of files in the GYP file itself.  If
1289         this design doesn't scale, we might have to revisit it in the future.
1290
1291         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1292         * JavaScriptCore.gypi:
1293         * gyp/JavaScriptCore.gyp:
1294
1295 2011-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1296
1297         Unreviewed, rolling out r80079.
1298         http://trac.webkit.org/changeset/80079
1299         https://bugs.webkit.org/show_bug.cgi?id=55547
1300
1301         "Broke the Win debug build?" (Requested by dcheng on #webkit).
1302
1303         * wtf/Platform.h:
1304
1305 2011-03-01  Daniel Cheng  <dcheng@chromium.org>
1306
1307         Reviewed by David Levin.
1308
1309         Add feature define for data transfer items
1310         https://bugs.webkit.org/show_bug.cgi?id=55510
1311
1312         * wtf/Platform.h:
1313
1314 2011-03-01  Oliver Hunt  <oliver@apple.com>
1315
1316         Reviewed by Joseph Pecoraro.
1317
1318         Misaligned memory access in CloneDeserializer on all ARM arch.
1319         https://bugs.webkit.org/show_bug.cgi?id=48742
1320
1321         Add a CPU class for architectures that need aligned addresses
1322         for memory access.
1323
1324         * wtf/Platform.h:
1325
1326 2011-03-01  Adam Barth  <abarth@webkit.org>
1327
1328         Reviewed by Dimitri Glazkov.
1329
1330         Add pre- and post-build actions for JavaScriptCore GYP build
1331         https://bugs.webkit.org/show_bug.cgi?id=55507
1332
1333         After this patch, we have all the steps for building the main
1334         JavaScriptCore framework except the "copy headers" step, which I'll do
1335         next.
1336
1337         * gyp/JavaScriptCore.gyp:
1338
1339 2011-03-01  Geoffrey Garen  <ggaren@apple.com>
1340
1341         Reviewed by Sam Weinig.
1342
1343         Rolled back in r79627 now that the underlying cause for it crashing is fixed.
1344         https://bugs.webkit.org/show_bug.cgi?id=55159
1345
1346         * JavaScriptCore.exp:
1347         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1348         * JavaScriptCore.xcodeproj/project.pbxproj:
1349         * runtime/Heap.cpp:
1350         (JSC::Heap::allocateSlowCase):
1351         * runtime/Heap.h:
1352         * runtime/JSCell.h:
1353         (JSC::JSCell::MarkedSpace::sizeClassFor):
1354         (JSC::JSCell::Heap::allocate):
1355         (JSC::JSCell::JSCell::operator new):
1356         * runtime/MarkedBlock.h:
1357         * runtime/MarkedSpace.cpp:
1358         (JSC::MarkedSpace::MarkedSpace):
1359         (JSC::MarkedSpace::allocateBlock):
1360         (JSC::MarkedSpace::reset):
1361         * runtime/MarkedSpace.h:
1362         (JSC::MarkedSpace::SizeClass::SizeClass):
1363
1364 2011-03-01  Mark Rowe  <mrowe@apple.com>
1365
1366         Reviewed by Sam Weinig.
1367
1368         Replace two script phases that do nothing but copy files with copy files build phases.
1369
1370         This speeds up the build by a few seconds on high-end Mac Pros.
1371
1372         * JavaScriptCore.xcodeproj/project.pbxproj:
1373
1374 2011-03-01  David Kilzer  <ddkilzer@apple.com>
1375
1376         Spring cleaning!
1377
1378         Rubber-stamped by Mark Rowe.
1379
1380         * JavaScriptCore.xcodeproj/project.pbxproj:
1381         (Copy Into Framework): Remove "set -x" and its comment.
1382
1383 2011-03-01  Michael Saboff  <msaboff@apple.com>
1384
1385         Reviewed by Darin Adler.
1386
1387         TinyMCE not working in nightlies
1388         https://bugs.webkit.org/show_bug.cgi?id=54978
1389
1390         Disabling setupBeginChars() to temporarily work arround the test 
1391         failure.  Filed https://bugs.webkit.org/show_bug.cgi?id=55479
1392         to track fixing the issue.
1393
1394         * yarr/YarrPattern.cpp:
1395         (JSC::Yarr::YarrPattern::compile):
1396
1397 2011-02-23  Joseph Pecoraro  <joepeck@webkit.org>
1398
1399         Reviewed by Kenneth Rohde Christiansen.
1400
1401         Viewport parsing no longer accepts "1.0;" value as valid.
1402         https://bugs.webkit.org/show_bug.cgi?id=53705
1403
1404         Include a didReadNumber parameter to String -> float / double
1405         conversion functions. This way, if the "ok" boolean out
1406         parameter is false, you can check to see if there in fact
1407         was a valid number parsed with garbage at the end. Examples
1408         of that would be parsing "123x456" would have ok = false,
1409         but didReadNumber = true.
1410
1411         * JavaScriptCore.exp:
1412         * wtf/text/StringImpl.cpp:
1413         (WTF::StringImpl::toDouble):
1414         (WTF::StringImpl::toFloat):
1415         * wtf/text/StringImpl.h:
1416         * wtf/text/WTFString.cpp:
1417         (WTF::String::toDouble):
1418         (WTF::String::toFloat):
1419         (WTF::charactersToDouble):
1420         (WTF::charactersToFloat):
1421         * wtf/text/WTFString.h:
1422
1423 2011-02-28  Geoffrey Garen  <ggaren@apple.com>
1424
1425         Reviewed by Gavin Barraclough.
1426
1427         Past-the-end writes in VM exceptions (caused crashes in r79627)
1428         https://bugs.webkit.org/show_bug.cgi?id=55448
1429         
1430         Some exceptions had the wrong structures, so they misoverestimated their
1431         inline storage sizes.
1432
1433         * runtime/JSGlobalData.cpp:
1434         (JSC::JSGlobalData::JSGlobalData): Use the right structure.
1435
1436         * runtime/JSObject.h:
1437         (JSC::JSNonFinalObject::JSNonFinalObject):
1438         (JSC::JSFinalObject::JSFinalObject): ASSERT that our structure capacity
1439         is correct to verify this doesn't happen again.
1440
1441 2011-03-01  Andras Becsi  <abecsi@webkit.org>
1442
1443         Reviewed by Csaba Osztrogon√°c.
1444
1445         [Qt] Clean up the project files and move common options to WebKit.pri.
1446
1447         * JavaScriptCore.pri: Move options also needed in WebCore into WebKit.pri.
1448         * JavaScriptCore.pro: Deduplicate options.
1449         * jsc.pro: Ditto.
1450
1451 2011-03-01  Adam Barth  <abarth@webkit.org>
1452
1453         Reviewed by Eric Seidel.
1454
1455         Teach JavaScriptCore GYP build about DEPTH
1456         https://bugs.webkit.org/show_bug.cgi?id=55425
1457
1458         In addition to teaching the JavaScriptCore GYP build about DEPTH, this
1459         change overrides the GCC warning configuration to disable a warning
1460         that's causing probems in Assertions.cpp.  With that warning disabled,
1461         JavaScriptCore builds again.
1462
1463         * gyp/JavaScriptCore.gyp:
1464
1465 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
1466
1467         Windows build fix.
1468
1469         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1470
1471 2011-02-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1472
1473         Unreviewed, rolling out r79948.
1474         http://trac.webkit.org/changeset/79948
1475         https://bugs.webkit.org/show_bug.cgi?id=55439
1476
1477         "caused crashes on the SL release bot" (Requested by ggaren on
1478         #webkit).
1479
1480         * runtime/JSGlobalData.h:
1481         * runtime/WriteBarrier.h:
1482
1483 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
1484
1485         Windows build fix.
1486
1487         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1488
1489 2011-02-28  Gavin Barraclough  <barraclough@apple.com>
1490
1491         Reviewed by Sam Weinig & Darin Adler.
1492
1493         Bug 55423 - Clean up property tables in Structure
1494
1495         Encapsulate, reduce duplication of table search code,
1496         and reduce the size of the tables (remove the index,
1497         just maintain the tables in the correct order).
1498
1499         Shows a 0.5% - 1% progression on sunspider.
1500
1501         * JavaScriptCore.exp:
1502         * runtime/PropertyMapHashTable.h:
1503         (JSC::isPowerOf2):
1504         (JSC::nextPowerOf2):
1505             bit ops used to calculate table size.
1506         (JSC::PropertyMapEntry::PropertyMapEntry):
1507         (JSC::PropertyTable::ordered_iterator::operator++):
1508         (JSC::PropertyTable::ordered_iterator::operator==):
1509         (JSC::PropertyTable::ordered_iterator::operator!=):
1510         (JSC::PropertyTable::ordered_iterator::operator*):
1511         (JSC::PropertyTable::ordered_iterator::operator->):
1512         (JSC::PropertyTable::ordered_iterator::ordered_iterator):
1513             implementation of the iterator types
1514         (JSC::PropertyTable::PropertyTable):
1515         (JSC::PropertyTable::~PropertyTable):
1516             constructors take an initial capacity for the table,
1517             a table to copy, or both.
1518         (JSC::PropertyTable::begin):
1519         (JSC::PropertyTable::end):
1520             create in-order iterators.
1521         (JSC::PropertyTable::find):
1522             search the hash table
1523         (JSC::PropertyTable::add):
1524             add a value to the hash table
1525         (JSC::PropertyTable::remove):
1526             remove a value from the hash table
1527         (JSC::PropertyTable::size):
1528         (JSC::PropertyTable::isEmpty):
1529             accessors.
1530         (JSC::PropertyTable::propertyStorageSize):
1531         (JSC::PropertyTable::clearDeletedOffsets):
1532         (JSC::PropertyTable::hasDeletedOffset):
1533         (JSC::PropertyTable::getDeletedOffset):
1534         (JSC::PropertyTable::addDeletedOffset):
1535             cache deleted (available) offsets in the property storage array.
1536         (JSC::PropertyTable::copy):
1537             take a copy of the PropertyTable, potentially expanding the capacity.
1538         (JSC::PropertyTable::sizeInMemory):
1539             used for DEBUG build statistics
1540         (JSC::PropertyTable::reinsert):
1541         (JSC::PropertyTable::rehash):
1542         (JSC::PropertyTable::tableCapacity):
1543         (JSC::PropertyTable::deletedEntryIndex):
1544         (JSC::PropertyTable::skipDeletedEntries):
1545         (JSC::PropertyTable::table):
1546         (JSC::PropertyTable::usedCount):
1547         (JSC::PropertyTable::dataSize):
1548         (JSC::PropertyTable::sizeForCapacity):
1549         (JSC::PropertyTable::canInsert):
1550             these methods provide internal implementation.
1551         * runtime/Structure.cpp:
1552         (JSC::Structure::dumpStatistics):
1553         (JSC::Structure::~Structure):
1554         (JSC::Structure::materializePropertyMap):
1555         (JSC::Structure::despecifyDictionaryFunction):
1556         (JSC::Structure::addPropertyTransition):
1557         (JSC::Structure::flattenDictionaryStructure):
1558         (JSC::Structure::copyPropertyTable):
1559         (JSC::Structure::get):
1560         (JSC::Structure::despecifyFunction):
1561         (JSC::Structure::despecifyAllFunctions):
1562         (JSC::Structure::put):
1563         (JSC::Structure::remove):
1564         (JSC::Structure::createPropertyMap):
1565         (JSC::Structure::getPropertyNames):
1566         (JSC::PropertyTable::checkConsistency):
1567         (JSC::Structure::checkConsistency):
1568             factored out code to PropertyMapHashTable.h
1569         * runtime/Structure.h:
1570         (JSC::Structure::propertyStorageSize):
1571         (JSC::Structure::isEmpty):
1572         (JSC::Structure::get):
1573             factored out code to PropertyMapHashTable.h
1574
1575 2011-02-28  Xan Lopez  <xlopez@igalia.com>
1576
1577         Another fix build :(
1578
1579         Fix typo.
1580
1581         * runtime/MachineStackMarker.cpp:
1582         (JSC::freePlatformThreadRegisters):
1583
1584 2011-02-28  Xan Lopez  <xlopez@igalia.com>
1585
1586         Unreviewed build fix for Snow Leopard.
1587
1588         * runtime/MachineStackMarker.cpp:
1589         (JSC::freePlatformThreadRegisters):
1590
1591 2011-02-28  Alejandro G. Castro  <alex@igalia.com>
1592
1593         Unreviewed, fix SnowLeopard compilation after r79952.
1594
1595         * runtime/MachineStackMarker.cpp:
1596         (JSC::freePlatformThreadRegisters):
1597
1598 2011-02-28  Mark Rowe  <mrowe@apple.com>
1599
1600         Reviewed by Darin Adler.
1601
1602         <http://webkit.org/b/55430> OwnArrayPtr.h's LOOSE_OWN_ARRAY_PTR results in link errors.
1603
1604         * wtf/OwnArrayPtr.h:
1605         (WTF::::set): Implement OwnArrayPtr::set.
1606
1607 2011-02-28  Martin Zoubek  <martin.zoubek@acision.com> and Alejandro G. Castro  <alex@igalia.com>
1608
1609         Reviewed by Martin Robinson.
1610
1611         Multithread support for JSC on UNIX
1612         https://bugs.webkit.org/show_bug.cgi?id=26838
1613
1614         Implement suspendThread() and resumeThread() for systems with
1615         pthread.h using thread signal handler.
1616
1617         * runtime/MachineStackMarker.cpp:
1618         (JSC::pthreadSignalHandlerSuspendResume):
1619         (JSC::MachineStackMarker::Thread::Thread):
1620         (JSC::getCurrentPlatformThread):
1621         (JSC::suspendThread):
1622         (JSC::resumeThread):
1623         (JSC::getPlatformThreadRegisters):
1624         (JSC::otherThreadStackPointer):
1625         (JSC::freePlatformThreadRegisters):
1626         (JSC::MachineStackMarker::markOtherThreadConservatively):
1627         * wtf/Platform.h: Added Gtk port to use
1628         ENABLE_JSC_MULTIPLE_THREADS.
1629
1630 2011-02-28  Oliver Hunt  <oliver@apple.com>
1631
1632         Reviewed by Darin Adler.
1633
1634         Stop using DeprecatedPtr for the global exception slot
1635         https://bugs.webkit.org/show_bug.cgi?id=55424
1636
1637         Create GCRootPtr to signify that the exception slot is
1638         a gcroot, and so is exempt from the usual writebarrier
1639         restrictions.
1640
1641         * runtime/JSGlobalData.h:
1642         * runtime/WriteBarrier.h:
1643         (JSC::GCRootPtr::GCRootPtr):
1644         (JSC::GCRootPtr::operator=):
1645
1646 2011-02-28  Adam Barth  <abarth@webkit.org>
1647
1648         Reviewed by Dimitri Glazkov.
1649
1650         Use more xcconfig files in JavaScriptCore gyp build
1651         https://bugs.webkit.org/show_bug.cgi?id=55391
1652
1653         The GYP experts tell me that we have have a total of two xcconfig
1654         files: one for the xcodeproj as a whole and one for each target.  This
1655         patch uses that technique to re-use the existing xcconfig files and
1656         eliminate the duplication.
1657
1658         Technically, this patch introduces some build errors because the
1659         xcconfig files assume that the xcodeproj file is one level higher in
1660         the directory hierarchy.  Specifically, the xcodeproj file can no
1661         longer find the Info.plist or the prefix header.  I plan to fix that in
1662         a subsequent patch.
1663
1664         Also, this patch introduces the Release and Production configurations,
1665         which should work correctly now.
1666
1667         * gyp/JavaScriptCore.gyp:
1668
1669 2011-02-28  Jon Honeycutt  <jhoneycutt@apple.com>
1670
1671         Windows build fix.
1672
1673         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1674         Add symbol to export.
1675
1676 2011-02-28  Oliver Hunt  <oliver@apple.com>
1677
1678         Reviewed by Gavin Barraclough.
1679
1680         Make ScopeChainNode GC allocated
1681         https://bugs.webkit.org/show_bug.cgi?id=55283
1682
1683         Simplify lifetime and other issues with the scopechain
1684         by making it gc allocated.  This allows us to simplify
1685         function exit and unwinding, as well as making the
1686         current iterative refcounting go away.
1687
1688         * JavaScriptCore.exp:
1689         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1690         * bytecode/CodeBlock.cpp:
1691         (JSC::CodeBlock::createActivation):
1692         * bytecode/StructureStubInfo.cpp:
1693         * bytecompiler/BytecodeGenerator.cpp:
1694         (JSC::BytecodeGenerator::generate):
1695         (JSC::BytecodeGenerator::BytecodeGenerator):
1696         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
1697         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
1698         * bytecompiler/BytecodeGenerator.h:
1699         * debugger/Debugger.cpp:
1700         (JSC::Recompiler::operator()):
1701         * debugger/DebuggerCallFrame.h:
1702         (JSC::DebuggerCallFrame::scopeChain):
1703         * interpreter/CachedCall.h:
1704         (JSC::CachedCall::CachedCall):
1705         * interpreter/CallFrame.h:
1706         * interpreter/Interpreter.cpp:
1707         (JSC::depth):
1708         (JSC::Interpreter::unwindCallFrame):
1709         (JSC::Interpreter::throwException):
1710         (JSC::Interpreter::execute):
1711         (JSC::Interpreter::executeCall):
1712         (JSC::Interpreter::executeConstruct):
1713         (JSC::Interpreter::privateExecute):
1714         * jit/JITCall.cpp:
1715         (JSC::JIT::compileOpCallInitializeCallFrame):
1716         (JSC::JIT::compileOpCall):
1717         * jit/JITCall32_64.cpp:
1718         (JSC::JIT::compileOpCallInitializeCallFrame):
1719         (JSC::JIT::emit_op_ret):
1720         (JSC::JIT::emit_op_ret_object_or_this):
1721         (JSC::JIT::compileOpCall):
1722         * jit/JITOpcodes.cpp:
1723         (JSC::JIT::emit_op_end):
1724         (JSC::JIT::emit_op_ret):
1725         (JSC::JIT::emit_op_ret_object_or_this):
1726         * jit/JITOpcodes32_64.cpp:
1727         (JSC::JIT::emit_op_end):
1728         * jit/JITStubs.cpp:
1729         (JSC::DEFINE_STUB_FUNCTION):
1730         * jit/JITStubs.h:
1731         * runtime/ArgList.cpp:
1732         * runtime/Completion.cpp:
1733         (JSC::evaluate):
1734         * runtime/Completion.h:
1735         * runtime/DateConversion.cpp:
1736         * runtime/Executable.cpp:
1737         (JSC::EvalExecutable::compileInternal):
1738         (JSC::ProgramExecutable::compileInternal):
1739         (JSC::FunctionExecutable::compileForCallInternal):
1740         (JSC::FunctionExecutable::compileForConstructInternal):
1741         * runtime/FunctionConstructor.cpp:
1742         (JSC::constructFunction):
1743         * runtime/GCActivityCallbackCF.cpp:
1744         * runtime/Identifier.cpp:
1745         * runtime/JSCell.h:
1746         * runtime/JSChunk.cpp: Added.
1747         * runtime/JSChunk.h: Added.
1748         * runtime/JSFunction.cpp:
1749         (JSC::JSFunction::JSFunction):
1750         (JSC::JSFunction::markChildren):
1751         (JSC::JSFunction::getCallData):
1752         (JSC::JSFunction::getOwnPropertySlot):
1753         (JSC::JSFunction::getConstructData):
1754         * runtime/JSFunction.h:
1755         (JSC::JSFunction::scope):
1756         (JSC::JSFunction::setScope):
1757         * runtime/JSGlobalData.cpp:
1758         (JSC::JSGlobalData::JSGlobalData):
1759         * runtime/JSGlobalData.h:
1760         * runtime/JSGlobalObject.cpp:
1761         (JSC::JSGlobalObject::init):
1762         (JSC::JSGlobalObject::markChildren):
1763         * runtime/JSGlobalObject.h:
1764         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData):
1765         (JSC::JSGlobalObject::globalScopeChain):
1766         * runtime/JSGlobalObjectFunctions.cpp:
1767         (JSC::globalFuncEval):
1768         * runtime/JSLock.cpp:
1769         * runtime/JSNumberCell.cpp:
1770         * runtime/JSZombie.cpp:
1771         * runtime/MarkedBlock.cpp:
1772         * runtime/MarkedSpace.cpp:
1773         * runtime/PropertyNameArray.cpp:
1774         * runtime/ScopeChain.cpp:
1775         (JSC::ScopeChainNode::print):
1776         (JSC::ScopeChainNode::localDepth):
1777         (JSC::ScopeChainNode::markChildren):
1778         * runtime/ScopeChain.h:
1779         (JSC::ScopeChainNode::ScopeChainNode):
1780         (JSC::ScopeChainNode::createStructure):
1781         (JSC::ScopeChainNode::push):
1782         (JSC::ScopeChainNode::pop):
1783         (JSC::ScopeChainIterator::ScopeChainIterator):
1784         (JSC::ScopeChainIterator::operator*):
1785         (JSC::ScopeChainIterator::operator->):
1786         (JSC::ScopeChainIterator::operator++):
1787         (JSC::ScopeChainNode::begin):
1788         (JSC::ScopeChainNode::end):
1789         (JSC::ExecState::globalData):
1790         (JSC::ExecState::lexicalGlobalObject):
1791         (JSC::ExecState::globalThisValue):
1792         * runtime/ScopeChainMark.h:
1793         * wtf/DateMath.cpp:
1794
1795 2011-02-27  Adam Barth  <abarth@webkit.org>
1796
1797         Reviewed by Eric Seidel.
1798
1799         Implement WTF::randomNumber in terms of WTF::cryptographicallyRandomNumber when possible
1800         https://bugs.webkit.org/show_bug.cgi?id=55326
1801
1802         Currently, randomNumber does a bunch of platform-specific work that to
1803         get a cryptographic randomness when available.  Instead, we should use
1804         cryptographicallyRandomNumber, which abstracts this work.
1805         Unfortunately, we can't remove all of the WTF::randomNumber
1806         implementation because not every port has access to cryptographically
1807         random numbers.
1808
1809         * wtf/RandomNumber.cpp:
1810         (WTF::randomNumber):
1811
1812 2011-02-27  Benjamin Poulain  <ikipou@gmail.com>
1813
1814         Reviewed by Darin Adler.
1815
1816         Eliminate DeprecatedPtrList from RenderBlock
1817         https://bugs.webkit.org/show_bug.cgi?id=54972
1818
1819         Add methods find() and contains() using an adaptor to ListHashSet.
1820         Those method are like the one of HashSet, they allow to find objects
1821         based on a different key than the one used to define the set.
1822
1823         Add convenience methods for direct access to the head and tail of the list.
1824         Those methods are providing similar API/behavior as Vector.
1825
1826         * wtf/ListHashSet.h:
1827         (WTF::::first):
1828         (WTF::::last):
1829         (WTF::::removeLast):
1830         (WTF::ListHashSetTranslatorAdapter::hash):
1831         (WTF::ListHashSetTranslatorAdapter::equal):
1832         (WTF::::find):
1833         (WTF::::contains):
1834
1835 2011-02-26  Patrick Gansterer  <paroga@webkit.org>
1836
1837         Reviewed by Andreas Kling.
1838
1839         Add support for DragonFly BSD
1840         https://bugs.webkit.org/show_bug.cgi?id=54407
1841
1842         DragonFly BSD is based on FreeBSD, so handle it like FreeBSD.
1843
1844         * wtf/Platform.h:
1845
1846 2011-02-26  Adam Barth  <abarth@webkit.org>
1847
1848         Reviewed by Dimitri Glazkov.
1849
1850         JavaScriptCore should use the xcconfig file instead of importing that information into GYP
1851         https://bugs.webkit.org/show_bug.cgi?id=55282
1852
1853         Technically, this breaks the build because I had removed one of the
1854         warnings in this config file, but this change seems like an
1855         improvement.
1856
1857         * gyp/JavaScriptCore.gyp:
1858
1859 2011-02-26  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
1860
1861         Reviewed by Nikolas Zimmermann.
1862
1863         SH4 JIT SUPPORT
1864         https://bugs.webkit.org/show_bug.cgi?id=44329
1865
1866         Provide an ExecutableAllocater::cacheFlush() implementation for
1867         Linux/SH4.
1868
1869         * jit/ExecutableAllocator.h:
1870         (JSC::ExecutableAllocator::cacheFlush):
1871
1872 2011-02-25  Sheriff Bot  <webkit.review.bot@gmail.com>
1873
1874         Unreviewed, rolling out r79627.
1875         http://trac.webkit.org/changeset/79627
1876         https://bugs.webkit.org/show_bug.cgi?id=55274
1877
1878         broke worker tests (Requested by olliej on #webkit).
1879
1880         * JavaScriptCore.exp:
1881         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1882         * runtime/Heap.cpp:
1883         (JSC::Heap::allocate):
1884         * runtime/Heap.h:
1885         * runtime/JSCell.h:
1886         (JSC::JSCell::JSCell::operator new):
1887         (JSC::JSCell::MarkedSpace::sizeClassFor):
1888         (JSC::JSCell::MarkedSpace::allocate):
1889         * runtime/MarkedBlock.h:
1890         * runtime/MarkedSpace.cpp:
1891         (JSC::MarkedSpace::MarkedSpace):
1892         (JSC::MarkedSpace::allocateBlock):
1893         (JSC::MarkedSpace::reset):
1894         * runtime/MarkedSpace.h:
1895         (JSC::MarkedSpace::SizeClass::SizeClass):
1896
1897 2011-02-25  Michael Saboff  <msaboff@apple.com>
1898
1899         Reviewed by Darin Adler.
1900
1901         Leak in JSParser::Scope of ScopeLabelInfo Vector
1902         https://bugs.webkit.org/show_bug.cgi?id=55249
1903
1904         Changed m_labels to be an OwnPtr<>.  Added VectorTraits
1905         and Scope copy constructor to support this change.
1906
1907         * parser/JSParser.cpp:
1908         (JSC::JSParser::Scope::~Scope):
1909
1910 2011-02-25  Fumitoshi Ukai  <ukai@chromium.org>
1911
1912         Reviewed by Adam Barth.
1913
1914         WebSocket uses insecure random numbers
1915         https://bugs.webkit.org/show_bug.cgi?id=54714
1916
1917         * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
1918
1919 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
1920
1921         Reviewed by Adam Roben.
1922
1923         Move timeBeginPeriod into OS(WINDOWS) section
1924         https://bugs.webkit.org/show_bug.cgi?id=55247
1925
1926         * jsc.cpp:
1927         (main): timeBeginPeriod is available on all Windows versions and not compiler specific.
1928
1929 2011-02-25  Patrick Gansterer  <paroga@webkit.org>
1930
1931         Unreviewed WinCE build fix for r79695.
1932
1933         * jsc.cpp:
1934         (main): SetErrorMode isn't available on WinCE.
1935
1936 2011-02-25  Adam Roben  <aroben@apple.com>
1937
1938         Work around Cygwin's crash-suppression behavior
1939
1940         Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which any processes it launches will
1941         inherit. This is bad for testing/debugging, as it causes the post-mortem debugger not to be
1942         invoked. (Cygwin does this because it makes crashes more UNIX-y.) We reset the error mode
1943         when our test apps launch to work around Cygwin's behavior.
1944
1945         Fixes <http://webkit.org/b/55222> Test apps crash silently (without invoking post-mortem
1946         debugger) when launched from Cygwin 1.7
1947
1948         Reviewed by Darin Adler.
1949
1950         * API/tests/testapi.c: Added a now-needed #include.
1951         (main):
1952         * jsc.cpp:
1953         (main):
1954         Call ::SetErrorMode(0) to undo Cygwin's folly.
1955
1956         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Define NOMINMAX like many of our
1957         other projects do so that windows.h won't define min/max macros that interfere with
1958         std::numeric_limits<T>::min/max.
1959
1960 2011-02-24  Adam Barth  <abarth@webkit.org>
1961
1962         Reviewed by Eric Seidel.
1963
1964         Add GYP project for JavaScriptCore
1965         https://bugs.webkit.org/show_bug.cgi?id=55027
1966
1967         Again, this GYP files is very rough, but it succeeds in building
1968         JavaScriptCore.  There's a lot more work to do here, especially in the
1969         area of sharing with JavaScriptGlue.gyp.  This patch is more of a
1970         checkpoint so that other folks can help out if they wish.
1971
1972         * gyp: Added.
1973         * gyp/JavaScriptCore.gyp: Added.
1974         * gyp/generate-derived-sources.sh: Added.
1975
1976 2011-02-24  Adam Barth  <abarth@webkit.org>
1977
1978         Reviewed by Eric Seidel.
1979
1980         Add missing files to JavaScriptCore.gypi
1981         https://bugs.webkit.org/show_bug.cgi?id=55193
1982
1983         I forgot to add mm files in my previous patch.
1984
1985         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1986         * JavaScriptCore.gypi:
1987
1988 2011-02-24  Adam Barth  <abarth@webkit.org>
1989
1990         Reviewed by Eric Seidel.
1991
1992         Remove unused parameter name in GCActivityCallback.cpp
1993         https://bugs.webkit.org/show_bug.cgi?id=55194
1994
1995         This change is not strictly required for the GYP-based build system,
1996         but I noticed this error when working on the new build system.
1997
1998         * runtime/GCActivityCallback.cpp:
1999         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
2000
2001 2011-02-24  James Robinson  <jamesr@chromium.org>
2002
2003         Reviewed by Darin Fisher.
2004
2005         Add a USE() macro to control use of the built-in UTF8 codec
2006         https://bugs.webkit.org/show_bug.cgi?id=55189
2007
2008         Defaults USE(BUILTIN_UTF8_CODEC) to true for all platforms except chromium, which controls the flag via features.gypi.
2009
2010         * wtf/Platform.h:
2011
2012 2011-02-24  Geoffrey Garen  <ggaren@apple.com>
2013
2014         Reviewed by Darin Adler.
2015
2016         Variable-sized allocation (but still capped at 64 bytes)
2017         https://bugs.webkit.org/show_bug.cgi?id=55159
2018         
2019         SunSpider reports no change.
2020
2021         * JavaScriptCore.exp: Some day, I hope not to have to edit this file.
2022
2023         * runtime/Heap.cpp:
2024         (JSC::Heap::allocateSlowCase): Split allocation into a fast and slow
2025         case, so the fast case can inline size class selection and turn it into
2026         a compile-time constant.
2027         
2028         Changed the collect-on-every allocation debugging switch to collect only
2029         on every slow allocation, so you can still flip the switch without
2030         recompiling the world. This may also be preferable for debugging purposes,
2031         since collecting after every single allocation can be unusably slow,
2032         and can mask problems by running destructors early.
2033
2034         * runtime/Heap.h: Ditto.
2035
2036         * runtime/JSCell.h:
2037         (JSC::JSCell::MarkedSpace::sizeClassFor):
2038         (JSC::JSCell::Heap::allocate):
2039         (JSC::JSCell::JSCell::operator new): The inlining mentioned above.
2040
2041         * runtime/MarkedBlock.h: Dropped the block size from 256KB to 16KB. With
2042         multiple size classes, allocating a full 256KB for the first allocation
2043         in a given class can be pathologically wasteful. (8KB, or 4KB Mac and
2044         8KB Windows, would be even better, but that seems to be a peformance
2045         regression for now.)
2046         
2047         * runtime/MarkedSpace.cpp:
2048         (JSC::MarkedSpace::MarkedSpace):
2049         (JSC::MarkedSpace::allocateBlock):
2050         (JSC::MarkedSpace::reset): There's more than one size class now, and its
2051         cell size is not constant.
2052
2053         * runtime/MarkedSpace.h:
2054         (JSC::MarkedSpace::SizeClass::SizeClass): Ditto.
2055
2056 2011-02-23  Oliver Hunt  <oliver@apple.com>
2057
2058         Reviewed by Geoffrey Garen.
2059
2060         Make WeakGCMap use new handle infrastructure
2061         https://bugs.webkit.org/show_bug.cgi?id=55100
2062
2063         Remove old WeakGCMap implementation and move over to new handle
2064         based logic.
2065
2066         This has a number of benefits, most notably it makes a WeakGCMap
2067         always reflect the true state of the world by as all entries are
2068         removed at the first gc cycle that makes them dead.  This allows
2069         us to get rid of code in a wide variety of objects where the only
2070         purpose was to remove themselves from maps.
2071
2072         It also means that we no longer need to have special "unchecked"
2073         versions of any functions on WeakGCMap.  Alas in order to maintain
2074         compatibility with the JSWeakObjectMapClear API it is still
2075         necessary to have an api that resembles uncheckedRemove, this is
2076         now deprecatedRemove and will be dealt with in a later patch.
2077
2078         In order to get correct semantics in WeakGCMap we need more
2079         contextual information in the finalizer, so we've added an
2080         abstract class based finaliser and a context parameter to the
2081         calls.
2082
2083         The new an improved WeakGCMap also results in sigificantly more
2084         churn in the weak handle lists so exposed some potential problems
2085         during the post mark phase which have been rectified as well.
2086
2087         * API/JSWeakObjectMapRefPrivate.cpp:
2088         * API/JSWeakObjectMapRefPrivate.h:
2089         * runtime/Heap.cpp:
2090         (JSC::Heap::globalObjectCount):
2091         (JSC::Heap::protectedGlobalObjectCount):
2092         * runtime/JSGlobalData.cpp:
2093         (JSC::JSGlobalData::JSGlobalData):
2094         * runtime/JSGlobalData.h:
2095         * runtime/JSGlobalObject.cpp:
2096         (JSC::JSGlobalObject::~JSGlobalObject):
2097         (JSC::JSGlobalObject::init):
2098         * runtime/WeakGCMap.h:
2099         (JSC::WeakGCMap::iterator::iterator):
2100         (JSC::WeakGCMap::iterator::get):
2101         (JSC::WeakGCMap::iterator::getSlot):
2102         (JSC::WeakGCMap::iterator::operator++):
2103         (JSC::WeakGCMap::iterator::operator==):
2104         (JSC::WeakGCMap::iterator::operator!=):
2105         (JSC::WeakGCMap::WeakGCMap):
2106         (JSC::WeakGCMap::isEmpty):
2107         (JSC::WeakGCMap::clear):
2108         (JSC::WeakGCMap::get):
2109         (JSC::WeakGCMap::getSlot):
2110         (JSC::WeakGCMap::set):
2111         (JSC::WeakGCMap::take):
2112         (JSC::WeakGCMap::size):
2113         (JSC::WeakGCMap::deprecatedRemove):
2114         (JSC::WeakGCMap::begin):
2115         (JSC::WeakGCMap::end):
2116         (JSC::WeakGCMap::~WeakGCMap):
2117         (JSC::WeakGCMap::finalize):
2118         * runtime/WeakGCPtr.h:
2119         (JSC::WeakGCPtr::WeakGCPtr):
2120         (JSC::WeakGCPtr::set):
2121
2122 2011-02-24  Oliver Hunt  <oliver@apple.com>
2123
2124         Reviewed by Gavin Barraclough.
2125
2126         Make weaklist processing deal with weak handles being removed during the iteration
2127         https://bugs.webkit.org/show_bug.cgi?id=55105
2128
2129         It is possible for the handle heap to end up in a broken state if
2130         a handle's finalizer removes either the current or next handle
2131         to be visited during the post-gc cleanup.  This patch removes that
2132         problem by allowing the deallocate(Node*) routine to update the
2133         iterator if it is called during finalization.
2134
2135         * collector/handles/HandleHeap.cpp:
2136         (JSC::HandleHeap::HandleHeap):
2137         (JSC::HandleHeap::updateAfterMark):
2138         (JSC::HandleHeap::clearWeakPointers):
2139         (JSC::HandleHeap::writeBarrier):
2140         (JSC::HandleHeap::protectedGlobalObjectCount):
2141         * collector/handles/HandleHeap.h:
2142         (JSC::Finalizer::~Finalizer):
2143         (JSC::HandleHeap::getFinalizer):
2144         (JSC::HandleHeap::deallocate):
2145         (JSC::HandleHeap::makeWeak):
2146         (JSC::HandleHeap::makeSelfDestroying):
2147         (JSC::HandleHeap::Node::Node):
2148         (JSC::HandleHeap::Node::setFinalizer):
2149         (JSC::HandleHeap::Node::finalizer):
2150         (JSC::HandleHeap::Node::finalizerContext):
2151         * interpreter/RegisterFile.cpp:
2152         (JSC::RegisterFile::setGlobalObject):
2153         (JSC::GlobalObjectNotifier::finalize):
2154         (JSC::RegisterFile::globalObjectCollectedNotifier):
2155         * interpreter/RegisterFile.h:
2156         (JSC::RegisterFile::RegisterFile):
2157         * runtime/Heap.cpp:
2158         (JSC::Heap::destroy):
2159         * runtime/WeakGCPtr.h:
2160         (JSC::WeakGCPtr::WeakGCPtr):
2161         (JSC::WeakGCPtr::set):
2162
2163 2011-02-24  Michael Saboff  <msaboff@apple.com>
2164
2165         Reviewed by Oliver Hunt.
2166
2167         PatternAlternative leaked in YarrPatternConstructor::atomParenthesesEnd()
2168         https://bugs.webkit.org/show_bug.cgi?id=55156
2169
2170         Added code to delete unneeded PatternAlternative after it is removed
2171         from m_alternatives Vector.
2172
2173         * yarr/YarrPattern.cpp:
2174         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
2175
2176 2011-02-24  Eric Seidel  <eric@webkit.org>
2177
2178         Reviewed by Anders Carlsson.
2179
2180         VectorBuffer should not call malloc(0)
2181         https://bugs.webkit.org/show_bug.cgi?id=55091
2182
2183         Turns out the malloc() call which was so hot in:
2184         https://bugs.webkit.org/show_bug.cgi?id=55005
2185         was actually just malloc(0).
2186
2187         We shouldn't be calling malloc(0) anyway, since there is no need to
2188         and it might actually do work on some systems.
2189         I believe on Mac it ends up taking the standard spinlocks (expensive)
2190         and the code on Brew actually does a malloc(1) instead.  Neither is desirable.
2191
2192         * wtf/Vector.h:
2193         (WTF::VectorBufferBase::allocateBuffer):
2194         (WTF::VectorBufferBase::tryAllocateBuffer):
2195
2196 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
2197
2198         Reviewed by Darin Adler.
2199
2200         Remove obsolete PLATFORM(CI)
2201         https://bugs.webkit.org/show_bug.cgi?id=55082
2202
2203         * wtf/Platform.h:
2204
2205 2011-02-24  Martin Robinson  <mrobinson@igalia.com>
2206
2207         Reviewed by Xan Lopez.
2208
2209         [GTK] Remove the GFile GOwnPtr specialization
2210         https://bugs.webkit.org/show_bug.cgi?id=55154
2211
2212         Remove the GFile specialization of GOwnPtr. It's sufficient to use GRefPtr
2213         to track GFiles since they are just regular reference-counted GObjects.
2214
2215         * wtf/gobject/GOwnPtr.cpp: Remove GFile specialization.
2216         * wtf/gobject/GOwnPtr.h: Ditto.
2217
2218 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
2219
2220         Reviewed by Eric Seidel.
2221
2222         Rename PLATFORM(SKIA) to USE(SKIA)
2223         https://bugs.webkit.org/show_bug.cgi?id=55090
2224
2225         * wtf/Platform.h:
2226
2227 2011-02-24  Patrick Gansterer  <paroga@webkit.org>
2228
2229         Reviewed by Alexey Proskuryakov.
2230
2231         Remove pthreads dependecy for JSLock
2232         https://bugs.webkit.org/show_bug.cgi?id=54832
2233
2234         JSLock is only needed to support an obsolete execution model where JavaScriptCore
2235         automatically protected against concurrent access from multiple threads.
2236         So it's safe to disable it on non-mac platforms where we don't have native pthreads.
2237
2238         * runtime/JSLock.cpp:
2239
2240 2011-02-24  Chao-ying Fu  <fu@mips.com>
2241
2242         Reviewed by Eric Seidel.
2243
2244         Fix MIPS build with new patchOffsetPut/GetByIdPropertyMapOffset1/2 values
2245         https://bugs.webkit.org/show_bug.cgi?id=54997
2246
2247         * jit/JIT.h:
2248         * jit/JITStubs.cpp:
2249         (JSC::JITThunks::JITThunks):
2250
2251 2011-02-24  Andras Becsi  <abecsi@webkit.org>
2252
2253         Reviewed by Laszlo Gombos.
2254
2255         [Qt] MinGW build fails to link
2256         https://bugs.webkit.org/show_bug.cgi?id=55050
2257
2258         Prepend the libraries of subcomponents instead of appending them
2259         to fix the library order according to the dependency of the libraries
2260
2261         * JavaScriptCore.pri: rename addJavaScriptCore to prependJavaScriptCore
2262         * jsc.pro: ditto
2263
2264 2011-02-24  Eric Seidel  <eric@webkit.org>
2265
2266         Reviewed by Adam Barth.
2267
2268         Deque<T> should support inline capacity
2269         https://bugs.webkit.org/show_bug.cgi?id=55032
2270
2271         The title says it all.  There are currently no places
2272         which use this code yet, however it's been tested in conjunction
2273         with code for bug 55005.
2274
2275         This also adds an ASSERT that capacity is never 1.  If you were able
2276         to set the capacity equal to 1, the Deque would just get confused
2277         and happily append your item but still think it had size 0.
2278
2279         * wtf/Deque.h:
2280         (WTF::DequeIterator::DequeIterator):
2281         (WTF::DequeConstIterator::DequeConstIterator):
2282         (WTF::DequeReverseIterator::DequeReverseIterator):
2283         (WTF::DequeConstReverseIterator::DequeConstReverseIterator):
2284         (WTF::::checkValidity):
2285         (WTF::::checkIndexValidity):
2286         (WTF::::invalidateIterators):
2287         (WTF::::Deque):
2288         (WTF::deleteAllValues):
2289         (WTF::::operator):
2290         (WTF::::destroyAll):
2291         (WTF::::~Deque):
2292         (WTF::::swap):
2293         (WTF::::clear):
2294         (WTF::::findIf):
2295         (WTF::::expandCapacityIfNeeded):
2296         (WTF::::expandCapacity):
2297         (WTF::::takeFirst):
2298         (WTF::::append):
2299         (WTF::::prepend):
2300         (WTF::::removeFirst):
2301         (WTF::::remove):
2302         (WTF::::addToIteratorsList):
2303         (WTF::::removeFromIteratorsList):
2304         (WTF::::DequeIteratorBase):
2305         (WTF::::~DequeIteratorBase):
2306         (WTF::::isEqual):
2307         (WTF::::increment):
2308         (WTF::::decrement):
2309         (WTF::::after):
2310         (WTF::::before):
2311         * wtf/Vector.h:
2312
2313 2011-02-22  Adam Barth  <abarth@webkit.org>
2314
2315         Reviewed by Ojan Vafai. 
2316
2317         Add missing files to JavaScriptCore.gypi 
2318         https://bugs.webkit.org/show_bug.cgi?id=55020 
2319
2320         gypi files are supposed to list every file under the sun.  This patch 
2321         adds some missing files and sorts the rest. 
2322
2323         * JavaScriptCore.gypi: 
2324
2325 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
2326
2327         Reviewed by Darin Adler.
2328
2329         Refactored MarkedSpace to operate in terms of size classes
2330         https://bugs.webkit.org/show_bug.cgi?id=55106
2331         
2332         SunSpider reports no change.
2333
2334         * runtime/JSCell.h:
2335         (JSC::JSCell::MarkedSpace::sizeClassFor):
2336         (JSC::JSCell::MarkedSpace::allocate): Delegate allocation based on size
2337         class. Since these functions are inline, the compiler can constant fold
2338         them.
2339
2340         * runtime/MarkedBlock.h:
2341         (JSC::MarkedBlock::cellSize):
2342         (JSC::MarkedBlock::size): Factored out a cellSize() helper.
2343
2344         * runtime/MarkedSpace.cpp:
2345         (JSC::MarkedSpace::allocateBlock):
2346         (JSC::MarkedSpace::allocateFromSizeClass):
2347         (JSC::MarkedSpace::shrink):
2348         (JSC::MarkedSpace::reset):
2349         * runtime/MarkedSpace.h:
2350         (JSC::MarkedSpace::SizeClass::SizeClass):
2351         (JSC::MarkedSpace::SizeClass::reset): Changed to operate in terms of
2352         abstract SizeClass objects, which are independent linked lists of blocks
2353         of a certain size class, instead of a single m_heap object.
2354
2355 2011-02-23  Adam Barth  <abarth@webkit.org>
2356
2357         Reviewed by James Robinson.
2358
2359         [Chromium] Use WebKitClient for OSRandomSource instead of trying to talk to the file system in the sandbox
2360         https://bugs.webkit.org/show_bug.cgi?id=55093
2361
2362         Exclude OSRandomSource.cpp from the Chromium build.  This function is
2363         implemented in WebKit/chromium/src instead.
2364
2365         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2366
2367 2011-02-23  Oliver Hunt  <oliver@apple.com>
2368
2369         Roll out r64156 as it introduces incorrect behaviour.
2370
2371         * runtime/JSByteArray.h:
2372         (JSC::JSByteArray::setIndex):
2373
2374 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
2375
2376         Reviewed by Oliver Hunt.
2377
2378         Moved the "nextAtom" allocation pointer into MarkedBlock for better encapsulation
2379         https://bugs.webkit.org/show_bug.cgi?id=55079
2380         
2381         SunSpider reports no change.
2382
2383         * runtime/Heap.cpp:
2384         (JSC::Heap::reset): Moved Zombie sweeping here, up from MarkedSpace,
2385         since we want Heap to logically control MarkedSpace. MarkedSpace should
2386         never choose to sweep itself.
2387
2388         * runtime/JSCell.h:
2389         (JSC::JSCell::MarkedBlock::allocate): Updated for nextAtom becoming a
2390         member of MarkedBlock. No need to reset nextAtom to firstAtom() when
2391         we reach the end of a block, since there's now an explicit reset pass
2392         during GC.
2393
2394         * runtime/MarkedBlock.cpp:
2395         (JSC::MarkedBlock::MarkedBlock):
2396         * runtime/MarkedBlock.h:
2397         (JSC::MarkedBlock::reset): Added the nextAtom data member, and reordered
2398         some data members to improve cache locality.
2399
2400         * runtime/MarkedSpace.cpp:
2401         (JSC::MarkedSpace::MarkedSpace):
2402         (JSC::MarkedSpace::allocate):
2403         (JSC::MarkedSpace::reset):
2404         * runtime/MarkedSpace.h:
2405         (JSC::CollectorHeap::CollectorHeap): Removed nextAtom, and added an
2406         explicit reset pass.
2407
2408 2011-02-23  James Robinson  <jamesr@chromium.org>
2409
2410         Unreviewed, rolling out r79428.
2411         http://trac.webkit.org/changeset/79428
2412         https://bugs.webkit.org/show_bug.cgi?id=54714
2413
2414         Does not work in the Chromium sandbox
2415
2416         * JavaScriptCore.exp:
2417
2418 2011-02-23  Adam Roben  <aroben@apple.com>
2419
2420         Fix an off-by-one error in JSC::appendSourceToError
2421
2422         Looks like this bug has been around since the code was first added in r35245.
2423
2424         Fixes <http://webkit.org/b/55052> <rdar://problem/9043512> Crash in JSC::appendSourceToError
2425         when running fast/dom/objc-big-method-name.html on Windows with full page heap enabled
2426
2427         Reviewed by Darin Adler.
2428
2429         * interpreter/Interpreter.cpp:
2430         (JSC::appendSourceToError): When trimming whitespace off the end of the string, examine the
2431         character at stop-1 rather than at stop. At this point in the code, stop represents the
2432         index just past the end of the characters we care about, and can even be just past the end
2433         of the entire data buffer.
2434
2435 2011-02-23  Geoffrey Garen  <ggaren@apple.com>
2436
2437         Reviewed by Darin Adler.
2438         
2439         Rolled back in r79367 with SnowLeopard Release bot crash fixed.
2440         https://bugs.webkit.org/show_bug.cgi?id=54999
2441         
2442         The crash was caused by failure to update the "nextBlock" pointer when
2443         removing a block from the list while shrinking. The fix is to update the
2444         "nextBlock" pointer.
2445         
2446         This crash was very rare because it only happened in cases where the very
2447         first block in the heap contained no marked cells.
2448
2449 2011-02-23  Dan Bernstein  <mitz@apple.com>
2450
2451         Reviewed by Gavin Barraclough.
2452
2453         Include frame numbers in backtraces.
2454         https://bugs.webkit.org/show_bug.cgi?id=55060
2455
2456         * wtf/Assertions.cpp:
2457
2458 2011-02-23  Xan Lopez  <xlopez@igalia.com>
2459
2460         Reviewed by Gavin Barraclough.
2461
2462         latest jsc for armv7 crashes in sunspider tests
2463         https://bugs.webkit.org/show_bug.cgi?id=54667
2464
2465         Update JIT offset values in ARMv7 after r78732. Fixes crashes in
2466         SunSpider and JavaScript tests.
2467
2468         * jit/JIT.h: update values.
2469
2470 2011-02-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2471
2472         Unreviewed, rolling out r79418.
2473         http://trac.webkit.org/changeset/79418
2474         https://bugs.webkit.org/show_bug.cgi?id=55043
2475
2476         "breaks shlib linux build" (Requested by morrita on #webkit).
2477
2478         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2479         * JavaScriptCore.gypi:
2480
2481 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
2482
2483         Reviewed by Alexey Proskuryakov.
2484
2485         Use DEFINE_STATIC_LOCAL for ignoreSetMutex in Structure.cpp
2486         https://bugs.webkit.org/show_bug.cgi?id=54831
2487
2488         * runtime/InitializeThreading.cpp:
2489         (JSC::initializeThreadingOnce):
2490         * runtime/Structure.cpp:
2491         (JSC::ignoreSetMutex):
2492         (JSC::Structure::Structure):
2493         (JSC::Structure::~Structure):
2494         (JSC::Structure::initializeThreading):
2495         * runtime/Structure.h:
2496
2497 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
2498
2499         Reviewed by Darin Adler.
2500
2501         Rename PLATFORM(CF) to USE(CF)
2502         https://bugs.webkit.org/show_bug.cgi?id=53540
2503
2504         * runtime/DatePrototype.cpp:
2505         * runtime/GCActivityCallbackCF.cpp:
2506         * runtime/JSGlobalData.cpp:
2507         (JSC::JSGlobalData::JSGlobalData):
2508         * wtf/CurrentTime.cpp:
2509         * wtf/Platform.h:
2510         * wtf/text/AtomicString.h:
2511         * wtf/text/StringImpl.h:
2512         (WTF::StringImpl::computeHash):
2513         * wtf/text/WTFString.h:
2514         * wtf/unicode/icu/CollatorICU.cpp:
2515         (WTF::Collator::userDefault):
2516
2517 2011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
2518
2519         Unreviewed build fix for Windows.
2520
2521         WebSocket uses insecure random numbers
2522         https://bugs.webkit.org/show_bug.cgi?id=54714
2523
2524         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export WTF::cryptographicallyRandomNumber()
2525
2526 2011-02-23  Fumitoshi Ukai  <ukai@chromium.org>
2527
2528         Reviewed by Adam Barth.
2529
2530         WebSocket uses insecure random numbers
2531         https://bugs.webkit.org/show_bug.cgi?id=54714
2532
2533         * JavaScriptCore.exp: Export WTF::cryptographicallyRandomNumber()
2534
2535 2011-02-22  Adam Barth  <abarth@webkit.org>
2536
2537         Reviewed by Ojan Vafai.
2538
2539         Add missing files to JavaScriptCore.gypi
2540         https://bugs.webkit.org/show_bug.cgi?id=55020
2541
2542         gypi files are supposed to list every file under the sun.  This patch
2543         adds some missing files and sorts the rest.
2544
2545         * JavaScriptCore.gypi:
2546
2547 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2548
2549         Unreviewed, rolling out r79367.
2550         http://trac.webkit.org/changeset/79367
2551         https://bugs.webkit.org/show_bug.cgi?id=55012
2552
2553         all layout tests are crashing on Snow Leopard (Requested by
2554         rniwa on #webkit).
2555
2556         * GNUmakefile.am:
2557         * JavaScriptCore.gypi:
2558         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2559         * JavaScriptCore.xcodeproj/project.pbxproj:
2560         * runtime/MarkedBlock.cpp:
2561         (JSC::MarkedBlock::MarkedBlock):
2562         * runtime/MarkedBlock.h:
2563         * runtime/MarkedSpace.cpp:
2564         (JSC::MarkedSpace::destroy):
2565         (JSC::MarkedSpace::allocateBlock):
2566         (JSC::MarkedSpace::freeBlock):
2567         (JSC::MarkedSpace::allocate):
2568         (JSC::MarkedSpace::shrink):
2569         (JSC::MarkedSpace::reset):
2570         * runtime/MarkedSpace.h:
2571         (JSC::CollectorHeap::collectorBlock):
2572         * wtf/CMakeLists.txt:
2573         * wtf/DoublyLinkedList.h: Removed.
2574
2575 2011-02-22  Geoffrey Garen  <ggaren@apple.com>
2576
2577         Reviewed by Oliver Hunt.
2578
2579         Manage MarkedBlocks in a linked list instead of a vector, so arbitrary removal is O(1)
2580         https://bugs.webkit.org/show_bug.cgi?id=54999
2581         
2582         SunSpider reports no change.
2583
2584         * GNUmakefile.am:
2585         * JavaScriptCore.gypi:
2586         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2587         * JavaScriptCore.xcodeproj/project.pbxproj: So many build systems, so little time.
2588         * wtf/CMakeLists.txt:
2589
2590         * runtime/MarkedBlock.cpp:
2591         (JSC::MarkedBlock::MarkedBlock):
2592         * runtime/MarkedBlock.h:
2593         (JSC::MarkedBlock::setPrev):
2594         (JSC::MarkedBlock::setNext):
2595         (JSC::MarkedBlock::prev):
2596         (JSC::MarkedBlock::next): Added linked list data members and accessors.
2597
2598         * runtime/MarkedSpace.cpp:
2599         (JSC::MarkedSpace::destroy):
2600         (JSC::MarkedSpace::allocateBlock): Stop using vector, since it doesn't exist anymore.
2601
2602         (JSC::MarkedSpace::freeBlocks): New helper function for updating relevant
2603         data structures when freeing blocks.
2604
2605         (JSC::MarkedSpace::allocate): Updated for nextBlock being a pointer and
2606         not a vector index.
2607
2608         (JSC::MarkedSpace::shrink): Construct a temporary list of empties and
2609         then free them, to avoid modifying our hash table while iterating it.
2610         This wasn't a concern before because we were using indirect array
2611         indexing, not direct pointer indexing.
2612
2613         (JSC::MarkedSpace::reset): Updated for nextBlock being a pointer and
2614         not a vector index.
2615
2616         * runtime/MarkedSpace.h:
2617         (JSC::CollectorHeap::CollectorHeap): Changed data type from vector to linked list.
2618
2619         * wtf/DoublyLinkedList.h: Added. New linked list class.
2620         (WTF::::DoublyLinkedList):
2621         (WTF::::isEmpty):
2622         (WTF::::head):
2623         (WTF::::append):
2624         (WTF::::remove):
2625
2626 2011-02-22  Gavin Barraclough  <barraclough@apple.com>
2627
2628         Windows build fix.
2629
2630         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2631
2632 2011-02-22  Gavin Barraclough  <barraclough@apple.com>
2633
2634         Reviewed by Sam Weinig.
2635
2636         Bug 54988 - Re-create StructureTransitionTable class, encapsulate transition table
2637
2638         The Structure class keeps a table of transitions to derived Structure types. Since
2639         this table commonly contains a single entry we employ an optimization where instead
2640         of holding a map, we may hold a pointer directly to a single instance of the mapped
2641         type. We use an additional bit of data to flag whether the pointer is currently
2642         pointing to a table of transitions, or a singleton transition. Previously we had
2643         commonly used a pattern of storing data in the low bits of pointers, but had moved
2644         away from this since it causes false leaks to be reported by the leaks tool. However
2645         in this case, the entries in the map are weak links - this pointer will never be
2646         responsible for keeping an object alive.  As such we can use this approach provided
2647         that the bit is set when a table is not in use (otherwise the table would appear to
2648         be leaked).
2649
2650         Additionally, the transition table currently allows two entries to exist for a given
2651         key - one specialized to a particular value, and one not specialized. This is
2652         unnecessary, wasteful, and a little inconsistent. (If you create an entry for a
2653         specialized value, then a non-specialized entry, both will exist.  If you create an
2654         entry for a non-specialized value, then try to create a specialized entry, only a
2655         non-specialized form will be allowed.)
2656
2657         This shows a small progression on v8.
2658
2659         * JavaScriptCore.exp:
2660         * runtime/JSObject.h:
2661         (JSC::JSObject::putDirectInternal):
2662         * runtime/Structure.cpp:
2663         (JSC::StructureTransitionTable::contains):
2664         (JSC::StructureTransitionTable::get):
2665         (JSC::StructureTransitionTable::remove):
2666         (JSC::StructureTransitionTable::add):
2667         (JSC::Structure::dumpStatistics):
2668         (JSC::Structure::Structure):
2669         (JSC::Structure::~Structure):
2670         (JSC::Structure::addPropertyTransitionToExistingStructure):
2671         (JSC::Structure::addPropertyTransition):
2672         * runtime/Structure.h:
2673         (JSC::Structure::get):
2674         * runtime/StructureTransitionTable.h:
2675         (JSC::StructureTransitionTable::Hash::hash):
2676         (JSC::StructureTransitionTable::Hash::equal):
2677         (JSC::StructureTransitionTable::HashTraits::emptyValue):
2678         (JSC::StructureTransitionTable::HashTraits::constructDeletedValue):
2679         (JSC::StructureTransitionTable::HashTraits::isDeletedValue):
2680         (JSC::StructureTransitionTable::StructureTransitionTable):
2681         (JSC::StructureTransitionTable::~StructureTransitionTable):
2682         (JSC::StructureTransitionTable::isUsingSingleSlot):
2683         (JSC::StructureTransitionTable::map):
2684         (JSC::StructureTransitionTable::setMap):
2685         (JSC::StructureTransitionTable::singleTransition):
2686         (JSC::StructureTransitionTable::setSingleTransition):
2687
2688 2011-02-22  Andras Becsi  <abecsi@webkit.org>
2689
2690         Reviewed by Laszlo Gombos.
2691
2692         [Qt] Redesign the build system
2693         https://bugs.webkit.org/show_bug.cgi?id=51339
2694
2695         Part 2.
2696
2697         Build WebCore as a static library, compile the WebKit API and WebKit2 API
2698         in a final step and link to WebKit2, WebCore and JSC libraries to fix
2699         linking issues resulting from stripped away symbols.
2700
2701         * JavaScriptCore.pri: Remove the workaround.
2702
2703 2011-02-21  Adam Roben  <aroben@apple.com>
2704
2705         Fix linker warning on Windows
2706
2707         r79135 tried to export JSObject::s_info by adding it to JavaScriptCore.def. This is the
2708         obvious way (since it's how we export functions), but unfortunately it doesn't work correct.
2709         r79222 made us export it the right way (using the JS_EXPORTDATA macro), but forgot to remove
2710         it from JavaScriptCore.def. This caused us to get linker warnings about exporting the symbol
2711         multiple times.
2712
2713         Rubber-stamped by Anders Carlsson.
2714
2715         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSObject::s_info.
2716
2717 2011-02-21  Brian Weinstein  <bweinstein@apple.com>
2718
2719         Reviewed by Adam Roben.
2720
2721         WebResourceCacheManager should be responsible for managing the CFURLCache as well
2722         as the WebCore memory cache.
2723         https://bugs.webkit.org/show_bug.cgi?id=54886
2724         Part of <rdar://problem/8971738>
2725
2726         Add a new use flag for using the CFURLCache.
2727
2728         * wtf/Platform.h:
2729
2730 2011-02-21  Xan Lopez  <xlopez@igalia.com>
2731
2732         Reviewed by Gavin Barraclough.
2733
2734         Use ASSERT_JIT_OFFSET in JITPropertyAccess32_64.cpp
2735         https://bugs.webkit.org/show_bug.cgi?id=54901
2736
2737         * jit/JIT.h: swap actual and expected values in message, they were
2738         reversed.
2739         * jit/JITCall32_64.cpp:
2740         (JSC::JIT::compileOpCall): use ASSERT_JIT_OFFSET instead of
2741         a simple ASSERT.
2742         * jit/JITPropertyAccess32_64.cpp:
2743         (JSC::JIT::emit_op_method_check): ditto.
2744         (JSC::JIT::compileGetByIdHotPath): ditto.
2745         (JSC::JIT::compileGetByIdSlowCase): ditto.
2746         (JSC::JIT::emit_op_put_by_id): ditto.
2747
2748 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
2749
2750         Ruber stamped by Sam Weinig
2751
2752         Bug 54899 - Math.LOG10E should be 0.4342944819032518
2753         This value is quoted in section 15.8.1.5 of the spec.
2754
2755         * runtime/MathObject.cpp:
2756         (JSC::MathObject::MathObject):
2757
2758 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
2759
2760         Reviewed by Sam Weinig.
2761
2762         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
2763
2764         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
2765         containing a pointer to its parent class. These links should reflect the inheritance
2766         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
2767         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
2768         since intervening C++ classes may not have ClassInfo - but would be a potential bug
2769         were ClassInfo were to be added.
2770
2771         * API/JSCallbackConstructor.cpp:
2772         * API/JSCallbackFunction.cpp:
2773         * API/JSCallbackObjectFunctions.h:
2774         * runtime/Arguments.h:
2775         * runtime/ArrayPrototype.cpp:
2776         * runtime/BooleanObject.cpp:
2777         * runtime/DateInstance.cpp:
2778         * runtime/DatePrototype.cpp:
2779         * runtime/ErrorInstance.cpp:
2780         * runtime/InternalFunction.cpp:
2781         * runtime/JSActivation.cpp:
2782         * runtime/JSArray.cpp:
2783         * runtime/JSFunction.cpp:
2784         * runtime/JSONObject.cpp:
2785         * runtime/JSObject.h:
2786         * runtime/JSZombie.h:
2787         * runtime/MathObject.cpp:
2788         * runtime/NativeErrorConstructor.cpp:
2789         * runtime/NumberConstructor.cpp:
2790         * runtime/NumberObject.cpp:
2791         * runtime/RegExpConstructor.cpp:
2792         * runtime/RegExpObject.cpp:
2793         * runtime/StringObject.cpp:
2794         * runtime/StringPrototype.cpp:
2795
2796 2011-02-21  Adam Roben  <aroben@apple.com>
2797
2798         Export JSObject::s_info from JavaScriptCore.dll
2799
2800         This matches what we do for all other ClassInfo objects that WebCore needs access to.
2801
2802         Fixes <http://webkit.org/b/54881> REGRESSION (r79132): Lots of tests crashing in
2803         JSCell::inherits on Windows
2804
2805         Reviewed by Sam Weinig.
2806
2807         * runtime/JSObject.h: Added JS_EXPORTDATA to s_info.
2808
2809 2011-02-21  Kristian Amlie  <kristian.amlie@nokia.com>
2810
2811         Reviewed by Andreas Kling.
2812
2813         Switched to compiler based detection, where the error actually is.
2814
2815         It is not the platform that needs the workaround, it is the compiler.
2816
2817         QtWebKit fails to compile on Windows XP with msvc-2008
2818         https://bugs.webkit.org/show_bug.cgi?id=54746
2819
2820         * bytecode/CodeBlock.h:
2821         * runtime/RegExpObject.h:
2822
2823 2011-02-20  Gavin Barraclough  <barraclough@apple.com>
2824
2825         Reviewed by Oliver Hunt.
2826
2827         https://bugs.webkit.org/show_bug.cgi?id=54839
2828         Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
2829
2830         Historically, Native functions used to be represented by PrototypeFunctions, however
2831         since introducing call optimizations to the JIT this has used JSFunctions for host
2832         calls too. At the point this change was made, the interpreter continued to use
2833         PrototypeFunctions, however since fallback from the JIT to interpreter was introduced
2834         the interpreter has had to be able to run using host functions represented using
2835         JSFunctions - leading to an unnecessary and redundant divergence in behaviour between 
2836         interpreter only builds, and situations where the JIT has fallen back to interpreting.
2837
2838         NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction
2839         for wrappers for host functions, and as such can also be removed.
2840
2841         GlobalEvalFunction is a redundant wrapper that happens to be derived from
2842         PrototypeFunction. It existed to hold a reference to the global object - but since all
2843         functions how derive from JSObjectWithGlobalObject, this no longer requires an
2844         additional class to provide this functionality.
2845
2846         * JavaScriptCore.JSVALUE32_64only.exp:
2847         * JavaScriptCore.JSVALUE64only.exp:
2848         * JavaScriptCore.xcodeproj/project.pbxproj:
2849             Removed symbols / references to files.
2850
2851         * runtime/GlobalEvalFunction.cpp: Removed.
2852         * runtime/GlobalEvalFunction.h: Removed.
2853         * runtime/NativeFunctionWrapper.h: Removed.
2854         * runtime/PrototypeFunction.cpp: Removed.
2855         * runtime/PrototypeFunction.h: Removed.
2856             Removed.
2857
2858         * runtime/Executable.cpp:
2859         (JSC::NativeExecutable::~NativeExecutable):
2860         * runtime/Executable.h:
2861         (JSC::NativeExecutable::create):
2862         (JSC::NativeExecutable::NativeExecutable):
2863         (JSC::JSFunction::nativeFunction):
2864         * runtime/JSFunction.cpp:
2865         (JSC::callHostFunctionAsConstructor):
2866         (JSC::JSFunction::JSFunction):
2867         (JSC::JSFunction::getCallData):
2868         * runtime/JSFunction.h:
2869         * runtime/JSGlobalData.cpp:
2870         (JSC::JSGlobalData::getHostFunction):
2871         * runtime/JSGlobalData.h:
2872         (JSC::JSGlobalData::getCTIStub):
2873             Added interpreter-friendly constructors for NativeExecutables.
2874
2875         * bytecompiler/BytecodeGenerator.cpp:
2876         * interpreter/Interpreter.cpp:
2877         * jit/JITStubs.cpp:
2878         * jsc.cpp:
2879         * runtime/ArrayConstructor.cpp:
2880         * runtime/BooleanPrototype.cpp:
2881         * runtime/BooleanPrototype.h:
2882         * runtime/CallData.h:
2883         * runtime/DateConstructor.cpp:
2884         * runtime/DateConstructor.h:
2885         * runtime/ErrorPrototype.cpp:
2886         * runtime/ErrorPrototype.h:
2887         * runtime/FunctionPrototype.cpp:
2888         * runtime/FunctionPrototype.h:
2889         * runtime/JSGlobalObject.cpp:
2890         * runtime/JSGlobalObject.h:
2891         * runtime/JSGlobalObjectFunctions.cpp:
2892         * runtime/Lookup.cpp:
2893         * runtime/NumberPrototype.cpp:
2894         * runtime/NumberPrototype.h:
2895         * runtime/ObjectConstructor.cpp:
2896         * runtime/ObjectConstructor.h:
2897         * runtime/ObjectPrototype.cpp:
2898         * runtime/ObjectPrototype.h:
2899         * runtime/RegExpPrototype.cpp:
2900         * runtime/RegExpPrototype.h:
2901         * runtime/SmallStrings.h:
2902         * runtime/StringConstructor.cpp:
2903         * runtime/StringConstructor.h:
2904             Removed use of redundant classes.
2905
2906 2011-02-19  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2907
2908         Unreviewed build fix for Symbian.
2909
2910         [Symbian] Revert the removal of linking 
2911         against hal after r79126.
2912
2913         Dependency on the hal library can not be removed 
2914         as it is still used (e.g. in MarkStackSymbian.cpp).
2915
2916         * JavaScriptCore.pri:
2917
2918 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2919
2920         Interpreter build fix.
2921
2922         * runtime/ArrayConstructor.cpp:
2923         * runtime/BooleanPrototype.cpp:
2924         * runtime/DateConstructor.cpp:
2925         * runtime/ErrorPrototype.cpp:
2926         * runtime/FunctionPrototype.cpp:
2927         * runtime/Lookup.cpp:
2928         * runtime/NumberPrototype.cpp:
2929         * runtime/ObjectConstructor.cpp:
2930         * runtime/ObjectPrototype.cpp:
2931         * runtime/RegExpPrototype.cpp:
2932         * runtime/StringConstructor.cpp:
2933
2934 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2935
2936         Build fix!!
2937
2938         * JavaScriptCore.exp:
2939
2940 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2941
2942         Windows build fix!!
2943
2944         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2945
2946 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2947
2948         Windows build fix!
2949
2950         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2951
2952 2011-02-19  Gavin Barraclough  <barraclough@apple.com>
2953
2954         Build fix!
2955
2956         * JavaScriptCore.exp:
2957
2958 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
2959
2960         Reviewed by Sam Weinig.
2961
2962         Bug 54786 - Devirtualize JSCell::classInfo()
2963
2964         Instead of making a virtual function call, add a pointer to the ClassInfo
2965         onto Structure.
2966
2967         This removes a virtual function call, and paves the way towards removing all
2968         the createStructure methods, and StructureFlags/AnonymousSlotCount properties
2969         (these should be able to move onto ClassInfo).
2970
2971         Calls to Structure::create must now pass a pointer to the ClassInfo for the
2972         structure. All objects now have a ClassInfo pointer, non-object cell types
2973         still do not.
2974
2975         Changes are most mechanical, involving three steps:
2976             * Remove virtual classInfo() methods.
2977             * Add &s_info parameter to calls to Structure::create.
2978             * Rename ClassInfo static members on classes from 'info' to 's_info',
2979               for consistency.
2980
2981         * API/JSCallbackConstructor.cpp:
2982         * API/JSCallbackConstructor.h:
2983         * API/JSCallbackFunction.cpp:
2984         * API/JSCallbackFunction.h:
2985         * API/JSCallbackObject.cpp:
2986         * API/JSCallbackObject.h:
2987         * API/JSCallbackObjectFunctions.h:
2988         * API/JSObjectRef.cpp:
2989         * API/JSValueRef.cpp:
2990         * API/JSWeakObjectMapRefPrivate.cpp:
2991         * JavaScriptCore.exp:
2992         * debugger/Debugger.cpp:
2993         * debugger/DebuggerActivation.h:
2994         * debugger/DebuggerCallFrame.cpp:
2995         * interpreter/Interpreter.cpp:
2996         * jit/JITCall32_64.cpp:
2997         * jit/JITOpcodes.cpp:
2998         * jit/JITStubs.cpp:
2999         * profiler/Profiler.cpp:
3000         * runtime/Arguments.cpp:
3001         * runtime/Arguments.h:
3002         * runtime/ArrayConstructor.cpp:
3003         * runtime/ArrayPrototype.cpp:
3004         * runtime/ArrayPrototype.h:
3005         * runtime/BooleanObject.cpp:
3006         * runtime/BooleanObject.h:
3007         * runtime/BooleanPrototype.cpp:
3008         * runtime/DateConstructor.cpp:
3009         * runtime/DateInstance.cpp:
3010         * runtime/DateInstance.h:
3011         * runtime/DatePrototype.cpp:
3012         * runtime/DatePrototype.h:
3013         * runtime/ErrorInstance.cpp:
3014         * runtime/ErrorInstance.h:
3015         * runtime/ErrorPrototype.cpp:
3016         * runtime/FunctionPrototype.cpp:
3017         * runtime/FunctionPrototype.h:
3018         * runtime/GetterSetter.h:
3019         * runtime/GlobalEvalFunction.h:
3020         * runtime/InternalFunction.cpp:
3021         * runtime/InternalFunction.h:
3022         * runtime/JSAPIValueWrapper.h:
3023         * runtime/JSActivation.cpp:
3024         * runtime/JSActivation.h:
3025         * runtime/JSArray.cpp:
3026         * runtime/JSArray.h:
3027         * runtime/JSByteArray.cpp:
3028         * runtime/JSByteArray.h:
3029         * runtime/JSCell.cpp:
3030         * runtime/JSCell.h:
3031         * runtime/JSFunction.cpp:
3032         * runtime/JSFunction.h:
3033         * runtime/JSGlobalData.cpp:
3034         * runtime/JSGlobalObject.cpp:
3035         * runtime/JSGlobalObject.h:
3036         * runtime/JSNotAnObject.h:
3037         * runtime/JSONObject.cpp:
3038         * runtime/JSONObject.h:
3039         * runtime/JSObject.cpp:
3040         * runtime/JSObject.h:
3041         * runtime/JSObjectWithGlobalObject.h:
3042         * runtime/JSPropertyNameIterator.h:
3043         * runtime/JSStaticScopeObject.h:
3044         * runtime/JSString.h:
3045         * runtime/JSVariableObject.h:
3046         * runtime/JSWrapperObject.h:
3047         * runtime/JSZombie.cpp:
3048         * runtime/JSZombie.h:
3049         * runtime/Lookup.cpp:
3050         * runtime/MathObject.cpp:
3051         * runtime/MathObject.h:
3052         * runtime/NativeErrorConstructor.cpp:
3053         * runtime/NativeErrorConstructor.h:
3054         * runtime/NumberConstructor.cpp:
3055         * runtime/NumberConstructor.h:
3056         * runtime/NumberObject.cpp:
3057         * runtime/NumberObject.h:
3058         * runtime/NumberPrototype.cpp:
3059         * runtime/ObjectConstructor.cpp:
3060         * runtime/ObjectPrototype.cpp:
3061         * runtime/RegExpConstructor.cpp:
3062         * runtime/RegExpConstructor.h:
3063         * runtime/RegExpObject.cpp:
3064         * runtime/RegExpObject.h:
3065         * runtime/RegExpPrototype.cpp:
3066         * runtime/ScopeChain.cpp:
3067         * runtime/StringConstructor.cpp:
3068         * runtime/StringObject.cpp:
3069         * runtime/StringObject.h:
3070         * runtime/StringObjectThatMasqueradesAsUndefined.h:
3071         * runtime/StringPrototype.cpp:
3072         * runtime/StringPrototype.h:
3073         * runtime/Structure.cpp:
3074         * runtime/Structure.h:
3075
3076 2011-02-19  David Kilzer  <ddkilzer@apple.com>
3077
3078         <http://webkit.org/b/54808> Change jsc target to build directly into JavaScriptCore.framework/Resources/jsc
3079
3080         Reviewed by Dan Bernstein.
3081
3082         * Configurations/Base.xcconfig: Added
3083         JAVASCRIPTCORE_FRAMEWORKS_DIR variable.
3084         * Configurations/JavaScriptCore.xcconfig: Used
3085         JAVASCRIPTCORE_FRAMEWORKS_DIR to define INSTALL_PATH.
3086         * JavaScriptCore.xcodeproj/project.pbxproj: Set the INSTALL_PATH
3087         for Production configuration of jsc target.
3088         (Copy Into Framework): Removed old build phase.
3089         (Fix Framework Reference): Renamed build phase to "Copy Into
3090         Framework".  Added "set -x" call to make the script print the
3091         commands it is running.  Added code to exit early for Production
3092         builds since this was never intended for them.  Added code to
3093         copy jsc into the JavaScriptCore.framework/Resources directory.
3094
3095 2011-02-19  Siddharth Mathur  <siddharth.mathur@nokia.com>
3096
3097         Reviewed by Laszlo Gombos.
3098
3099         [Symbian] OSAllocator implementation for Symbian OS. 
3100         Manages both data and code region requests. V8 and Sunspider tested
3101         OK with interpreter. Not tested with JSC JIT yet as it has unrelated
3102         failures. Also no thread safety yet.
3103         https://bugs.webkit.org/show_bug.cgi?id=51128
3104
3105         * JavaScriptCore.pri: removed HAL linkage
3106         * wtf/Bitmap.h:
3107         (WTF::::findRunOfZeros): find run of zeros in a bitmap. quick n dirty
3108         * wtf/OSAllocator.h:
3109         (WTF::OSAllocator::decommitAndRelease): decommit explicitly 
3110         * wtf/OSAllocatorSymbian.cpp: Impl. of OSAllocator interface 
3111         (WTF::allocateCodeChunk): utility for code chunks
3112         (WTF::deallocateCodeChunk): utility for code chunks
3113         (WTF::dataAllocatorInstance): getter for data allocator instance
3114         (WTF::OSAllocator::reserveUncommitted):
3115         (WTF::OSAllocator::releaseDecommitted):
3116         (WTF::OSAllocator::commit):
3117         (WTF::OSAllocator::decommit):
3118         (WTF::OSAllocator::reserveAndCommit):
3119         (WTF::PageAllocatorSymbian::PageAllocatorSymbian): maps requests 
3120         to one underlying Symbian chunk
3121         (WTF::PageAllocatorSymbian::~PageAllocatorSymbian):
3122         (WTF::PageAllocatorSymbian::reserve):
3123         (WTF::PageAllocatorSymbian::release):
3124         (WTF::PageAllocatorSymbian::commit):
3125         (WTF::PageAllocatorSymbian::decommit):
3126         (WTF::PageAllocatorSymbian::contains):
3127         * wtf/PageAllocatorSymbian.h: Added.
3128         (WTF::SymbianChunk::SymbianChunk): wrapper around RChunk  
3129         (WTF::SymbianChunk::~SymbianChunk):
3130         (WTF::SymbianChunk::contains):
3131         
3132 2011-02-19  Yong Li  <yoli@rim.com>
3133
3134         Reviewed by Eric Seidel.
3135
3136         https://bugs.webkit.org/show_bug.cgi?id=54687
3137         When being built with armcc, "int" bit fields are treated as
3138         unsigned integers, which will fail the comparisons like "m_offset == -1".
3139         Using "signed" fixes the problem.
3140
3141         * assembler/ARMAssembler.h:
3142         * assembler/ARMv7Assembler.h:
3143
3144 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
3145
3146         Reviewed by Sam Weinig.
3147
3148         Made MarkedSpace block iteration size-class agnostic
3149         https://bugs.webkit.org/show_bug.cgi?id=54792
3150         
3151         SunSpider reports no change.
3152
3153         * runtime/MarkedSpace.cpp:
3154         (JSC::MarkedSpace::clearMarks):
3155         (JSC::MarkedSpace::sweep):
3156         (JSC::MarkedSpace::objectCount):
3157         (JSC::MarkedSpace::size):
3158         (JSC::MarkedSpace::capacity):
3159         * runtime/MarkedSpace.h:
3160         (JSC::MarkedSpace::forEach): Iterate blocks in hashing order instead of
3161         size class list order. This is a much simpler convention in a world
3162         of many different size classes.
3163
3164 2011-02-18  Kristian Amlie  <kristian.amlie@nokia.com>
3165
3166         Reviewed by Andreas Kling.
3167
3168         Added friend exception to Qt platform, which also compiles Windows.
3169
3170         QtWebKit fails to compile on Windows XP with msvc-2008
3171         https://bugs.webkit.org/show_bug.cgi?id=54746
3172
3173         * bytecode/CodeBlock.h:
3174         * runtime/RegExpObject.h:
3175
3176 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
3177
3178         (Rolled back in r79022 with crash fixed.)
3179
3180         Reviewed by Sam Weinig.
3181
3182         Use hashing instead of linear search in the conservative pointer test
3183         https://bugs.webkit.org/show_bug.cgi?id=54767
3184         
3185         SunSpider reports no change.
3186
3187         * runtime/MarkedSpace.cpp:
3188         (JSC::MarkedSpace::destroy): No need to explicitly clear the blocks array,
3189         since freeBlock removes items for us.
3190
3191         (JSC::MarkedSpace::freeBlock): Fixed a typo that always removed the last
3192         block from the block set instead of the block being freed. Changed to
3193         remove a block from our data structures before deallocating it, since
3194         this is slightly cleaner.
3195
3196         * runtime/MarkedSpace.h:
3197         (JSC::MarkedSpace::contains): Variable-sized objects will use more,
3198         smaller blocks, so it's important for the contains check not to be O(n)
3199         in the number of blocks.
3200
3201 2011-02-18  chris reiss  <christopher.reiss@nokia.com>
3202
3203         Reviewed by Andreas Kling.
3204
3205         REGRESSION: Date.parse("Tue Nov 23 20:40:05 2010 GMT") returns NaN
3206         https://bugs.webkit.org/show_bug.cgi?id=49989
3207
3208         updated test fast/js/script-tests/date-parse-test.js
3209
3210         * wtf/DateMath.cpp:
3211         (WTF::parseDateFromNullTerminatedCharacters):
3212
3213 2011-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
3214
3215         Unreviewed, rolling out r79022.
3216         http://trac.webkit.org/changeset/79022
3217         https://bugs.webkit.org/show_bug.cgi?id=54775
3218
3219         It broke the whole world (Requested by Ossy on #webkit).
3220
3221         * runtime/MarkedSpace.h:
3222         (JSC::MarkedSpace::contains):
3223
3224 2011-02-18  Yael Aharon  <yael.aharon@nokia.com>
3225
3226         Reviewed by Dave Hyatt.
3227
3228         Add support for dir=auto
3229         https://bugs.webkit.org/show_bug.cgi?id=50916
3230
3231         Change defaultWritingDirection() to return if the writing direction
3232         was determined from a letter with strong directionality or not.
3233
3234         * JavaScriptCore.exp:
3235         * JavaScriptCore.order:
3236         * wtf/text/StringImpl.cpp:
3237         (WTF::StringImpl::defaultWritingDirection):
3238         * wtf/text/StringImpl.h:
3239         * wtf/text/WTFString.h:
3240         (WTF::String::defaultWritingDirection):
3241
3242 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
3243
3244         Reviewed by Sam Weinig.
3245
3246         Use hashing instead of linear search in the conservative pointer test
3247         https://bugs.webkit.org/show_bug.cgi?id=54767
3248         
3249         SunSpider reports no change.
3250
3251         * runtime/MarkedSpace.h:
3252         (JSC::MarkedSpace::contains): Variable-sized objects will use more,
3253         smaller blocks, so it's important for the contains check not to be O(n)
3254         in the number of blocks.
3255
3256 2011-02-18  Geoffrey Garen  <ggaren@apple.com>
3257
3258         Reviewed by Sam Weinig.
3259
3260         Tightened some usage accounting code in MarkedSpace
3261         https://bugs.webkit.org/show_bug.cgi?id=54761
3262         
3263         SunSpider reports no change.
3264
3265         * runtime/Heap.cpp:
3266         (JSC::Heap::Heap): Initialize the marked space high water mark on
3267         construction, instead of relying on some implicit subtleties to make
3268         not initializing it work out OK.
3269
3270         * runtime/Heap.h: Fixed up includes.
3271
3272         * runtime/MarkedBlock.h: Made firstAtom() static so clients can call it
3273         even without having allocated a block.
3274
3275         * runtime/MarkedSpace.cpp:
3276         (JSC::MarkedSpace::MarkedSpace): Don't pre-allocate a block, since this
3277         would be prohibitively expensive with multiple size classes.
3278
3279         (JSC::MarkedSpace::allocateBlock):
3280         (JSC::MarkedSpace::freeBlock): Track allocated blocks in a hash set,
3281         since linear search in the contains check will be prohibitively
3282         expensive once we're using lots of smaller blocks.
3283
3284         (JSC::MarkedSpace::allocate): Don't assume that we always have a block
3285         allocated, since we don't anymore. (See above.)
3286
3287         (JSC::MarkedSpace::reset):
3288         * runtime/MarkedSpace.h: Updated for changes mentioned above.
3289
3290 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
3291
3292         Reviewed by Sam Weinig.
3293
3294         Made object allocation secretly variable-sized (Shhhh!)
3295         https://bugs.webkit.org/show_bug.cgi?id=54721
3296         
3297         SunSpider reports no change.
3298         
3299         Internally, MarkedBlock now makes variable-sized allocations, even
3300         though MarkedSpace doesn't take advantage of this yet.
3301
3302         * runtime/MarkedBlock.cpp:
3303         (JSC::MarkedBlock::MarkedBlock): No need to ASSERT that allocations are
3304         fixed-sized.
3305
3306         * runtime/MarkedBlock.h: Shrunk the atom size so we can allocate things
3307         that are not multiples of 64 bytes.
3308
3309 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
3310
3311         Reviewed by Sam Weinig.
3312
3313         Fixed some math errors when when using variable-sized cells
3314         https://bugs.webkit.org/show_bug.cgi?id=54717
3315         
3316         SunSpider reports no change.
3317         
3318         Computer Science Barbie says, "Math is not so hard afterall!"
3319
3320         * runtime/JSCell.h:
3321         (JSC::JSCell::MarkedBlock::allocate): Round up when calculating the
3322         minimum number of atoms required for a cell, since rounding down
3323         will get you splinched.
3324
3325         * runtime/MarkedBlock.cpp:
3326         (JSC::MarkedBlock::MarkedBlock):
3327         (JSC::MarkedBlock::sweep):
3328         * runtime/MarkedBlock.h:
3329         (JSC::MarkedBlock::forEach): Changed a bunch of != tests to < tests
3330         because m_endAtom is actually a fuzzy end -- iterating from firstAtom()
3331         may not hit m_endAtom exactly.
3332
3333 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
3334
3335         Reviewed by Sam Weinig.
3336
3337         A little more abstraction for MarkedSpace::contains
3338         https://bugs.webkit.org/show_bug.cgi?id=54715
3339
3340         * runtime/MarkedBlock.h:
3341         (JSC::MarkedBlock::contains): Added a contains function, so MarkedSpace
3342         doesn't have to know how MarkedBlock tracks containment internally.
3343
3344         * runtime/MarkedSpace.h:
3345         (JSC::MarkedSpace::contains): Call through to MarkedBlock to figure out
3346         if a cell that seems to be in a block is valid.
3347
3348 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
3349
3350         Reviewed by Sam Weinig.
3351
3352         Removed the invariant that the last cell in a block is always marked
3353         https://bugs.webkit.org/show_bug.cgi?id=54713
3354         
3355         SunSpider reports no change.
3356         
3357         This adds one branch to allocation, but simplifies the mark invariant,
3358         especially in a world of variable-sized cells. Now, it really is true
3359         that any cell whose mark bit is set is a valid, live cell whose
3360         constructor has run and whose destructor has not run.
3361
3362         * runtime/JSCell.h: 
3363         (JSC::JSCell::MarkedBlock::allocate): Changed this do-while into a while
3364         since we can no longer rely on a set mark bit to break out of this loop
3365         before it reaches the end of the block.
3366
3367         * runtime/MarkedBlock.cpp:
3368         (JSC::MarkedBlock::MarkedBlock):
3369         (JSC::MarkedBlock::sweep): 
3370         * runtime/MarkedBlock.h:
3371         (JSC::MarkedBlock::isEmpty):
3372         (JSC::MarkedBlock::clearMarks):
3373         (JSC::MarkedBlock::markCount):
3374         (JSC::MarkedBlock::forEach): No need to set a special last mark bit.
3375
3376 2011-02-17  Sheriff Bot  <webkit.review.bot@gmail.com>
3377
3378         Unreviewed, rolling out r78856 and r78907.
3379         http://trac.webkit.org/changeset/78856
3380         http://trac.webkit.org/changeset/78907
3381         https://bugs.webkit.org/show_bug.cgi?id=54705
3382
3383         These seem to break tests on 32-bit builds. (Requested by
3384         aroben on #webkit).
3385
3386         * JavaScriptCore.xcodeproj/project.pbxproj:
3387         * collector/handles/Global.h:
3388         (JSC::Global::internalSet):
3389         * collector/handles/Handle.h:
3390         (JSC::HandleTypes::getFromSlot):
3391         (JSC::HandleTypes::toJSValue):
3392         (JSC::HandleTypes::validateUpcast):
3393         (JSC::HandleConverter::operator->):
3394         (JSC::HandleConverter::operator*):
3395         (JSC::Handle::Handle):
3396         (JSC::Handle::get):
3397         * runtime/JSArray.cpp:
3398         (JSC::JSArray::sortNumeric):
3399         * runtime/JSObject.h:
3400         (JSC::JSObject::inlineGetOwnPropertySlot):
3401         * runtime/SlotAccessor.h: Removed.
3402         * runtime/WeakGCPtr.h:
3403         (JSC::WeakGCPtr::get):
3404         (JSC::WeakGCPtr::internalSet):
3405         * runtime/WriteBarrier.h:
3406         (JSC::DeprecatedPtr::DeprecatedPtr):
3407         (JSC::DeprecatedPtr::get):
3408         (JSC::DeprecatedPtr::operator*):
3409         (JSC::DeprecatedPtr::operator->):
3410         (JSC::DeprecatedPtr::slot):
3411         (JSC::DeprecatedPtr::operator UnspecifiedBoolType*):
3412         (JSC::DeprecatedPtr::operator!):
3413         (JSC::WriteBarrierBase::set):
3414         (JSC::WriteBarrierBase::get):
3415         (JSC::WriteBarrierBase::operator*):
3416         (JSC::WriteBarrierBase::operator->):
3417         (JSC::WriteBarrierBase::clear):
3418         (JSC::WriteBarrierBase::slot):
3419         (JSC::WriteBarrierBase::operator UnspecifiedBoolType*):
3420         (JSC::WriteBarrierBase::operator!):
3421         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
3422         (JSC::WriteBarrier::WriteBarrier):
3423
3424 2011-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
3425
3426         Unreviewed.
3427
3428         [Qt] Buildfix.
3429
3430         * wtf/RetainPtr.h: Add missing PLATFORM(CF) guard.
3431
3432 2011-02-17  Geoffrey Garen  <ggaren@apple.com>
3433
3434         Reviewed by Oliver Hunt.
3435
3436         Made MarkedBlock variable-sized
3437         https://bugs.webkit.org/show_bug.cgi?id=54692
3438         
3439         SunSpider reports no change.
3440         
3441         Each MarkedBlock is now composed of a set of fixed-sized atoms, with one
3442         mark bit per atom. A given cell may be composed of one or more atoms.
3443         
3444         * runtime/Heap.cpp:
3445         (JSC::Heap::allocate): Made fixed-sizedness a property of MarkedSpace,
3446         bubbling it up from MarkedBlock, since MarkedBlock now supports variable-
3447         sizedness.
3448
3449         * runtime/JSCell.h:
3450         (JSC::JSCell::MarkedBlock::allocate): Removed use of CELLS_PER_BLOCK and
3451         (implicit) one constants -- these quantities are not constant anymore.
3452         Updated for switch from cell to atom.
3453
3454         * runtime/MarkedBlock.cpp:
3455         (JSC::MarkedBlock::create):
3456         (JSC::MarkedBlock::destroy):
3457         (JSC::MarkedBlock::MarkedBlock):
3458         (JSC::MarkedBlock::sweep):
3459         * runtime/MarkedBlock.h:
3460         (JSC::MarkedBlock::firstAtom):
3461         (JSC::MarkedBlock::atoms):
3462         (JSC::MarkedBlock::isAtomAligned):