f17412ea3f361d2b3b5d34df370f643ec28d5908
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-06-27  Ryosuke Niwa  <rniwa@webkit.org>
2
3         Build fix attempt after r89885.
4
5         * JavaScriptCore.exp:
6         * jsc.cpp:
7
8 2011-06-27  Oliver Hunt  <oliver@apple.com>
9
10         Reviewed by Geoffrey Garen.
11
12         Support throwing away non-running code even while other code is running
13         https://bugs.webkit.org/show_bug.cgi?id=63485
14
15         Add a function to CodeBlock to support unlinking direct linked callsites,
16         and then with that in place add logic to discard code from any function
17         that is not currently on the stack.
18
19         The unlinking completely reverts any optimized call sites, such that they
20         may be relinked again in future.
21
22         * JavaScriptCore.exp:
23         * bytecode/CodeBlock.cpp:
24         (JSC::CodeBlock::unlinkCalls):
25         (JSC::CodeBlock::clearEvalCache):
26         * bytecode/CodeBlock.h:
27         (JSC::CallLinkInfo::CallLinkInfo):
28         (JSC::CallLinkInfo::unlink):
29         * bytecode/EvalCodeCache.h:
30         (JSC::EvalCodeCache::clear):
31         * heap/Heap.cpp:
32         (JSC::Heap::getConservativeRegisterRoots):
33         * heap/Heap.h:
34         * jit/JIT.cpp:
35         (JSC::JIT::privateCompile):
36         * jit/JIT.h:
37         * jit/JITCall.cpp:
38         (JSC::JIT::compileOpCall):
39         * jit/JITWriteBarrier.h:
40         (JSC::JITWriteBarrierBase::clear):
41         * jsc.cpp:
42         (GlobalObject::GlobalObject):
43         (functionReleaseExecutableMemory):
44         * runtime/Executable.cpp:
45         (JSC::EvalExecutable::unlinkCalls):
46         (JSC::ProgramExecutable::unlinkCalls):
47         (JSC::FunctionExecutable::discardCode):
48         (JSC::FunctionExecutable::unlinkCalls):
49         * runtime/Executable.h:
50         * runtime/JSGlobalData.cpp:
51         (JSC::SafeRecompiler::returnValue):
52         (JSC::SafeRecompiler::operator()):
53         (JSC::JSGlobalData::releaseExecutableMemory):
54
55 2011-06-27  Gavin Barraclough  <barraclough@apple.com>
56
57         Reviewed by Oliver Hunt.
58
59         https://bugs.webkit.org/show_bug.cgi?id=63497
60         Add DEBUG_WITH_BREAKPOINT support to the DFG JIT.
61
62         * dfg/DFGByteCodeParser.cpp:
63         (JSC::DFG::ByteCodeParser::parseBlock):
64         * dfg/DFGNode.h:
65         * dfg/DFGNonSpeculativeJIT.cpp:
66         (JSC::DFG::NonSpeculativeJIT::compile):
67         * dfg/DFGSpeculativeJIT.cpp:
68         (JSC::DFG::SpeculativeJIT::compile):
69
70 2011-06-27  Juan C. Montemayor  <jmont@apple.com>
71
72         Reviewed by Mark Rowe.
73
74         Indirectly including TextPosition.h and XPathGrammar.h causes compile errors
75         https://bugs.webkit.org/show_bug.cgi?id=63392
76         
77         When both TextPosition.h and XPathGrammar.h are included a compile-error
78         is caused, since XPathGrammar.h defines a macro called NUMBER and 
79         TextPosition has a typedef named NUMBER.
80
81         * wtf/text/TextPosition.h:
82         (WTF::TextPosition::TextPosition):
83         (WTF::TextPosition::minimumPosition):
84         (WTF::TextPosition::belowRangePosition):
85
86 2011-06-27  Filip Pizlo  <fpizlo@apple.com>
87
88         Reviewed by Gavin Barraclough.
89
90         DFG JIT does not perform put_by_id caching.
91         https://bugs.webkit.org/show_bug.cgi?id=63409
92
93         * bytecode/StructureStubInfo.h:
94         * dfg/DFGJITCodeGenerator.cpp:
95         (JSC::DFG::JITCodeGenerator::cachedPutById):
96         * dfg/DFGJITCodeGenerator.h:
97         * dfg/DFGJITCompiler.cpp:
98         (JSC::DFG::JITCompiler::compileFunction):
99         * dfg/DFGJITCompiler.h:
100         (JSC::DFG::JITCompiler::addPropertyAccess):
101         (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
102         * dfg/DFGNonSpeculativeJIT.cpp:
103         (JSC::DFG::NonSpeculativeJIT::compile):
104         * dfg/DFGOperations.cpp:
105         * dfg/DFGOperations.h:
106         * dfg/DFGRepatch.cpp:
107         (JSC::DFG::dfgRepatchByIdSelfAccess):
108         (JSC::DFG::tryCacheGetByID):
109         (JSC::DFG::appropriatePutByIdFunction):
110         (JSC::DFG::tryCachePutByID):
111         (JSC::DFG::dfgRepatchPutByID):
112         * dfg/DFGRepatch.h:
113         * dfg/DFGSpeculativeJIT.cpp:
114         (JSC::DFG::SpeculativeJIT::compile):
115
116 2011-06-27  Gustavo Noronha Silva  <gns@gnome.org>
117
118         Unreviewed build fix. One more filed missing during distcheck, for
119         the MIPS build.
120
121         * GNUmakefile.list.am:
122
123 2011-06-26  Filip Pizlo  <fpizlo@apple.com>
124
125         Reviewed by Gavin Barraclough.
126
127         DFG non-speculative JIT has potentially harmful speculations with respect to arithmetic operations.
128         https://bugs.webkit.org/show_bug.cgi?id=63347
129
130         * dfg/DFGNonSpeculativeJIT.cpp:
131             - Changed arithmetic operations to speculate in favor of integers.
132         (JSC::DFG::NonSpeculativeJIT::valueToNumber):
133         (JSC::DFG::NonSpeculativeJIT::knownConstantArithOp):
134         (JSC::DFG::NonSpeculativeJIT::basicArithOp):
135         (JSC::DFG::NonSpeculativeJIT::compile):
136         * dfg/DFGNonSpeculativeJIT.h:
137         * dfg/DFGOperations.cpp:
138             - Added slow-path routines for arithmetic that perform no speculation; the
139               non-speculative JIT will generate calls to these in cases where its
140               speculation fails.
141         * dfg/DFGOperations.h:
142
143 2011-06-24  Nikolas Zimmermann  <nzimmermann@rim.com>
144
145         Reviewed by Rob Buis.
146
147         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
148         https://bugs.webkit.org/show_bug.cgi?id=59085
149
150         * wtf/Platform.h: Force Qt-EWS into a full rebuild, otherwhise this patch breaks the EWS.
151
152 2011-06-24  Michael Saboff  <msaboff@apple.com>
153
154         Reviewed by Gavin Barraclough.
155
156         Arm Assembler, Immediate stack offset values truncated to 8 bits for add & sub
157         https://bugs.webkit.org/show_bug.cgi?id=63345
158
159         The methods ARMThumbImmediate::getUInt9 and ARMThumbImmediate::getUInt10
160         return 9 and 10 bit quantities, therefore changed their return type from
161         uint8_t to uint16_t.  Also casted the places where they are used as they
162         are currently shifted and used as 7 or 8 bit values.
163
164         These methods are currently used for literals for stack offsets, 
165         including creating and destroying stack frames.  The prior truncation of
166         the upper bits caused stack frames to be too small, thus allowing a
167         JIT'ed function to access and overwrite stack space outside of the
168         incorrectly sized stack frame.
169
170         * assembler/ARMv7Assembler.h:
171         (JSC::ARMThumbImmediate::getUInt9):
172         (JSC::ARMThumbImmediate::getUInt10):
173         (JSC::ARMv7Assembler::add):
174         (JSC::ARMv7Assembler::ldr):
175         (JSC::ARMv7Assembler::str):
176         (JSC::ARMv7Assembler::sub):
177         (JSC::ARMv7Assembler::sub_S):
178
179 2011-06-24  Michael Saboff  <msaboff@apple.com>
180
181         Reviewed by Geoffrey Garen.
182
183         releaseFastMallocFreeMemory doesn't adjust free counts for scavenger
184         https://bugs.webkit.org/show_bug.cgi?id=63015
185
186         Added code to adjust class TCMalloc_PageHeap variables free_committed_pages_ and
187         min_free_committed_pages_since_last_scavenge_ in ReleaseFreeList().  These 
188         adjustments are a bug.  These need to reflect the pages that are released
189         in ReleaseFreeLsit so that scavenge doesn't try to free that many pages as well.
190         Made ReleaseFreeList a member of TCMalloc_PageHeap in the process.  Updated
191         Check() and helper method CheckList() to check the number of actual free pages
192         with free_committed_pages_.
193
194         The symptom of the problem of the existing code is that the scavenger may
195         run unneccesarily without any real work to do, i.e. pages on the free lists.
196         The scanvenger would also end up freeing too many pages, that is going below 
197         the current 528 target free pages.
198
199         Note that the style of the changes was kept consistent with the
200         existing style.
201
202         * wtf/FastMalloc.cpp:
203         (WTF::TCMalloc_PageHeap::Check):
204         (WTF::TCMalloc_PageHeap::CheckList):
205         (WTF::TCMalloc_PageHeap::ReleaseFreeList):
206
207 2011-06-24  Abhishek Arya  <inferno@chromium.org>
208
209         Reviewed by Darin Adler.
210
211         Match other clampTo* functions in style with clampToInteger(float)
212         function.
213         https://bugs.webkit.org/show_bug.cgi?id=53449
214
215         * wtf/MathExtras.h:
216         (clampToInteger):
217         (clampToFloat):
218         (clampToPositiveInteger):
219
220 2011-06-24  Sheriff Bot  <webkit.review.bot@gmail.com>
221
222         Unreviewed, rolling out r89594.
223         http://trac.webkit.org/changeset/89594
224         https://bugs.webkit.org/show_bug.cgi?id=63316
225
226         It broke 5 tests on the Qt bot (Requested by Ossy_DC on
227         #webkit).
228
229         * GNUmakefile.list.am:
230         * JavaScriptCore.gypi:
231         * icu/unicode/uscript.h: Removed.
232         * wtf/unicode/ScriptCodesFromICU.h: Removed.
233         * wtf/unicode/brew/UnicodeBrew.h:
234         * wtf/unicode/glib/UnicodeGLib.h:
235         * wtf/unicode/icu/UnicodeIcu.h:
236         * wtf/unicode/qt4/UnicodeQt4.h:
237         * wtf/unicode/wince/UnicodeWinCE.h:
238
239 2011-06-23  Filip Pizlo  <fpizlo@apple.com>
240
241         Reviewed by Gavin Barraclough.
242
243         DFG non-speculative JIT should have obvious optimizations for GetById and GetByVal
244         https://bugs.webkit.org/show_bug.cgi?id=63173
245
246         * dfg/DFGJITCodeGenerator.cpp:
247         (JSC::DFG::JITCodeGenerator::cachedGetById):
248         * dfg/DFGJITCodeGenerator.h:
249         * dfg/DFGNonSpeculativeJIT.cpp:
250         (JSC::DFG::NonSpeculativeJIT::compile):
251         * dfg/DFGSpeculativeJIT.cpp:
252         (JSC::DFG::SpeculativeJIT::compile):
253
254 2011-06-23  Oliver Hunt  <oliver@apple.com>
255
256         Fix Qt again.
257
258         * assembler/ARMAssembler.h:
259         (JSC::ARMAssembler::readPointer):
260
261 2011-06-23  Oliver Hunt  <oliver@apple.com>
262
263         Fix Qt Build
264
265         * assembler/ARMAssembler.h:
266         (JSC::ARMAssembler::readPointer):
267
268 2011-06-23  Stephanie Lewis  <slewis@apple.com>
269
270         Reviewed by Darin Adler.
271
272         https://bugs.webkit.org/show_bug.cgi?id=63298
273         Replace Malloc with FastMalloc to match the rest of wtf.
274
275         * wtf/BlockStack.h:
276         (WTF::::~BlockStack):
277         (WTF::::grow):
278         (WTF::::shrink):
279
280 2011-06-23  Oliver Hunt  <oliver@apple.com>
281
282         Reviewed by Gavin Barraclough.
283
284         Add the ability to dynamically modify linked call sites
285         https://bugs.webkit.org/show_bug.cgi?id=63291
286
287         Add JITWriteBarrier as a writebarrier class that allows
288         reading and writing directly into the code stream.
289
290         This required adding logic to all the assemblers to allow
291         us to read values back out of the instruction stream.
292
293         * JavaScriptCore.xcodeproj/project.pbxproj:
294         * assembler/ARMAssembler.h:
295         (JSC::ARMAssembler::readPointer):
296         * assembler/ARMv7Assembler.h:
297         (JSC::ARMv7Assembler::readPointer):
298         (JSC::ARMv7Assembler::readInt32):
299         (JSC::ARMv7Assembler::decodeTwoWordOp5i6Imm4Reg4EncodedImmFirst):
300         (JSC::ARMv7Assembler::decodeTwoWordOp5i6Imm4Reg4EncodedImmSecond):
301         * assembler/AbstractMacroAssembler.h:
302         (JSC::AbstractMacroAssembler::readPointer):
303         * assembler/MIPSAssembler.h:
304         (JSC::MIPSAssembler::readInt32):
305         (JSC::MIPSAssembler::readPointer):
306         * assembler/MacroAssemblerCodeRef.h:
307         (JSC::MacroAssemblerCodePtr::operator!):
308         * assembler/SH4Assembler.h:
309         (JSC::SH4Assembler::readPCrelativeAddress):
310         (JSC::SH4Assembler::readPointer):
311         (JSC::SH4Assembler::readInt32):
312         * assembler/X86Assembler.h:
313         (JSC::X86Assembler::readPointer):
314         * bytecode/CodeBlock.cpp:
315         (JSC::CodeBlock::visitAggregate):
316         * bytecode/CodeBlock.h:
317         (JSC::MethodCallLinkInfo::seenOnce):
318         (JSC::MethodCallLinkInfo::setSeen):
319         * heap/MarkStack.h:
320         * jit/JIT.cpp:
321         (JSC::JIT::privateCompile):
322         (JSC::JIT::linkCall):
323         (JSC::JIT::linkConstruct):
324         * jit/JITPropertyAccess.cpp:
325         (JSC::JIT::patchMethodCallProto):
326         * jit/JITPropertyAccess32_64.cpp:
327         * jit/JITWriteBarrier.h: Added.
328         (JSC::JITWriteBarrierBase::operator UnspecifiedBoolType*):
329         (JSC::JITWriteBarrierBase::operator!):
330         (JSC::JITWriteBarrierBase::setFlagOnBarrier):
331         (JSC::JITWriteBarrierBase::isFlagged):
332         (JSC::JITWriteBarrierBase::setLocation):
333         (JSC::JITWriteBarrierBase::location):
334         (JSC::JITWriteBarrierBase::JITWriteBarrierBase):
335         (JSC::JITWriteBarrierBase::set):
336         (JSC::JITWriteBarrierBase::get):
337         (JSC::JITWriteBarrier::JITWriteBarrier):
338         (JSC::JITWriteBarrier::set):
339         (JSC::JITWriteBarrier::get):
340         (JSC::MarkStack::append):
341
342 2011-06-23  Gavin Barraclough  <barraclough@apple.com>
343
344         Reviewed by Oliver Hunt.
345
346         https://bugs.webkit.org/show_bug.cgi?id=61585
347         Crash running regexp /(?:(?=g))|(?:m).{2147483648,}/
348
349         This is due to use of int instead of unsigned, bad math around
350         the 2^31 boundary.
351
352         * yarr/YarrInterpreter.cpp:
353         (JSC::Yarr::ByteCompiler::emitDisjunction):
354             - Change some uses of int to unsigned, refactor compare logic to
355               restrict to the range 0..2^32-1 (rather than -2^32-1..2^32-1).
356         * yarr/YarrJIT.cpp:
357         (JSC::Yarr::YarrGenerator::generate):
358         (JSC::Yarr::YarrGenerator::backtrack):
359             - Ditto.
360
361 2011-06-22  Gavin Barraclough  <barraclough@apple.com>
362
363         Reviewed by Sam Weinig.
364
365         https://bugs.webkit.org/show_bug.cgi?id=63218
366         DFG JIT - remove machine type guarantees from graph
367
368         The DFG JIT currently makes assumptions about the types of machine registers
369         that certain nodes will be loaded into. This will be broken as we generate
370         nodes to produce both integer and double code paths. Remove int<->double
371         conversions nodes. This design decision also gave rise to multiple types of
372         constant nodes, requiring separate handling for each type. Merge these back
373         into JSConstant.
374
375         * dfg/DFGAliasTracker.h:
376         (JSC::DFG::AliasTracker::equalIgnoringLaterNumericConversion):
377         * dfg/DFGByteCodeParser.cpp:
378         (JSC::DFG::ByteCodeParser::getToInt32):
379         (JSC::DFG::ByteCodeParser::getToNumber):
380         (JSC::DFG::ByteCodeParser::toInt32):
381         (JSC::DFG::ByteCodeParser::toNumber):
382         (JSC::DFG::ByteCodeParser::isInt32Constant):
383         (JSC::DFG::ByteCodeParser::isDoubleConstant):
384         (JSC::DFG::ByteCodeParser::valueOfInt32Constant):
385         (JSC::DFG::ByteCodeParser::valueOfDoubleConstant):
386         (JSC::DFG::ByteCodeParser::one):
387         (JSC::DFG::ByteCodeParser::predictInt32):
388         * dfg/DFGGraph.cpp:
389         (JSC::DFG::Graph::dump):
390         * dfg/DFGJITCodeGenerator.h:
391         (JSC::DFG::JITCodeGenerator::silentFillGPR):
392         (JSC::DFG::JITCodeGenerator::silentFillFPR):
393         (JSC::DFG::JITCodeGenerator::isJSConstant):
394         (JSC::DFG::JITCodeGenerator::isDoubleConstant):
395         (JSC::DFG::JITCodeGenerator::valueOfJSConstantAsImmPtr):
396         * dfg/DFGJITCompiler.cpp:
397         (JSC::DFG::JITCompiler::fillNumericToDouble):
398         (JSC::DFG::JITCompiler::fillInt32ToInteger):
399         * dfg/DFGJITCompiler.h:
400         (JSC::DFG::JITCompiler::isJSConstant):
401         (JSC::DFG::JITCompiler::isInt32Constant):
402         (JSC::DFG::JITCompiler::isDoubleConstant):
403         (JSC::DFG::JITCompiler::valueOfJSConstant):
404         (JSC::DFG::JITCompiler::valueOfInt32Constant):
405         (JSC::DFG::JITCompiler::valueOfDoubleConstant):
406         * dfg/DFGNode.h:
407         (JSC::DFG::Node::Node):
408         (JSC::DFG::Node::isConstant):
409         (JSC::DFG::Node::notTakenBytecodeOffset):
410         * dfg/DFGNonSpeculativeJIT.cpp:
411         (JSC::DFG::NonSpeculativeJIT::isKnownInteger):
412         (JSC::DFG::NonSpeculativeJIT::isKnownNumeric):
413         (JSC::DFG::NonSpeculativeJIT::compile):
414         * dfg/DFGSpeculativeJIT.cpp:
415         (JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
416         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
417         (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
418         (JSC::DFG::SpeculativeJIT::compile):
419
420 2011-06-23  Jungshik Shin  <jshin@chromium.org>
421
422         Reviewed by Alexey Proskuryakov.
423
424         Add ScriptCodesFromICU.h to wtf/unicode and make necessary changes in
425         build files for ports not using ICU.
426         Add icu/unicode/uscript.h for ports using ICU. It's taken from 
427         ICU 3.6 (the version used on Mac OS 10.5)
428
429         http://bugs.webkit.org/show_bug.cgi?id=20797
430
431         * GNUmakefile.list.am:
432         * JavaScriptCore.gypi:
433         * icu/unicode/uscript.h: Added for UScriptCode enum.
434         * wtf/unicode/ScriptCodesFromICU.h: UScriptCode enum added.
435         * wtf/unicode/icu/UnicodeIcu.h:
436         * wtf/unicode/brew/UnicodeBrew.h:
437         * wtf/unicode/glib/UnicodeGLib.h:
438         * wtf/unicode/qt4/UnicodeQt4.h:
439         * wtf/unicode/wince/UnicodeWinCE.h:
440
441 2011-06-23  Ryuan Choi  <ryuan.choi@samsung.com>
442
443         Reviewed by Andreas Kling.
444
445         [EFL][WK2] Add PLATFORM(EFL) to use UNIX_DOMAIN_SOCKETS.
446         https://bugs.webkit.org/show_bug.cgi?id=63228
447
448         * wtf/Platform.h: Add PLATFORM(EFL) guard.
449
450 2011-06-23  Sheriff Bot  <webkit.review.bot@gmail.com>
451
452         Unreviewed, rolling out r89547.
453         http://trac.webkit.org/changeset/89547
454         https://bugs.webkit.org/show_bug.cgi?id=63252
455
456         "Chrmium crash on start" (Requested by yurys on #webkit).
457
458         * wtf/DynamicAnnotations.cpp:
459         (WTFAnnotateBenignRaceSized):
460         (WTFAnnotateHappensBefore):
461         (WTFAnnotateHappensAfter):
462         * wtf/DynamicAnnotations.h:
463
464 2011-06-23  Timur Iskhodzhanov  <timurrrr@google.com>
465
466         Reviewed by David Levin.
467
468         Make dynamic annotations weak symbols and prevent identical code folding by the linker
469         https://bugs.webkit.org/show_bug.cgi?id=62443
470
471         * wtf/DynamicAnnotations.cpp:
472         (WTFAnnotateBenignRaceSized):
473         (WTFAnnotateHappensBefore):
474         (WTFAnnotateHappensAfter):
475         * wtf/DynamicAnnotations.h:
476
477 2011-06-22  Yael Aharon  <yael.aharon@nokia.com>
478
479         Reviewed by Andreas Kling.
480
481         [Qt] Add a build flag for building with libxml2 and libxslt.
482         https://bugs.webkit.org/show_bug.cgi?id=63113
483
484         * wtf/Platform.h:
485
486 2011-06-22  Sheriff Bot  <webkit.review.bot@gmail.com>
487
488         Unreviewed, rolling out r89489.
489         http://trac.webkit.org/changeset/89489
490         https://bugs.webkit.org/show_bug.cgi?id=63203
491
492         Broke chromium mac build on build.webkit.org (Requested by
493         abarth on #webkit).
494
495         * wtf/Platform.h:
496
497 2011-06-22  Cary Clark  <caryclark@google.com>
498
499         Reviewed by Darin Fisher.
500
501         Use Skia if Skia on Mac Chrome is enabled
502         https://bugs.webkit.org/show_bug.cgi?id=62999
503
504         * wtf/Platform.h:
505         Add switch to use Skia if, externally,
506         Skia has been enabled by a gyp define.
507
508 2011-06-22  Geoffrey Garen  <ggaren@apple.com>
509
510         Reviewed by Oliver Hunt.
511
512         * interpreter/RegisterFile.h: Removed unnecessary #include <stdio.h>.
513
514 2011-06-22  Geoffrey Garen  <ggaren@apple.com>
515
516         Reviewed by Oliver Hunt.
517
518         Removed the conceit that global variables are local variables when running global code
519         https://bugs.webkit.org/show_bug.cgi?id=63106
520         
521         This is required for write barrier correctness.
522         
523         SunSpider reports about a 0.5% regression, mostly from bitops-bitwise-and.js.
524         I was able to reduce the regression with a tiny peephole optimization in
525         the bytecompiler, but not eliminate it. I'm committing this assuming
526         that turning on generational GC will win back at least 0.5%.
527
528         (FWIW, the DFG JIT can easily eliminate any regression by sharing loads of
529         the global object's var storage. I considered doing the same kind of
530         optimization in the existing JIT, but it seemed like moving in the wrong
531         direction.)
532
533         * bytecompiler/BytecodeGenerator.cpp:
534         (JSC::BytecodeGenerator::addGlobalVar):
535         (JSC::BytecodeGenerator::BytecodeGenerator): Don't give global variables
536         negative indices, since they're no longer negatively offset from the
537         current stack frame.
538         
539         Do give global variables monotonically increasing positive indices, since
540         that's much easier to work with.
541         
542         Don't limit the number of optimizable global variables, since it's no
543         longer limited by the register file, since they're no longer stored in
544         the register file.
545
546         (JSC::BytecodeGenerator::registerFor): Global code never has any local
547         registers because a var in global code is actually a property of the
548         global object.
549
550         (JSC::BytecodeGenerator::constRegisterFor): Ditto.
551
552         (JSC::BytecodeGenerator::emitResolve): Did a tiny bit of constant
553         propagation and dead code elimination to speed up our compiles and
554         reduce WTFs / minute.
555
556         * bytecompiler/BytecodeGenerator.h:
557         (JSC::BytecodeGenerator::registerFor): Removed special handling of globals.
558
559         (JSC::BytecodeGenerator::shouldOptimizeLocals): Don't optimize locals in
560         global code, since there are none.
561
562         (JSC::BytecodeGenerator::canOptimizeNonLocals): Do optimize non-locals
563         in global code (i.e., global vars), since there are some.
564
565         * interpreter/Interpreter.cpp:
566         (JSC::Interpreter::callEval):
567         (JSC::Interpreter::Interpreter):
568         (JSC::Interpreter::dumpRegisters):
569         (JSC::Interpreter::execute):
570         * interpreter/Interpreter.h: Updated for deleted / renamed code.
571
572         * interpreter/RegisterFile.cpp:
573         (JSC::RegisterFile::gatherConservativeRoots):
574         (JSC::RegisterFile::releaseExcessCapacity): Updated for deleted / renamed
575         data members.
576
577         * interpreter/RegisterFile.h:
578         (JSC::RegisterFile::begin):
579         (JSC::RegisterFile::size):
580         (JSC::RegisterFile::RegisterFile):
581         (JSC::RegisterFile::shrink): Removed all code and comments dealing with
582         global variables stored in the register file.
583
584         (JSC::RegisterFile::grow): Updated for same.
585         
586         Also, a slight correctness fix: Test the VM commit end, and not just the
587         in-use end, when checking for stack overflow. In theory, it's invalid to
588         commit past the end of your allocation, even if you never touch that
589         memory. This makes the usable size of the stack slightly smaller. No test
590         because we don't know of any case in practice where this crashes.
591
592         * runtime/JSGlobalData.cpp:
593         (JSC::JSGlobalData::JSGlobalData): Updated for changes above.
594
595         * runtime/JSGlobalObject.cpp:
596         (JSC::JSGlobalObject::resizeRegisters):
597         (JSC::JSGlobalObject::addStaticGlobals):
598         * runtime/JSGlobalObject.h: Simplified globals to have monotonically 
599         increasing indexes, always located in our external storage.
600
601 2011-06-21  MORITA Hajime  <morrita@google.com>
602
603         Unreviewed, rolling out r89401 and r89403.
604         http://trac.webkit.org/changeset/89401
605         http://trac.webkit.org/changeset/89403
606         https://bugs.webkit.org/show_bug.cgi?id=62970
607
608         Breaks mac build and mistakenly enables the spellcheck API
609
610         * Configurations/FeatureDefines.xcconfig:
611         * JavaScriptCore.xcodeproj/project.pbxproj:
612
613 2011-06-21  Kent Tamura  <tkent@chromium.org>
614
615         [Mac] Sort Xcode project files.
616
617         * JavaScriptCore.xcodeproj/project.pbxproj:
618
619 2011-06-20  MORITA Hajime  <morrita@google.com>
620
621         Reviewed by Kent Tamura.
622
623         Spellcheck API should be build-able.
624         https://bugs.webkit.org/show_bug.cgi?id=62970
625
626         No new tests, changing only build related files
627         
628         * Configurations/FeatureDefines.xcconfig:
629
630 2011-06-21  Geoffrey Garen  <ggaren@apple.com>
631
632         Reviewed by Oliver Hunt.
633
634         Moved 'const' off the global-variable-as-local-variable crack pipe
635         https://bugs.webkit.org/show_bug.cgi?id=63105
636         
637         This is necessary for moving the rest of the code off of same.
638         
639         Many problems remain in our handling of const. I have fixed none of them.
640
641         * bytecompiler/BytecodeGenerator.h:
642         (JSC::BytecodeGenerator::scopeChain): New accessor, needed to enable
643         const to directly implement its unique scoping rules.
644
645         * bytecompiler/NodesCodegen.cpp:
646         (JSC::PrefixResolveNode::emitBytecode): Do specify that our resolve is
647         for writing, so we don't overwrite const variables.
648
649         (JSC::ConstDeclNode::emitCodeSingle): Don't assume that all declared const
650         variables are available as local variables, since this won't be the case
651         once global variables are not available as local variables. Instead, use
652         put_scoped_var in the case where there is no local variable. Like a local
653         variable, put_scoped_var succeeds even though const properties are
654         read-only, since put_scoped_var skips read-only checks. (Yay?)
655
656 2011-06-21  Oliver Hunt  <oliver@apple.com>
657
658         Reviewed by Alexey Proskuryakov.
659
660         REGRESSION(r89257): It broke 2 jscore tests (Requested by Ossy_away on #webkit).
661         https://bugs.webkit.org/show_bug.cgi?id=63052
662
663         Release mode only failure, the stack overflow guards were getting there error
664         handling inlined, so that they were essentially causing their own demise.
665
666         * parser/JSParser.cpp:
667         (JSC::JSParser::updateErrorMessage):
668         (JSC::JSParser::updateErrorWithNameAndMessage):
669
670 2011-06-20  Kenneth Russell  <kbr@google.com>
671
672         Unreviewed.
673
674         Rolled out r89233 and r89235 because of crashes in http/tests/misc/acid3.html on Snow Leopard and other platforms
675         https://bugs.webkit.org/show_bug.cgi?id=63022
676
677         * wtf/Platform.h:
678
679 2011-06-18  Anders Carlsson  <andersca@apple.com>
680
681         Reviewed by Darin Adler.
682
683         Disallow assigning into PassOwnArrayPtr, PassOwnPtr and PassRefPtr
684         https://bugs.webkit.org/show_bug.cgi?id=62940
685
686         Remove clear() and all assignment operators except one which now has a COMPILE_ASSERT.
687
688         * wtf/PassOwnArrayPtr.h:
689         (WTF::PassOwnArrayPtr::operator=):
690         * wtf/PassOwnPtr.h:
691         (WTF::PassOwnPtr::operator=):
692         * wtf/PassRefPtr.h:
693         (WTF::PassRefPtr::operator=):
694         (WTF::NonNullPassRefPtr::operator=):
695
696 2011-06-20  Oliver Hunt  <oliver@apple.com>
697
698         Reviewed by Darin Adler.
699
700         REGRESSION (r79060): Searching for a flight at united.com fails
701         https://bugs.webkit.org/show_bug.cgi?id=63003
702
703         This original change also broke Twitter, and we attempted to refine the fix to 
704         address that problem (http://trac.webkit.org/changeset/80542), but since it still breaks United,
705         we need to revert the change until we understand the problem better.
706
707         * wtf/DateMath.cpp:
708         (WTF::parseDateFromNullTerminatedCharacters):
709
710 2011-06-20  Juan C. Montemayor  <jmont@apple.com>
711
712         Reviewed by Oliver Hunt.
713
714         No context for javascript parse errors.
715         https://bugs.webkit.org/show_bug.cgi?id=62613
716         
717         Parse errors now show more details like:
718         "Unexpected token: ]"
719         or
720         "Expected token: while"
721         
722         For reserved names, numbers, indentifiers, strings, lexer errors, 
723         and EOFs, the following error messages are printed:
724         
725         "Use of reserved word: super"
726         "Unexpected number: 42"
727         "Unexpected identifier: "
728         "Unexpected string: "foobar""
729         "Invalid token character sequence: \u4023"
730         "Unexpected EOF"
731
732         * parser/JSParser.cpp:
733         (JSC::JSParser::consume):
734         (JSC::JSParser::getToken):
735         (JSC::JSParser::getTokenName):
736         (JSC::JSParser::updateErrorMessageSpecialCase):
737         (JSC::JSParser::updateErrorMessage):
738         (JSC::JSParser::updateErrorWithNameAndMessage):
739         (JSC::jsParse):
740         (JSC::JSParser::JSParser):
741         (JSC::JSParser::parseProgram):
742         (JSC::JSParser::parseVarDeclarationList):
743         (JSC::JSParser::parseForStatement):
744         (JSC::JSParser::parseBreakStatement):
745         (JSC::JSParser::parseContinueStatement):
746         (JSC::JSParser::parseWithStatement):
747         (JSC::JSParser::parseTryStatement):
748         (JSC::JSParser::parseStatement):
749         (JSC::JSParser::parseFormalParameters):
750         (JSC::JSParser::parseFunctionInfo):
751         (JSC::JSParser::parseAssignmentExpression):
752         (JSC::JSParser::parsePrimaryExpression):
753         (JSC::JSParser::parseMemberExpression):
754         (JSC::JSParser::parseUnaryExpression):
755         * parser/JSParser.h:
756         * parser/Lexer.cpp:
757         (JSC::Lexer::lex):
758         * parser/Parser.cpp:
759         (JSC::Parser::parse):
760
761 2011-06-20  Nikolas Zimmermann  <nzimmermann@rim.com>
762
763         Reviewed by Rob Buis.
764
765         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
766         https://bugs.webkit.org/show_bug.cgi?id=59085
767
768         * wtf/Platform.h: Force Qt-EWS into a full rebuild, otherwhise this patch breaks the EWS.
769
770 2011-06-19  Oliver Hunt  <oliver@apple.com>
771
772         Reviewed by Sam Weinig.
773
774         Correct logic for putting errors on the correct line when handling JSONP
775         https://bugs.webkit.org/show_bug.cgi?id=62962
776
777         Minor fix for the minor fix.  *sigh*
778
779         * interpreter/Interpreter.cpp:
780         (JSC::Interpreter::execute):
781
782 2011-06-19  Oliver Hunt  <oliver@apple.com>
783
784         Minor fix to correct layout test results.
785
786         * interpreter/Interpreter.cpp:
787         (JSC::Interpreter::execute):
788
789 2011-06-17  Oliver Hunt  <oliver@apple.com>
790
791         Reviewed by Gavin Barraclough.
792
793         JSONP is unnecessarily slow
794         https://bugs.webkit.org/show_bug.cgi?id=62920
795
796         JSONP has unfortunately become a fairly common idiom online, yet
797         it triggers very poor performance in JSC as we end up doing codegen
798         for a large number of property accesses that will
799            * only be run once, so the vast amount of logic we dump to handle
800              caching of accesses is unnecessary.
801            * We are doing codegen that is directly proportional to just
802              creating the object in the first place.
803
804         This patch extends the use of the literal parser to JSONP-like structures
805         in global code, handling a number of different forms I have seen online.
806         In an extreme case this improves performance of JSONP by more than 2x
807         due to removal of code generation and execution time, and a few optimisations
808         that I made to the parser itself.
809
810         * API/JSValueRef.cpp:
811         (JSValueMakeFromJSONString):
812         * interpreter/Interpreter.cpp:
813         (JSC::Interpreter::callEval):
814         (JSC::Interpreter::execute):
815         * parser/Lexer.cpp:
816         (JSC::Lexer::isKeyword):
817         * parser/Lexer.h:
818         * runtime/JSGlobalObjectFunctions.cpp:
819         (JSC::globalFuncEval):
820         * runtime/JSONObject.cpp:
821         (JSC::JSONProtoFuncParse):
822         * runtime/LiteralParser.cpp:
823         (JSC::LiteralParser::tryJSONPParse):
824         (JSC::LiteralParser::makeIdentifier):
825         (JSC::LiteralParser::Lexer::lex):
826         (JSC::LiteralParser::Lexer::next):
827         (JSC::isSafeStringCharacter):
828         (JSC::LiteralParser::Lexer::lexString):
829         (JSC::LiteralParser::Lexer::lexNumber):
830         (JSC::LiteralParser::parse):
831         * runtime/LiteralParser.h:
832         (JSC::LiteralParser::LiteralParser):
833         (JSC::LiteralParser::tryLiteralParse):
834         (JSC::LiteralParser::Lexer::Lexer):
835
836 2011-06-18  Sheriff Bot  <webkit.review.bot@gmail.com>
837
838         Unreviewed, rolling out r89184.
839         http://trac.webkit.org/changeset/89184
840         https://bugs.webkit.org/show_bug.cgi?id=62927
841
842         It broke 22 tests on all bot (Requested by Ossy_weekend on
843         #webkit).
844
845         * API/JSValueRef.cpp:
846         (JSValueMakeFromJSONString):
847         * interpreter/Interpreter.cpp:
848         (JSC::Interpreter::callEval):
849         (JSC::Interpreter::execute):
850         * parser/Lexer.cpp:
851         * parser/Lexer.h:
852         * runtime/JSGlobalObjectFunctions.cpp:
853         (JSC::globalFuncEval):
854         * runtime/JSONObject.cpp:
855         (JSC::JSONProtoFuncParse):
856         * runtime/LiteralParser.cpp:
857         (JSC::LiteralParser::Lexer::lex):
858         (JSC::isSafeStringCharacter):
859         (JSC::LiteralParser::Lexer::lexString):
860         (JSC::LiteralParser::Lexer::lexNumber):
861         (JSC::LiteralParser::parse):
862         * runtime/LiteralParser.h:
863         (JSC::LiteralParser::LiteralParser):
864         (JSC::LiteralParser::tryLiteralParse):
865         (JSC::LiteralParser::Lexer::Lexer):
866         (JSC::LiteralParser::Lexer::next):
867
868 2011-06-17  Oliver Hunt  <oliver@apple.com>
869
870         Reviewed by Gavin Barraclough.
871
872         JSONP is unnecessarily slow
873         https://bugs.webkit.org/show_bug.cgi?id=62920
874
875         JSONP has unfortunately become a fairly common idiom online, yet
876         it triggers very poor performance in JSC as we end up doing codegen
877         for a large number of property accesses that will
878            * only be run once, so the vast amount of logic we dump to handle
879              caching of accesses is unnecessary.
880            * We are doing codegen that is directly proportional to just
881              creating the object in the first place.
882
883         This patch extends the use of the literal parser to JSONP-like structures
884         in global code, handling a number of different forms I have seen online.
885         In an extreme case this improves performance of JSONP by more than 2x
886         due to removal of code generation and execution time, and a few optimisations
887         that I made to the parser itself.
888
889         * API/JSValueRef.cpp:
890         (JSValueMakeFromJSONString):
891         * interpreter/Interpreter.cpp:
892         (JSC::Interpreter::callEval):
893         (JSC::Interpreter::execute):
894         * parser/Lexer.cpp:
895         (JSC::Lexer::isKeyword):
896         * parser/Lexer.h:
897         * runtime/JSGlobalObjectFunctions.cpp:
898         (JSC::globalFuncEval):
899         * runtime/JSONObject.cpp:
900         (JSC::JSONProtoFuncParse):
901         * runtime/LiteralParser.cpp:
902         (JSC::LiteralParser::tryJSONPParse):
903         (JSC::LiteralParser::makeIdentifier):
904         (JSC::LiteralParser::Lexer::lex):
905         (JSC::LiteralParser::Lexer::next):
906         (JSC::isSafeStringCharacter):
907         (JSC::LiteralParser::Lexer::lexString):
908         (JSC::LiteralParser::Lexer::lexNumber):
909         (JSC::LiteralParser::parse):
910         * runtime/LiteralParser.h:
911         (JSC::LiteralParser::LiteralParser):
912         (JSC::LiteralParser::tryLiteralParse):
913         (JSC::LiteralParser::Lexer::Lexer):
914
915 2011-06-17  Geoffrey Garen  <ggaren@apple.com>
916
917         Reviewed by Oliver Hunt.
918
919         Moved some property access JIT code into property access JIT files
920         https://bugs.webkit.org/show_bug.cgi?id=62906
921
922         * jit/JITOpcodes.cpp:
923         * jit/JITOpcodes32_64.cpp:
924         * jit/JITPropertyAccess.cpp:
925         (JSC::JIT::emitSlow_op_put_by_val):
926         (JSC::JIT::emit_op_get_scoped_var):
927         (JSC::JIT::emit_op_put_scoped_var):
928         (JSC::JIT::emit_op_get_global_var):
929         (JSC::JIT::emit_op_put_global_var):
930         * jit/JITPropertyAccess32_64.cpp:
931         (JSC::JIT::emit_op_get_scoped_var):
932         (JSC::JIT::emit_op_put_scoped_var):
933         (JSC::JIT::emit_op_get_global_var):
934         (JSC::JIT::emit_op_put_global_var):
935
936 2011-06-17  Anders Carlsson  <andersca@apple.com>
937
938         Build fix.
939
940         * JavaScriptCore.xcodeproj/project.pbxproj:
941
942 2011-06-17  Geoffrey Garen  <ggaren@apple.com>
943
944         Try to fix the Leopard build?
945
946         * JavaScriptCore.xcodeproj/project.pbxproj:
947
948 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
949
950         Reviewed by Oliver Hunt.
951
952         Added some write barrier action, compiled out by default
953         https://bugs.webkit.org/show_bug.cgi?id=62844
954
955         * JavaScriptCore.exp: Build!
956
957         * JavaScriptCore.xcodeproj/project.pbxproj: Fixed an incremental build
958         issue with Heap.cpp.
959
960         * heap/Heap.cpp:
961         (JSC::Heap::writeBarrierSlowCase):
962         * heap/Heap.h:
963         (JSC::Heap::writeBarrier):
964         * heap/MarkedBlock.h:
965         (JSC::MarkedBlock::isAtomAligned):
966         (JSC::MarkedBlock::blockFor):
967         (JSC::MarkedBlock::atomNumber):
968         (JSC::MarkedBlock::ownerSetNumber):
969         (JSC::MarkedBlock::addOldSpaceOwner):
970         (JSC::MarkedBlock::OwnerSet::OwnerSet):
971         (JSC::MarkedBlock::OwnerSet::add):
972         (JSC::MarkedBlock::OwnerSet::clear):
973         (JSC::MarkedBlock::OwnerSet::size):
974         (JSC::MarkedBlock::OwnerSet::didOverflow):
975         (JSC::MarkedBlock::OwnerSet::owners): Added a basic write barrier that
976         tracks owners for regions within blocks. Currently unused.
977
978 2011-06-17  Raphael Kubo da Costa  <kubo@profusion.mobi>
979
980         Reviewed by Eric Seidel.
981
982         [EFL] Add some OwnPtr specializations for EFL types.
983         For now there are specializations for Ecore_Evas and Evas_Object.
984         https://bugs.webkit.org/show_bug.cgi?id=62877
985
986         * wtf/CMakeListsEfl.txt:
987         * wtf/OwnPtrCommon.h:
988         * wtf/efl/OwnPtrEfl.cpp: Added.
989         (WTF::deleteOwnedPtr):
990
991 2011-06-17  Joone Hur  <joone.hur@collabora.co.uk>
992
993         Reviewed by Martin Robinson.
994
995         [GTK] Replace GdkRectangle by cairo_rectangle_int_t
996         https://bugs.webkit.org/show_bug.cgi?id=60687
997
998         Replace GdkRectangle by cairo_rectangle_int_t.
999
1000         * wtf/gobject/GTypedefs.h: Replace GdkRectangle by cairo_rectangle_int_t.
1001
1002 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
1003
1004         Reviewed by Oliver Hunt.
1005
1006         https://bugs.webkit.org/show_bug.cgi?id=53014
1007         ES5 strict mode keyword restrictions aren't implemented
1008
1009         The following are future restricted words is strict mode code:
1010             implements, interface, let, package, private, protected, public, static, yield
1011
1012         * parser/JSParser.h:
1013             - Add RESERVED_IF_STRICT token.
1014         * parser/Keywords.table:
1015             - Add new future restricted words.
1016         * parser/Lexer.cpp:
1017         (JSC::Lexer::parseIdentifier):
1018             - Check for RESERVED_IF_STRICT; in nonstrict code this is converted to IDENT.
1019         (JSC::Lexer::lex):
1020             - Pass strictMode flag to parseIdentifier.
1021         * parser/Lexer.h:
1022             - parseIdentifier needs a strictMode flag.
1023         * runtime/CommonIdentifiers.h:
1024             - Add identifiers for new reserved words.
1025
1026 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
1027
1028         Reviewed by Oliver Hunt.
1029
1030         https://bugs.webkit.org/show_bug.cgi?id=23611
1031         Multiline Javascript comments cause incorrect parsing of following script.
1032
1033         From the spec:
1034         "A MultiLineComment [is] simply discarded if it contains no line terminator,
1035         but if a MultiLineComment contains one or more line terminators, then it is
1036         replaced with a single line terminator, which becomes part of the stream of
1037         inputs for the syntactic grammar." 
1038
1039         This may result in behavioural changes, due to automatic semicolon insertion.
1040
1041         * parser/Lexer.cpp:
1042         (JSC::Lexer::parseMultilineComment):
1043             - Set m_terminator is we see a line terminator in a multiline comment.
1044
1045 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
1046
1047         Reviewed by Sam Weinig.
1048
1049         https://bugs.webkit.org/show_bug.cgi?id=62824
1050         DFG JIT - add support for branch-fusion of compareEq, JSValue comparisons in SpeculativeJIT
1051
1052         CompareEq of non-integer values is the most common cause of speculation failure.
1053
1054         * dfg/DFGSpeculativeJIT.cpp:
1055         (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
1056             - Support Equals.
1057         (JSC::DFG::SpeculativeJIT::compilePeepHoleEq):
1058             - new! - peephole optimized Eq of JSValues.
1059         (JSC::DFG::SpeculativeJIT::compile):
1060             - Add peephole optimization for CompareEq.
1061         * dfg/DFGSpeculativeJIT.h:
1062         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
1063             - Add support for dead nodes between compare & branch.
1064         (JSC::DFG::SpeculativeJIT::isInteger):
1065             - Added to determine which form of peephole to do in CompareEq.
1066
1067 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
1068
1069         Try to fix the Windows build.
1070
1071         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export another
1072         symbol.
1073
1074         * bytecode/EvalCodeCache.h:
1075         * heap/HandleHeap.h:
1076         * heap/HeapRootVisitor.h:
1077         * heap/NewSpace.h:
1078         * runtime/ArgList.h:
1079         * runtime/ScopeChain.h:
1080         * runtime/SmallStrings.h:
1081         * runtime/Structure.h: Stop forward-declaring things that don't really
1082         exist anymore.
1083
1084 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
1085
1086         Try to fix the Mac build: Removed and re-added SlotVisitor.h to the Xcode
1087         project while crossing my fingers and facing west.
1088
1089         * JavaScriptCore.xcodeproj/project.pbxproj:
1090
1091 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
1092
1093         Build fix: Removed an incorrect symbol on Windows.
1094
1095         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1096
1097 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
1098
1099         Build fix: Removed an accidental commit from the future.
1100
1101         * CMakeLists.txt:
1102
1103 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
1104
1105         Reviewed by Oliver Hunt.
1106
1107         Introduced SlotVisitor into the project
1108         https://bugs.webkit.org/show_bug.cgi?id=62820
1109         
1110         This resolves a class vs typedef forward declaration issue, and gives all
1111         exported symbols the correct names.
1112
1113         * CMakeLists.txt:
1114         * GNUmakefile.list.am:
1115         * JavaScriptCore.exp:
1116         * JavaScriptCore.gypi:
1117         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1118         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
1119
1120         * bytecode/EvalCodeCache.h:
1121         * heap/HandleHeap.h:
1122         * heap/Heap.cpp:
1123         (JSC::Heap::Heap):
1124         (JSC::Heap::markRoots):
1125         * heap/Heap.h:
1126         * heap/HeapRootVisitor.h: Replaced MarkStack with SlotVisitor. Now no
1127         clients operate on a MarkStack.
1128
1129         * heap/MarkStack.cpp:
1130         (JSC::SlotVisitor::visitChildren):
1131         (JSC::SlotVisitor::drain):
1132         * heap/SlotVisitor.h: Added.
1133         (JSC::SlotVisitor::SlotVisitor): Used 'protected' and a little cheesy
1134         inheritance to give SlotVisitor all the attributes of MarkStack without
1135         making this change giant. Over time, we will move more behavior into
1136         SlotVisitor and its subclasses.
1137
1138         * heap/MarkStack.h:
1139         * heap/NewSpace.h: Replaced MarkStack with SlotVisitor. Now no
1140         clients operate on a MarkStack.
1141
1142         * runtime/ArgList.h:
1143         * runtime/JSCell.h:
1144         * runtime/JSObject.h:
1145         * runtime/ScopeChain.h:
1146         * runtime/SmallStrings.h:
1147         * runtime/Structure.h: Replaced MarkStack with SlotVisitor. Now no
1148         clients operate on a MarkStack.
1149
1150 2011-06-15  Oliver Hunt  <oliver@apple.com>
1151
1152         Reviewed by Geoffrey Garen.
1153
1154         Reduce memory usage of resolve_global
1155         https://bugs.webkit.org/show_bug.cgi?id=62765
1156
1157         If we have a large number of resolve_globals in a single
1158         block start planting plain resolve instructions instead 
1159         whenever we aren't in a loop.  This allows us to reduce
1160         the code size for extremely large functions without
1161         losing the performance benefits of op_resolve_global.
1162
1163         * bytecode/CodeBlock.h:
1164         (JSC::CodeBlock::globalResolveInfoCount):
1165         * bytecompiler/BytecodeGenerator.cpp:
1166         (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
1167         (JSC::BytecodeGenerator::emitResolve):
1168         (JSC::BytecodeGenerator::emitResolveWithBase):
1169         * bytecompiler/BytecodeGenerator.h:
1170
1171 2011-06-16  Qi Zhang  <qi.2.zhang@nokia.com>
1172
1173         Reviewed by Laszlo Gombos.
1174
1175         [Qt] Fix building with CONFIG(use_system_icu)
1176         https://bugs.webkit.org/show_bug.cgi?id=62744
1177
1178         Do not define WTF_USE_QT4_UNICODE if WTF_USE_ICU_UNICODE is set.
1179
1180         * wtf/Platform.h:
1181
1182 2011-06-15  Darin Adler  <darin@apple.com>
1183
1184         Reviewed by Adam Barth.
1185
1186         Remove obsolete LOOSE_OWN_PTR code
1187         https://bugs.webkit.org/show_bug.cgi?id=59909
1188
1189         The internal Apple dependency on this is gone now.
1190
1191         * wtf/OwnArrayPtr.h: Removed constructor that takes a raw pointer,
1192         set function that takes a raw pointer.
1193
1194         * wtf/OwnPtr.h: Removed constructor that takes a raw pointer,
1195         set functino that takes a raw pointer.
1196
1197         * wtf/PassOwnArrayPtr.h: Made constructor that takes a nullptr
1198         and assignment operator that takes a nullptr unconditional.
1199         Made constructor that takes a raw pointer private and explicit,
1200         and removed assignment operator that takes a raw pointer.
1201
1202         * wtf/PassOwnPtr.h: Made assignment operator that takes a nullptr
1203         unconditional. Made constructor that takes a raw pointer private
1204         and explicit, and removed assignment operator that takes a raw pointer.
1205
1206 2011-06-15  Sam Weinig  <sam@webkit.org>
1207
1208         Reviewed by Geoffrey Garen and Gavin Barraclough.
1209
1210         Make access-nseive ~9x faster on the non-speculative path by
1211         adding special casing for doubles that can lossless-ly be converted
1212         to a uint32_t in getByVal and putByVal. This avoids calls to stringification
1213         and the hash lookup.  Long term, we should try and get property of a getByVal
1214         and putByVal to be an integer immediate even in the non-speculative path.
1215
1216         * dfg/DFGOperations.cpp:
1217         (JSC::DFG::putByVal):
1218         (JSC::DFG::operationPutByValInternal):
1219
1220 2011-06-15  Oliver Hunt  <oliver@apple.com>
1221
1222         Reviewed by Darin Adler.
1223
1224         REGRESSION (r88719): 5by5.tv schedule is not visible
1225         https://bugs.webkit.org/show_bug.cgi?id=62720
1226
1227         Problem here is that the lexer wasn't considering '$' to be
1228         a valid character in an identifier.
1229
1230         * parser/Lexer.h:
1231         (JSC::Lexer::lexExpectIdentifier):
1232
1233 2011-06-15  Oliver Hunt  <oliver@apple.com>
1234
1235         Reviewed by Sam Weinig.
1236
1237         Reduce the size of global_resolve
1238         https://bugs.webkit.org/show_bug.cgi?id=62738
1239
1240         Reduce the code size of global_resolve in the JIT by replacing
1241         multiple pointer loads with a single pointer move + two offset
1242         loads.
1243
1244         * jit/JITOpcodes.cpp:
1245         (JSC::JIT::emit_op_resolve_global):
1246         * jit/JITOpcodes32_64.cpp:
1247         (JSC::JIT::emit_op_resolve_global):
1248
1249 2011-06-14  Geoffrey Garen  <ggaren@apple.com>
1250
1251         Reviewed by Dan Bernstein.
1252
1253         Fixed an inavlid ASSERT I found while investigating
1254         <rdar://problem/9580254> Crash in JSC::HandleHeap::finalizeWeakHandles + 92
1255         https://bugs.webkit.org/show_bug.cgi?id=62699        
1256
1257         No test since we don't know of a way to get WebCore to deallocate the
1258         next-to-finalize handle, which is also the last handle in the list,
1259         while finalizing the second-to-last handle in the list.
1260
1261         * heap/HandleHeap.h:
1262         (JSC::HandleHeap::deallocate): Don't ASSERT that m_nextToFinalize has a
1263         non-0 next() after updating it, since it is valid to update m_nextToFinalize
1264         to point to the tail sentinel.
1265         
1266         Do ASSERT that m_nextToFinalize has a non-0 next() before updating it,
1267         since it is not valid to update m_nextToFinalize to point past the tail
1268         sentinel.
1269         
1270         Also, use m_nextToFinalize consistently for clarity.
1271
1272 2011-06-14  Gavin Barraclough  <barraclough@apple.com>
1273
1274         Reviewed by Sam Weinig.
1275
1276         https://bugs.webkit.org/show_bug.cgi?id=43841
1277         SegmentedVector::operator== typo
1278
1279         * wtf/SegmentedVector.h:
1280         (WTF::SegmentedVectorIterator::operator==):
1281         (WTF::SegmentedVectorIterator::operator!=):
1282
1283 2011-06-14  Oliver Hunt  <oliver@apple.com>
1284
1285         Reviewed by Gavin Barraclough.
1286
1287         Constant array literals result in unnecessarily large amounts of code
1288         https://bugs.webkit.org/show_bug.cgi?id=62658
1289
1290         Add a new version of op_new_array that simply copies values from a buffer
1291         we hang off of the CodeBlock, rather than generating code to place each
1292         entry into the registerfile, and then copying it from the registerfile into
1293         the array.  This is a slight improvement on some sunspider tests, but no
1294         measurable overall change.  That's okay though as our goal was to reduce
1295         code size without hurting performance.
1296
1297         * bytecode/CodeBlock.cpp:
1298         (JSC::CodeBlock::dump):
1299         * bytecode/CodeBlock.h:
1300         (JSC::CodeBlock::addImmediateBuffer):
1301         (JSC::CodeBlock::immediateBuffer):
1302         * bytecode/Opcode.h:
1303         * bytecompiler/BytecodeGenerator.cpp:
1304         (JSC::BytecodeGenerator::addImmediateBuffer):
1305         (JSC::BytecodeGenerator::emitNewArray):
1306         * bytecompiler/BytecodeGenerator.h:
1307         * bytecompiler/NodesCodegen.cpp:
1308         (JSC::ArrayNode::emitBytecode):
1309         * interpreter/Interpreter.cpp:
1310         (JSC::Interpreter::privateExecute):
1311         * jit/JIT.cpp:
1312         (JSC::JIT::privateCompileMainPass):
1313         * jit/JIT.h:
1314         * jit/JITOpcodes.cpp:
1315         (JSC::JIT::emit_op_new_array):
1316         (JSC::JIT::emit_op_new_array_buffer):
1317         * jit/JITOpcodes32_64.cpp:
1318         * jit/JITStubs.cpp:
1319         (JSC::DEFINE_STUB_FUNCTION):
1320         * jit/JITStubs.h:
1321
1322 2011-06-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1323
1324         Unreviewed, rolling out r88841.
1325         http://trac.webkit.org/changeset/88841
1326         https://bugs.webkit.org/show_bug.cgi?id=62672
1327
1328         Caused many tests to crash (Requested by rniwa on #webkit).
1329
1330         * bytecode/CodeBlock.cpp:
1331         (JSC::CodeBlock::dump):
1332         * bytecode/CodeBlock.h:
1333         * bytecode/Opcode.h:
1334         * bytecompiler/BytecodeGenerator.cpp:
1335         (JSC::BytecodeGenerator::emitNewArray):
1336         * bytecompiler/BytecodeGenerator.h:
1337         * bytecompiler/NodesCodegen.cpp:
1338         (JSC::ArrayNode::emitBytecode):
1339         * interpreter/Interpreter.cpp:
1340         (JSC::Interpreter::privateExecute):
1341         * jit/JIT.cpp:
1342         (JSC::JIT::privateCompileMainPass):
1343         * jit/JIT.h:
1344         * jit/JITOpcodes.cpp:
1345         (JSC::JIT::emit_op_new_array):
1346         * jit/JITOpcodes32_64.cpp:
1347         (JSC::JIT::emit_op_new_array):
1348         * jit/JITStubs.cpp:
1349         * jit/JITStubs.h:
1350
1351 2011-06-14  Oliver Hunt  <oliver@apple.com>
1352
1353         Reviewed by Gavin Barraclough.
1354
1355         Constant array literals result in unnecessarily large amounts of code
1356         https://bugs.webkit.org/show_bug.cgi?id=62658
1357
1358         Add a new version of op_new_array that simply copies values from a buffer
1359         we hang off of the CodeBlock, rather than generating code to place each
1360         entry into the registerfile, and then copying it from the registerfile into
1361         the array.  This is a slight improvement on some sunspider tests, but no
1362         measurable overall change.  That's okay though as our goal was to reduce
1363         code size without hurting performance.
1364
1365         * bytecode/CodeBlock.cpp:
1366         (JSC::CodeBlock::dump):
1367         * bytecode/CodeBlock.h:
1368         (JSC::CodeBlock::addImmediateBuffer):
1369         (JSC::CodeBlock::immediateBuffer):
1370         * bytecode/Opcode.h:
1371         * bytecompiler/BytecodeGenerator.cpp:
1372         (JSC::BytecodeGenerator::addImmediateBuffer):
1373         (JSC::BytecodeGenerator::emitNewArray):
1374         * bytecompiler/BytecodeGenerator.h:
1375         * bytecompiler/NodesCodegen.cpp:
1376         (JSC::ArrayNode::emitBytecode):
1377         * interpreter/Interpreter.cpp:
1378         (JSC::Interpreter::privateExecute):
1379         * jit/JIT.cpp:
1380         (JSC::JIT::privateCompileMainPass):
1381         * jit/JIT.h:
1382         * jit/JITOpcodes.cpp:
1383         (JSC::JIT::emit_op_new_array):
1384         (JSC::JIT::emit_op_new_array_buffer):
1385         * jit/JITOpcodes32_64.cpp:
1386         * jit/JITStubs.cpp:
1387         (JSC::DEFINE_STUB_FUNCTION):
1388         * jit/JITStubs.h:
1389
1390 2011-06-14  Stephanie Lewis  <slewis@apple.com>
1391
1392         Rubber stamped by Oliver Hunt.
1393
1394         <rdar://problem/9511169>
1395         Update order files.
1396
1397         * JavaScriptCore.order:
1398
1399 2011-06-14  Sam Weinig  <sam@webkit.org>
1400
1401         Reviewed by Geoffrey Garen.
1402
1403         Fix dumping of constants to have the correct constant number.
1404
1405         * bytecode/CodeBlock.cpp:
1406         (JSC::CodeBlock::dump):
1407
1408 2011-06-14  Benjamin Poulain  <benjamin@webkit.org>
1409
1410         Reviewed by Eric Seidel.
1411
1412         KeywordLookupGenerator's Trie does not work with Python 3
1413         https://bugs.webkit.org/show_bug.cgi?id=62635
1414
1415         With Python 3, dict.items() return an iterator. Since the iterator
1416         protocol changed between Python 2 and 3, the easiest way to get the
1417         values is to have something that use the iterator implicitely, like a
1418         for() loop.
1419
1420         * KeywordLookupGenerator.py:
1421
1422 2011-06-13  Oliver Hunt  <oliver@apple.com>
1423
1424         Reviewed by Gavin Barraclough.
1425
1426         Fix llocp and lvalp names in the lexer to something more meaningful
1427         https://bugs.webkit.org/show_bug.cgi?id=62605
1428
1429         A simple rename
1430
1431         * parser/Lexer.cpp:
1432         (JSC::Lexer::parseIdentifier):
1433         (JSC::Lexer::parseString):
1434         (JSC::Lexer::lex):
1435         * parser/Lexer.h:
1436         (JSC::Lexer::lexExpectIdentifier):
1437
1438 2011-06-13  Oliver Hunt  <oliver@apple.com>
1439
1440         Reviewed by Gavin Barraclough.
1441
1442         Make it possible to inline the common case of identifier lexing
1443         https://bugs.webkit.org/show_bug.cgi?id=62600
1444
1445         Add a lexing function that expects to lex an "normal" alpha numeric
1446         identifier (that ignores keywords) so it's possible to inline the
1447         common parsing cases.  This comes out as a reasonable parsing speed
1448         boost.
1449
1450         * parser/JSParser.cpp:
1451         (JSC::JSParser::nextExpectIdentifier):
1452         (JSC::JSParser::parseProperty):
1453         (JSC::JSParser::parseMemberExpression):
1454         * parser/Lexer.cpp:
1455         * parser/Lexer.h:
1456         (JSC::Lexer::makeIdentifier):
1457         (JSC::Lexer::lexExpectIdentifier):
1458
1459 2011-06-13  Xan Lopez  <xlopez@igalia.com>
1460
1461         Reviewed by Martin Robinson.
1462
1463         Distcheck fixes.
1464
1465         * GNUmakefile.am:
1466         * GNUmakefile.list.am:
1467
1468 2011-06-13  Oliver Hunt  <oliver@apple.com>
1469
1470         Reviewed by Simon Fraser.
1471
1472         Make it possible to inline Identifier::equal
1473         https://bugs.webkit.org/show_bug.cgi?id=62584
1474
1475         Move Identifier::equal to the Identifier header file.
1476
1477         * runtime/Identifier.cpp:
1478         * runtime/Identifier.h:
1479         (JSC::Identifier::equal):
1480
1481 2011-06-13  Tony Chang  <tony@chromium.org>
1482
1483         Reviewed by Dimitri Glazkov.
1484
1485         rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX
1486         https://bugs.webkit.org/show_bug.cgi?id=62578
1487
1488         * Configurations/FeatureDefines.xcconfig:
1489
1490 2011-06-13  Tony Chang  <tony@chromium.org>
1491
1492         Reviewed by Adam Barth.
1493
1494         rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX
1495         https://bugs.webkit.org/show_bug.cgi?id=62545
1496
1497         * Configurations/FeatureDefines.xcconfig:
1498
1499 2011-06-12  Patrick Gansterer  <paroga@webkit.org>
1500
1501         Unreviewed. Build fix for !ENABLE(JIT) after r88604.
1502
1503         * bytecode/CodeBlock.cpp:
1504         (JSC::CodeBlock::visitAggregate):
1505
1506 2011-06-11  Gavin Barraclough  <barraclough@apple.com>
1507
1508         Reviewed by Darin Adler.
1509
1510         https://bugs.webkit.org/show_bug.cgi?id=16777
1511
1512         Remove #define NaN per Darin's comments.
1513
1514         * runtime/JSGlobalObjectFunctions.cpp:
1515         (JSC::parseIntOverflow):
1516         (JSC::parseInt):
1517         (JSC::jsStrDecimalLiteral):
1518         (JSC::jsToNumber):
1519         (JSC::parseFloat):
1520         * wtf/DateMath.cpp:
1521         (WTF::equivalentYearForDST):
1522         (WTF::parseES5DateFromNullTerminatedCharacters):
1523         (WTF::parseDateFromNullTerminatedCharacters):
1524         (WTF::timeClip):
1525         (JSC::parseDateFromNullTerminatedCharacters):
1526
1527 2011-06-11  Gavin Barraclough  <barraclough@apple.com>
1528
1529         Rubber stamped by Geoff Garen.
1530
1531         https://bugs.webkit.org/show_bug.cgi?id=62503
1532         Remove JIT_OPTIMIZE_* switches
1533
1534         The alternative code paths are untested, and not well maintained.
1535         These were useful when there was more churn in the JIT, but now
1536         are a maintenance overhead. Time to move on, removing.
1537
1538         * bytecode/CodeBlock.cpp:
1539         (JSC::CodeBlock::visitAggregate):
1540         * jit/JIT.cpp:
1541         (JSC::JIT::privateCompileSlowCases):
1542         (JSC::JIT::privateCompile):
1543         (JSC::JIT::linkConstruct):
1544         * jit/JIT.h:
1545         * jit/JITCall.cpp:
1546         * jit/JITCall32_64.cpp:
1547         * jit/JITOpcodes.cpp:
1548         (JSC::JIT::privateCompileCTIMachineTrampolines):
1549         (JSC::JIT::privateCompileCTINativeCall):
1550         * jit/JITOpcodes32_64.cpp:
1551         (JSC::JIT::privateCompileCTIMachineTrampolines):
1552         (JSC::JIT::privateCompileCTINativeCall):
1553         (JSC::JIT::softModulo):
1554         * jit/JITPropertyAccess.cpp:
1555         * jit/JITPropertyAccess32_64.cpp:
1556         * jit/JITStubs.cpp:
1557         (JSC::DEFINE_STUB_FUNCTION):
1558         * runtime/Lookup.cpp:
1559         (JSC::setUpStaticFunctionSlot):
1560         * runtime/Lookup.h:
1561         * wtf/Platform.h:
1562
1563 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
1564
1565         Reviewed by Sam Weinig.
1566
1567         https://bugs.webkit.org/show_bug.cgi?id=16777
1568         Eliminate JSC::NaN and JSC::Inf
1569
1570         There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants.
1571         The ones in std::numeric_limits are perfectly good.
1572         Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite.
1573
1574         * API/JSCallbackObjectFunctions.h:
1575         (JSC::::toNumber):
1576         * API/JSValueRef.cpp:
1577         (JSValueMakeNumber):
1578         (JSValueToNumber):
1579         * JavaScriptCore.exp:
1580         * runtime/CachedTranscendentalFunction.h:
1581         (JSC::CachedTranscendentalFunction::initialize):
1582         * runtime/DateConstructor.cpp:
1583         (JSC::constructDate):
1584         * runtime/DateInstanceCache.h:
1585         (JSC::DateInstanceData::DateInstanceData):
1586         (JSC::DateInstanceCache::reset):
1587         * runtime/JSCell.cpp:
1588         * runtime/JSCell.h:
1589         (JSC::JSCell::JSValue::getPrimitiveNumber):
1590         (JSC::JSCell::JSValue::toNumber):
1591         * runtime/JSGlobalData.cpp:
1592         (JSC::JSGlobalData::JSGlobalData):
1593         (JSC::JSGlobalData::resetDateCache):
1594         * runtime/JSGlobalObject.cpp:
1595         (JSC::JSGlobalObject::reset):
1596         * runtime/JSGlobalObjectFunctions.cpp:
1597         (JSC::globalFuncParseInt):
1598         (JSC::globalFuncIsFinite):
1599         * runtime/JSNotAnObject.cpp:
1600         (JSC::JSNotAnObject::toNumber):
1601         * runtime/JSValue.cpp:
1602         * runtime/JSValue.h:
1603         * runtime/JSValueInlineMethods.h:
1604         (JSC::jsNaN):
1605         * runtime/MathObject.cpp:
1606         (JSC::mathProtoFuncMax):
1607         (JSC::mathProtoFuncMin):
1608         * runtime/NumberConstructor.cpp:
1609         (JSC::numberConstructorNegInfinity):
1610         (JSC::numberConstructorPosInfinity):
1611         * runtime/NumberPrototype.cpp:
1612         (JSC::numberProtoFuncToExponential):
1613         (JSC::numberProtoFuncToFixed):
1614         (JSC::numberProtoFuncToPrecision):
1615         (JSC::numberProtoFuncToString):
1616         * runtime/UString.cpp:
1617         * wtf/DecimalNumber.h:
1618         (WTF::DecimalNumber::DecimalNumber):
1619         * wtf/dtoa.cpp:
1620         (WTF::dtoa):
1621
1622 2011-06-10  Tony Chang  <tony@chromium.org>
1623
1624         Reviewed by Ojan Vafai.
1625
1626         add a compile guard ENABLE(FLEXBOX)
1627         https://bugs.webkit.org/show_bug.cgi?id=62049
1628
1629         * Configurations/FeatureDefines.xcconfig:
1630
1631 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
1632
1633         Reviewed by Sam Weinig.
1634
1635         https://bugs.webkit.org/show_bug.cgi?id=55347
1636         "name" and "message" enumerable on *Error.prototype
1637
1638         This arises from chapter 15 of the spec:
1639             "Every other property described in this clause has the attributes
1640             { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
1641             unless otherwise specified."
1642         Standardized properties are not enumerable.
1643
1644         * runtime/ErrorInstance.cpp:
1645         (JSC::ErrorInstance::ErrorInstance):
1646         * runtime/NativeErrorPrototype.cpp:
1647         (JSC::NativeErrorPrototype::NativeErrorPrototype):
1648
1649 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1650
1651         Build fix: Corrected header spelling.
1652
1653         * heap/OldSpace.h:
1654
1655 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1656
1657         Reviewed by Oliver Hunt.
1658
1659         Added OldSpace to the project
1660         https://bugs.webkit.org/show_bug.cgi?id=62417
1661         
1662         Currently unused.
1663         
1664         Added OldSpace, the ability to iterate NewSpace vs OldSpace, and a
1665         per-block flag for testing whether you're in NewSpace vs OldSpace.
1666
1667         * CMakeLists.txt:
1668         * GNUmakefile.list.am:
1669         * JavaScriptCore.gypi:
1670         * JavaScriptCore.pro:
1671         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1672         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
1673
1674         * heap/MarkedBlock.cpp:
1675         (JSC::MarkedBlock::MarkedBlock):
1676         * heap/MarkedBlock.h:
1677         (JSC::MarkedBlock::inNewSpace):
1678         (JSC::MarkedBlock::setInNewSpace): Added inNewSpace flag, for use in
1679         write barrier.
1680
1681         * heap/NewSpace.cpp:
1682         (JSC::NewSpace::addBlock):
1683         (JSC::NewSpace::removeBlock):
1684         * heap/NewSpace.h:
1685         (JSC::NewSpace::forEachBlock): Added forEachBlock, to use for
1686         NewSpace-specific operations.
1687
1688         * heap/OldSpace.cpp: Added.
1689         (JSC::OldSpace::OldSpace):
1690         (JSC::OldSpace::addBlock):
1691         (JSC::OldSpace::removeBlock):
1692         * heap/OldSpace.h: Added.
1693         (JSC::OldSpace::forEachBlock): New class for holding promoted blocks.
1694         Not in use yet.
1695
1696 2011-06-09  Hyowon Kim  <hw1008.kim@samsung.com>
1697
1698         Reviewed by Antonio Gomes.
1699
1700         [EFL] Make accelerated compositing build in Webkit-EFL
1701         https://bugs.webkit.org/show_bug.cgi?id=62361
1702
1703         Add PLATFORM(EFL) to enable ACCELERATED_COMPOSITING on EFL port.
1704
1705         * wtf/Platform.h:
1706
1707 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
1708
1709         Reviewed by Geoff Garen.
1710
1711         Bug 62405 - Fix integer overflow in Array.prototype.push
1712
1713         Fix geoff's review comments re static_cast.
1714
1715         * runtime/ArrayPrototype.cpp:
1716         (JSC::arrayProtoFuncPush):
1717
1718 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1719
1720         Reviewed by Oliver Hunt.
1721
1722         Factored MarkedBlock set management into a helper class with a fast case Bloom filter
1723         https://bugs.webkit.org/show_bug.cgi?id=62413
1724         
1725         SunSpider reports a small speedup.
1726         
1727         This is in preparation for having ConservativeSet operate on arbitrary
1728         sets of MarkedBlocks, and in preparation for conservative scanning
1729         becoming proportionally more important than other GC activities.
1730
1731         * GNUmakefile.list.am:
1732         * JavaScriptCore.gypi:
1733         * JavaScriptCore.xcodeproj/project.pbxproj: Build-o.
1734
1735         * heap/ConservativeRoots.cpp:
1736         (JSC::ConservativeRoots::add):
1737         * heap/ConservativeRoots.h:
1738         (JSC::ConservativeRoots::ConservativeRoots): Operate on a MarkedBlockSet
1739         directly, instead of a Heap, so we can operate on subsets of the Heap
1740         instead.
1741         
1742         Use a TinyBloomFilter for single-cycle exclusion of most pointers. This
1743         is particularly important since we expect not to find our subject pointer
1744         in the MarkedBlock hash, and hash misses are more expensive than typical
1745         hash lookups because they have high collision rates.
1746         
1747         No need for single-pointer add() to be public anymore, since nobody uses it.
1748
1749         * heap/Heap.cpp:
1750         (JSC::Heap::markRoots):
1751         * heap/Heap.h:
1752         (JSC::Heap::forEachCell):
1753         (JSC::Heap::forEachBlock): Use MarkedBlockSet since that's what
1754         ConservativeRoots relies on.
1755         
1756         Nixed contains(), since nobody uses it anymore.
1757
1758         * heap/MarkedBlock.h:
1759         (WTF::MarkedBlockHash::hash): Added a faster hash taking advantage of
1760         the VM layout properties of MarkedBlocks.
1761
1762         * heap/MarkedBlockSet.h: Added.
1763         (JSC::MarkedBlockSet::add):
1764         (JSC::MarkedBlockSet::remove):
1765         (JSC::MarkedBlockSet::recomputeFilter):
1766         (JSC::MarkedBlockSet::filter):
1767         (JSC::MarkedBlockSet::set):
1768         * heap/TinyBloomFilter.h: Added.
1769         (JSC::TinyBloomFilter::TinyBloomFilter):
1770         (JSC::TinyBloomFilter::add):
1771         (JSC::TinyBloomFilter::ruleOut): New helper class, used above.
1772
1773         * interpreter/RegisterFile.cpp:
1774         (JSC::RegisterFile::gatherConservativeRoots): No need to specifically
1775         exclude values by tag -- the tiny bloom filter is already a register-register
1776         compare, so adding another "rule out" factor just slows things down.
1777
1778 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
1779
1780         Reviewed by Oliver Hunt.
1781
1782         Bug 62405 - Fix integer overflow in Array.prototype.push
1783
1784         There are three integer overflows here, leading to safe (not a security risk)
1785         but incorrect (non-spec-compliant) behaviour.
1786
1787         Two overflows occur when calculating the new length after pushing (one in the
1788         fast version of push in JSArray, one in the generic version in ArrayPrototype).
1789         The other occurs calculating indices to write to when multiple items are pushed.
1790
1791         These errors result in three test-262 failures.
1792
1793         * runtime/ArrayPrototype.cpp:
1794         (JSC::arrayProtoFuncPush):
1795         * runtime/JSArray.cpp:
1796         (JSC::JSArray::put):
1797         (JSC::JSArray::push):
1798
1799 2011-06-09  Dan Bernstein  <mitz@apple.com>
1800
1801         Reviewed by Anders Carlsson.
1802
1803         Add Vector::reverse()
1804         https://bugs.webkit.org/show_bug.cgi?id=62393
1805
1806         * wtf/Vector.h:
1807         (WTF::Vector::reverse): Added
1808
1809 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1810
1811         Reviewed by Oliver Hunt.
1812
1813         Factored a bunch of Heap functionality into stand-alone functors
1814         https://bugs.webkit.org/show_bug.cgi?id=62337
1815         
1816         This is in preparation for making these functors operate on arbitrary
1817         sets of MarkedBlocks.
1818
1819         * JavaScriptCore.exp: This file is a small tragedy.
1820
1821         * debugger/Debugger.cpp:
1822         (JSC::Debugger::recompileAllJSFunctions): Updated for type change and rename.
1823
1824         * heap/HandleHeap.h:
1825         (JSC::HandleHeap::forEachStrongHandle): New function for iterating all
1826         strong handles, so we can play along in the functor game.
1827
1828         * heap/Heap.cpp:
1829         (JSC::CountFunctor::CountFunctor::CountFunctor):
1830         (JSC::CountFunctor::CountFunctor::count):
1831         (JSC::CountFunctor::CountFunctor::returnValue):
1832         (JSC::CountFunctor::ClearMarks::operator()):
1833         (JSC::CountFunctor::ResetAllocator::operator()):
1834         (JSC::CountFunctor::Sweep::operator()):
1835         (JSC::CountFunctor::MarkCount::operator()):
1836         (JSC::CountFunctor::Size::operator()):
1837         (JSC::CountFunctor::Capacity::operator()):
1838         (JSC::CountFunctor::Count::operator()):
1839         (JSC::CountFunctor::CountIfGlobalObject::operator()):
1840         (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
1841         (JSC::CountFunctor::TakeIfEmpty::operator()):
1842         (JSC::CountFunctor::TakeIfEmpty::returnValue):
1843         (JSC::CountFunctor::RecordType::RecordType):
1844         (JSC::CountFunctor::RecordType::typeName):
1845         (JSC::CountFunctor::RecordType::operator()):
1846         (JSC::CountFunctor::RecordType::returnValue): These functors factor out
1847         behavior that used to be in the functions below.
1848
1849         (JSC::Heap::clearMarks):
1850         (JSC::Heap::sweep):
1851         (JSC::Heap::objectCount):
1852         (JSC::Heap::size):
1853         (JSC::Heap::capacity):
1854         (JSC::Heap::protectedGlobalObjectCount):
1855         (JSC::Heap::protectedObjectCount):
1856         (JSC::Heap::protectedObjectTypeCounts):
1857         (JSC::Heap::objectTypeCounts):
1858         (JSC::Heap::resetAllocator):
1859         (JSC::Heap::freeBlocks):
1860         (JSC::Heap::shrink): Factored out behavior into the functors above.
1861
1862         * heap/Heap.h:
1863         (JSC::Heap::forEachProtectedCell):
1864         (JSC::Heap::forEachCell):
1865         (JSC::Heap::forEachBlock): Added forEach* iteration templates. I chose
1866         functor-based templates instead of plain iterators because they're simpler
1867         to implement in this case and they require a lot less code at the call site.
1868
1869         * heap/MarkedBlock.h:
1870         (JSC::MarkedBlock::VoidFunctor::returnValue): Default parent class for
1871         trivial functors.
1872
1873         (JSC::MarkedBlock::forEachCell): Renamed forEach to forEachCell because
1874         we have a few different kind of "for each" now.
1875
1876         * runtime/JSGlobalData.cpp:
1877         (WTF::Recompile::operator()):
1878         (JSC::JSGlobalData::JSGlobalData):
1879         (JSC::JSGlobalData::recompileAllJSFunctions): Updated for type change and rename.
1880
1881         * runtime/JSGlobalData.h: Removed globalObjectCount because it was unused.
1882
1883 2011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
1884
1885         Reviewed by Pavel Feldman.
1886
1887         Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
1888         https://bugs.webkit.org/show_bug.cgi?id=52791
1889
1890         No new tests. The problem can be reproduced by trying to create InspectorValue
1891         from 1.0e-100 and call ->toJSONString() on this.
1892
1893         * JavaScriptCore.exp:
1894         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1895         export 2 functions DecimalNumber::bufferLengthForStringExponential and
1896         DecimalNumber::toStringExponential.
1897
1898 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1899
1900         Unreviewed, rolling out r88404.
1901         http://trac.webkit.org/changeset/88404
1902         https://bugs.webkit.org/show_bug.cgi?id=62342
1903
1904         broke win and mac build (Requested by tony^work on #webkit).
1905
1906         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1907
1908 2011-06-08  Evan Martin  <evan@chromium.org>
1909
1910         Reviewed by Adam Barth.
1911
1912         [chromium] use gyp 'settings' type for settings target
1913         https://bugs.webkit.org/show_bug.cgi?id=62323
1914
1915         The 'settings' gyp target type is for targets that exist solely
1916         for their settings (no build rules).  The comment above this target
1917         says it's for this, but it incorrectly uses 'none'.
1918
1919         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1920
1921 2011-06-08  Sailesh Agrawal  <sail@chromium.org>
1922
1923         Reviewed by Mihai Parparita.
1924
1925         Chromium Mac: Enable overlay scrollbars
1926         https://bugs.webkit.org/show_bug.cgi?id=59756
1927
1928         Enable WTF_USE_WK_SCROLLBAR_PAINTER for Chromium Mac. This allows us to use overlay scrollbars on future versions of Mac OS X.
1929
1930         * wtf/Platform.h:
1931
1932 2011-06-08  Oliver Hunt  <oliver@apple.com>
1933
1934         Reviewed by Geoffrey Garen.
1935
1936         Add faster lookup cache for multi character identifiers
1937         https://bugs.webkit.org/show_bug.cgi?id=62327
1938
1939         Add a non-hash lookup for mutiple character identifiers.  This saves us from
1940         adding repeated identifiers to the ParserArena's identifier list as people
1941         tend to not start all their variables and properties with the same character
1942         and happily identifier locality works in our favour.
1943
1944         * parser/ParserArena.h:
1945         (JSC::IdentifierArena::isEmpty):
1946         (JSC::IdentifierArena::clear):
1947         (JSC::IdentifierArena::makeIdentifier):
1948
1949 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1950
1951         Reviewed by Oliver Hunt.
1952
1953         Took some responsibilities away from NewSpace
1954         https://bugs.webkit.org/show_bug.cgi?id=62325
1955         
1956         NewSpace is basically just an allocator now.
1957         
1958         Heap acts as a controller, responsible for managing the set of all
1959         MarkedBlocks.
1960         
1961         This is in preparation for moving parts of the controller logic into
1962         separate helper classes that can act on arbitrary sets of MarkedBlocks
1963         that may or may not be in NewSpace.
1964
1965         * heap/Heap.cpp:
1966         (JSC::Heap::Heap):
1967         (JSC::Heap::destroy):
1968         (JSC::Heap::allocate):
1969         (JSC::Heap::markRoots):
1970         (JSC::Heap::clearMarks):
1971         (JSC::Heap::sweep):
1972         (JSC::Heap::objectCount):
1973         (JSC::Heap::size):
1974         (JSC::Heap::capacity):
1975         (JSC::Heap::collect):
1976         (JSC::Heap::resetAllocator):
1977         (JSC::Heap::allocateBlock):
1978         (JSC::Heap::freeBlocks):
1979         (JSC::Heap::shrink): Moved the set of MarkedBlocks from NewSpace to Heap,
1980         along with all functions that operate on the set of MarkedBlocks. Also
1981         moved responsibility for deciding whether to allocate a new MarkedBlock,
1982         and for allocating it.
1983
1984         * heap/Heap.h:
1985         (JSC::Heap::contains):
1986         (JSC::Heap::forEach): Ditto.
1987
1988         * heap/NewSpace.cpp:
1989         (JSC::NewSpace::addBlock):
1990         (JSC::NewSpace::removeBlock):
1991         (JSC::NewSpace::resetAllocator):
1992         * heap/NewSpace.h:
1993         (JSC::NewSpace::waterMark):
1994         (JSC::NewSpace::allocate): Ditto.
1995
1996 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1997
1998         Reviewed by Oliver Hunt.
1999
2000         Some more MarkedSpace => NewSpace renaming
2001         https://bugs.webkit.org/show_bug.cgi?id=62305
2002
2003         * JavaScriptCore.exp:
2004         * JavaScriptCore.order:
2005         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2006         * heap/Heap.cpp:
2007         (JSC::Heap::Heap):
2008         (JSC::Heap::destroy):
2009         (JSC::Heap::reportExtraMemoryCostSlowCase):
2010         (JSC::Heap::allocate):
2011         (JSC::Heap::markRoots):
2012         (JSC::Heap::objectCount):
2013         (JSC::Heap::size):
2014         (JSC::Heap::capacity):
2015         (JSC::Heap::collect):
2016         (JSC::Heap::isValidAllocation):
2017         * heap/Heap.h:
2018         (JSC::Heap::markedSpace):
2019         (JSC::Heap::contains):
2020         (JSC::Heap::forEach):
2021         (JSC::Heap::allocate):
2022         * runtime/JSCell.h:
2023
2024 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
2025
2026         Reviewed by Eric Seidel.
2027
2028         Add export macros to profiler headers.
2029         https://bugs.webkit.org/show_bug.cgi?id=27551
2030
2031         * profiler/Profiler.h:
2032
2033 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
2034
2035         Reviewed by Eric Seidel.
2036
2037         Add export symbols to parser headers.
2038         https://bugs.webkit.org/show_bug.cgi?id=27551
2039
2040         * parser/SourceProviderCache.h:
2041
2042 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
2043
2044         Reviewed by Eric Seidel.
2045
2046         Add export symbols to interpreter headers.
2047         https://bugs.webkit.org/show_bug.cgi?id=27551
2048
2049         * interpreter/Interpreter.h:
2050
2051 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
2052
2053         Reviewed by Eric Seidel.
2054
2055         Add export symbols to debugger headers.
2056         https://bugs.webkit.org/show_bug.cgi?id=27551
2057
2058         * debugger/Debugger.h:
2059         * debugger/DebuggerCallFrame.h:
2060
2061 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
2062
2063         Reviewed by Darin Adler.
2064
2065         Moved MarkedSpace.* to NewSpace.* in preparation for more renaming
2066         https://bugs.webkit.org/show_bug.cgi?id=62268
2067
2068         * CMakeLists.txt:
2069         * GNUmakefile.list.am:
2070         * JavaScriptCore.gypi:
2071         * JavaScriptCore.pro:
2072         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2073         * JavaScriptCore.xcodeproj/project.pbxproj:
2074         * heap/Heap.h:
2075         * heap/MarkedBlock.h:
2076         * heap/MarkedSpace.cpp: Removed.
2077         * heap/MarkedSpace.h: Removed.
2078         * heap/NewSpace.cpp: Copied from Source/JavaScriptCore/heap/MarkedSpace.cpp.
2079         * heap/NewSpace.h: Copied from Source/JavaScriptCore/heap/MarkedSpace.h.
2080
2081 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2082
2083         Unreviewed, rolling out r88365.
2084         http://trac.webkit.org/changeset/88365
2085         https://bugs.webkit.org/show_bug.cgi?id=62301
2086
2087         windows bots broken (Requested by loislo_ on #webkit).
2088
2089         * JavaScriptCore.exp:
2090
2091 2011-06-08  Ryan Sleevi  <rsleevi@chromium.org>
2092
2093         Reviewed by Tony Chang.
2094
2095         Suppress C++0x compat warnings when compiling Chromium port with GCC 4.6
2096
2097         Compiling Chromium port under GCC 4.6 produces warnings about nullptr
2098         https://bugs.webkit.org/show_bug.cgi?id=62242
2099
2100         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2101
2102 2011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
2103
2104         Reviewed by Andreas Kling.
2105
2106         Webkit on SPARC Solaris has wrong endian
2107         https://bugs.webkit.org/show_bug.cgi?id=29407
2108
2109         Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
2110         there are more ocurrences of the same code pattern in webkit.
2111
2112         This patch includes the check on these other parts of the code.
2113
2114         This is a speculative fix, I don't have a sparc machine to test and
2115         don't know which kind of test would trigger a crash (but it's quite
2116         obvious that it's the same code duplicated in different files).
2117
2118         * runtime/UString.h:
2119         (JSC::UStringHash::equal):
2120         * wtf/text/StringHash.h:
2121         (WTF::StringHash::equal):
2122
2123 2011-06-08  Yael Aharon  <yael.aharon@nokia.com>
2124
2125         Reviewed by Andreas Kling.
2126
2127         [Qt] Build fix for building QtWebKit inside of Qt.
2128         https://bugs.webkit.org/show_bug.cgi?id=62280
2129
2130         Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
2131         into QtWebKit.prl.
2132
2133         No new tests, as this is just a build fix.
2134
2135         * JavaScriptCore.pri:
2136
2137 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
2138
2139         Reviewed by Oliver Hunt.
2140
2141         Split 'reset' into 'collect' and 'resetAllocator'
2142         https://bugs.webkit.org/show_bug.cgi?id=62267
2143
2144         * heap/Heap.cpp:
2145         (JSC::Heap::allocate):
2146         (JSC::Heap::collectAllGarbage):
2147         (JSC::Heap::collect):
2148         * heap/Heap.h:
2149         * heap/MarkedBlock.h:
2150         (JSC::MarkedBlock::resetAllocator):
2151         * heap/MarkedSpace.cpp:
2152         (JSC::MarkedSpace::resetAllocator):
2153         * heap/MarkedSpace.h:
2154         (JSC::MarkedSpace::SizeClass::resetAllocator):
2155
2156 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
2157
2158         Reviewed by Sam Weinig.
2159
2160         Renamed some more marks to visits
2161         https://bugs.webkit.org/show_bug.cgi?id=62254
2162
2163         * heap/HandleHeap.cpp:
2164         (JSC::HandleHeap::visitStrongHandles):
2165         (JSC::HandleHeap::visitWeakHandles):
2166         * heap/HandleHeap.h:
2167         * heap/HandleStack.cpp:
2168         (JSC::HandleStack::visit):
2169         * heap/HandleStack.h:
2170         * heap/Heap.cpp:
2171         (JSC::Heap::markProtectedObjects):
2172         (JSC::Heap::markTempSortVectors):
2173         (JSC::Heap::markRoots):
2174         * heap/HeapRootVisitor.h:
2175         (JSC::HeapRootVisitor::visit):
2176         * runtime/ArgList.cpp:
2177         (JSC::MarkedArgumentBuffer::markLists):
2178
2179 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
2180
2181         Reviewed by Sam Weinig
2182
2183         https://bugs.webkit.org/show_bug.cgi?id=55537
2184         Functions claim to have 'callee' which they actually don't (and shouldn't)
2185
2186         * JavaScriptCore.xcodeproj/project.pbxproj:
2187         * runtime/JSFunction.cpp:
2188         (JSC::JSFunction::getOwnPropertyNames):
2189
2190 2011-06-07  Juan C. Montemayor  <jmont@apple.com>
2191
2192         Reviewed by Darin Adler.
2193
2194         Make JSStaticFunction and JSStaticValue less "const"
2195         https://bugs.webkit.org/show_bug.cgi?id=62222
2196
2197         * API/JSObjectRef.h:
2198         * API/tests/testapi.c:
2199         (checkConstnessInJSObjectNames):
2200         (main):
2201         * JavaScriptCore.xcodeproj/project.pbxproj:
2202
2203 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
2204
2205         Reviewed by Sam Weinig.
2206
2207         https://bugs.webkit.org/show_bug.cgi?id=62240
2208         DFG JIT - add support for for-loop array initialization.
2209
2210         Support put by val beyond vector length.
2211         Add a operationPutByValBeyondArrayBounds operation, make
2212         PutValVal call this if the vector length check fails.
2213
2214         * dfg/DFGJITCodeGenerator.h:
2215         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
2216         (JSC::DFG::JITCodeGenerator::silentFillGPR):
2217         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
2218         (JSC::DFG::JITCodeGenerator::isDoubleConstantWithInt32Value):
2219         (JSC::DFG::JITCodeGenerator::isJSConstantWithInt32Value):
2220         (JSC::DFG::JITCodeGenerator::isIntegerConstant):
2221         (JSC::DFG::JITCodeGenerator::valueOfIntegerConstant):
2222         * dfg/DFGOperations.cpp:
2223         (JSC::DFG::operationPutByValInternal):
2224         * dfg/DFGOperations.h:
2225         * dfg/DFGSpeculativeJIT.cpp:
2226         (JSC::DFG::SpeculativeJIT::compile):
2227         * dfg/DFGSpeculativeJIT.h:
2228
2229 2011-06-06  James Simonsen  <simonjam@chromium.org>
2230
2231         Reviewed by James Robinson.
2232
2233         Add monotonicallyIncreasingTime() to get monotonically increasing time
2234         https://bugs.webkit.org/show_bug.cgi?id=37743
2235
2236         * wtf/CurrentTime.cpp: Add monotonicallyIncreasingTime() for mac and a fallback implementation that just wraps currentTime().
2237         (WTF::monotonicallyIncreasingTime):
2238         * wtf/CurrentTime.h: Add monotonicallyIncreasingTime().
2239
2240 2011-06-06  Alexandru Chiculita  <achicu@adobe.com>
2241
2242         Reviewed by Kent Tamura.
2243
2244         Add ENABLE_CSS_EXCLUSIONS support for build-webkit script
2245         https://bugs.webkit.org/show_bug.cgi?id=61628
2246
2247         * Configurations/FeatureDefines.xcconfig:
2248
2249 2011-06-06  Mihnea Ovidenie  <mihnea@adobe.com>
2250
2251         Reviewed by Kent Tamura.
2252
2253         Add ENABLE(CSS_REGIONS) guard for CSS Regions support
2254         https://bugs.webkit.org/show_bug.cgi?id=61631
2255
2256         * Configurations/FeatureDefines.xcconfig:
2257
2258 2011-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2259
2260         Unreviewed. Fix the GTK+ build.
2261
2262         * GNUmakefile.am: Add javascriptcore_cflags variable.
2263
2264 2011-06-04  Kevin Ollivier  <kevino@theolliviers.com>
2265
2266         [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
2267         to build on Mac.
2268
2269         * wtf/Platform.h:
2270
2271 2011-06-04  Gustavo Noronha Silva  <gns@gnome.org>
2272
2273         Unreviewed, MIPS build fix.
2274
2275         WebKitGTK+ tarball fails to build on MIPS.
2276         https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
2277
2278         * GNUmakefile.list.am: Add missing MIPS-related file to the list
2279         of files that are added to the tarball on make dist, and fix
2280         sorting.
2281
2282 2011-06-04  Sam Weinig  <sam@webkit.org>
2283
2284         Reviewed by Darin Adler.
2285
2286         Fix formatting of the output generated by KeywordLookupGenerator.py
2287         https://bugs.webkit.org/show_bug.cgi?id=62083
2288
2289         - Uses correct year for copyright.
2290         - Puts ending brace on same line as "else if"
2291         - Puts starting brace of function on its own line.
2292         - Adds some tasteful whitespace.
2293         - Adds comments to make clear that scopes are ending
2294         - Make macros actually split on two lines.
2295
2296         * KeywordLookupGenerator.py:
2297
2298 2011-06-04  Adam Barth  <abarth@webkit.org>
2299
2300         Reviewed by Eric Seidel.
2301
2302         KeywordLookupGenerator.py spams stdout in Chromium Linux build
2303         https://bugs.webkit.org/show_bug.cgi?id=62087
2304
2305         This action does not appear to be needed.
2306
2307         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2308
2309 2011-06-03  Oliver Hunt  <oliver@apple.com>
2310
2311         Reviewed by Maciej Stachowiak.
2312
2313         Lexer needs to provide Identifier for reserved words
2314         https://bugs.webkit.org/show_bug.cgi?id=62086
2315
2316         Alas it is necessary to provide an Identifier reference for keywords
2317         so that we can do the right thing when they're used in object literals.
2318         We now keep Identifiers for all reserved words in the CommonIdentifiers
2319         structure so that we can access them without a hash lookup.
2320
2321         * KeywordLookupGenerator.py:
2322         * parser/Lexer.cpp:
2323         (JSC::Lexer::parseIdentifier):
2324         * parser/Lexer.h:
2325         * runtime/CommonIdentifiers.cpp:
2326         (JSC::CommonIdentifiers::CommonIdentifiers):
2327         * runtime/CommonIdentifiers.h:
2328
2329 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
2330
2331         Reviewed by Sam Weinig.
2332
2333         Add debug code to break on speculation failures.
2334
2335         * dfg/DFGJITCompiler.cpp:
2336         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
2337         (JSC::DFG::JITCompiler::compileFunction):
2338         * dfg/DFGNode.h:
2339
2340 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
2341
2342         Reviewed by Sam Weinig.
2343
2344         https://bugs.webkit.org/show_bug.cgi?id=62082
2345         DFG JIT - bug passing arguments that need swap
2346
2347         This is really just a typo.
2348         When setting up the arguments for a call out to a C operation, we'll
2349         fail to swap arguments where this is necessary. For example, in the
2350         case of 2 arg calls, where the first argument is in %rdx & the second
2351         is in %rsi we should swap (exec will be passed in %rdi), but we don't.
2352
2353         This can also affect function calls passing three arguments.
2354
2355         * dfg/DFGJITCodeGenerator.h:
2356         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
2357             - Call swap with the correct arguments.
2358
2359 2011-06-03  Oliver Hunt  <oliver@apple.com>
2360
2361         Reviewed by Gavin Barraclough.
2362
2363         Force inlining of some hot lexer functions
2364         https://bugs.webkit.org/show_bug.cgi?id=62079
2365
2366         Fix more GCC stupidity
2367
2368         * parser/Lexer.h:
2369         (JSC::Lexer::isWhiteSpace):
2370         (JSC::Lexer::isLineTerminator):
2371
2372 2011-06-03  Oliver Hunt  <oliver@apple.com>
2373
2374         Reviewed by Gavin Barraclough.
2375
2376         GCC not inlining some functions that it really should be
2377         https://bugs.webkit.org/show_bug.cgi?id=62075
2378
2379         Add ALWAYS_INLINE to a number of parsing and lexing functions
2380         that should always be inlined.  This gets us ~1.4% on my ad hoc
2381         parser test.
2382
2383         * KeywordLookupGenerator.py:
2384         * parser/JSParser.cpp:
2385         (JSC::JSParser::next):
2386         (JSC::JSParser::nextTokenIsColon):
2387         (JSC::JSParser::consume):
2388         (JSC::JSParser::match):
2389         (JSC::JSParser::tokenStart):
2390         (JSC::JSParser::tokenLine):
2391         (JSC::JSParser::tokenEnd):
2392         * parser/Lexer.cpp:
2393         (JSC::isIdentPart):
2394
2395 2011-06-03  Oliver Hunt  <oliver@apple.com>
2396
2397         Whoops, fix last minute bug.
2398
2399         * parser/Lexer.cpp:
2400         (JSC::Lexer::parseIdentifier):
2401
2402 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
2403
2404         Try to fix the GTK+ build.
2405
2406         * GNUmakefile.am: Clean up some spaces that should be tabs.
2407         * GNUmakefile.list.am: Add KeywordLookup.h to the source list
2408         and clean up some spaces that should be tabs.
2409
2410 2011-06-03  Oliver Hunt  <oliver@apple.com>
2411
2412         Reviewed by Geoffrey Garen.
2413
2414         Improve keyword lookup
2415         https://bugs.webkit.org/show_bug.cgi?id=61913
2416
2417         Rather than doing multiple hash lookups as we currently
2418         do when trying to identify keywords we now use an 
2419         automatically generated decision tree (essentially it's
2420         a hard coded patricia trie).  We still use the regular
2421         lookup table for the last few characters of an input as
2422         this allows us to completely skip all bounds checks.
2423
2424         * CMakeLists.txt:
2425         * DerivedSources.make:
2426         * DerivedSources.pro:
2427         * GNUmakefile.am:
2428         * JavaScriptCore.gyp/JavaScriptCore.gyp:
2429         * JavaScriptCore.xcodeproj/project.pbxproj:
2430         * KeywordLookupGenerator.py: Added.
2431         * make-generated-sources.sh:
2432         * parser/Lexer.cpp:
2433         (JSC::Lexer::internalShift):
2434         (JSC::Lexer::shift):
2435         (JSC::Lexer::parseIdentifier):
2436         * parser/Lexer.h:
2437
2438 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
2439
2440         Reviewed by Benjamin Poulain.
2441
2442         [Qt] Build flag for experimental ICU library support
2443         https://bugs.webkit.org/show_bug.cgi?id=60786
2444
2445         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
2446         ICU powered Unicode support. 
2447
2448         * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
2449         * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE). 
2450
2451 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
2452
2453         Reviewed by Benjamin Poulain.
2454
2455         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
2456         https://bugs.webkit.org/show_bug.cgi?id=61957
2457
2458         When building inside the Qt source tree, qmake always append the mkspecs
2459         defines after ours. We have to workaround and make sure that we append 
2460         our flags after the qmake variable used inside Qt. This workaround was provided 
2461         by our qmake folks. We need to append in both case because qmake behave differently
2462         when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
2463
2464         * JavaScriptCore.pro:
2465
2466 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
2467
2468         Reviewed by Adam Barth.
2469
2470         Added a method to generate RFC 2822 compliant date strings.
2471         https://bugs.webkit.org/show_bug.cgi?id=7169
2472
2473         * wtf/DateMath.cpp:
2474         (WTF::twoDigitStringFromNumber):
2475         (WTF::makeRFC2822DateString):
2476         * wtf/DateMath.h:
2477
2478 2011-06-02  Alexis Menard  <alexis.menard@openbossa.org>
2479
2480         Reviewed by Andreas Kling.
2481
2482         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
2483         https://bugs.webkit.org/show_bug.cgi?id=61957
2484
2485         When building inside the Qt source tree, qmake always append the mkspecs
2486         defines after ours. We have to workaround and make sure that we append  
2487         our flags after the qmake variable used inside Qt. This workaround was provided
2488         by our qmake folks.
2489
2490         * JavaScriptCore.pro:
2491
2492 2011-06-01  Oliver Hunt  <oliver@apple.com>
2493
2494         Reviewed by Geoffrey Garen.
2495
2496         Add single character lookup cache to IdentifierArena
2497         https://bugs.webkit.org/show_bug.cgi?id=61879
2498
2499         Add a simple lookup cache for single ascii character
2500         identifiers.  Produces around a 2% improvement in parse
2501         time for my adhoc parser test.
2502
2503         * parser/ParserArena.h:
2504         (JSC::IdentifierArena::IdentifierArena):
2505         (JSC::IdentifierArena::clear):
2506         (JSC::IdentifierArena::makeIdentifier):
2507
2508 2011-05-31  Oliver Hunt  <oliver@apple.com>
2509
2510         Reviewed by Geoffrey Garen.
2511
2512         Freezing a function and its prototype causes browser to crash.
2513         https://bugs.webkit.org/show_bug.cgi?id=61758
2514
2515         Make JSObject::preventExtensions virtual so that we can override it
2516         and instantiate all lazy
2517
2518         * JavaScriptCore.exp:
2519         * runtime/JSFunction.cpp:
2520         (JSC::createPrototypeProperty):
2521         (JSC::JSFunction::preventExtensions):
2522         (JSC::JSFunction::getOwnPropertySlot):
2523         * runtime/JSFunction.h:
2524         * runtime/JSObject.h:
2525         * runtime/JSObject.cpp:
2526         (JSC::JSObject::seal):
2527         (JSC::JSObject::seal):
2528
2529 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2530
2531         Unreviewed, rolling out r87788.
2532         http://trac.webkit.org/changeset/87788
2533         https://bugs.webkit.org/show_bug.cgi?id=61856
2534
2535         breaks windows chromium canary (Requested by jknotten on
2536         #webkit).
2537
2538         * wtf/DateMath.cpp:
2539         (WTF::timeClip):
2540         * wtf/DateMath.h:
2541
2542 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
2543
2544         Reviewed by Adam Barth.
2545
2546         Added a method to generate RFC 2822 compliant date strings.
2547         https://bugs.webkit.org/show_bug.cgi?id=7169
2548
2549         * wtf/DateMath.cpp:
2550         (WTF::twoDigitStringFromNumber):
2551         (WTF::makeRFC2822DateString):
2552         * wtf/DateMath.h:
2553
2554 2011-05-31  Yong Li  <yoli@rim.com>
2555
2556         Reviewed by Eric Seidel.
2557
2558         https://bugs.webkit.org/show_bug.cgi?id=54807
2559         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
2560         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
2561         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
2562         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
2563         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
2564         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
2565         rule we should have in order to make our code independent from compilers and compiler flags.
2566
2567         No new test added because this change is not known to fix any issue.
2568
2569         * bytecode/StructureStubInfo.h:
2570
2571 2011-05-30  Hojong Han  <hojong.han@samsung.com>
2572
2573         Reviewed by Geoffrey Garen.
2574
2575         [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
2576         https://bugs.webkit.org/show_bug.cgi?id=61416
2577
2578         * assembler/MacroAssemblerARM.h:
2579         (JSC::MacroAssemblerARM::branch32):
2580         * tests/mozilla/ecma/Expressions/11.12-1.js:
2581         (getTestCases):
2582
2583 2011-05-29  Geoffrey Garen  <ggaren@apple.com>
2584
2585         Reviewed by Sam Weinig.
2586
2587         Some heap refactoring
2588         https://bugs.webkit.org/show_bug.cgi?id=61704
2589         
2590         SunSpider says no change.
2591
2592         * JavaScriptCore.exp: Export!
2593
2594         * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
2595
2596         (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
2597
2598         (JSC::Heap::allocate): Changed inline allocation code to only select the
2599         size class, since this can be optimized out at compile time -- everything
2600         else is now inlined into this out-of-line function.
2601         
2602         No need to duplicate ASSERTs made in our caller.
2603
2604         * heap/Heap.h:
2605         (JSC::Heap::heap):
2606         (JSC::Heap::isMarked):
2607         (JSC::Heap::testAndSetMarked):
2608         (JSC::Heap::testAndClearMarked):
2609         (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
2610         a layer of indirection through MarkedSpace.
2611
2612         (JSC::Heap::allocate): See above.
2613
2614         * heap/MarkedBlock.cpp:
2615         (JSC::MarkedBlock::create):
2616         (JSC::MarkedBlock::MarkedBlock):
2617         * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
2618
2619         * heap/MarkedSpace.cpp:
2620         (JSC::MarkedSpace::MarkedSpace):
2621         (JSC::MarkedSpace::allocateBlock):
2622         * heap/MarkedSpace.h:
2623         (JSC::MarkedSpace::allocate): Updated to match changes above.
2624
2625 2011-05-28  David Kilzer  <ddkilzer@apple.com>
2626
2627         BUILD FIX when building only the interpreter
2628
2629         Fixes the following compiler warning:
2630
2631             JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
2632              void releaseExecutableMemory(JSGlobalData& globalData)
2633                   ^
2634
2635         * jit/ExecutableAllocator.h: Moved declaration of
2636         JSC::releaseExecutableMemory().
2637
2638 2011-05-28  David Kilzer  <ddkilzer@apple.com>
2639
2640         BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
2641
2642         * assembler/LinkBuffer.h:
2643         (JSC::LinkBuffer::linkCode): Added missing argument.
2644
2645 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
2646
2647         Reviewed by Oliver Hunt.
2648
2649         JS API is too aggressive about throwing exceptions for NULL get or set operations
2650         https://bugs.webkit.org/show_bug.cgi?id=61678
2651
2652         * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
2653         function that returns a JSValue, so it can fail and still forward to
2654         normal property lookup.
2655
2656         * API/JSCallbackObjectFunctions.h:
2657         (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
2658         access a static property -- just forward the access. This allows objects
2659         to observe get/set operations but still let the JS object manage lifetime.
2660
2661         (JSC::::put): Ditto.
2662
2663         (JSC::::getStaticValue): Same as JSCallbackObject.h.
2664
2665         * API/tests/testapi.c:
2666         (MyObject_set_nullGetForwardSet):
2667         * API/tests/testapi.js: Updated tests to reflect slightly less strict
2668         behavior, which matches headerdoc claims.
2669
2670 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
2671
2672         Reviewed by Oliver Hunt.
2673
2674         Property caching is too aggressive for API objects
2675         https://bugs.webkit.org/show_bug.cgi?id=61677
2676
2677         * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
2678         callback APIs allow the client to change its mind about our propertis at
2679         any time.
2680
2681         * API/tests/testapi.c:
2682         (PropertyCatchalls_getProperty):
2683         (PropertyCatchalls_setProperty):
2684         (PropertyCatchalls_getPropertyNames):
2685         (PropertyCatchalls_class):
2686         (main):
2687         * API/tests/testapi.js: Some tests for dynamic API objects.
2688
2689         * interpreter/Interpreter.cpp:
2690         (JSC::Interpreter::tryCachePutByID):
2691         (JSC::Interpreter::tryCacheGetByID):
2692         * jit/JITStubs.cpp:
2693         (JSC::JITThunks::tryCachePutByID):
2694         (JSC::JITThunks::tryCacheGetByID):
2695         (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
2696         requires it.
2697
2698         * runtime/JSTypeInfo.h:
2699         (JSC::TypeInfo::TypeInfo):
2700         (JSC::TypeInfo::isFinal):
2701         (JSC::TypeInfo::prohibitsPropertyCaching):
2702         (JSC::TypeInfo::flags): Added a flag to track opting out of property
2703         caching. Fixed an "&&" vs "&" typo that was previously harmless, but
2704         is now harmful since m_flags2 can have more than one bit set.
2705
2706 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2707
2708         Unreviewed.
2709
2710         Fix a typo in the order_file flag.
2711
2712         * Configurations/Base.xcconfig:
2713
2714 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
2715
2716         Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
2717
2718         * runtime/JSGlobalData.cpp:
2719         (JSGlobalData::JSGlobalData):
2720
2721 2011-05-27  Oliver Hunt  <oliver@apple.com>
2722
2723         Reviewed by Geoffrey Garen.
2724
2725         Add a few validity assertions to JSCallbackObject
2726         https://bugs.webkit.org/show_bug.cgi?id=61659
2727
2728         * API/JSCallbackObject.h:
2729         (JSC::JSCallbackObject::visitChildren):
2730
2731 2011-05-27  Oliver Hunt  <oliver@apple.com>
2732
2733         Build fix
2734
2735         * runtime/RegExpCache.cpp:
2736         (JSC::RegExpCache::invalidateCode):
2737
2738 2011-05-27  Oliver Hunt  <oliver@apple.com>
2739
2740         Reviewed by Geoffrey Garen.
2741
2742         Try to release unused executable memory when the FixedVMPool allocator is under pressure
2743         https://bugs.webkit.org/show_bug.cgi?id=61651
2744
2745         Rather than crashing when full the FixedVMPool allocator now returns a null
2746         allocation.  We replace the code that used to CRASH() on null allocations
2747         with logic that asks the provided globalData to release any executable memory
2748         that it can.  Currently this just means throwing away all regexp code, but
2749         in future we'll try to be more aggressive.
2750
2751         * assembler/ARMAssembler.cpp:
2752         (JSC::ARMAssembler::executableCopy):
2753         * assembler/ARMAssembler.h:
2754         * assembler/AssemblerBuffer.h:
2755         (JSC::AssemblerBuffer::executableCopy):
2756         * assembler/AssemblerBufferWithConstantPool.h:
2757         * assembler/LinkBuffer.h:
2758         (JSC::LinkBuffer::LinkBuffer):
2759         (JSC::LinkBuffer::linkCode):
2760         * assembler/MIPSAssembler.h:
2761         (JSC::MIPSAssembler::executableCopy):
2762         * assembler/SH4Assembler.h:
2763         (JSC::SH4Assembler::executableCopy):
2764         * assembler/X86Assembler.h:
2765         (JSC::X86Assembler::executableCopy):
2766         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
2767         * dfg/DFGJITCompiler.cpp:
2768         (JSC::DFG::JITCompiler::compileFunction):
2769         * jit/ExecutableAllocator.h:
2770         (JSC::ExecutablePool::create):
2771         (JSC::ExecutablePool::alloc):
2772         (JSC::ExecutableAllocator::ExecutableAllocator):
2773         (JSC::ExecutableAllocator::poolForSize):
2774         (JSC::ExecutablePool::ExecutablePool):
2775         (JSC::ExecutablePool::poolAllocate):
2776         * jit/ExecutableAllocatorFixedVMPool.cpp:
2777         (JSC::FixedVMPoolAllocator::alloc):
2778         * jit/JIT.cpp:
2779         (JSC::JIT::privateCompile):
2780         * jit/JITOpcodes.cpp:
2781         (JSC::JIT::privateCompileCTIMachineTrampolines):
2782         * jit/JITOpcodes32_64.cpp:
2783         (JSC::JIT::privateCompileCTIMachineTrampolines):
2784         (JSC::JIT::privateCompileCTINativeCall):
2785         * jit/JITPropertyAccess.cpp:
2786         (JSC::JIT::stringGetByValStubGenerator):
2787         (JSC::JIT::privateCompilePutByIdTransition):
2788         (JSC::JIT::privateCompilePatchGetArrayLength):
2789         (JSC::JIT::privateCompileGetByIdProto):
2790         (JSC::JIT::privateCompileGetByIdSelfList):
2791         (JSC::JIT::privateCompileGetByIdProtoList):
2792         (JSC::JIT::privateCompileGetByIdChainList):
2793         (JSC::JIT::privateCompileGetByIdChain):
2794         * jit/JITPropertyAccess32_64.cpp:
2795         (JSC::JIT::stringGetByValStubGenerator):
2796         (JSC::JIT::privateCompilePutByIdTransition):
2797         (JSC::JIT::privateCompilePatchGetArrayLength):
2798         (JSC::JIT::privateCompileGetByIdProto):
2799         (JSC::JIT::privateCompileGetByIdSelfList):
2800         (JSC::JIT::privateCompileGetByIdProtoList):
2801         (JSC::JIT::privateCompileGetByIdChainList):
2802         (JSC::JIT::privateCompileGetByIdChain):
2803         * jit/SpecializedThunkJIT.h:
2804         (JSC::SpecializedThunkJIT::finalize):
2805         * jit/ThunkGenerators.cpp:
2806         (JSC::charCodeAtThunkGenerator):
2807         (JSC::charAtThunkGenerator):
2808         (JSC::fromCharCodeThunkGenerator):
2809         (JSC::sqrtThunkGenerator):
2810         (JSC::powThunkGenerator):
2811         * runtime/JSGlobalData.cpp:
2812         (JSC::JSGlobalData::JSGlobalData):
2813         (JSC::JSGlobalData::releaseExecutableMemory):
2814         (JSC::releaseExecutableMemory):
2815         * runtime/JSGlobalData.h:
2816         * runtime/RegExpCache.cpp:
2817         (JSC::RegExpCache::invalidateCode):
2818         * runtime/RegExpCache.h:
2819         * yarr/YarrJIT.cpp:
2820         (JSC::Yarr::YarrGenerator::compile):
2821
2822 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2823
2824         Reviewed by Oliver Hunt.
2825
2826         Optimized ConservativeSet to avoid double-visiting objects
2827         https://bugs.webkit.org/show_bug.cgi?id=61592
2828         
2829         SunSpider thinks this might be a 1% speedup
2830
2831         * heap/ConservativeRoots.h:
2832         (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
2833         an object.
2834
2835         * heap/Heap.h:
2836         (JSC::Heap::isMarked):
2837         (JSC::Heap::testAndSetMarked):
2838         (JSC::Heap::testAndClearMarked):
2839         (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
2840         to void*, since clients want to ask questions about arbitrary pointers
2841         into the heap, even when they aren't known to be JSCells.
2842
2843         * heap/MarkedBlock.h:
2844         (JSC::MarkedBlock::testAndClearMarked):
2845         * heap/MarkedSpace.h:
2846         (JSC::MarkedSpace::isMarked):
2847         (JSC::MarkedSpace::testAndSetMarked):
2848         (JSC::MarkedSpace::testAndClearMarked):
2849         (JSC::MarkedSpace::setMarked):
2850         (JSC::MarkedSpace::contains): Ditto.
2851
2852         * wtf/Bitmap.h:
2853         (WTF::::testAndClear): New function for ConservativeRoots's inverted
2854         marking pass.
2855
2856 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2857
2858         Rubber Stamped by Adam Roben.
2859
2860         Update Order Files.  Use -order_file flag since it can order more of the binary.
2861
2862         * Configurations/Base.xcconfig:
2863         * JavaScriptCore.order:
2864
2865 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2866
2867         Reviewed by Oliver Hunt.
2868
2869         Renamed heapRootMarker to heapRootVisitor to match its class name
2870         https://bugs.webkit.org/show_bug.cgi?id=61584
2871
2872         * heap/Heap.cpp:
2873         (JSC::Heap::markProtectedObjects):
2874         (JSC::Heap::markTempSortVectors):
2875         (JSC::Heap::markRoots):
2876
2877 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2878
2879         Reviewed by Oliver Hunt.
2880
2881         Removed some interdependency between Heap and SmallStrings by simplifying
2882         the SmallStrings lifetime model
2883         https://bugs.webkit.org/show_bug.cgi?id=61579
2884         
2885         SunSpider reports no change.
2886         
2887         Using Weak<T> could accomplish this too, but we're not sure it will give
2888         us the performance we need. This is a first step, and it accomplishes
2889         most of the value of using Weak<T>.
2890
2891         * heap/Heap.cpp:
2892         (JSC::Heap::destroy):
2893         (JSC::Heap::markRoots):
2894         (JSC::Heap::reset): Finalize small strings just like other weak handles.
2895
2896         * runtime/SmallStrings.cpp:
2897         (JSC::finalize):
2898         (JSC::SmallStrings::finalizeSmallStrings):
2899         * runtime/SmallStrings.h: Make all small strings trivially weak, instead
2900         of having an "all for one, one for all" memory model.
2901
2902 2011-05-26  Oliver Hunt  <oliver@apple.com>
2903
2904         Reviewed by Geoffrey Garen.
2905
2906         Make RegExpCache a weak map
2907         https://bugs.webkit.org/show_bug.cgi?id=61554
2908
2909         Switch to a weak map for the regexp cache, and hide that
2910         behaviour behind RegExp::create.
2911
2912         When a RegExp is compiled it attempts to add itself to
2913         the "strong" cache.  This cache is a simple round-robin
2914         buffer as was the old strong cache.  Happily this can
2915         be smaller than the old strong cache as RegExps are only
2916         added when they're compiled so it is under less pressure
2917         to evict.
2918
2919         * bytecompiler/NodesCodegen.cpp:
2920         (JSC::RegExpNode::emitBytecode):
2921         * runtime/RegExp.cpp:
2922         (JSC::RegExp::RegExp):
2923         (JSC::RegExp::create):
2924         (JSC::RegExp::match):
2925         * runtime/RegExp.h:
2926         (JSC::RegExp::gcShouldInvalidateCode):
2927         (JSC::RegExp::hasCode):
2928         (JSC::RegExp::key):
2929         * runtime/RegExpCache.cpp:
2930         (JSC::RegExpCache::lookupOrCreate):
2931         (JSC::RegExpCache::RegExpCache):
2932         (JSC::RegExpCache::isReachableFromOpaqueRoots):
2933         (JSC::RegExpCache::finalize):
2934         * runtime/RegExpCache.h:
2935         * runtime/RegExpConstructor.cpp:
2936         (JSC::constructRegExp):
2937         * runtime/RegExpPrototype.cpp:
2938         (JSC::regExpProtoFuncCompile):
2939         * runtime/StringPrototype.cpp:
2940         (JSC::stringProtoFuncMatch):
2941         (JSC::stringProtoFuncSearch):
2942
2943 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2944
2945         Reviewed by Oliver Hunt.
2946
2947         Moved Heap-related functions out of JSCell.h and into respective header files
2948         https://bugs.webkit.org/show_bug.cgi?id=61567
2949
2950         * heap/Heap.h:
2951         (JSC::Heap::allocate):
2952         (JSC::Heap::heap):
2953         * heap/MarkedBlock.h:
2954         (JSC::MarkedBlock::allocate):
2955         * heap/MarkedSpace.h:
2956         (JSC::MarkedSpace::sizeClassFor):
2957         (JSC::MarkedSpace::allocate):
2958         * runtime/JSCell.h:
2959         (JSC::JSCell::destructor):
2960
2961 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2962
2963         Try to fix Windows build.
2964
2965         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2966
2967 2011-05-26  Ryosuke Niwa  <rniwa@webkit.org>
2968
2969         Reviewed by Eric Seidel.
2970
2971         [debug feature] WTFString should have show() method
2972         https://bugs.webkit.org/show_bug.cgi?id=61149
2973
2974         Added String::show and AtomicString::show in NDEBUG.
2975
2976         * wtf/text/AtomicString.cpp:
2977         (WTF::AtomicString::show):
2978         * wtf/text/AtomicString.h:
2979         * wtf/text/WTFString.cpp:
2980         (String::show):
2981         * wtf/text/WTFString.h:
2982
2983 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2984
2985         Reviewed by Geoffrey Garen.
2986
2987         Factored out some Heap ASSERTs
2988         https://bugs.webkit.org/show_bug.cgi?id=61565
2989
2990         * JavaScriptCore.exp:
2991         * heap/Heap.cpp:
2992         (JSC::isValidSharedInstanceThreadState):
2993         (JSC::isValidThreadState):
2994         (JSC::Heap::markRoots):
2995         (JSC::Heap::isValidAllocation):
2996         * heap/Heap.h:
2997         * runtime/JSCell.h:
2998         (JSC::JSCell::Heap::allocate):
2999
3000 2011-05-26  Gavin Barraclough  <barraclough@apple.com>
3001
3002         Reviewed by Geoff Garen.
3003
3004         https://bugs.webkit.org/show_bug.cgi?id=61508
3005         DFG JIT - Add support for get by id self caching.
3006
3007         Change the call out to be an unexpected call (using silent spill/fill functions),
3008         add a structure check & compact load to the JIT code, and add repatching mechanisms.
3009         Since DFGOperations may want to be be implemented in asm, make these symbols be extern
3010         "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
3011         so that it can look up its StructureStubInfo.
3012
3013         * JavaScriptCore.xcodeproj/project.pbxproj:
3014             - Added new files.
3015         * bytecode/StructureStubInfo.h:
3016             - Added 'unset' entries to union.
3017         * dfg/DFGJITCodeGenerator.h:
3018         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
3019             - Return the call, we need this to populate the StructureStubInfo.
3020         * dfg/DFGJITCompiler.cpp:
3021         (JSC::DFG::JITCompiler::compileFunction):
3022             - Populate the CodebBlock's StructureStubInfo Vector.
3023         * dfg/DFGJITCompiler.h:
3024         (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
3025             - Return the call, we need this to populate the StructureStubInfo.
3026         (JSC::DFG::JITCompiler::addPropertyAccess):
3027         (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
3028             - Add structures to record property access info during compilation.
3029         * dfg/DFGOperations.cpp:
3030             - Made all external methods extern "C".
3031         (JSC::DFG::operationPutByValInternal):
3032             - Moved outside of the extern "C" block.
3033         * dfg/DFGOperations.h:
3034             - Made all external methods extern "C".
3035         * dfg/DFGRepatch.cpp: Added.
3036         (JSC::DFG::dfgRepatchCall):
3037             - repatch a call to link to a new callee function.
3038         (JSC::DFG::dfgRepatchGetByIdSelf):
3039             - Modify the JIT code to optimize self accesses.
3040         (JSC::DFG::tryCacheGetByID):
3041             - Internal implementation of dfgRepatchGetByID (factor out failing cases).
3042         (JSC::DFG::dfgRepatchGetByID):
3043             - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
3044         * dfg/DFGRepatch.h: Added.
3045             - Expose dfgRepatchGetByID.
3046         * dfg/DFGSpeculativeJIT.cpp:
3047         (JSC::DFG::SpeculativeJIT::compile):
3048             - Changed implementation of GetById ops.
3049
3050 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
3051
3052         Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
3053
3054         * heap/MarkedBlock.cpp:
3055         (JSC::MarkedBlock::MarkedBlock):
3056         * heap/MarkedBlock.h:
3057         * wtf/DoublyLinkedList.h:
3058         (WTF::::DoublyLinkedListNode):
3059         (WTF::::setPrev):
3060         (WTF::::setNext):
3061         (WTF::::prev):
3062         (WTF::::next):
3063         (WTF::::DoublyLinkedList):
3064         (WTF::::isEmpty):
3065         (WTF::::size):
3066         (WTF::::clear):
3067         (WTF::::head):
3068         (WTF::::append):
3069         (WTF::::remove):
3070         (WTF::::removeHead):
3071
3072 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
3073
3074         Rolled out http://trac.webkit.org/changeset/87408 because it broke the
3075         Windows build.
3076
3077         * heap/MarkedBlock.cpp:
3078         (JSC::MarkedBlock::MarkedBlock):
3079         * heap/MarkedBlock.h:
3080         (JSC::MarkedBlock::setPrev):
3081         (JSC::MarkedBlock::setNext):
3082         (JSC::MarkedBlock::prev):
3083         (JSC::MarkedBlock::next):
3084         * wtf/DoublyLinkedList.h:
3085         (WTF::::DoublyLinkedList):
3086         (WTF::::isEmpty):
3087         (WTF::::head):
3088         (WTF::::append):
3089         (WTF::::remove):
3090
3091 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
3092
3093         Reviewed by Oliver Hunt.
3094
3095         Provide a real owner when copying a property table, for the sake of
3096         write barriers.
3097         https://bugs.webkit.org/show_bug.cgi?id=61547
3098         
3099         No test because we can't enable the writeBarrier() ASSERT just yet.
3100
3101         * runtime/Structure.cpp:
3102         (JSC::Structure::addPropertyTransition):
3103
3104 2011-05-26  Adam Roben  <aroben@apple.com>
3105
3106         Windows build fix after r87346
3107
3108         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
3109         reality.
3110
3111 2011-05-26  Patrick Gansterer  <paroga@webkit.org>
3112
3113         Reviewed by Adam Barth.
3114
3115         ASSERT(isMainThread()) when using single threaded jsc executable
3116         https://bugs.webkit.org/show_bug.cgi?id=60846
3117
3118         Remove the ASSERT since we do not have the concept of MainThread in JSC.
3119
3120         * wtf/CryptographicallyRandomNumber.cpp:
3121         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
3122         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
3123
3124 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
3125
3126         Reviewed by Sam Weinig.
3127
3128         https://bugs.webkit.org/show_bug.cgi?id=61506
3129
3130         Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
3131         so that they are available to the SpeculativeJIT.
3132
3133         * dfg/DFGJITCodeGenerator.h:
3134         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
3135         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
3136         (JSC::DFG::JITCodeGenerator::silentFillGPR):
3137         (JSC::DFG::JITCodeGenerator::silentFillFPR):
3138         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
3139         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
3140         * dfg/DFGNonSpeculativeJIT.h:
3141
3142 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
3143
3144         An attempt to revive Windows bots.
3145
3146         * runtime/RegExp.cpp:
3147         * runtime/RegExp.h:
3148
3149 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
3150
3151         Reviewed by Sam Weinig.
3152
3153         Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
3154
3155         This data structure, used at runtime by the JIT, is currently unnecessarily populated
3156         with default entries during byte compilation.
3157
3158         Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
3159         us to one entry per corresponding bytecode op, which may be undesirable. Instead,
3160         populate this array from the JIT.
3161
3162         The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
3163         these, so that the class can have a default constructor (and to simply switch statements
3164         in code walking over the table).
3165
3166         This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
3167         to check for functions containing property access. Instead do so in the DFGByteCodeParser.
3168
3169         * bytecode/CodeBlock.cpp:
3170         (JSC::printStructureStubInfo):
3171         * bytecode/CodeBlock.h:
3172         (JSC::CodeBlock::setNumberOfStructureStubInfos):
3173         (JSC::CodeBlock::numberOfStructureStubInfos):
3174         * bytecode/StructureStubInfo.cpp:
3175         (JSC::StructureStubInfo::deref):
3176         (JSC::StructureStubInfo::visitAggregate):
3177         * bytecode/StructureStubInfo.h:
3178         (JSC::StructureStubInfo::StructureStubInfo):
3179         * bytecompiler/BytecodeGenerator.cpp:
3180         (JSC::BytecodeGenerator::emitGetById):
3181         (JSC::BytecodeGenerator::emitPutById):
3182         (JSC::BytecodeGenerator::emitDirectPutById):
3183         * dfg/DFGByteCodeParser.cpp:
3184         (JSC::DFG::ByteCodeParser::parseBlock):
3185         * jit/JIT.cpp:
3186         (JSC::JIT::JIT):
3187         (JSC::JIT::privateCompileMainPass):
3188         (JSC::JIT::privateCompileSlowCases):
3189         (JSC::JIT::privateCompile):
3190         * jit/JIT.h:
3191         * jit/JITPropertyAccess.cpp:
3192         (JSC::JIT::emit_op_get_by_id):
3193         (JSC::JIT::emit_op_put_by_id):
3194         (JSC::JIT::emit_op_method_check):
3195         (JSC::JIT::compileGetByIdHotPath):
3196         (JSC::JIT::compileGetByIdSlowCase):
3197         (JSC::JIT::emitSlow_op_put_by_id):
3198         * jit/JITPropertyAccess32_64.cpp:
3199         (JSC::JIT::emit_op_get_by_id):
3200         (JSC::JIT::emitSlow_op_get_by_id):
3201         (JSC::JIT::emit_op_put_by_id):
3202         (JSC::JIT::emitSlow_op_put_by_id):
3203         (JSC::JIT::emit_op_method_check):
3204         (JSC::JIT::compileGetByIdHotPath):
3205         (JSC::JIT::compileGetByIdSlowCase):
3206         * runtime/Executable.cpp:
3207         (JSC::tryDFGCompile):
3208
3209 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
3210
3211         Reviewed by Sam Weinig.
3212
3213         Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
3214
3215         * assembler/AbstractMacroAssembler.h:
3216         (JSC::AbstractMacroAssembler::Call::Call):
3217         (JSC::AbstractMacroAssembler::Call::fromTailJump):
3218         (JSC::AbstractMacroAssembler::Jump::Jump):
3219         (JSC::AbstractMacroAssembler::Jump::link):
3220         (JSC::AbstractMacroAssembler::Jump::linkTo):
3221         (JSC::AbstractMacroAssembler::Jump::isSet):
3222         (JSC::AbstractMacroAssembler::differenceBetween):
3223         (JSC::AbstractMacroAssembler::linkJump):
3224         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
3225         * assembler/LinkBuffer.h:
3226         (JSC::LinkBuffer::link):
3227         (JSC::LinkBuffer::locationOf):
3228         (JSC::LinkBuffer::locationOfNearCall):
3229         (JSC::LinkBuffer::returnAddressOffset):
3230         * assembler/MacroAssemblerARM.h:
3231         (JSC::MacroAssemblerARM::linkCall):
3232         * assembler/MacroAssemblerARMv7.h:
3233         (JSC::MacroAssemblerARMv7::linkCall):
3234         * assembler/MacroAssemblerMIPS.h:
3235         (JSC::MacroAssemblerMIPS::linkCall):
3236         * assembler/MacroAssemblerSH4.cpp:
3237         (JSC::MacroAssemblerSH4::linkCall):
3238         * assembler/MacroAssemblerX86.h:
3239         (JSC::MacroAssemblerX86::linkCall):
3240         * assembler/MacroAssemblerX86_64.h:
3241         (JSC::MacroAssemblerX86_64::linkCall):
3242
3243 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
3244
3245         Reviewed by Sam Weinig.
3246
3247         https://bugs.webkit.org/show_bug.cgi?id=61500
3248         Add JSObject::offsetOfPropertyStorage
3249
3250         * jit/JITPropertyAccess.cpp:
3251         (JSC::JIT::compileGetDirectOffset):
3252         (JSC::JIT::compileGetByIdHotPath):
3253         (JSC::JIT::emit_op_put_by_id):
3254         (JSC::JIT::compilePutDirectOffset):
3255         * jit/JITPropertyAccess32_64.cpp:
3256         (JSC::JIT::compileGetByIdHotPath):
3257         (JSC::JIT::emit_op_put_by_id):
3258         (JSC::JIT::compilePutDirectOffset):
3259         (JSC::JIT::compileGetDirectOffset):
3260         * runtime/JSObject.h:
3261         (JSC::JSObject::offsetOfPropertyStorage):
3262
3263 2011-05-25  Oliver Hunt  <oliver@apple.com>
3264
3265         Reviewed by Geoffrey Garen.
3266
3267         Make RegExp GC allocated
3268         https://bugs.webkit.org/show_bug.cgi?id=61490
3269
3270         Make RegExp GC allocated.  Basically mechanical change to replace
3271         most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
3272         where actual ownership happens.
3273
3274         Made the RegExpCache use Strong<> references currently to avoid any
3275         changes in behaviour.
3276
3277         * JavaScriptCore.exp:
3278         * bytecode/CodeBlock.cpp:
3279         (JSC::CodeBlock::visitAggregate):
3280         * bytecode/CodeBlock.h:
3281         (JSC::CodeBlock::addRegExp):
3282         * bytecompiler/BytecodeGenerator.cpp:
3283         (JSC::BytecodeGenerator::addRegExp):
3284         (JSC::BytecodeGenerator::emitNewRegExp):
3285         * bytecompiler/BytecodeGenerator.h:
3286         * runtime/JSCell.h:
3287         * runtime/JSGlobalData.cpp:
3288         (JSC::JSGlobalData::JSGlobalData):
3289         (JSC::JSGlobalData::clearBuiltinStructures):
3290         (JSC::JSGlobalData::addRegExpToTrace):
3291         * runtime/JSGlobalData.h:
3292         * runtime/JSGlobalObject.cpp:
3293         (JSC::JSGlobalObject::reset):
3294         * runtime/RegExp.cpp:
3295         (JSC::RegExp::RegExp):
3296         (JSC::RegExp::create):
3297         (JSC::RegExp::invalidateCode):
3298         * runtime/RegExp.h:
3299         (JSC::RegExp::createStructure):
3300         * runtime/RegExpCache.cpp:
3301         (JSC::RegExpCache::lookupOrCreate):
3302         (JSC::RegExpCache::create):
3303         * runtime/RegExpCache.h:
3304         * runtime/RegExpConstructor.cpp:
3305         (JSC::constructRegExp):
3306         * runtime/RegExpObject.cpp:
3307         (JSC::RegExpObject::RegExpObject):
3308         (JSC::RegExpObject::visitChildren):
3309         * runtime/RegExpObject.h:
3310         (JSC::RegExpObject::setRegExp):
3311         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
3312         * runtime/RegExpPrototype.cpp:
3313         (JSC::RegExpPrototype::RegExpPrototype):
3314         (JSC::regExpProtoFuncCompile):
3315         * runtime/RegExpPrototype.h:
3316         * runtime/StringPrototype.cpp:
3317         (JSC::stringProtoFuncMatch):
3318         (JSC::stringProtoFuncSearch):
3319
3320 2011-05-25  Oliver Hunt  <oliver@apple.com>
3321
3322         Reviewed by Geoffrey Garen.
3323
3324         Generate regexp code lazily
3325         https://bugs.webkit.org/show_bug.cgi?id=61476
3326
3327         RegExp construction now simply validates the RegExp, it does
3328         not perform actual codegen.
3329
3330         * runtime/RegExp.cpp:
3331         (JSC::RegExp::RegExp):
3332         (JSC::RegExp::recompile):
3333         (JSC::RegExp::compile):
3334         (JSC::RegExp::match):
3335         * runtime/RegExp.h:
3336         (JSC::RegExp::recompileIfNecessary):
3337         * runtime/RegExpConstructor.h:
3338         (JSC::RegExpConstructor::performMatch):
3339         * runtime/RegExpObject.cpp:
3340         (JSC::RegExpObject::match):
3341         * runtime/StringPrototype.cpp:
3342         (JSC::stringProtoFuncReplace):
3343         (JSC::stringProtoFuncMatch):
3344         (JSC::stringProtoFuncSearch):
3345         (JSC::stringProtoFuncSplit):
3346
3347 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3348
3349         Reviewed by Geoffrey Garen.
3350
3351         Removed MarkSetProperties because it was unused
3352         https://bugs.webkit.org/show_bug.cgi?id=61418
3353
3354         * heap/MarkStack.h:
3355         (JSC::MarkSet::MarkSet):
3356         (JSC::MarkStack::append):
3357         * runtime/JSActivation.cpp:
3358         (JSC::JSActivation::visitChildren):
3359         * runtime/JSArray.h:
3360         (JSC::JSArray::visitChildrenDirect):
3361         * runtime/JSPropertyNameIterator.cpp:
3362         (JSC::JSPropertyNameIterator::visitChildren):
3363         * runtime/WriteBarrier.h:
3364         (JSC::MarkStack::appendValues):
3365
3366 2011-05-25  Oliver Hunt  <oliver@apple.com>
3367
3368         Reviewed by Geoffrey Garen.
3369
3370         Make allocations with guard pages ensure that the allocation succeeded
3371         https://bugs.webkit.org/show_bug.cgi?id=61453
3372
3373         Add null checks, and make PageBlock's operator bool() use
3374         the realbase, rather than the start of usable memory.
3375
3376         * wtf/OSAllocatorPosix.cpp:
3377         (WTF::OSAllocator::reserveAndCommit):
3378         * wtf/PageBlock.h:
3379         (WTF::PageBlock::operator bool):
3380         (WTF::PageBlock::PageBlock):
3381
3382 2011-04-10  Kevin Ollivier  <kevino@theolliviers.com>
3383
3384         Reviewed by Eric Seidel.
3385
3386         Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
3387         
3388         https://bugs.webkit.org/show_bug.cgi?id=27551
3389
3390         * bytecompiler/BytecodeGenerator.h:
3391
3392 2011-05-24  Keishi Hattori  <keishi@webkit.org>
3393
3394         Reviewed by Kent Tamura.
3395
3396         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
3397         https://bugs.webkit.org/show_bug.cgi?id=61273
3398
3399         * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
3400
3401 2011-05-24  Kevin Ollivier  <kevino@theolliviers.com>
3402
3403         Reviewed by Eric Seidel.
3404
3405         Add export macros to WTFString.h.
3406         
3407         https://bugs.webkit.org/show_bug.cgi?id=27551
3408
3409         * wtf/text/WTFString.h:
3410         (WTF::String::String):
3411         (WTF::String::findIgnoringCase):
3412         (WTF::String::isHashTableDeletedValue):
3413
3414 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3415
3416         Maybe fix the Mac build now?
3417
3418         * JavaScriptCore.xcodeproj/project.pbxproj:
3419
3420 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3421
3422         Maybe fix the Mac build?
3423         
3424         * JavaScriptCore.xcodeproj/project.pbxproj:
3425
3426 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3427
3428         Reviewed by Oliver Hunt.
3429
3430         Split HeapRootVisitor into its own class
3431         https://bugs.webkit.org/show_bug.cgi?id=61399
3432
3433         * GNUmakefile.list.am:
3434         * JavaScriptCore.gypi:
3435         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3436         * JavaScriptCore.xcodeproj/project.pbxproj:
3437         * heap/HandleHeap.cpp:
3438         * heap/HandleStack.cpp:
3439         * heap/Heap.cpp:
3440         * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
3441         * heap/MarkStack.h:
3442         * runtime/ArgList.cpp:
3443         * runtime/SmallStrings.cpp:
3444
3445 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
3446
3447         Rubberstamped by David Kilzer.
3448
3449         Updated some files that I forgot in my previous MHTML CL.
3450
3451         * Configurations/FeatureDefines.xcconfig:
3452
3453 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3454
3455         Fix the Mac build: Yes, please do remove these files, svn.
3456
3457         * JavaScriptCore.xcodeproj/project.pbxproj:
3458
3459 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3460
3461         Reviewed by Oliver Hunt.
3462
3463         Let's just have one way to get the system page size, bokay?
3464         https://bugs.webkit.org/show_bug.cgi?id=61384
3465
3466         * CMakeListsEfl.txt:
3467         * CMakeListsWinCE.txt:
3468         * GNUmakefile.list.am:
3469         * JavaScriptCore.exp:
3470         * JavaScriptCore.gypi:
3471         * JavaScriptCore.pro:
3472         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
3473         is gone completely now, since it only existed to provide a duplicate way
3474         to access the system page size.
3475
3476         * heap/MarkStack.cpp:
3477         (JSC::MarkStack::reset):
3478         * heap/MarkStack.h:
3479         (JSC::::MarkStackArray):
3480         (JSC::::shrinkAllocation): Use WTF::pageSize.
3481
3482         * heap/MarkStackPosix.cpp:
3483         * heap/MarkStackSymbian.cpp:
3484         * heap/MarkStackWin.cpp: Removed now-empty files.
3485
3486         * jit/ExecutableAllocator.cpp:
3487         (JSC::ExecutableAllocator::reprotectRegion):
3488         * jit/ExecutableAllocator.h:
3489         (JSC::ExecutableAllocator::ExecutableAllocator):
3490         (JSC::ExecutablePool::ExecutablePool):
3491         (JSC::ExecutablePool::poolAllocate):
3492         * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
3493
3494         * wscript: Removed now-empty files.
3495
3496         * wtf/PageBlock.cpp:
3497         (WTF::systemPageSize): Integrated questionable Symbian page size rule
3498         from ExecutableAllocator, because that seems like what the original
3499         author should have done.
3500
3501 2011-05-24  Oliver Hunt  <oliver@apple.com>
3502
3503         Reviewed by Gavin Barraclough.
3504
3505         Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
3506         https://bugs.webkit.org/show_bug.cgi?id=61385
3507
3508         The interpreter uses the structure slot of get_by_id and put_by_id to hold
3509         the initial structure it encountered so that it can identify whether a
3510         given access is stable.
3511
3512         When marking though we only visit the slot when we've decided to cache, and
3513         so this value could die.  This was "safe" as the value was only used for a
3514         pointer compare, but it was incorrect.  We now just mark the slot like we
3515         should have been doing already.
3516
3517         * bytecode/CodeBlock.cpp:
3518         (JSC::CodeBlock::visitStructures):
3519
3520 2011-05-24  Adam Roben  <aroben@apple.com>
3521
3522         Windows build fix
3523
3524         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
3525
3526 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3527
3528         Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
3529
3530         * heap/MarkStack.h:
3531         (JSC::::shrinkAllocation):
3532
3533 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3534
3535         Rubber-stamped by Oliver Hunt.
3536
3537         Split out function definitions and class definitions from class
3538         declarations in MarkStack.h, for readability.
3539
3540         * heap/MarkStack.h:
3541         (JSC::MarkStack::MarkStack):
3542         (JSC::MarkStack::~MarkStack):
3543         (JSC::MarkStack::addOpaqueRoot):
3544         (JSC::MarkStack::containsOpaqueRoot):
3545         (JSC::MarkStack::opaqueRootCount):
3546         (JSC::MarkSet::MarkSet):
3547         (JSC::MarkStack::allocateStack):
3548         (JSC::MarkStack::releaseStack):
3549         (JSC::MarkStack::pageSize):
3550         (JSC::::MarkStackArray):
3551         (JSC::::~MarkStackArray):
3552         (JSC::::expand):
3553         (JSC::::append):
3554         (JSC::::removeLast):
3555         (JSC::::last):
3556         (JSC::::isEmpty):
3557         (JSC::::size):
3558         (JSC::::shrinkAllocation):
3559
3560 2011-05-24  Oliver Hunt  <oliver@apple.com>
3561
3562         Reviewed by Geoffrey Garen.
3563
3564         Avoid creating unnecessary identifiers and strings in the syntax checker
3565         https://bugs.webkit.org/show_bug.cgi?id=61378
3566
3567         Selectively tell the lexer that there are some places it does not need to
3568         do the real work of creating Identifiers for IDENT and STRING tokens.
3569
3570         Make parseString and parseIdentifier templatized on whether they should
3571         do real work, or merely validate the tokens.
3572
3573         SunSpider --parse-only reports ~5-8% win depending on hardware.
3574
3575         * parser/ASTBuilder.h:
3576         (JSC::ASTBuilder::createDotAccess):
3577         * parser/JSParser.cpp:
3578         (JSC::JSParser::next):
3579         (JSC::JSParser::consume):
3580         (JSC::JSParser::parseVarDeclarationList):
3581         (JSC::JSParser::parseConstDeclarationList):
3582         (JSC::JSParser::parseExpression):
3583         (JSC::JSParser::parseAssignmentExpression):
3584         (JSC::JSParser::parseConditionalExpression):
3585         (JSC::JSParser::parseBinaryExpression):
3586         (JSC::JSParser::parseProperty):
3587         (JSC::JSParser::parseObjectLiteral):
3588         (JSC::JSParser::parseArrayLiteral):
3589         (JSC::JSParser::parseArguments):
3590         (JSC::JSParser::parseMemberExpression):
3591         * parser/Lexer.cpp:
3592         (JSC::Lexer::parseIdentifier):
3593         (JSC::Lexer::parseString):
3594         (JSC::Lexer::lex):
3595         * parser/Lexer.h:
3596         * parser/SyntaxChecker.h:
3597         (JSC::SyntaxChecker::createDotAccess):
3598         (JSC::SyntaxChecker::createProperty):
3599
3600 2011-05-23  Michael Saboff  <msaboff@apple.com>
3601
3602         Reviewed by Mark Rowe.
3603
3604         Safari often freezes when clicking "Return free memory" in Caches dialog
3605         https://bugs.webkit.org/show_bug.cgi?id=61325
3606
3607         There are two fixes and improvement in instrumentation code used to find 
3608         one of the problems.
3609         Changed ReleaseFreeList() to set the "decommitted" bit when releasing
3610         pages to the system and moving Spans from the normal list to the returned 
3611         list.
3612         Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
3613         to eliminate an infinite loop if we can't meet the pagesToRelease target.
3614         Added a check for the decommitted bit being set properly in 
3615         TCMalloc_PageHeap::CheckList.
3616
3617         * wtf/FastMalloc.cpp:
3618         (WTF::TCMalloc_PageHeap::scavenge):
3619         (WTF::TCMalloc_PageHeap::Check):
3620         (WTF::TCMalloc_PageHeap::CheckList):
3621         (WTF::ReleaseFreeList):
3622
3623 2011-05-23  Gavin Barraclough  <barraclough@apple.com>
3624
3625         Reviewed by Geoff Garen.
3626
3627         https://bugs.webkit.org/show_bug.cgi?id=61306
3628
3629         The begin characters optimization currently has issues (#61129),
3630         and does not appear to still be a performance win. The prudent
3631         next step seems to be to disable while we ascertain whether this
3632         is still a useful performance optimization.
3633
3634         * yarr/YarrInterpreter.cpp:
3635         (JSC::Yarr::Interpreter::matchDisjunction):
3636         (JSC::Yarr::Interpreter::interpret):
3637         * yarr/YarrInterpreter.h:
3638         (JSC::Yarr::BytecodePattern::BytecodePattern):
3639         * yarr/YarrPattern.cpp:
3640         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
3641         (JSC::Yarr::YarrPattern::compile):
3642         (JSC::Yarr::YarrPattern::YarrPattern):
3643         * yarr/YarrPattern.h:
3644         (JSC::Yarr::YarrPattern::reset):
3645
3646 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
3647
3648         Reviewed by Simon Fraser.
3649
3650         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
3651         https://bugs.webkit.org/show_bug.cgi?id=58216
3652
3653         * wtf/MathExtras.h:
3654         (clampToInteger):
3655         (clampToPositiveInteger):
3656
3657 2011-05-23  Ruben  <chromium@hybridsource.org>
3658
3659         Reviewed by Tony Chang.
3660
3661         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
3662         https://bugs.webkit.org/show_bug.cgi?id=61219
3663
3664         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3665
3666 2011-05-23  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
3667
3668         Reviewed by Gavin Barraclough.
3669
3670         [SH4] AssemblerLabel does not name a type
3671         https://bugs.webkit.org/show_bug.cgi?id=59927
3672
3673         SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
3674
3675         * assembler/MacroAssemblerSH4.h:
3676
3677 2011-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
3678
3679         Rubber stamped by Eric Seidel.
3680
3681         [CMAKE] Refactoring wtf related code.
3682         https://bugs.webkit.org/show_bug.cgi?id=60146
3683
3684         Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
3685
3686         * CMakeLists.txt:
3687         * CMakeListsEfl.txt:
3688         * wtf/CMakeLists.txt:
3689         * wtf/CMakeListsEfl.txt:
3690
3691 2011-05-22  Adam Barth  <abarth@webkit.org>
3692
3693         Enable strict PassOwnPtr for everyone.  I expect this patch will need
3694         some followups to make the GTK and EFL bots green again.
3695
3696         * wtf/PassOwnPtr.h:
3697
3698 2011-05-20  Oliver Hunt  <oliver@apple.com>
3699
3700         Reviewed by Gavin Barraclough.
3701
3702         Reduce size of inline cache path of get_by_id on ARMv7
3703         https://bugs.webkit.org/show_bug.cgi?id=61221
3704
3705         This reduces the code size of get_by_id by 20 bytes
3706
3707         * assembler/ARMv7Assembler.h:
3708         (JSC::ARMv7Assembler::ldrCompact):
3709         (JSC::ARMv7Assembler::repatchCompact):
3710         (JSC::ARMv7Assembler::setUInt7ForLoad):
3711         * assembler/MacroAssemblerARMv7.h:
3712         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
3713         * jit/JIT.h:
3714
3715 2011-05-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
3716
3717         Reviewed by Oliver Hunt.
3718
3719         Zombies should "live" forever
3720         https://bugs.webkit.org/show_bug.cgi?id=61170
3721
3722         Reusing zombie cells could still hide garbage
3723         collected cell related bugs.
3724
3725         * JavaScriptCore.pro:
3726         * heap/MarkedBlock.cpp:
3727         (JSC::MarkedBlock::clearMarks):
3728         * heap/MarkedBlock.h:
3729         * heap/MarkedSpace.cpp:
3730         (JSC::MarkedSpace::destroy):
3731         * runtime/JSCell.h:
3732         (JSC::JSCell::JSValue::isZombie):
3733         * runtime/JSZombie.h:
3734         (JSC::JSZombie::~JSZombie):
3735         * runtime/WriteBarrier.h:
3736         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
3737
3738 2011-05-20  Brady Eidson  <beidson@apple.com>
3739
3740         Reviewed by Sam Weinig.
3741
3742         <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
3743         Horrendous bug in callOnMainThreadAndWait
3744
3745         * wtf/MainThread.cpp:
3746         (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
3747           syncFlag condition, reacquire the mutex first.
3748
3749 2011-05-20  Oliver Hunt  <oliver@apple.com>
3750
3751         Reviewed by Sam Weinig.
3752
3753         Remove unnecessary double->int conversion at the end of op_div
3754         https://bugs.webkit.org/show_bug.cgi?id=61198
3755
3756         We don't attempt this conversion on 64bit, removing it actually speeds
3757         up sunspider and v8 slightly, and it reduces code size.
3758
3759         * jit/JITArithmetic32_64.cpp:
3760         (JSC::JIT::emit_op_div):
3761
3762 2011-05-19  Evan Martin  <evan@chromium.org>
3763
3764         Reviewed by Tony Chang.
3765
3766         [chromium] remove <(library) variable
3767         https://bugs.webkit.org/show_bug.cgi?id=61158
3768
3769         This was for a build experiment; we can just use the correct value now.
3770
3771         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3772
3773 2011-05-20  Oliver Hunt  <oliver@apple.com>
3774
3775         Reviewed by Sam Weinig.
3776
3777         Interpreter uses wrong bytecode offset for determining exception handler
3778         https://bugs.webkit.org/show_bug.cgi?id=61191
3779
3780         The bytecode offset given for the returnPC from the JIT is
3781         actually the offset for the start of the instruction triggering
3782         the call, whereas in the interpreter it is the actual return
3783         VPC.  This means if the next instruction following a call was
3784         in an exception region we would incorrectly redirect to its
3785         handler.  Long term we want to completely redo how exceptions
3786         are handled anyway so the simplest and lowest risk fix here is
3787         to simply subtract one from the return vPC so that we have an
3788         offset in the triggering instruction.
3789
3790         It turns out this is caught by a couple of tests already.
3791
3792         * interpreter/Interpreter.cpp:
3793         (JSC::Interpreter::unwindCallFrame):
3794
3795 2011-05-20  Xan Lopez  <xlopez@igalia.com>
3796
3797         Reviewed by Oliver Hunt.
3798
3799         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
3800         https://bugs.webkit.org/show_bug.cgi?id=42756
3801
3802         Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
3803         check of the available memory. This should give us an
3804         overcommit-like behavior in most systems, which is what we want.
3805
3806         * wtf/OSAllocatorPosix.cpp:
3807         (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
3808
3809 2011-05-19  Gabor Loki  <loki@webkit.org>
3810
3811         Fix ARM build after r86919
3812
3813         * assembler/ARMAssembler.h:
3814         (JSC::ARMAssembler::nop):
3815
3816 2011-05-19  Oliver Hunt  <oliver@apple.com>
3817
3818         Reviewed by Gavin Barraclough.
3819
3820         Randomise code starting location a little
3821         https://bugs.webkit.org/show_bug.cgi?id=61161
3822
3823         Add a nop() function to the Assemblers so that we
3824         can randomise code offsets slightly at no real cost.
3825
3826         * assembler/ARMAssembler.h:
3827         (JSC::ARMAssembler::nop):
3828         * assembler/ARMv7Assembler.h:
3829         (JSC::ARMv7Assembler::nop):
3830         * assembler/MacroAssemblerARM.h:
3831         (JSC::MacroAssemblerARM::nop):
3832         * assembler/MacroAssemblerARMv7.h:
3833         (JSC::MacroAssemblerARMv7::nop):
3834         * assembler/MacroAssemblerMIPS.h:
3835         (JSC::MacroAssemblerMIPS::nop):
3836         * assembler/MacroAssemblerSH4.h:
3837         (JSC::MacroAssemblerSH4::nop):
3838         * assembler/MacroAssemblerX86Common.h:
3839         (JSC::MacroAssemblerX86Common::nop):
3840         * assembler/X86Assembler.h:
3841         (JSC::X86Assembler::nop):
3842         * jit/JIT.cpp:
3843         (JSC::JIT::JIT):
3844         (JSC::JIT::privateCompile):
3845         * jit/JIT.h:
3846         * runtime/WeakRandom.h:
3847         (JSC::WeakRandom::getUint32):
3848
3849 2011-05-19  Oliver Hunt  <oliver@apple.com>
3850
3851         Fix windows build.
3852
3853         * wtf/OSAllocatorWin.cpp:
3854         (WTF::OSAllocator::reserveUncommitted):
3855         (WTF::OSAllocator::reserveAndCommit):
3856
3857 2011-05-19  Oliver Hunt  <oliver@apple.com>
3858
3859         Reviewed by Gavin Barraclough.
3860
3861         Add guard pages to each end of the memory region used by the fixedvm allocator
3862         https://bugs.webkit.org/show_bug.cgi?id=61150
3863
3864         Add mechanism to notify the OSAllocator that pages at either end of an
3865         allocation should be considered guard pages.  Update PageReservation,
3866         PageAllocation, etc to handle this.
3867
3868         * JavaScriptCore.exp:
3869         * jit/ExecutableAllocatorFixedVMPool.cpp:
3870         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3871         * wtf/OSAllocator.h:
3872         * wtf/OSAllocatorPosix.cpp:
3873         (WTF::OSAllocator::reserveUncommitted):
3874         (WTF::OSAllocator::reserveAndCommit):
3875         * wtf/PageAllocation.h:
3876         (WTF::PageAllocation::PageAllocation):
3877         * wtf/PageAllocationAligned.h:
3878         (WTF::PageAllocationAligned::PageAllocationAligned):
3879         * wtf/PageBlock.h:
3880         (WTF::PageBlock::PageBlock):
3881         * wtf/PageReservation.h:
3882         (WTF::PageReservation::reserve):
3883         (WTF::PageReservation::reserveWithGuardPages):
3884             Add a new function to make a reservation that will add guard
3885             pages to the ends of an allocation.
3886         (WTF::PageReservation::PageReservation):
3887
3888 2011-05-19  Oliver Hunt  <oliver@apple.com>
3889
3890         Reviewed by Geoffrey Garen.
3891
3892         Make Executables release their JIT code as soon as they become dead
3893         https://bugs.webkit.org/show_bug.cgi?id=61134
3894
3895         Add an ability to clear an Executable's jit code without requiring
3896         it to be destroyed, and then call that from a finalizer.
3897
3898         * heap/Weak.h:
3899         (JSC::Weak::Weak):
3900         (JSC::Weak::leak):
3901         * jit/JITCode.h:
3902         (JSC::JITCode::clear):
3903         * runtime/Executable.cpp:
3904         (JSC::ExecutableFinalizer::finalize):
3905         (JSC::ExecutableBase::executableFinalizer):
3906         * runtime/Executable.h:
3907         (JSC::ExecutableBase::ExecutableBase):
3908         (JSC::ExecutableBase::clearExecutableCode):
3909
3910 2011-05-19  Adam Roben  <aroben@apple.com>
3911
3912         Remove a redundant and broken data export
3913
3914         Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
3915         JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
3916         to a linker warning about multiple definitions.)
3917
3918         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
3919
3920 2011-05-18  Oliver Hunt  <oliver@apple.com>
3921
3922         Reviewed by Gavin Barraclough.
3923
3924         Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
3925         https://bugs.webkit.org/show_bug.cgi?id=61064
3926
3927         Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
3928         for its inline storage.  This resolves the problem of GC occurring before
3929         a subclass has initialised its anonymous storage.
3930
3931         * runtime/JSObject.h:
3932
3933 2011-05-18  Adam Barth  <abarth@webkit.org>
3934
3935         Reviewed by Sam Weinig.
3936
3937         Delete WTFURL
3938         https://bugs.webkit.org/show_bug.cgi?id=61084
3939
3940         It's been a year and we've failed to complete this project.  It's time
3941         to throw in the towel.
3942
3943         * JavaScriptCore.xcodeproj/project.pbxproj:
3944         * wtf/url: Removed.
3945         * wtf/url/api: Removed.
3946         * wtf/url/api/ParsedURL.cpp: Removed.
3947         * wtf/url/api/ParsedURL.h: Removed.
3948         * wtf/url/api/URLString.h: Removed.
3949         * wtf/url/src: Removed.
3950         * wtf/url/src/RawURLBuffer.h: Removed.
3951         * wtf/url/src/URLBuffer.h: Removed.
3952         * wtf/url/src/URLCharacterTypes.cpp: Removed.
3953         * wtf/url/src/URLCharacterTypes.h: Removed.
3954         * wtf/url/src/URLComponent.h: Removed.
3955         * wtf/url/src/URLEscape.cpp: Removed.
3956         * wtf/url/src/URLEscape.h: Removed.
3957         * wtf/url/src/URLParser.h: Removed.
3958         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
3959         * wtf/url/src/URLSegments.cpp: Removed.
3960         * wtf/url/src/URLSegments.h: Removed.
3961         * wtf/url/wtfurl.gyp: Removed.
3962
3963 2011-05-18  Oliver Hunt  <oliver@apple.com>
3964
3965         Reviewed by Sam Weinig.
3966
3967         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
3968         https://bugs.webkit.org/show_bug.cgi?id=61090
3969
3970         Remove the Structure-free JSGlobalObject constructor and instead always
3971         pass the structure into the JSGlobalObject constructor.
3972         Stop DebuggerActivation creating a new structure every time, and simply
3973         use a single shared structure held by the GlobalData.
3974
3975         * API/JSContextRef.cpp:
3976         * debugger/DebuggerActivation.cpp:
3977         (JSC::DebuggerActivation::DebuggerActivation):
3978         * jsc.cpp:
3979         (GlobalObject::GlobalObject):
3980         (functionRun):
3981         (jscmain):
3982         * runtime/JSGlobalData.cpp:
3983         (JSC::JSGlobalData::JSGlobalData):
3984         (JSC::JSGlobalData::clearBuiltinStructures):
3985         * runtime/JSGlobalData.h:
3986         * runtime/JSGlobalObject.h:
3987
3988 2011-05-18  Oliver Hunt  <oliver@apple.com>
3989
3990         Reviewed by Adam Roben.
3991
3992         Disable gc validation in release builds
3993         https://bugs.webkit.org/show_bug.cgi?id=60680
3994
3995         Add back the NDEBUG check
3996
3997         * wtf/Platform.h:
3998
3999 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
4000
4001         Rolled out attempts to fix EFL build because they're not enough -- the
4002         build script needs to be fixed.
4003
4004         * runtime/BooleanPrototype.cpp:
4005         * runtime/DateConstructor.cpp:
4006         * runtime/ErrorPrototype.cpp:
4007
4008 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
4009
4010         More attempts to work around the EFL build system being borken.
4011
4012         * runtime/DateConstructor.cpp:
4013         * runtime/ErrorPrototype.cpp:
4014
4015 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
4016
4017         Try to fix the EFL build.
4018
4019         * runtime/BooleanPrototype.cpp:
4020
4021 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
4022
4023         Rolling back in r86653 with build fixed.
4024
4025         Reviewed by Gavin Barraclough and Oliver Hunt.
4026
4027         Global object initialization is expensive
4028         https://bugs.webkit.org/show_bug.cgi?id=60933
4029         
4030         Changed a bunch of globals to allocate their properties lazily, and changed
4031         the global object to allocate a bunch of its globals lazily.
4032         
4033         This reduces the footprint of a global object from 287 objects with 58
4034         functions for 24K to 173 objects with 20 functions for 15K.
4035
4036         Large patch, but it's all mechanical.
4037
4038         * DerivedSources.make:
4039         * JavaScriptCore.exp: Build!
4040
4041         * create_hash_table: Added a special case for fromCharCode, since it uses
4042         a custom "thunk generator".
4043
4044         * heap/Heap.cpp:
4045         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
4046         overcount objects that were owned through more than one mechanism because
4047         it was getting in the way of counting the results for this patch.
4048
4049         * interpreter/CallFrame.h:
4050         (JSC::ExecState::arrayConstructorTable):
4051         (JSC::ExecState::arrayPrototypeTable):
4052         (JSC::ExecState::booleanPrototypeTable):
4053         (JSC::ExecState::dateConstructorTable):
4054         (JSC::ExecState::errorPrototypeTable):
4055         (JSC::ExecState::globalObjectTable):
4056         (JSC::ExecState::numberConstructorTable):
4057         (JSC::ExecState::numberPrototypeTable):
4058         (JSC::ExecState::objectPrototypeTable):
4059         (JSC::ExecState::regExpPrototypeTable):
4060         (JSC::ExecState::stringConstructorTable): Added new tables.
4061
4062         * runtime/ArrayConstructor.cpp:
4063         (JSC::ArrayConstructor::ArrayConstructor):
4064         (JSC::ArrayConstructor::getOwnPropertySlot):
4065         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
4066         * runtime/ArrayConstructor.h:
4067         (JSC::ArrayConstructor::createStructure):
4068         * runtime/ArrayPrototype.cpp:
4069         (JSC::ArrayPrototype::getOwnPropertySlot):
4070         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
4071         * runtime/ArrayPrototype.h:
4072         * runtime/BooleanPrototype.cpp:
4073         (JSC::BooleanPrototype::BooleanPrototype):
4074         (JSC::BooleanPrototype::getOwnPropertySlot):
4075         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
4076         * runtime/BooleanPrototype.h:
4077         (JSC::BooleanPrototype::createStructure):
4078         * runtime/DateConstructor.cpp:
4079         (JSC::DateConstructor::DateConstructor):
4080         (JSC::DateConstructor::getOwnPropertySlot):
4081         (JSC::DateConstructor::getOwnPropertyDescriptor):
4082         * runtime/DateConstructor.h:
4083         (JSC::DateConstructor::createStructure):
4084         * runtime/ErrorPrototype.cpp:
4085         (JSC::ErrorPrototype::ErrorPrototype):
4086         (JSC::ErrorPrototype::getOwnPropertySlot):
4087         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
4088         * runtime/ErrorPrototype.h:
4089         (JSC::ErrorPrototype::createStructure): Standardized these objects
4090         to use static tables for function properties.
4091
4092         * runtime/JSGlobalData.cpp:
4093         (JSC::JSGlobalData::JSGlobalData):
4094         (JSC::JSGlobalData::~JSGlobalData):
4095         * runtime/JSGlobalData.h: Added new tables.
4096
4097         * runtime/JSGlobalObject.cpp:
4098         (JSC::JSGlobalObject::reset):
4099         (JSC::JSGlobalObject::addStaticGlobals):
4100         (JSC::JSGlobalObject::getOwnPropertySlot):
4101         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
4102         * runtime/JSGlobalObject.h:
4103         * runtime/JSGlobalObjectFunctions.cpp:
4104         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
4105         static table for its global functions. This required uninlining some
4106         things to avoid a circular header dependency. However, those things
4107         probably shouldn't have been inlined in the first place.
4108         
4109         Even more global object properties can be made lazy, but that requires