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