2010-12-07 Kenneth Russell <kbr@google.com>
[WebKit.git] / JavaScriptCore / ChangeLog
1 2010-12-07  Kenneth Russell  <kbr@google.com>
2
3         Reviewed by David Levin.
4
5         Fix compilation of core web audio files on Windows
6         https://bugs.webkit.org/show_bug.cgi?id=50603
7
8         Added log2 definition to MathExtras.h on Windows platform.
9
10         * wtf/MathExtras.h:
11         (log2):
12
13 2010-12-07  Antti Koivisto  <antti@apple.com>
14
15         Reviewed by Gavin Barraclough.
16
17         https://bugs.webkit.org/show_bug.cgi?id=50412
18         http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading 
19         
20         Creating a substring caused the original string be flattened if it was in the rope form. This could use
21         significant amount of memory by reducing buffer sharing between strings.
22         
23         Add a rope specific substring function that constructs the substring by reusing the rope fibers
24         instead of flattening the rope.
25         
26         No change observed in SunSpider.
27
28         * runtime/JSString.cpp:
29         (JSC::JSString::substringFromRope):
30         * runtime/JSString.h:
31         (JSC::jsSubstring):
32         * runtime/StringPrototype.cpp:
33         (JSC::stringProtoFuncSubstr):
34         (JSC::stringProtoFuncSubstring):
35
36 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
37
38         Reviewed by Gavin Barraclough.
39
40         Simplified some ASLR-related code in PageAllocation/Reservation
41         https://bugs.webkit.org/show_bug.cgi?id=50599
42         
43         Removed reserveAt, allocateAt, and friends, since they all existed to
44         serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
45         ASLR code down into systemAllocate -- now, any time you allocate
46         executable memory on a supporting platform, the memory's location is
47         randomized.
48
49         * jit/ExecutableAllocatorFixedVMPool.cpp:
50         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
51         to randomize anything.
52
53         * wtf/PageAllocation.h:
54         (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
55         beefed up executable allocation with randomization.
56
57         * wtf/PageReservation.h:
58         (WTF::PageReservation::systemReserve): Removed some *At() functions.
59
60 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
61
62         Reviewed by Maciej Stachowiak.
63
64         reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
65         https://bugs.webkit.org/show_bug.cgi?id=50588
66         
67         * wtf/OSAllocatorPosix.cpp:
68         (WTF::OSAllocator::reserve):
69         (WTF::OSAllocator::reserveAndCommit):
70         (WTF::OSAllocator::commit): Tightened up some comments. Changed
71         reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
72
73 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
74
75         Reviewed by Andreas Kling.
76
77         [WINCE] Add build system
78         https://bugs.webkit.org/show_bug.cgi?id=50522
79
80         * CMakeListsWinCE.txt: Added.
81         * shell/CMakeListsWinCE.txt: Added.
82         * wtf/CMakeListsWinCE.txt: Added.
83
84 2010-12-06  John Tantalo  <john.tantalo@gmail.com>
85
86         Reviewed by Geoffrey Garen.
87
88         jsc does not ignore shebang
89         https://bugs.webkit.org/show_bug.cgi?id=49576
90
91         * jsc.cpp:
92         (fillBufferWithContentsOfFile):
93           - translate shebang into a valid JavaScript comment so the lexer ignores it
94
95 2010-12-05  Adam Roben  <aroben@apple.com>
96
97         Windows production build fix
98
99         Put spaces after trailing backslashes when setting
100         %WebKitVSPropsRedirectionDir%. According to MSDN
101         <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
102
103            A backslash ( \ ) followed by a newline character is interpreted as
104            a space in the command; use a backslash at the end of a line to
105            continue a command onto the next line. NMAKE interprets the
106            backslash literally if any other character, including a space or
107            tab, follows the backslash.
108
109         * JavaScriptCore.vcproj/JavaScriptCore.make:
110
111 2010-12-04  Patrick Gansterer  <paroga@webkit.org>
112
113         Unreviewed, build fix after r69132.
114
115         * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
116
117 2010-12-04  Xan Lopez  <xlopez@igalia.com>
118
119         Reviewed by Martin Robinson.
120
121         [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
122         https://bugs.webkit.org/show_bug.cgi?id=50451
123
124         * wtf/gobject/GTypedefs.h: add GdkWindow defines.
125
126 2010-12-03  Gavin Barraclough  <barraclough@apple.com>
127
128         Rubber stamped by Oliver Hunt.
129
130         Bug 50509 - set* methods on MacroAssembler are awfully named.
131
132         Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
133         set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
134         setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
135
136         Rename to clarify.
137
138         set32 -> set32Compare32
139         setTest32 -> set32Test32
140         set8 -> set8Compare32
141         setTest8 -> set32Test8
142
143         * assembler/MacroAssembler.h:
144         (JSC::MacroAssembler::setPtr):
145         * assembler/MacroAssemblerARM.h:
146         (JSC::MacroAssemblerARM::set32Compare32):
147         (JSC::MacroAssemblerARM::set8Compare32):
148         (JSC::MacroAssemblerARM::set32Test32):
149         (JSC::MacroAssemblerARM::set32Test8):
150         * assembler/MacroAssemblerARMv7.h:
151         (JSC::MacroAssemblerARMv7::set32Compare32):
152         (JSC::MacroAssemblerARMv7::set8Compare32):
153         (JSC::MacroAssemblerARMv7::set32Test32):
154         (JSC::MacroAssemblerARMv7::set32Test8):
155         * assembler/MacroAssemblerMIPS.h:
156         (JSC::MacroAssemblerMIPS::set8Compare32):
157         (JSC::MacroAssemblerMIPS::set32Compare32):
158         (JSC::MacroAssemblerMIPS::set32Test8):
159         (JSC::MacroAssemblerMIPS::set32Test32):
160         * assembler/MacroAssemblerX86Common.h:
161         (JSC::MacroAssemblerX86Common::set8Compare32):
162         (JSC::MacroAssemblerX86Common::set32Compare32):
163         (JSC::MacroAssemblerX86Common::set32Test8):
164         (JSC::MacroAssemblerX86Common::set32Test32):
165         * jit/JITOpcodes.cpp:
166         (JSC::JIT::emit_op_eq):
167         (JSC::JIT::emit_op_neq):
168         (JSC::JIT::compileOpStrictEq):
169         (JSC::JIT::emit_op_eq_null):
170         (JSC::JIT::emit_op_neq_null):
171         * jit/JITOpcodes32_64.cpp:
172         (JSC::JIT::emit_op_eq):
173         (JSC::JIT::emit_op_neq):
174         (JSC::JIT::compileOpStrictEq):
175         (JSC::JIT::emit_op_eq_null):
176         (JSC::JIT::emit_op_neq_null):
177
178 2010-12-03  Oliver Hunt  <oliver@apple.com>
179
180         Reviewed by Geoff Garen.
181
182         Incorrect logic for returning memory at the end of linking.
183         Reviewed by Geoff Garen.
184
185         At the end of linking we return any space at the end of the
186         allocated executable region that was saved due to branch
187         compaction.  This is currently by done by subtracting the
188         different from the m_freePtr in the allocation pool.  This
189         can be incorrect if your allocation was made from a new
190         page that was not selected for subsequent allocations.
191
192         This patch corrects this behaviour by verifying that the
193         memory being returned actually comes from the current
194         allocation pool.
195
196         * assembler/LinkBuffer.h:
197         (JSC::LinkBuffer::linkCode):
198         * jit/ExecutableAllocator.h:
199         (JSC::ExecutablePool::tryShrink):
200
201 2010-12-03  Michael Saboff  <msaboff@apple.com>
202
203         Reviewed by Gavin Barraclough
204
205         Changes to significantly reduce branches to branches in JIT'ed
206         parentheses backtrack processing.  The changes include the following:
207         - Taking the backtracking processing out of line and adding it as
208           code at the end of the JIT'ed routine.
209         - Allow backtracks to be direct via an indirect branch for an address
210           pushed onto the stack.  If the use of an indirect branch is from a
211           conditional jump, then we emit a trampoline at the end of the 
212           routine.
213         - Propogate backtracks instead of adding trampolines.  Backtracks are
214           propogated to where they are used.  This change also eliminated 
215           trampoline branch code that aren't used.
216         - Added global expression state to keep track of parentheses tail
217           code and indirect branches.
218         Other changes made to support these changes.
219         - Split invertOrCapture flag on Patterns to two separate flags.  Added
220           getters for these flags.  Rippled these changes to both the JIT 
221           and interpreter code.
222         - Split BacktrackDestination out off TermGenerationState struct.
223           This is done to hold references to a backtrack for later code
224           generation.
225         https://bugs.webkit.org/show_bug.cgi?id=50295
226
227         * assembler/ARMAssembler.h:
228         (JSC::ARMAssembler::JmpDst::isSet):
229         * assembler/ARMv7Assembler.h:
230         (JSC::ARMv7Assembler::JmpDst::isSet):
231         * assembler/AbstractMacroAssembler.h:
232         (JSC::AbstractMacroAssembler::Label::isSet):
233         (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
234         (JSC::AbstractMacroAssembler::DataLabelPtr::used):
235         (JSC::AbstractMacroAssembler::JumpList::clear):
236         * assembler/MIPSAssembler.h:
237         (JSC::MIPSAssembler::JmpDst::isSet):
238         * assembler/X86Assembler.h:
239         (JSC::X86Assembler::JmpDst::isSet):
240         * yarr/RegexCompiler.cpp:
241         (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
242         (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
243         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
244         (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
245         * yarr/RegexInterpreter.cpp:
246         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
247         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
248         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
249         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
250         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
251         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
252         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
253         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
254         (JSC::Yarr::ByteCompiler::emitDisjunction):
255         * yarr/RegexInterpreter.h:
256         (JSC::Yarr::ByteTerm::ByteTerm):
257         (JSC::Yarr::ByteTerm::BackReference):
258         (JSC::Yarr::ByteTerm::invert):
259         (JSC::Yarr::ByteTerm::capture):
260         * yarr/RegexJIT.cpp:
261         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
262         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
263         (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
264         (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
265         (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
266         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
267         (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
268         (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
269         (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
270         (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
271         (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
272         (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
273         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
274         (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
275         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
276         (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
277         (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
278         (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
279         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
280         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
281         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
282         (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
283         (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
284         (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
285         (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
286         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
287         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
288         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
289         (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
290         (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
291         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
292         (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
293         (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
294         (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
295         (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
296         (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
297         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
298         (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
299         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
300         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
301         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
302         (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
303         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
304         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
305         (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
306         (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
307         (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
308         (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
309         (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
310         (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
311         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
312         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
313         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
314         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
315         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
316         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
317         (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
318         (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
319         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
320         (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
321         (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
322         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
323         (JSC::Yarr::RegexGenerator::generateAssertionBOL):
324         (JSC::Yarr::RegexGenerator::generateAssertionEOL):
325         (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
326         (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
327         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
328         (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
329         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
330         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
331         (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
332         (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
333         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
334         (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
335         (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
336         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
337         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
338         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
339         (JSC::Yarr::RegexGenerator::generateDisjunction):
340         (JSC::Yarr::RegexGenerator::compile):
341         * yarr/RegexPattern.h:
342         (JSC::Yarr::PatternTerm::PatternTerm):
343         (JSC::Yarr::PatternTerm::invert):
344         (JSC::Yarr::PatternTerm::capture):
345
346 2010-12-03  Chris Rogers  <crogers@google.com>
347
348         Reviewed by Kenneth Russell.
349
350         First steps to adding web audio files to build systems
351         https://bugs.webkit.org/show_bug.cgi?id=49952
352
353         * wtf/Complex.h:
354
355 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
356
357         Reviewed by Andreas Kling.
358
359         Move StringWx.cpp into wtf directory
360         https://bugs.webkit.org/show_bug.cgi?id=50060
361
362         * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
363         (WTF::String::String):
364
365 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
366
367         Reviewed by Andreas Kling.
368
369         Move StringBrew.cpp into wtf directory
370         https://bugs.webkit.org/show_bug.cgi?id=50058
371
372         * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
373         (WTF::String::String):
374
375 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
376
377         Reviewed by Andreas Kling.
378
379         Move StringHaiku.cpp into wtf directory
380         https://bugs.webkit.org/show_bug.cgi?id=50057
381
382         * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
383         (WTF::String::String):
384         (WTF::String::operator BString):
385
386 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
387
388         Try to fix Windows build.
389
390         * runtime/GCActivityCallback.cpp:
391         (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
392
393 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
394
395         Reviewed by Gavin Barraclough.
396
397         Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
398         com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
399         
400         * API/APIShims.h:
401         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
402         synchronize() function.
403
404         * runtime/Collector.cpp:
405         (JSC::Heap::activityCallback):
406         * runtime/Collector.h: Added an activityCallback() accessor, for the
407         call above.
408
409         * runtime/GCActivityCallback.h:
410         (JSC::GCActivityCallback::synchronize):
411         * runtime/GCActivityCallbackCF.cpp:
412         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
413         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
414         (JSC::DefaultGCActivityCallback::operator()):
415         (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
416         scheduled in. If we begin/resume execution within a new run loop, reschedule
417         on it. This prevents a crash when using a lockless context group on
418         multiple threads -- the crash would happen if the GC timer scheduled on
419         thread A, then you continued execution on thread B, then the thread A
420         timer fired.
421
422 2010-12-02  Darin Adler  <darin@apple.com>
423
424         * wtf/ASCIICType.h: Fix wrong type from last check-in.
425
426 2010-12-02  Darin Adler  <darin@apple.com>
427
428         Try to fix certain builds (Qt Windows).
429
430         * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
431         versions of ICU, UChar32 can be a typedef for unsigned. Adding this
432         overload should make us compatible with these old ICUs.
433
434 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
435
436         Reviewed by Darin Adler.
437
438         Add AtomicString::fromUTF8
439         https://bugs.webkit.org/show_bug.cgi?id=45594
440
441         Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
442         calculates the required length for the UTF16 conversation in one step.
443         This is then used in a specialized translator for the string table of AtomicString.
444
445         * JavaScriptCore.exp:
446         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
447         * wtf/text/AtomicString.cpp:
448         (WTF::CStringTranslator::equal):
449         (WTF::HashAndUTF8CharactersTranslator::hash):
450         (WTF::HashAndUTF8CharactersTranslator::equal):
451         (WTF::HashAndUTF8CharactersTranslator::translate):
452         (WTF::AtomicString::add):
453         (WTF::AtomicString::addSlowCase):
454         (WTF::AtomicString::find):
455         (WTF::AtomicString::fromUTF8):
456         * wtf/text/AtomicString.h:
457         * wtf/text/StringImpl.h:
458         * wtf/text/WTFString.h:
459         * wtf/unicode/UTF8.cpp:
460         (WTF::Unicode::readUTF8Sequence):
461         (WTF::Unicode::convertUTF8ToUTF16):
462         (WTF::Unicode::calculateStringHashFromUTF8):
463         (WTF::Unicode::equalUTF16WithUTF8):
464         * wtf/unicode/UTF8.h:
465
466 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
467
468         Reviewed by Sam Weinig.
469
470         Added a little hardening to OSAllocator.
471
472         * wtf/OSAllocatorPosix.cpp:
473         (WTF::OSAllocator::release):
474         * wtf/OSAllocatorWin.cpp:
475         (WTF::OSAllocator::reserve):
476         (WTF::OSAllocator::reserveAndCommit):
477         (WTF::OSAllocator::commit):
478         (WTF::OSAllocator::decommit):
479         (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
480         reports an error.
481
482 2010-12-02  Csaba Osztrogonác  <ossy@webkit.org>
483
484         Reviewed by Geoffrey Garen.
485
486         [Qt] Make platform managing of OSAllocator better than r73106
487         https://bugs.webkit.org/show_bug.cgi?id=50385
488
489         * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
490         * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
491         * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
492         * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
493
494 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
495
496         Reviewed by Andreas Kling.
497
498         [WINCE] Use GetTickCount() for srand()
499         https://bugs.webkit.org/show_bug.cgi?id=50338
500
501         time() is not a native function on WinCE, so use GetTickCount() instead.
502
503         * wtf/RandomNumberSeed.h:
504         (WTF::initializeRandomNumberGenerator):
505
506 2010-12-02  Norbert Leser  <norbert.leser@nokia.com>
507
508         Reviewed by Laszlo Gombos.
509
510         [Qt] [Symbian] Reintroduce compiler optimizations for JSC
511         https://bugs.webkit.org/show_bug.cgi?id=50270
512
513         Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
514         Tested via Sunspider and V8 - both of which show significant performance improvement.
515
516         * JavaScriptCore.pro:
517
518 2010-12-02  Peter Varga  <pvarga@inf.u-szeged.hu>
519
520         Reviewed by Gavin Barraclough.
521
522         Move regex parsing and fallback handling to runtime/RegExp.cpp
523         https://bugs.webkit.org/show_bug.cgi?id=50015
524
525         * runtime/RegExp.cpp:
526         (JSC::RegExp::RegExp):
527         (JSC::RegExp::create):
528         (JSC::RegExp::compile):
529         (JSC::RegExp::match):
530         (JSC::RegExp::printTraceData):
531         * runtime/RegExp.h:
532         (JSC::RegExp::pattern):
533         * yarr/RegexInterpreter.cpp:
534         * yarr/RegexInterpreter.h:
535         * yarr/RegexJIT.cpp:
536         (JSC::Yarr::RegexGenerator::compile):
537         (JSC::Yarr::jitCompileRegex):
538         * yarr/RegexJIT.h:
539         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
540         (JSC::Yarr::RegexCodeBlock::setFallBack):
541         (JSC::Yarr::RegexCodeBlock::isFallBack):
542         (JSC::Yarr::executeRegex):
543
544 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
545
546         Try to fix the GTK build.
547
548         * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
549
550 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
551
552         Try to fix the EFL Linux build.
553
554         * CMakeListsEfl.txt: Added OSAllocator to the project.
555
556 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
557
558         Try to fix the Qt build: Include all OS files for Qt's sake, and then
559         use #ifdefs in the files to exclude things based on OS.
560         
561         This is a pretty bad way to manage platforms -- hopefully we can
562         fix the Qt build system and move away from this in the future.
563
564         * wtf/OSAllocatorPosix.cpp:
565         * wtf/OSAllocatorSymbian.cpp:
566         * wtf/OSAllocatorWin.cpp:
567         * wtf/wtf.pri:
568
569 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
570
571         Try to fix the Chromium build.
572         
573         * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
574
575 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
576
577         Try to fix the GTK build.
578
579         * GNUmakefile.am: Added OSAllocator to another project.
580
581 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
582
583         Try to fix the GTK Linux build.
584
585         * JavaScriptCore.gypi: Added OSAllocator to the project.
586
587 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
588
589         Try to fix the Qt Linux build.
590
591         * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
592
593 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
594
595         Try to fix Windows build: export some more symbols.
596
597         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
598
599 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
600
601         Try to fix the Qt Linux build.
602
603         * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
604
605 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
606
607         Windows build fix: commit doesn't have a return value.
608
609         * wtf/OSAllocatorWin.cpp:
610         (WTF::OSAllocator::commit):
611
612 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
613
614         Build fix: Export some symbols.
615
616         * JavaScriptCore.exp:
617
618 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
619
620         Build fix.
621
622         * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
623         so other projects can see it.
624
625         * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
626
627 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
628
629         Reviewed by Sam Weinig.
630
631         Baby step toward a cross-platform virtual memory abstraction: created
632         an all-static OSAllocator class and changed MarkStack to use it.
633
634         * JavaScriptCore.exp: These functions are inlined now.
635
636         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
637
638         * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
639
640         * runtime/MarkStack.h:
641         (JSC::MarkStack::allocateStack):
642         (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
643         own platform-specific code.
644
645         * runtime/MarkStackNone.cpp: Removed. Nothing used this.
646
647         * runtime/MarkStackPosix.cpp: 
648         * runtime/MarkStackSymbian.cpp:
649         * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
650         we use the OSAllocator abstraction now.
651
652         * wtf/OSAllocator.h: Added.
653         * wtf/OSAllocatorPosix.cpp: Added.
654         (WTF::OSAllocator::reserve):
655         (WTF::OSAllocator::reserveAndCommit):
656         (WTF::OSAllocator::commit):
657         (WTF::OSAllocator::decommit):
658         (WTF::OSAllocator::release):
659         * wtf/OSAllocatorSymbian.cpp: Added.
660         (WTF::OSAllocator::reserve):
661         (WTF::OSAllocator::reserveAndCommit):
662         (WTF::OSAllocator::commit):
663         (WTF::OSAllocator::decommit):
664         (WTF::OSAllocator::release):
665         * wtf/OSAllocatorWin.cpp: Added.
666         (WTF::OSAllocator::reserve):
667         (WTF::OSAllocator::reserveAndCommit):
668         (WTF::OSAllocator::commit):
669         (WTF::OSAllocator::decommit):
670         (WTF::OSAllocator::release): The new OSAllocator abstraction.
671
672         * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
673
674 2010-12-01  Steve Falkenburg  <sfalken@apple.com>
675
676         Reviewed by Adam Roben.
677
678         WinCairo build should not use link-time code generation (LTCG)
679         https://bugs.webkit.org/show_bug.cgi?id=50353
680
681         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
682         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
683         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
684         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
685
686 010-12-01  Steve Falkenburg  <sfalken@apple.com>
687
688         Reviewed by Adam Roben.
689
690         vcproj changes can't be applied cleanly by the Windows EWS bot
691         https://bugs.webkit.org/show_bug.cgi?id=50328
692
693         * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
694         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
695         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
696         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
697         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
698         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
699         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
700         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
701         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
702         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
703         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
704         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
705         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
706         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
707
708 2010-12-01  Gavin Barraclough  <barraclough@apple.com>
709
710         Reviewed by Sam Weinig.
711
712         Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
713
714         For unmatched subpattens we previously used to set the subpattern end to -1,
715         but now we only set the start value. E.g. consider the following:
716             /a(b)?c/.exec("ac");
717         Previously we would generate an internal results array of:
718             [ 0, 2, -1, -1 ]
719         Since fairly recently we have generated results of:
720             [ 0, 2, -1, ??? ]
721         (With the end index of the subpattern uninitialized).
722
723         Update these ASSERTs to account for this.
724
725         Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
726         were checking the wrong property on the pattern term. We should have been
727         looking at term.parentheses.subpatternId, but instead were checking
728         term.subpatternId. The latter is actually only the subpatternId for
729         back reference terms. Rename this to backReferenceSubpatternId.
730
731         * yarr/RegexInterpreter.cpp:
732         (JSC::Yarr::Interpreter::matchBackReference):
733         (JSC::Yarr::Interpreter::backtrackBackReference):
734
735 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
736
737         Rubber stamped by Sam Weinig.
738
739         Bug 50297 - \s in YARR should match BOMs.
740
741         From section 15.10.2.12 CharacterClassEscape contains:
742
743         The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
744         characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
745
746         Table 2 in section 7.2 contains:
747
748         \uFEFF Byte Order Mark <BOM>
749
750         * create_regex_tables:
751             Add BOM to spaces table.
752
753 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
754
755         Reviewed by Darin Adler.
756
757         Fixed review comments following bug #48101.
758         Mostly typos, plus gave quantifyInfinite a symbolic name.
759
760         * yarr/RegexCompiler.cpp:
761         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
762         (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
763         * yarr/RegexInterpreter.cpp:
764         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
765         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
766         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
767         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
768         * yarr/RegexJIT.cpp:
769         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
770         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
771         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
772         * yarr/RegexParser.h:
773         (JSC::Yarr::Parser::parseTokens):
774         (JSC::Yarr::parse):
775
776 2010-11-30  Steve Falkenburg  <sfalken@apple.com>
777
778         Reviewed by Darin Adler.
779
780         WTF project missing build-stopping code from its pre-build event
781         https://bugs.webkit.org/show_bug.cgi?id=50281
782
783         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
784
785 2010-11-30  Patrick Gansterer  <paroga@webkit.org>
786
787         Reviewed by Darin Adler.
788
789         Cleanup UTF8.cpp
790         https://bugs.webkit.org/show_bug.cgi?id=49581
791
792         Use macros and functions instead of range values directly.
793
794         * wtf/unicode/UTF8.cpp:
795         (WTF::Unicode::inlineUTF8SequenceLength):
796         (WTF::Unicode::UTF8SequenceLength):
797         (WTF::Unicode::convertUTF16ToUTF8):
798         (WTF::Unicode::readUTF8Sequence):
799         (WTF::Unicode::convertUTF8ToUTF16):
800         * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
801
802 2010-11-30  Geoffrey Garen  <ggaren@apple.com>
803
804         Reviewed by Gavin Barraclough.
805
806         Fixed a crash seen when using a PageAllocation to store itself.
807
808         * wtf/PageAllocation.h:
809         (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
810         it, in case unmapping m_base unmaps the PageAllocation.
811
812         * wtf/BumpPointerAllocator.h:
813         (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
814
815 2010-11-30  Xan Lopez  <xlopez@igalia.com>
816
817         Reviewed by Darin Adler.
818
819         m_hasNonEnumerableProperties is never initialized in Structure
820         https://bugs.webkit.org/show_bug.cgi?id=50266
821
822         * runtime/Structure.cpp:
823         (JSC::Structure::Structure): initialize member variable.
824
825 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
826
827         Windows build fix (part 1). Use correct environment variable syntax in cmd files.
828
829         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
830         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
831         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
832         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
833         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
834         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
835         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
836         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
837         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
838         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
839
840 2010-11-29  Dan Bernstein  <mitz@apple.com>
841
842         Reviewed by Darin Adler.
843
844         WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
845         https://bugs.webkit.org/show_bug.cgi?id=50038
846
847         * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
848
849 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
850
851         Reviewed by Darin Adler.
852
853         JavaScriptCore projects on Windows should use cmd files for build events
854         https://bugs.webkit.org/show_bug.cgi?id=50193
855
856         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
857         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
858         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
859         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
860         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
861         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
862         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
863         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
864         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
865         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
866         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
867         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
868         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
869         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
870
871 2010-11-29  Dai Mikurube  <dmikurube@google.com>
872
873         Reviewed by Kent Tamura.
874
875         when empty, clicking "down" on outer-spin-button returns "max value"
876         https://bugs.webkit.org/show_bug.cgi?id=45491
877
878         It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
879         date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
880         returns a struct tm, not milliseconds.
881
882         Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
883         environments. This calculation is already done in calculateUTCOffset(), and complicated.
884         Duplicating this complicated calculation is unreasonable because of maintainability.
885         To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
886
887         * JavaScriptCore.exp:
888         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
889         * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
890         (WTF::calculateUTCOffset):
891         (WTF::calculateDSTOffset):
892         * wtf/DateMath.h:
893
894 2010-11-29  Chris Rogers  <crogers@google.com>
895
896         Reviewed by Kenneth Russell.
897
898         Switch web audio code to use FloatPoint3D instead of Vector3
899         https://bugs.webkit.org/show_bug.cgi?id=50186
900
901         * wtf/Vector3.h: Removed.
902
903 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
904
905         Reviewed by Adam Roben.
906
907         Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
908         https://bugs.webkit.org/show_bug.cgi?id=49858
909
910         We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
911         - To simplify editing (editing vsprops build steps is confusing).
912         - For more readable diffs.
913
914         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
915         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
916         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
917
918 2010-11-29  Geoffrey Garen  <ggaren@apple.com>
919
920         Reviewed by Gavin Barraclough.
921
922         Improved accuracy of command-line SunSpider.
923
924         * jsc.cpp:
925         (functionRun): Changed the "run" function to run a given test in
926         its own global object. Previously, all tests ran in the same global
927         object, which created name conflicts, and made globals from previous
928         tests artificially survive into later tests.
929         
930         Also changed "run" to return the elapsed milliseconds when running a
931         given test, for slightly more accurate numbers.
932
933         (functionCheckSyntax): Ditto on returning elapsed milliseconds.
934
935 2010-11-29  Darin Adler  <darin@apple.com>
936
937         Reviewed by Andreas Kling.
938
939         Remove a couple unneeded overflow checks
940         https://bugs.webkit.org/show_bug.cgi?id=49816
941
942         * wtf/text/CString.cpp:
943         (WTF::CString::init): Use an ASSERT instead of
944         an overflow check with CRASH.
945
946 2010-11-29  Adam Roben  <aroben@apple.com>
947
948         Robustify react-to-vsprops-changes.py against changes to its location
949         or the location of the .vsprops files
950
951         Suggested by John Sullivan.
952
953         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
954         Removed file_modification_times.
955         (main): Use glob.glob to find the .vsprops files and assert that we found some.
956
957 2010-11-29  Adam Roben  <aroben@apple.com>
958
959         Touch wtf/Platform.h whenever any .vsprops file changes
960
961         This will cause all files to be recompiled, which will make changes to
962         preprocessor macros (e.g., ENABLE_*) actually take effect.
963
964         Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
965         macros are changed (because not enough files are rebuilt)
966
967         Reviewed by John Sullivan.
968
969         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
970         (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
971         added some comments and logging to make it clearer what the script is
972         doing and why.
973
974 2010-11-29  Adam Roben  <aroben@apple.com>
975
976         Update react-to-vsprops-changes.py after r72555
977
978         .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
979
980         Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
981         react-to-vsprops-changes.py no longer works for people with a
982         non-default $WebKitLibrariesDir
983
984         Reviewed by John Sullivan.
985
986         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
987         (main): Always look in WebKitLibraries/win for .vsprops files, not in
988         $WebKitLibrariesDir.
989
990 2010-11-28  Gavin Barraclough  <barraclough@apple.com>
991
992         Reviewed by Sam Weinig.
993
994         Bug 48100 - YARR allows what seems like a bogus character-class range
995
996         Per ECMA-262 character classes containing character ranges containing
997         character classes are invalid, eg:
998             /[\d-x]/
999             /[x-\d]/
1000             /[\d-\d]/
1001         These should throw a syntax error.
1002
1003         * yarr/RegexParser.h:
1004
1005 2010-11-27  Gavin Barraclough  <barraclough@apple.com>
1006
1007         Reviewed by Sam Weinig.
1008
1009         Bug 48101 - Yarr gives different results for /(?:a*?){2,}/
1010
1011         The test cases in the linked mozilla bug demonstrate a couple of
1012         problems in subpattern matching. These bugs lie in the optimized
1013         cases - for matching parentheses with a quantity count of 1, and
1014         for matching greedy quantified parentheses at the end of a regex
1015         (which do not backtrack).
1016
1017         In both of these cases we are failing to correctly handle empty
1018         matches. In the case of parentheses-single matches (quantity count
1019         one) we are failing to test for empty matches at all. In the case
1020         of terminal subpattern matches we do currently check, however there
1021         is a subtler bug here too. In the case of an empty match we will
1022         presently immediately fall through to the next alternative (or
1023         complete the regex match), whereas upon a failed match we should
1024         be backtracking into the failing alternative, to give it a chance
1025         to match further (e.g. consider /a??b?|a/.exec("ab") - upon first
1026         attempting to match the first alternative this will match the empty
1027         string - since a?? is non-greedy, however rather than moving on to
1028         the second alternative we should be re-matching the first one, at
1029         which point the non-greedy a?? will match, and as such the result
1030         should be "ab", not "a").
1031
1032         Terminal subpattern matching contains a second bug, too. The frame
1033         location values in the subpattern should be being allocated with
1034         the outer disjunction's frame (as we do for the parentheses-single
1035         optimization). Consider the following three regexes:
1036             /a*(?:b*)*c*/
1037             /a*(?:b*)c*/
1038             /a*(?:b*)*/
1039         Considering only the frame location required by the atoms a,b, and
1040         c, (ignoring space associated with the nested subpattern) the first
1041         regex (a normal subpattern match) requires a frame size of 2 for
1042         the outer disjunction, (to backtrack terms a & c), with each
1043         iteration of the subpattern requiring a frame of size 1 (in order
1044         to backtrack b). In the case of the second regex (where the
1045         parentheses-single optimization will kick in) the outer frame must
1046         be set up with a frame size of 3, since the outer frame will also
1047         be used when running the nested subpattern. We will currently only
1048         allocate a farme of size 1 for the outer disjuntion (to contain a),
1049         howver the frame size should be 2 (since the subpattern will be
1050         evaluated in the outer frame). In addition to failing to allocate
1051         frame space the frame offsets are also presently invalid - in the
1052         case of the last regex b's frame location will be set assuming it
1053         to be the first term in the frame, whereas in this case b lies
1054         after the term a, and should be taking a separate frame location.
1055
1056         In order to correctly allocate the frame for terminal subpattern
1057         matches we must move this optimization back up from the JIT into
1058         the compiler (and thus interpreter too), since this is where the
1059         frame allocation takes place.
1060
1061         * yarr/RegexCompiler.cpp:
1062         (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
1063         (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
1064         (JSC::Yarr::compileRegex):
1065         * yarr/RegexInterpreter.cpp:
1066         (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
1067         (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
1068         (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
1069         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
1070         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
1071         (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
1072         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
1073         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
1074         (JSC::Yarr::Interpreter::matchDisjunction):
1075         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
1076         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
1077         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
1078         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
1079         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
1080         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
1081         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
1082         (JSC::Yarr::ByteCompiler::emitDisjunction):
1083         * yarr/RegexInterpreter.h:
1084         * yarr/RegexJIT.cpp:
1085         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
1086         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
1087         (JSC::Yarr::RegexGenerator::generateTerm):
1088         * yarr/RegexPattern.h:
1089         (JSC::Yarr::PatternTerm::PatternTerm):
1090
1091 2010-11-24  Patrick Gansterer  <paroga@webkit.org>
1092
1093         Reviewed by Csaba Osztrogonác.
1094
1095         Remove Bakefile build system files
1096         https://bugs.webkit.org/show_bug.cgi?id=49983
1097
1098         r53757 only removed the content, but not the files.
1099         This patch removes that empty files.
1100
1101         * JavaScriptCoreSources.bkl: Removed.
1102         * jscore.bkl: Removed.
1103
1104 2010-11-24  Gabor Loki  <loki@webkit.org>
1105
1106         Reviewed by Csaba Osztrogonác.
1107
1108         Merge the usage of jumps and calls at ARM-JIT
1109         https://bugs.webkit.org/show_bug.cgi?id=50008
1110
1111         Those JmpSrc objects which represent jumps (not calls) should point to
1112         after the jump instruction.
1113
1114         * assembler/ARMAssembler.h:
1115         (JSC::ARMAssembler::blx):
1116         (JSC::ARMAssembler::loadBranchTarget):
1117         (JSC::ARMAssembler::getAbsoluteJumpAddress):
1118         (JSC::ARMAssembler::linkJump):
1119         (JSC::ARMAssembler::relinkJump):
1120         (JSC::ARMAssembler::linkCall):
1121         (JSC::ARMAssembler::relinkCall):
1122         (JSC::ARMAssembler::getRelocatedAddress):
1123         (JSC::ARMAssembler::getDifferenceBetweenLabels):
1124         (JSC::ARMAssembler::getCallReturnOffset):
1125         * assembler/MacroAssemblerARM.h:
1126         (JSC::MacroAssemblerARM::call):
1127
1128 2010-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1129
1130         Reviewed by Xan Lopez.
1131
1132         [GTK] Optimize foldCase, toLower and toUpper methods in glib unicode backend
1133         https://bugs.webkit.org/show_bug.cgi?id=48625
1134
1135         GLib methods use UTF-8 strings, so we have to convert from UTF-16 to
1136         UTF-8 to perform the case operations and then convert back the result to
1137         UTF-16. GLib conversion methods return a new allocated string, so we
1138         have to memcpy the result into the destination buffer too. Using our
1139         own methods to convert between UTF-8 and UTF-16 from wtf/unicode/UTF8.h
1140         we don't need such memcpy, since they take an already allocated buffer
1141         rather than returning a new one. There's another optimization for the
1142         case when the destination buffer is not large enough. In that case,
1143         methods should return the expected destination buffer size and are
1144         called again with a new buffer. We can avoid the conversion to UTF-16 by
1145         pre-calculating the required size for the destination buffer.
1146
1147         * wtf/unicode/glib/UnicodeGLib.cpp:
1148         (WTF::Unicode::getUTF16LengthFromUTF8):
1149         (WTF::Unicode::convertCase):
1150         (WTF::Unicode::foldCase):
1151         (WTF::Unicode::toLower):
1152         (WTF::Unicode::toUpper):
1153
1154 2010-11-23  Patrick Gansterer  <paroga@webkit.org>
1155
1156         Reviewed by Sam Weinig.
1157
1158         Use WTF::StringHasher directly in JavaScriptCore
1159         https://bugs.webkit.org/show_bug.cgi?id=49893
1160
1161         * profiler/CallIdentifier.h:
1162         (JSC::CallIdentifier::Hash::hash):
1163         * runtime/Identifier.cpp:
1164         (JSC::IdentifierCStringTranslator::hash):
1165         (JSC::IdentifierUCharBufferTranslator::hash):
1166
1167 2010-11-22  Patrick Gansterer  <paroga@webkit.org>
1168
1169         Reviewed by Sam Weinig.
1170
1171         Add WTF::FixedArray::size()
1172         https://bugs.webkit.org/show_bug.cgi?id=49891
1173
1174         Add a method to get the size of a FixedArray.
1175
1176         * wtf/FixedArray.h:
1177         (WTF::FixedArray::size):
1178
1179 2010-11-22  Patrick Gansterer  <paroga@webkit.org>
1180
1181         Reviewed by Adam Roben.
1182
1183         [WINCE] Set correct preprocessor definitions
1184         https://bugs.webkit.org/show_bug.cgi?id=49887
1185
1186         * wtf/Platform.h:
1187
1188 2010-11-22  Adam Roben  <aroben@apple.com>
1189
1190         Use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops files
1191
1192         Apple's Windows build allows placing header files and import libraries for WebKit's
1193         dependencies (CoreGraphics, CFNetwork, SQLite, etc.) outside the source tree via the
1194         $WebKitLibrariesDir environment variable. This is both required for production builds and
1195         convenient for Apple-internal developer builds. Apple's production builds also require that
1196         WebKit's shared .vsprops files be accessed relative to $WebKitLibrariesDir. In production
1197         builds, the files are copied into that directory tree by the
1198         WebKitLibraries/win/tools/WinTools.make file. In Apple-internal developer builds, the
1199         copying is done by
1200         JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make.
1201
1202         This .vsprops copying is problematic in one very important case: when a developer updates
1203         their source tree and then tries to build. Visual Studio only reads .vsprops files when a
1204         project is first loaded. So, when Visual Studio is first opened after the .vsprops files are
1205         updated, it reads in the old files that were already residing in $WebKitLibrariesDir. When a
1206         build is started, JavaScriptCoreGenerated.make copies the new .vsprops files into
1207         $WebKitLibrariesDir, but Visual Studio will not pick up the changes.  The rest of the build
1208         will proceed with out-of-date .vsprops files, which will likely result in a build failure.
1209
1210         To fix this, we now use normal relative paths to access the .vsprops files in the source
1211         tree rather than in $WebKitLibrariesDir, but prefix those paths with a new environment
1212         variable, $WebKitVSPropsRedirectionDir. In developer builds, this environment variable is
1213         unset, so the normal relative paths are used to read the .vsprops files out of the source
1214         tree directly. In production builds, this environment variable is set to a fake directory
1215         that will cause the .vsprops files in $WebKitLibrariesDir to be found when the relative path
1216         is resolved.
1217         
1218         For example, JavaScriptCore.vcproj uses this path for FeatureDefines.vsprops:
1219
1220         $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1221
1222         In developer builds, where $WebKitVSPropsRedirectionDir is unset, this will point to the
1223         files in WebKitLibraries\win\tools\vsprops in the source tree. In production builds,
1224         JavaScriptCore.make sets $WebKitVSPropsRedirectionDir to
1225         "$(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\", so the full path for
1226         FeatureDefines.vsprops becomes:
1227
1228         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\1\2\3\..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1229
1230         which resolves to:
1231
1232         $(SRCROOT)\AppleInternal\tools\vsprops\OpenSource\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops
1233
1234         (We rely on the fact that Windows doesn't care whether the directories "1", "2", and "3"
1235         actually exist since they are matched by an equal number of ".." path components.)
1236
1237         Note that Visual Studio still won't pick up changes made to .vsprops files while Visual
1238         Studio is open, but that problem hasn't seemed to cause developers many headaches so far.
1239
1240         Fixes <http://webkit.org/b/49181> Windows build fails mysteriously when .vsprops files are
1241         updated
1242
1243         Reviewed by Dave Hyatt.
1244
1245         * JavaScriptCore.vcproj/JavaScriptCore.make: Set $WebKitVSPropsRedirectionDir so that
1246         production builds can find the .vsprops files.
1247
1248         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Stopy copying the
1249         .vsprops files. It isn't needed anymore.
1250
1251         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1252         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1253         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1254         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1255         Changed to use paths relative to $WebKitVSPropsRedirectionDir to access shared .vsprops
1256         files.
1257
1258 2010-11-19  Peter Varga  <pvarga@inf.u-szeged.hu>
1259
1260         Reviewed by Gavin Barraclough.
1261
1262         YARR JIT should fallback to YARR Interpreter instead of PCRE.
1263         https://bugs.webkit.org/show_bug.cgi?id=46719
1264
1265         Remove the ENABLE_YARR macro and the option of matching regular
1266         expressions with PCRE from JavaScriptCore.
1267
1268         * runtime/JSGlobalData.h:
1269         * runtime/RegExp.cpp:
1270         (JSC::RegExp::compile):
1271         (JSC::RegExp::match):
1272         * tests/mozilla/expected.html:
1273         * wtf/Platform.h:
1274         * yarr/RegexCompiler.cpp:
1275         * yarr/RegexCompiler.h:
1276         * yarr/RegexInterpreter.cpp:
1277         (JSC::Yarr::byteCompileRegex):
1278         * yarr/RegexInterpreter.h:
1279         * yarr/RegexJIT.cpp:
1280         (JSC::Yarr::jitCompileRegex):
1281         * yarr/RegexJIT.h:
1282         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1283         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1284         (JSC::Yarr::RegexCodeBlock::getFallback):
1285         (JSC::Yarr::RegexCodeBlock::isFallback):
1286         (JSC::Yarr::RegexCodeBlock::setFallback):
1287         (JSC::Yarr::executeRegex):
1288         * yarr/RegexParser.h:
1289         * yarr/RegexPattern.h:
1290
1291 2010-11-20  Kwang Yul Seo  <skyul@company100.net>
1292
1293         Reviewed by David Kilzer.
1294
1295         [BREWMP] Replace DBGPRINTF and DBGPRINTF_FATAL with dbg_Message
1296         https://bugs.webkit.org/show_bug.cgi?id=49520
1297
1298         DBGPRINTF and DBGPRINTF_FATAL macros are prohibited in Mod1. Use dbg_Message instead.
1299
1300         * wtf/Assertions.cpp:
1301         * wtf/Assertions.h:
1302
1303 2010-11-20  Gabor Loki  <loki@webkit.org>
1304
1305         Reviewed by Gavin Barraclough.
1306
1307         Support JIT_OPTIMIZE_MOD on Thumb-2
1308         https://bugs.webkit.org/show_bug.cgi?id=49432
1309
1310         Rewrite the soft modulo operation into macroassembler form, and move it
1311         to JSValue32_64 section.
1312         Add support for soft modulo on Thumb-2 JIT also.
1313
1314         * assembler/ARMv7Assembler.h:
1315         (JSC::ARMv7Assembler::clz):
1316         * assembler/MacroAssemblerARM.h:
1317         (JSC::MacroAssemblerARM::countLeadingZeros32):
1318         (JSC::MacroAssemblerARM::relativeTableJump):
1319         * assembler/MacroAssemblerARMv7.h:
1320         (JSC::MacroAssemblerARMv7::countLeadingZeros32):
1321         (JSC::MacroAssemblerARMv7::relativeTableJump):
1322         * jit/JITArithmetic.cpp:
1323         (JSC::JIT::emit_op_mod):
1324         * jit/JITOpcodes.cpp:
1325         (JSC::JIT::privateCompileCTIMachineTrampolines):
1326         * jit/JITOpcodes32_64.cpp:
1327         (JSC::JIT::softModulo):
1328         * jit/JITStubs.cpp:
1329         (JSC::JITThunks::JITThunks):
1330         * wtf/Platform.h:
1331
1332 2010-11-20  David Kilzer  <ddkilzer@apple.com>
1333
1334         <http://webkit.org/b/49848> Make it possible to display the last character of a secure text field unobscured
1335
1336         Reviewed by Darin Adler.
1337
1338         * JavaScriptCore.exp:
1339         * wtf/text/StringImpl.cpp:
1340         (WTF::StringImpl::secure): Added argument that controls whether
1341         the last character is obscured or not.  Implemented behavior.
1342         * wtf/text/StringImpl.h:
1343         (WTF::StringImpl::LastCharacterBehavior): Added enum.
1344         (WTF::StringImpl::secure): Updated method signature.
1345
1346 2010-11-19  William Chan  <willchan@chromium.org>
1347
1348         Reviewed by David Levin.
1349
1350         Add USE(CHROMIUM_NET)
1351
1352         Indicates the use of Chromium's network stack.  Chromium's network
1353         stack performs better when it has full view of all resource requests,
1354         so USE(CHROMIUM_NET) can be used to bypass throttles.
1355
1356         https://bugs.webkit.org/show_bug.cgi?id=49778
1357
1358         * wtf/Platform.h:
1359
1360 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
1361
1362         Reviewed by Adam Roben.
1363
1364         Add Debug_Cairo_CFLite and Release_Cairo_CFLite configurations for all vcproj files
1365         https://bugs.webkit.org/show_bug.cgi?id=49819
1366
1367         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1368         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1369         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1370         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
1371         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1372         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1373
1374 2010-11-19  Oliver Hunt  <oliver@apple.com>
1375
1376         Reviewed by Geoffrey Garen.
1377
1378         Don't check for constant registers when we can guarantee that the register won't be in the constant pool
1379         https://bugs.webkit.org/show_bug.cgi?id=49814
1380
1381         Add uncheckedR(int) to CallFrame, and replace all the uses of r() with uncheckedR()
1382         when we can guarantee that the register is not referring to a constant.
1383         This makes the interpreter about 0.5% faster, and makes the CallFrame initialisation
1384         logic correct when we're using a faked callframe (as in the case of the globalExec).
1385
1386         * bytecode/CodeBlock.cpp:
1387         (JSC::CodeBlock::createActivation):
1388         * debugger/DebuggerCallFrame.cpp:
1389         (JSC::DebuggerCallFrame::thisObject):
1390         * interpreter/CallFrame.h:
1391         (JSC::ExecState::uncheckedR):
1392         * interpreter/Interpreter.cpp:
1393         (JSC::Interpreter::resolve):
1394         (JSC::Interpreter::resolveSkip):
1395         (JSC::Interpreter::resolveGlobal):
1396         (JSC::Interpreter::resolveGlobalDynamic):
1397         (JSC::Interpreter::resolveBase):
1398         (JSC::Interpreter::resolveBaseAndProperty):
1399         (JSC::Interpreter::callEval):
1400         (JSC::Interpreter::unwindCallFrame):
1401         (JSC::Interpreter::throwException):
1402         (JSC::Interpreter::execute):
1403         (JSC::Interpreter::executeCall):
1404         (JSC::Interpreter::executeConstruct):
1405         (JSC::Interpreter::prepareForRepeatCall):
1406         (JSC::Interpreter::createExceptionScope):
1407         (JSC::Interpreter::privateExecute):
1408         * jit/JITStubs.cpp:
1409         (JSC::DEFINE_STUB_FUNCTION):
1410         * runtime/JSActivation.cpp:
1411         (JSC::JSActivation::argumentsGetter):
1412
1413 2010-11-19  Steve Falkenburg  <sfalken@apple.com>
1414
1415         Reviewed by Darin Adler.
1416
1417         Normalize Cairo/CFLite project/solution configuration names
1418         https://bugs.webkit.org/show_bug.cgi?id=49818
1419
1420         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1421         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1422         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1423
1424 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
1425
1426         Reviewed by Adam Roben.
1427
1428         Windows vcproj configuration names should be normalized across projects
1429         https://bugs.webkit.org/show_bug.cgi?id=49776
1430
1431         * JavaScriptCore.vcproj/JavaScriptCore.sln:
1432         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1433         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added.
1434         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
1435
1436 2010-11-19  Patrick Gansterer  <paroga@webkit.org>
1437
1438         Unreviewed, build fix after r72360.
1439
1440         * bytecode/CodeBlock.h:
1441         (JSC::CodeBlock::bytecodeOffset):
1442
1443 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
1444
1445         Rubber stamped by Geoff Garen.
1446
1447         Bug 49577 - Function.prototype should be non-configurable
1448
1449         Ooops, Function.prototype should not be enumerable!
1450
1451         * runtime/JSFunction.cpp:
1452         (JSC::JSFunction::getOwnPropertySlot):
1453
1454 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
1455
1456         Reviewed by Oliver Hunt.
1457
1458         Bug 49708 - Stop recompiling functions to regenerate exception info.
1459
1460         Instead only hold info as necessary – keep divot info is the inspector
1461         is enabled, line number info is debugging or profiling, and handler
1462         info for functions with try/catch.
1463
1464         * bytecode/CodeBlock.cpp:
1465         (JSC::CodeBlock::dumpStatistics):
1466         (JSC::CodeBlock::CodeBlock):
1467         (JSC::CodeBlock::lineNumberForBytecodeOffset):
1468         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
1469         (JSC::CodeBlock::shrinkToFit):
1470         * bytecode/CodeBlock.h:
1471         (JSC::CodeBlock::bytecodeOffset):
1472         (JSC::CodeBlock::addExpressionInfo):
1473         (JSC::CodeBlock::addLineInfo):
1474         (JSC::CodeBlock::hasExpressionInfo):
1475         (JSC::CodeBlock::hasLineInfo):
1476         (JSC::CodeBlock::needsCallReturnIndices):
1477         (JSC::CodeBlock::callReturnIndexVector):
1478         * bytecode/SamplingTool.cpp:
1479         (JSC::SamplingTool::dump):
1480         * bytecompiler/BytecodeGenerator.cpp:
1481         (JSC::BytecodeGenerator::generate):
1482         (JSC::BytecodeGenerator::BytecodeGenerator):
1483         * bytecompiler/BytecodeGenerator.h:
1484         (JSC::BytecodeGenerator::emitNode):
1485         (JSC::BytecodeGenerator::emitNodeInConditionContext):
1486         (JSC::BytecodeGenerator::emitExpressionInfo):
1487         (JSC::BytecodeGenerator::addLineInfo):
1488         * interpreter/Interpreter.cpp:
1489         (JSC::Interpreter::unwindCallFrame):
1490         (JSC::appendSourceToError):
1491         (JSC::Interpreter::throwException):
1492         (JSC::Interpreter::privateExecute):
1493         (JSC::Interpreter::retrieveLastCaller):
1494         * interpreter/Interpreter.h:
1495         * jit/JIT.cpp:
1496         (JSC::JIT::privateCompile):
1497         * jit/JITStubs.cpp:
1498         (JSC::jitThrow):
1499         (JSC::DEFINE_STUB_FUNCTION):
1500         * runtime/Collector.cpp:
1501         (JSC::Heap::markRoots):
1502         * runtime/Executable.cpp:
1503         (JSC::EvalExecutable::compileInternal):
1504         (JSC::ProgramExecutable::compileInternal):
1505         (JSC::FunctionExecutable::compileForCallInternal):
1506         (JSC::FunctionExecutable::compileForConstructInternal):
1507         * runtime/Executable.h:
1508         * runtime/JSGlobalData.cpp:
1509         (JSC::JSGlobalData::JSGlobalData):
1510         * runtime/JSGlobalData.h:
1511         (JSC::JSGlobalData::usingAPI):
1512         * runtime/JSGlobalObject.h:
1513         (JSC::JSGlobalObject::supportsRichSourceInfo):
1514         (JSC::JSGlobalObject::globalData):
1515
1516 2010-11-18  Adam Roben  <aroben@apple.com>
1517
1518         Add a script to delete manifest-related files when they are older than
1519         any .vsprops file
1520
1521         Changes to .vsprops files can cause the manifest files to become
1522         invalid, and Visual Studio doesn't always figure out that it needs to
1523         rebuild them.
1524
1525         Reviewed by Sam Weinig.
1526
1527         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
1528         Call the new script.
1529
1530         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
1531         Added the new script.
1532
1533         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py: Added.
1534         (file_modification_times): Generator to return the modification time of
1535         each file in a directory hierarchy.
1536         (main): Get the modification time of the newest vsprops file, then find
1537         all manifest-related files in the obj directory. Delete all
1538         manifest-related files that are older than the newest vsprops file.
1539
1540 2010-11-18  Mark Rowe  <mrowe@apple.com>
1541
1542         Rubber-stamped by Adam Roben.
1543
1544         <rdar://problem/8602509&8602717&8602724> Enable compaction support.
1545
1546         * Configurations/JavaScriptCore.xcconfig:
1547
1548 2010-11-18  Gavin Barraclough  <barraclough@apple.com>
1549
1550         Reviewed by Oliver Hunt.
1551
1552         Bug 49635 - Profiler implementation is fragile
1553
1554         The profile presently requires the exception handling mechanism to explicitly
1555         remove all stack frames that are exited during the exception unwind mechanism.
1556         This is fragile in a number of ways:
1557           * We have to change bytecode register allocation when compiling code to run
1558             when profiling, to preserve the callee function (this is also required to
1559             call did_call after the call has returned).
1560           * In the JIT we have to maintain additional data structures
1561             (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
1562             containing the callee.
1563           * In the interpreter we use 'magic values' to offset into the instruction
1564             stream to rediscover the register containing the function.
1565
1566         Instead, move profiling into the head and tail of functions.
1567           * This correctly accounts the cost of the call itself to the caller.
1568           * This allows us to access the callee function object from the callframe.
1569           * This means that at the point a call is made we can track the stack depth
1570             on the ProfileNode.
1571           * When unwinding we can simply report the depth at which the exception is
1572             being handled - all call frames above this level are freed.
1573
1574         * bytecode/CodeBlock.cpp:
1575         (JSC::CodeBlock::shrinkToFit):
1576         * bytecode/CodeBlock.h:
1577         (JSC::CodeBlock::bytecodeOffset):
1578         (JSC::CodeBlock::methodCallLinkInfo):
1579         * bytecompiler/BytecodeGenerator.cpp:
1580         (JSC::BytecodeGenerator::emitCall):
1581         (JSC::BytecodeGenerator::emitCallVarargs):
1582         * interpreter/Interpreter.cpp:
1583         (JSC::Interpreter::unwindCallFrame):
1584         (JSC::Interpreter::throwException):
1585         (JSC::Interpreter::execute):
1586         (JSC::Interpreter::executeCall):
1587         (JSC::Interpreter::executeConstruct):
1588         (JSC::Interpreter::privateExecute):
1589         * jit/JITStubs.cpp:
1590         (JSC::DEFINE_STUB_FUNCTION):
1591         * profiler/Profile.cpp:
1592         (JSC::Profile::Profile):
1593         * profiler/ProfileGenerator.cpp:
1594         (JSC::ProfileGenerator::addParentForConsoleStart):
1595         (JSC::ProfileGenerator::willExecute):
1596         (JSC::ProfileGenerator::didExecute):
1597         (JSC::ProfileGenerator::exceptionUnwind):
1598         (JSC::ProfileGenerator::stopProfiling):
1599         * profiler/ProfileGenerator.h:
1600         * profiler/ProfileNode.cpp:
1601         (JSC::ProfileNode::ProfileNode):
1602         (JSC::ProfileNode::willExecute):
1603         * profiler/ProfileNode.h:
1604         (JSC::ProfileNode::create):
1605         (JSC::ProfileNode::callerCallFrame):
1606         * profiler/Profiler.cpp:
1607         (JSC::dispatchFunctionToProfiles):
1608         (JSC::Profiler::_willExecute):
1609         (JSC::Profiler::_didExecute):
1610         (JSC::Profiler::exceptionUnwind):
1611         * profiler/Profiler.h:
1612
1613 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
1614
1615         Reviewed by Adam Roben.
1616
1617         Remove leftover Windows Debug_Internal configurations
1618         https://bugs.webkit.org/show_bug.cgi?id=49758
1619
1620         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1621         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1622         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1623         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1624
1625 2010-11-18  Chao-ying Fu  <fu@mips.com>
1626
1627         Reviewed by Csaba Osztrogonác.
1628
1629         Avoid increasing required alignment of target type warning
1630         https://bugs.webkit.org/show_bug.cgi?id=43963
1631
1632         * runtime/UString.h:
1633         (JSC::UStringHash::equal):
1634         * wtf/StdLibExtras.h:
1635
1636 2010-11-17  Sam Weinig  <sam@webkit.org>
1637
1638         Reviewed by Anders Carlsson.
1639
1640         Add stubbed out ScrollAnimator for the Mac
1641         https://bugs.webkit.org/show_bug.cgi?id=49678
1642
1643         * wtf/Platform.h: Enable SMOOTH_SCROLLING on the Mac, this has no
1644         change in behavior at the moment.
1645
1646 2010-11-17  David Kilzer  <ddkilzer@apple.com>
1647
1648         <http://webkit.org/b/49634> Make overflow guards in WTF::String::utf8 explicit
1649
1650         Reviewed by Darin Adler.
1651
1652         Add an explicit overflow check prior to allocating our buffer,
1653         rather than implicitly relying on the guard in convertUTF16ToUTF8.
1654
1655         * wtf/text/WTFString.cpp:
1656         (WTF::String::utf8):
1657
1658 2010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1659
1660         Unreviewed, rolling out r72197.
1661         http://trac.webkit.org/changeset/72197
1662         https://bugs.webkit.org/show_bug.cgi?id=49661
1663
1664         broke fast/regex/test1.html (Requested by stampho on #webkit).
1665
1666         * runtime/JSGlobalData.h:
1667         * runtime/RegExp.cpp:
1668         (JSC::RegExpRepresentation::~RegExpRepresentation):
1669         (JSC::RegExp::compile):
1670         (JSC::RegExp::match):
1671         * tests/mozilla/expected.html:
1672         * wtf/Platform.h:
1673         * yarr/RegexCompiler.cpp:
1674         * yarr/RegexCompiler.h:
1675         * yarr/RegexInterpreter.cpp:
1676         * yarr/RegexInterpreter.h:
1677         * yarr/RegexJIT.cpp:
1678         (JSC::Yarr::jitCompileRegex):
1679         * yarr/RegexJIT.h:
1680         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1681         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1682         (JSC::Yarr::RegexCodeBlock::getFallback):
1683         (JSC::Yarr::RegexCodeBlock::setFallback):
1684         (JSC::Yarr::executeRegex):
1685         * yarr/RegexParser.h:
1686         * yarr/RegexPattern.h:
1687
1688 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
1689
1690         Reviewed by Gavin Barraclough.
1691
1692         YARR JIT should fallback to YARR Interpreter instead of PCRE.
1693         https://bugs.webkit.org/show_bug.cgi?id=46719
1694
1695         Remove the ENABLE_YARR macro and the option of matching regular
1696         expressions with PCRE from JavaScriptCore.
1697
1698         * runtime/JSGlobalData.h:
1699         * runtime/RegExp.cpp:
1700         (JSC::RegExp::compile):
1701         (JSC::RegExp::match):
1702         * tests/mozilla/expected.html:
1703         * wtf/Platform.h:
1704         * yarr/RegexCompiler.cpp:
1705         * yarr/RegexCompiler.h:
1706         * yarr/RegexInterpreter.cpp:
1707         (JSC::Yarr::byteCompileRegex):
1708         * yarr/RegexInterpreter.h:
1709         * yarr/RegexJIT.cpp:
1710         (JSC::Yarr::jitCompileRegex):
1711         * yarr/RegexJIT.h:
1712         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
1713         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
1714         (JSC::Yarr::RegexCodeBlock::getFallback):
1715         (JSC::Yarr::RegexCodeBlock::isFallback):
1716         (JSC::Yarr::RegexCodeBlock::setFallback):
1717         (JSC::Yarr::executeRegex):
1718         * yarr/RegexParser.h:
1719         * yarr/RegexPattern.h:
1720
1721 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
1722
1723         Reviewed by Gavin Barraclough.
1724
1725         Extend YARR Interpreter with beginning character look-up optimization
1726         https://bugs.webkit.org/show_bug.cgi?id=45751
1727
1728         Add beginning character look-up optimization which sets the start
1729         index to the first possible successful pattern match.
1730         Extend YARR Interpreter with lookupForBeginChars function which
1731         implements the beginning character look-up optimization.
1732
1733         * yarr/RegexInterpreter.cpp:
1734         (JSC::Yarr::Interpreter::InputStream::readPair):
1735         (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
1736         (JSC::Yarr::Interpreter::lookupForBeginChars):
1737         (JSC::Yarr::Interpreter::matchDisjunction):
1738         (JSC::Yarr::Interpreter::interpret):
1739         * yarr/RegexInterpreter.h:
1740         (JSC::Yarr::BytecodePattern::BytecodePattern):
1741
1742 2010-11-17  Alexis Menard  <alexis.menard@nokia.com>, Simon Hausmann  <simon.hausmann@nokia.com>
1743
1744         Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
1745
1746         [Qt] Add support for use GStreamer with the Qt build
1747
1748         Enable the build/inclusion of the wtf/QObject convenience classes.
1749
1750         * JavaScriptCore.pri:
1751         * wtf/wtf.pri:
1752
1753 2010-11-17  Peter Varga  <pvarga@inf.u-szeged.hu>
1754
1755         Reviewed by Gavin Barraclough.
1756
1757         Collect the beginning characters in a RegExp pattern for look-up
1758         optimization
1759         https://bugs.webkit.org/show_bug.cgi?id=45748
1760
1761         Extend the YARR's parser with an algorithm which collects the potential
1762         beginning characters from a RegExp pattern for later look-up optimization.
1763
1764         * yarr/RegexCompiler.cpp:
1765         (JSC::Yarr::BeginCharHelper::BeginCharHelper):
1766         (JSC::Yarr::BeginCharHelper::addBeginChar):
1767         (JSC::Yarr::BeginCharHelper::merge):
1768         (JSC::Yarr::BeginCharHelper::addCharacter):
1769         (JSC::Yarr::BeginCharHelper::linkHotTerms):
1770         (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
1771         (JSC::Yarr::RegexPatternConstructor::addBeginTerm):
1772         (JSC::Yarr::RegexPatternConstructor::setupDisjunctionBeginTerms):
1773         (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
1774         (JSC::Yarr::RegexPatternConstructor::setupBeginChars):
1775         (JSC::Yarr::compileRegex):
1776         * yarr/RegexPattern.h:
1777         (JSC::Yarr::TermChain::TermChain):
1778         (JSC::Yarr::BeginChar::BeginChar):
1779         (JSC::Yarr::RegexPattern::RegexPattern):
1780         (JSC::Yarr::RegexPattern::reset):
1781
1782 2010-11-17  Sheriff Bot  <webkit.review.bot@gmail.com>
1783
1784         Unreviewed, rolling out r72160.
1785         http://trac.webkit.org/changeset/72160
1786         https://bugs.webkit.org/show_bug.cgi?id=49646
1787
1788         Broke lots of fast/profiler tests, among others (Requested by
1789         aroben on #webkit).
1790
1791         * bytecode/CodeBlock.cpp:
1792         (JSC::CodeBlock::dump):
1793         (JSC::CodeBlock::functionRegisterForBytecodeOffset):
1794         (JSC::CodeBlock::shrinkToFit):
1795         * bytecode/CodeBlock.h:
1796         (JSC::CodeBlock::addFunctionRegisterInfo):
1797         * bytecode/Opcode.h:
1798         * bytecompiler/BytecodeGenerator.cpp:
1799         (JSC::BytecodeGenerator::BytecodeGenerator):
1800         (JSC::BytecodeGenerator::emitCall):
1801         (JSC::BytecodeGenerator::emitCallVarargs):
1802         (JSC::BytecodeGenerator::emitReturn):
1803         (JSC::BytecodeGenerator::emitConstruct):
1804         * bytecompiler/BytecodeGenerator.h:
1805         (JSC::CallArguments::profileHookRegister):
1806         * bytecompiler/NodesCodegen.cpp:
1807         (JSC::CallArguments::CallArguments):
1808         * interpreter/Interpreter.cpp:
1809         (JSC::Interpreter::unwindCallFrame):
1810         (JSC::Interpreter::throwException):
1811         (JSC::Interpreter::execute):
1812         (JSC::Interpreter::executeCall):
1813         (JSC::Interpreter::executeConstruct):
1814         (JSC::Interpreter::privateExecute):
1815         * jit/JIT.cpp:
1816         (JSC::JIT::privateCompileMainPass):
1817         * jit/JIT.h:
1818         * jit/JITOpcodes.cpp:
1819         (JSC::JIT::emit_op_profile_will_call):
1820         (JSC::JIT::emit_op_profile_did_call):
1821         * jit/JITOpcodes32_64.cpp:
1822         (JSC::JIT::emit_op_profile_will_call):
1823         (JSC::JIT::emit_op_profile_did_call):
1824         * jit/JITStubs.cpp:
1825         (JSC::DEFINE_STUB_FUNCTION):
1826         * jit/JITStubs.h:
1827         * profiler/Profile.cpp:
1828         (JSC::Profile::Profile):
1829         * profiler/ProfileGenerator.cpp:
1830         (JSC::ProfileGenerator::addParentForConsoleStart):
1831         (JSC::ProfileGenerator::willExecute):
1832         (JSC::ProfileGenerator::didExecute):
1833         (JSC::ProfileGenerator::stopProfiling):
1834         * profiler/ProfileGenerator.h:
1835         * profiler/ProfileNode.cpp:
1836         (JSC::ProfileNode::ProfileNode):
1837         (JSC::ProfileNode::willExecute):
1838         * profiler/ProfileNode.h:
1839         (JSC::ProfileNode::create):
1840         (JSC::ProfileNode::operator==):
1841         * profiler/Profiler.cpp:
1842         (JSC::dispatchFunctionToProfiles):
1843         (JSC::Profiler::willExecute):
1844         (JSC::Profiler::didExecute):
1845         * profiler/Profiler.h:
1846
1847 2010-11-16  Gavin Barraclough  <barraclough@apple.com>
1848
1849         Reviewed by Sam Weinig.
1850
1851         Bug 49635 - Profiler implementation is fragile
1852
1853         The profile presently requires the exception handling mechanism to explicitly
1854         remove all stack frames that are exited during the exception unwind mechanism.
1855         This is fragile in a number of ways:
1856           * We have to change bytecode register allocation when compiling code to run
1857             when profiling, to preserve the callee function (this is also required to
1858             call did_call after the call has returned).
1859           * In the JIT we have to maintain additional data structures
1860             (CodeBlock::RareData::m_functionRegisterInfos) to map back to the register
1861             containing the callee.
1862           * In the interpreter we use 'magic values' to offset into the instruction
1863             stream to rediscover the register containing the function.
1864
1865         Instead, move profiling into the head and tail of functions.
1866           * This correctly accounts the cost of the call itself to the caller.
1867           * This allows us to access the callee function object from the callframe.
1868           * This means that at the point a call is made we can track the stack depth
1869             on the ProfileNode.
1870           * When unwinding we can simply report the depth at which the exception is
1871             being handled - all call frames above this level are freed.
1872
1873         * JavaScriptCore.xcodeproj/project.pbxproj:
1874         * bytecode/CodeBlock.cpp:
1875         (JSC::CodeBlock::dump):
1876         (JSC::CodeBlock::shrinkToFit):
1877         * bytecode/CodeBlock.h:
1878         (JSC::CodeBlock::bytecodeOffset):
1879         (JSC::CodeBlock::methodCallLinkInfo):
1880         * bytecode/Opcode.h:
1881         * bytecompiler/BytecodeGenerator.cpp:
1882         (JSC::BytecodeGenerator::BytecodeGenerator):
1883         (JSC::BytecodeGenerator::emitCall):
1884         (JSC::BytecodeGenerator::emitCallVarargs):
1885         (JSC::BytecodeGenerator::emitReturn):
1886         (JSC::BytecodeGenerator::emitConstruct):
1887         * bytecompiler/BytecodeGenerator.h:
1888         (JSC::CallArguments::count):
1889         * bytecompiler/NodesCodegen.cpp:
1890         (JSC::CallArguments::CallArguments):
1891         * interpreter/Interpreter.cpp:
1892         (JSC::ProfileHostCall::ProfileHostCall):
1893         (JSC::ProfileHostCall::~ProfileHostCall):
1894         (JSC::Interpreter::unwindCallFrame):
1895         (JSC::Interpreter::throwException):
1896         (JSC::Interpreter::execute):
1897         (JSC::Interpreter::executeCall):
1898         (JSC::Interpreter::executeConstruct):
1899         (JSC::Interpreter::privateExecute):
1900         * jit/JIT.cpp:
1901         (JSC::JIT::privateCompileMainPass):
1902         * jit/JIT.h:
1903         * jit/JITOpcodes.cpp:
1904         (JSC::JIT::emit_op_profile_has_called):
1905         (JSC::JIT::emit_op_profile_will_return):
1906         * jit/JITOpcodes32_64.cpp:
1907         (JSC::JIT::emit_op_profile_has_called):
1908         (JSC::JIT::emit_op_profile_will_return):
1909         * jit/JITStubs.cpp:
1910         (JSC::DEFINE_STUB_FUNCTION):
1911         * jit/JITStubs.h:
1912         * profiler/Profile.cpp:
1913         (JSC::Profile::Profile):
1914         * profiler/ProfileGenerator.cpp:
1915         (JSC::ProfileGenerator::addParentForConsoleStart):
1916         (JSC::ProfileGenerator::willExecute):
1917         (JSC::ProfileGenerator::didExecute):
1918         (JSC::ProfileGenerator::exceptionUnwind):
1919         (JSC::ProfileGenerator::stopProfiling):
1920         * profiler/ProfileGenerator.h:
1921         * profiler/ProfileNode.cpp:
1922         (JSC::ProfileNode::ProfileNode):
1923         (JSC::ProfileNode::willExecute):
1924         * profiler/ProfileNode.h:
1925         (JSC::ProfileNode::create):
1926         (JSC::ProfileNode::operator==):
1927         (JSC::ProfileNode::exec):
1928         * profiler/Profiler.cpp:
1929         (JSC::dispatchFunctionToProfiles):
1930         (JSC::Profiler::hasCalled):
1931         (JSC::Profiler::willEvaluate):
1932         (JSC::Profiler::willReturn):
1933         (JSC::Profiler::didEvaluate):
1934         (JSC::Profiler::exceptionUnwind):
1935         * profiler/Profiler.h:
1936
1937 2010-11-16  Brian Weinstein  <bweinstein@apple.com>
1938
1939         Reviewed by Adam Roben and Steve Falkenburg.
1940
1941         Touch Platform.h to force a rebuild for Windows.
1942
1943         * wtf/Platform.h:
1944
1945 2010-11-16  Steve Falkenburg  <sfalken@apple.com>
1946
1947         Reviewed by Adam Roben.
1948
1949         Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
1950         https://bugs.webkit.org/show_bug.cgi?id=49632
1951
1952         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1953         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1954         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1955         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1956
1957 2010-11-16  Peter Varga  <pvarga@inf.u-szeged.hu>
1958
1959         Reviewed by Gavin Barraclough.
1960
1961         The number of recursive match calls isn't limited in YARR Interpreter
1962         https://bugs.webkit.org/show_bug.cgi?id=47906
1963
1964         Check the number of the matchDisjunction recursive calls to avoid unbounded
1965         recursion.
1966         Now the matchDisjunction function returns JSRegExpResult instead of bool.
1967         The JSRegExpResult enum contains the result of matching or the error code
1968         of the failure (like HitLimit) which terminates the matching.
1969         The error codes are based on pcre's jsRegExpExecute error codes.
1970
1971         * yarr/RegexInterpreter.cpp:
1972         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
1973         (JSC::Yarr::Interpreter::matchParentheses):
1974         (JSC::Yarr::Interpreter::backtrackParentheses):
1975         (JSC::Yarr::Interpreter::matchDisjunction):
1976         (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
1977         (JSC::Yarr::Interpreter::interpret):
1978         (JSC::Yarr::Interpreter::Interpreter):
1979         * yarr/RegexInterpreter.h:
1980
1981 2010-11-16  Brian Weinstein  <bweinstein@apple.com>
1982
1983         Rest of the Windows build fix.
1984
1985         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1986
1987 2010-11-16  Gavin Barraclough  <barraclough@apple.com>
1988
1989         Windows build fix pt 1.
1990
1991         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1992
1993 2010-11-16  Gavin Barraclough  <barraclough@apple.com>
1994
1995         Reviewed by Oliver Hunt.
1996
1997         https://bugs.webkit.org/show_bug.cgi?id=49606
1998
1999         The bug here is that we read the prototype from the RHS argument using a regular
2000         op_get_by_id before op_instanceof has checked that this is an object implementing
2001         HasInstance. This incorrect behaviour gives rise to further unnecessary complexity
2002         in the code base, since we have additional logic (implemented using the
2003         GetByIdExceptionInfo data structures on CodeBlock) to convert not an object errors
2004         from the get_by_id into invalid parameter errors. Having fixed this bug this code
2005         is all redundant, since in these cases the get_by_id will never have been reached.
2006
2007         * bytecode/CodeBlock.cpp:
2008         (JSC::CodeBlock::dump):
2009         (JSC::CodeBlock::shrinkToFit):
2010         * bytecode/CodeBlock.h:
2011         (JSC::CodeBlock::addExpressionInfo):
2012         * bytecode/Opcode.h:
2013         * bytecompiler/BytecodeGenerator.cpp:
2014         (JSC::BytecodeGenerator::BytecodeGenerator):
2015         (JSC::BytecodeGenerator::emitCheckHasInstance):
2016         * bytecompiler/BytecodeGenerator.h:
2017         * bytecompiler/NodesCodegen.cpp:
2018         (JSC::InstanceOfNode::emitBytecode):
2019         * interpreter/Interpreter.cpp:
2020         (JSC::Interpreter::throwException):
2021         (JSC::Interpreter::privateExecute):
2022         * jit/JIT.cpp:
2023         (JSC::JIT::privateCompileMainPass):
2024         (JSC::JIT::privateCompileSlowCases):
2025         * jit/JIT.h:
2026         * jit/JITOpcodes.cpp:
2027         (JSC::JIT::emit_op_check_has_instance):
2028         (JSC::JIT::emit_op_instanceof):
2029         (JSC::JIT::emitSlow_op_check_has_instance):
2030         (JSC::JIT::emitSlow_op_instanceof):
2031         * jit/JITOpcodes32_64.cpp:
2032         (JSC::JIT::emit_op_check_has_instance):
2033         (JSC::JIT::emit_op_instanceof):
2034         (JSC::JIT::emitSlow_op_check_has_instance):
2035         (JSC::JIT::emitSlow_op_instanceof):
2036         * jit/JITStubs.cpp:
2037         (JSC::DEFINE_STUB_FUNCTION):
2038         * jit/JITStubs.h:
2039         * runtime/ExceptionHelpers.cpp:
2040         (JSC::createInterruptedExecutionException):
2041         (JSC::createTerminatedExecutionException):
2042         (JSC::createUndefinedVariableError):
2043         (JSC::createNotAFunctionError):
2044         (JSC::createNotAnObjectError):
2045         * runtime/ExceptionHelpers.h:
2046         * runtime/JSGlobalData.cpp:
2047         (JSC::JSGlobalData::JSGlobalData):
2048         * runtime/JSGlobalData.h:
2049         * runtime/JSNotAnObject.cpp:
2050         (JSC::JSNotAnObject::toPrimitive):
2051         (JSC::JSNotAnObject::getPrimitiveNumber):
2052         (JSC::JSNotAnObject::toBoolean):
2053         (JSC::JSNotAnObject::toNumber):
2054         (JSC::JSNotAnObject::toString):
2055         (JSC::JSNotAnObject::toObject):
2056         (JSC::JSNotAnObject::getOwnPropertySlot):
2057         (JSC::JSNotAnObject::getOwnPropertyDescriptor):
2058         (JSC::JSNotAnObject::put):
2059         (JSC::JSNotAnObject::deleteProperty):
2060         (JSC::JSNotAnObject::getOwnPropertyNames):
2061         * runtime/JSNotAnObject.h:
2062         (JSC::JSNotAnObject::JSNotAnObject):
2063         * runtime/JSObject.h:
2064         (JSC::JSObject::isActivationObject):
2065         * runtime/JSValue.cpp:
2066         (JSC::JSValue::toObjectSlowCase):
2067         (JSC::JSValue::synthesizeObject):
2068         (JSC::JSValue::synthesizePrototype):
2069
2070 2010-11-15  Darin Adler  <darin@apple.com>
2071
2072         Reviewed by Sam Weinig.
2073
2074         Harden additional string functions against large lengths
2075         https://bugs.webkit.org/show_bug.cgi?id=49574
2076
2077         * wtf/text/CString.cpp:
2078         (WTF::CString::init): Check for length that is too large for CString.
2079         (WTF::CString::newUninitialized): Ditto.
2080         (WTF::CString::copyBufferIfNeeded): Fix types so the length stays
2081         in a size_t.
2082
2083         * wtf/text/WTFString.cpp:
2084         (WTF::String::append): Check for length that is too large.
2085
2086 2010-11-15  Gavin Barraclough  <barraclough@apple.com>
2087
2088         Reviewed by Sam Weinig.
2089
2090         Bug 49577 - Function.prototype should be non-configurable
2091
2092         JSC lazily allocates the prototype property of Function objects.
2093
2094         We check the prototype exists on 'get', but not on 'put'.
2095         If you 'put' without having first done a 'get' you can end up with a configurable
2096         prototype (prototype should only ever be non-configurable).
2097
2098         This is visible in a couple of ways:
2099           * 'delete' on the property may succeed. (the next access will result in a new,
2100           reset prototype object).
2101           * the prototype may be set to a getter.
2102
2103         * runtime/JSFunction.cpp:
2104         (JSC::JSFunction::getOwnPropertyNames):
2105             Reify the prototype property before allowing an enumerate including don't enum properties.
2106         (JSC::JSFunction::put):
2107             Reify the prototype property before any put to it.
2108
2109 2010-11-15  Gavin Barraclough  <barraclough@apple.com>
2110
2111         Reviewed by Geoff Garen.
2112
2113         Bug 49488 - Only add source specific information to exceptions in Interpreter::throwException
2114
2115         Three types of source location information are added to errors.
2116
2117         (1) Divot information.
2118
2119         This was added with the intention of using it to provide better source highlighting in the inspector.
2120         We may still want to do so, but we probably should not be exposing these values in a manner visible to
2121         user scripts – only through an internal C++ interface. The code adding divot properties to objects has
2122         been removed.
2123
2124         (2) Line number information.
2125
2126         Line number information is presently sometimes added at the point the exception is created, and sometimes
2127         added at the point the exception passes through throwException. Change this so that throwException has
2128         the sole responsibility for adding line number and source file information.
2129
2130         (3) Source snippets in the message of certain type errors (e.g. 'doc' in `Result of expression 'doc' [undefined] is not an object.`).
2131
2132         These messages are currently created at the point the exceptions is raised. Instead reformat the message
2133         such that the source snippet is located at the end (`Result of expression 'b1' [undefined] is not an object.`
2134         becomes `'undefined' is not an object (evaluating 'b1.property')`), and append these to the message at
2135         the in throw Exception. This presents a number of advantages:
2136           * we no longer need to have source location information to create these TypeErrors.
2137           * we can chose to append source location information in other error messages, including those where
2138             passing source location to the point of construction would be inconvenient.
2139           * we can chose in future to omit to append source location information when running in a non-debug mode.
2140
2141         This also cleans up some error output, e.g. removing double brackets ('[[]]') around objects in output,
2142         removing double periods (..) at end of lines, and adding slightly more context to some errors.
2143
2144         * bytecode/CodeBlock.cpp:
2145         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2146             - Separated called to access line and range information.
2147
2148         * bytecode/CodeBlock.h:
2149             - Separated called to access line and range information.
2150
2151         * interpreter/Interpreter.cpp:
2152         (JSC::Interpreter::resolve):
2153         (JSC::Interpreter::resolveSkip):
2154         (JSC::Interpreter::resolveGlobal):
2155         (JSC::Interpreter::resolveGlobalDynamic):
2156         (JSC::Interpreter::resolveBaseAndProperty):
2157         (JSC::isInvalidParamForIn):
2158         (JSC::isInvalidParamForInstanceOf):
2159             - Update parameters passed to error constructors.
2160         (JSC::appendSourceToError):
2161             - Update message property to add location information (previously added in createErrorMessage, in ExceptionHelpers)
2162         (JSC::Interpreter::throwException):
2163             - Updated to call appendSourceToError. 
2164         (JSC::Interpreter::privateExecute):
2165             - Update parameters passed to error constructors.
2166
2167         * jit/JITStubs.cpp:
2168         (JSC::DEFINE_STUB_FUNCTION):
2169             - Update parameters passed to error constructors.
2170
2171         * runtime/Error.cpp:
2172         (JSC::addErrorInfo):
2173         (JSC::hasErrorInfo):
2174             - Removed divot properties.
2175
2176         * runtime/Error.h:
2177             - Removed divot properties.
2178
2179         * runtime/ErrorInstance.cpp:
2180         (JSC::ErrorInstance::ErrorInstance):
2181             - Initialize new property.
2182
2183         * runtime/ErrorInstance.h:
2184         (JSC::ErrorInstance::appendSourceToMessage):
2185         (JSC::ErrorInstance::setAppendSourceToMessage):
2186         (JSC::ErrorInstance::clearAppendSourceToMessage):
2187             - Added flag to check for errors needing location information appending.
2188         (JSC::ErrorInstance::isErrorInstance):
2189             - Added virtual method to check for ErrorInstances.
2190
2191         * runtime/ExceptionHelpers.cpp:
2192         (JSC::createUndefinedVariableError):
2193         (JSC::createInvalidParamError):
2194         (JSC::createNotAConstructorError):
2195         (JSC::createNotAFunctionError):
2196         (JSC::createNotAnObjectError):
2197             - Update parameters passed to error constructors, stopped adding line number information early, changed TypeError messages.
2198
2199         * runtime/ExceptionHelpers.h:
2200             - Updated function signatures.
2201
2202         * runtime/JSFunction.cpp:
2203         (JSC::callHostFunctionAsConstructor):
2204             - Update parameters passed to error constructors.
2205
2206         * runtime/JSObject.h:
2207         (JSC::JSObject::isErrorInstance):
2208             - Added virtual method to check for ErrorInstances.
2209
2210 2010-11-12  Anders Carlsson  <andersca@apple.com>
2211
2212         Reviewed by Adam Roben.
2213
2214         CString(const char*) crashes when passed a null pointer
2215         https://bugs.webkit.org/show_bug.cgi?id=49450
2216
2217         * wtf/text/CString.cpp:
2218         (WTF::CString::CString):
2219         Return early if str is null.
2220
2221 2010-11-11  Gavin Barraclough  <barraclough@apple.com>
2222
2223         Reviewed by Oliver Hunt.
2224
2225         Bug 49420 - Clean up syntax/reference error throw.
2226
2227         Some errors detected at compile time are thrown at runtime. We currently do so using a op_new_error/op_throw bytecode pair.
2228         This is not ideal. op_throw is used for explicit user throw statements, and has different requirements in terms or meta data
2229         attached to the exception (controlled by the explicitThrow parameter passed to Interpreter::throwException). To work around
2230         this, op_new_error has to add the meta data at an early stage, which is unlike other VM exceptions being raised.
2231
2232         We can simplify this and bring into line with other exception behaviour by changing new_error from just allocating an
2233         Exception instance to also throwing it – but as a regular VM throw, correctly passing explicitThrow as false.
2234
2235         * JavaScriptCore.xcodeproj/project.pbxproj:
2236         * bytecode/CodeBlock.cpp:
2237         (JSC::CodeBlock::dump):
2238         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
2239         * bytecode/Opcode.h:
2240         * bytecompiler/BytecodeGenerator.cpp:
2241         (JSC::BytecodeGenerator::emitThrowReferenceError):
2242         (JSC::BytecodeGenerator::emitThrowSyntaxError):
2243         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
2244         * bytecompiler/BytecodeGenerator.h:
2245         (JSC::BytecodeGenerator::emitNodeInConditionContext):
2246         * bytecompiler/NodesCodegen.cpp:
2247         (JSC::ThrowableExpressionData::emitThrowReferenceError):
2248         (JSC::ThrowableExpressionData::emitThrowSyntaxError):
2249         (JSC::RegExpNode::emitBytecode):
2250         (JSC::PostfixErrorNode::emitBytecode):
2251         (JSC::PrefixErrorNode::emitBytecode):
2252         (JSC::AssignErrorNode::emitBytecode):
2253         (JSC::ForInNode::emitBytecode):
2254         (JSC::ContinueNode::emitBytecode):
2255         (JSC::BreakNode::emitBytecode):
2256         (JSC::ReturnNode::emitBytecode):
2257         (JSC::LabelNode::emitBytecode):
2258         * interpreter/Interpreter.cpp:
2259         (JSC::Interpreter::privateExecute):
2260         * jit/JIT.cpp:
2261         (JSC::JIT::privateCompileMainPass):
2262         * jit/JIT.h:
2263         * jit/JITOpcodes.cpp:
2264         (JSC::JIT::emit_op_throw_reference_error):
2265         (JSC::JIT::emit_op_throw_syntax_error):
2266         * jit/JITOpcodes32_64.cpp:
2267         (JSC::JIT::emit_op_throw_reference_error):
2268         (JSC::JIT::emit_op_throw_syntax_error):
2269         * jit/JITStubs.cpp:
2270         (JSC::DEFINE_STUB_FUNCTION):
2271         * jit/JITStubs.h:
2272         * parser/Nodes.h:
2273
2274 2010-11-11  Darin Adler  <darin@apple.com>
2275
2276         Reviewed by Sam Weinig.
2277
2278         Harden some string functions against large lengths
2279         https://bugs.webkit.org/show_bug.cgi?id=49293
2280
2281         * wtf/text/StringImpl.cpp:
2282         (WTF::StringImpl::create): Fix incorrect use of PassRefPtr. Check for
2283         strlen results that are too large for StringImpl.
2284         (WTF::StringImpl::lower): Check for lengths that are too large for
2285         int32_t.
2286         (WTF::StringImpl::upper): Fix incorrect use of PassRefPtr. Check for
2287         lengths that are too large for int32_t.
2288         (WTF::StringImpl::secure): Fix incorect use of PassRefPtr. Use unsigned
2289         rather than int and int32_t so we can handle any length.
2290         (WTF::StringImpl::foldCase): Fix incorrect use of PassRefPtr. Check for
2291         lengths that are too large for int32_t.
2292         (WTF::StringImpl::find): Check for strlen results that are too large for
2293         StringImpl.
2294         (WTF::StringImpl::findIgnoringCase): Ditto.
2295         (WTF::StringImpl::replace): Fix incorrect use of PassRefPtr.
2296         (WTF::StringImpl::createWithTerminatingNullCharacter): Check before
2297         incrementing length.
2298
2299 2010-11-11  Dan Horák  <dan@danny.cz>
2300
2301         Reviewed by Andreas Kling.
2302
2303         Add support for the s390/s390x architectures, it's big-endian
2304         with s390 being 32-bit and s390x being 64-bit.
2305
2306         https://bugs.webkit.org/show_bug.cgi?id=34786
2307
2308         * wtf/Platform.h:
2309
2310 2010-11-10  Csaba Osztrogonác  <ossy@webkit.org>
2311
2312         Reviewed by David Hyatt.
2313
2314         HTML5 Ruby support should be mandatory feature
2315         https://bugs.webkit.org/show_bug.cgi?id=49272
2316
2317         Remove Ruby as optional feature.
2318
2319         * Configurations/FeatureDefines.xcconfig:
2320         * JavaScriptCorePrefix.h:: Touch it to avoid incremental build failure on Windows.
2321
2322 2010-11-10  Peter Rybin  <peter.rybin@gmail.com>
2323
2324         Reviewed by Adam Barth.
2325
2326         HTML parser should provide script column position within HTML document to JavaScript engine
2327         https://bugs.webkit.org/show_bug.cgi?id=45271
2328
2329         Adds TextPosition* classes -- a structure that stores line/column/generation
2330         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
2331         wrappers that emphasize whether int number is used as zero-based or
2332         one-based.
2333
2334         * GNUmakefile.am:
2335         * JavaScriptCore.gypi:
2336         * JavaScriptCore.xcodeproj/project.pbxproj:
2337         * wtf/text/TextPosition.h: Added.
2338         (WTF::TextPosition::TextPosition):
2339         (WTF::TextPosition::minimumPosition):
2340         (WTF::TextPosition::belowRangePosition):
2341         (WTF::ZeroBasedNumber::fromZeroBasedInt):
2342         (WTF::ZeroBasedNumber::ZeroBasedNumber):
2343         (WTF::ZeroBasedNumber::zeroBasedInt):
2344         (WTF::ZeroBasedNumber::base):
2345         (WTF::ZeroBasedNumber::belowBase):
2346         (WTF::OneBasedNumber::fromOneBasedInt):
2347         (WTF::OneBasedNumber::OneBasedNumber):
2348         (WTF::OneBasedNumber::oneBasedInt):
2349         (WTF::OneBasedNumber::convertAsZeroBasedInt):
2350         (WTF::OneBasedNumber::convertToZeroBased):
2351         (WTF::OneBasedNumber::base):
2352         (WTF::OneBasedNumber::belowBase):
2353         (WTF::toZeroBasedTextPosition):
2354         (WTF::toOneBasedTextPosition):
2355         (WTF::ZeroBasedNumber::convertToOneBased):
2356
2357 2010-11-09  Gabor Loki  <loki@webkit.org>
2358
2359         Reviewed by Gavin Barraclough.
2360
2361         ARM JIT asserts when loading http://reader.google.com in debug mode
2362         https://bugs.webkit.org/show_bug.cgi?id=48912
2363
2364         There are several cases when the uninterrupted sequence is larger than
2365         maximum required offset for pathing the same sequence. Eg.: if in a
2366         uninterrupted sequence the last macroassembler's instruction is a stub
2367         call, it emits store instruction(s) which should not be included in the
2368         calculation of length of uninterrupted sequence. So, the insnSpace and
2369         constSpace should be upper limit instead of hard limit.
2370
2371         * jit/JIT.h:
2372         * jit/JITInlineMethods.h:
2373         (JSC::JIT::endUninterruptedSequence):
2374
2375 2010-11-09  David Kilzer  <ddkilzer@apple.com>
2376
2377         <http://webkit.org/b/49279> Fix include statements for local headers
2378
2379         Reviewed by Gavin Barraclough.
2380
2381         Use "Foo.h" instead of <Foo.h> for local headers.
2382
2383         * assembler/AbstractMacroAssembler.h: Also fixed sort order.
2384         * assembler/CodeLocation.h:
2385         * yarr/RegexJIT.h:
2386         * yarr/RegexParser.h:
2387
2388 2010-11-08  Adam Roben  <aroben@apple.com>
2389
2390         Roll out r71532
2391
2392         It broke the build for Cygwin 1.7 installs. Cygwin 1.7's default
2393         .bashrc unsets %TEMP%, which broke copy-tools.cmd.
2394
2395         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2396         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2397         * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Removed.
2398         * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Removed.
2399
2400 2010-11-08  Martin Robinson  <mrobinson@igalia.com>
2401
2402         Reviewed by Xan Lopez.
2403
2404         >=webkitgtk-1.2.5: parallel build fails with libtool: link: cannot find the library `libwebkit-1.0.la' or unhandled argument `libwebkit-1.0.la'
2405         https://bugs.webkit.org/show_bug.cgi?id=49128
2406
2407         r59042 introduced a C++-style comment in Platform.h, which is often
2408         included in C source files. Change it to a C-style comment.
2409
2410         * wtf/Platform.h: Fix the C++-style comment.
2411
2412 2010-11-08  Adam Roben  <aroben@apple.com>
2413
2414         Show a message and cause the build to immediately fail when any
2415         .vsprops files are copied
2416
2417         When $WebKitLibrariesDir is set to a non-standard location, the
2418         .vsprops files have to be copied from WebKitLibraries/win to
2419         $WebKitLibrariesDir. When this happens, Visual Studio doesn't pick up
2420         changes to the .vsprops files until the next time it opens the solution
2421         file. Before this patch, the build would soldier on with the old
2422         .vsprops files, leading to strange build failures. Now we detect that
2423         the .vsprops files have been updated, display a message to the user
2424         telling them what to do, and make the build fail immediately.
2425
2426         Fixes <http://webkit.org/b/49181> Windows build fail mysteriously when
2427         .vsprops files are updated
2428
2429         Reviewed by Steve Falkenburg.
2430
2431         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2432         Moved code to copy the tools directory to the new copy-tools.cmd
2433         script. Moved that after the command that writes the buildfailed file
2434         so the build will be considered a failure if copy-tools.cmd fails.
2435         Changed to write the project name into buildfailed like all our other
2436         projects do, so those other projects will know that the failure was due
2437         to this project.
2438
2439         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
2440         Added new scripts.
2441
2442         * JavaScriptCore.vcproj/JavaScriptCore/copy-tools.cmd: Added. Copies
2443         the tools directory to $WebKitLibrariesDir. If any files were copied,
2444         we display a message to the user and exit with error code 1 to cause
2445         the build to fail. In non-interactive builds, we just print the message
2446         to the build log. In interactive builds, we show the message in an
2447         alert.
2448
2449         * JavaScriptCore.vcproj/JavaScriptCore/show-alert.js: Added. Uses
2450         Windows Scripting Host to display a message in an alert.
2451
2452 2010-11-07  Sam Magnuson  <smagnuson@netflix.com>
2453
2454         Reviewed by Andreas Kling.
2455
2456         [Qt] make install does not cause JavaScriptCore to be built
2457         https://bugs.webkit.org/show_bug.cgi?id=49114
2458
2459         * JavaScriptCore.pro:
2460
2461 2010-11-05  Oliver Hunt  <oliver@apple.com>
2462
2463         Reviewed by Gavin Barraclough.
2464
2465         Website consistently crashing TOT in JIT::execute() on news.com.au
2466         https://bugs.webkit.org/show_bug.cgi?id=48954
2467
2468         The problem here was the strict pass of this conversion was loading the
2469         this structure into one register but doing the flags check off a different
2470         register.  This is clearly wrong.  I have been unable to trigger the crash
2471         with a reduction, but I've added an assertion to the this conversion to
2472         attempt to make it more readily catchable in future.
2473
2474         * jit/JITOpcodes.cpp:
2475         (JSC::JIT::emit_op_convert_this_strict):
2476         * jit/JITOpcodes32_64.cpp:
2477         (JSC::JIT::emit_op_convert_this_strict):
2478         * jit/JITStubs.cpp:
2479         (JSC::DEFINE_STUB_FUNCTION):
2480
2481 2010-11-04  Xan Lopez  <xlopez@igalia.com>
2482
2483         Reviewed by Adam Barth.
2484
2485         Use leakRef instead of releaseRef
2486         https://bugs.webkit.org/show_bug.cgi?id=48974
2487
2488         Use leakRef instead of the deprecated releaseRef. This was renamed
2489         some time ago because 'releaseRef' is too close to 'release',
2490         which does something completely different.
2491
2492 2010-11-04  Eric Seidel  <eric@webkit.org>
2493
2494         Reviewed by Gavin Barraclough.
2495
2496         REGRESSION(49798): Crash in HTMLObjectElement::parseMappedAttribute
2497         https://bugs.webkit.org/show_bug.cgi?id=48789
2498
2499         The contract for all String/AtomicString methods seems to be that it's
2500         safe to call them, even when the String is null (impl() returns 0).
2501         This contract was broken by r49798 (unintentionally) when optimizing
2502         for dromeo.
2503         This patch adds a null check to AtomicString::lower() fixing this
2504         crash and preventing future confusion.
2505
2506         * wtf/text/AtomicString.cpp:
2507         (WTF::AtomicString::lower):
2508
2509 2010-11-04  Adam Barth  <abarth@webkit.org>
2510
2511         Enabled ICCJPEG on Chromium Mac
2512         https://bugs.webkit.org/show_bug.cgi?id=48977
2513
2514         * wtf/Platform.h:
2515
2516 2010-11-03  Oliver Hunt  <oliver@apple.com>
2517
2518         Reviewed by Gavin Barraclough.
2519
2520         Crash in Function.prototype.call.apply
2521         https://bugs.webkit.org/show_bug.cgi?id=48485
2522
2523         The problem here was op_load_varargs failing to ensure that
2524         there was sufficient space for the entire callframe prior to
2525         op_call_varargs.  This meant that when we then re-entered the
2526         VM it was possible to stomp over an earlier portion of the
2527         stack, so causing sub-optimal behaviour.
2528
2529         * bytecode/Opcode.h:
2530         * bytecompiler/BytecodeGenerator.cpp:
2531         (JSC::BytecodeGenerator::emitLoadVarargs):
2532         * bytecompiler/BytecodeGenerator.h:
2533         * bytecompiler/NodesCodegen.cpp:
2534         (JSC::ApplyFunctionCallDotNode::emitBytecode):
2535         * jit/JIT.cpp:
2536         (JSC::JIT::privateCompile):
2537         * jit/JITOpcodes.cpp:
2538         (JSC::JIT::emit_op_load_varargs):
2539
2540 2010-11-03  Kenneth Russell  <kbr@google.com>
2541
2542         Reviewed by Chris Marrin.
2543
2544         Redesign extension mechanism in GraphicsContext3D
2545         https://bugs.webkit.org/show_bug.cgi?id=46894
2546
2547         * JavaScriptCore.exp:
2548          - Exposed String::split(const String&, Vector<String>).
2549
2550 2010-11-03  Adam Roben  <aroben@apple.com>
2551
2552         Bring WTF.vcproj up to date
2553
2554         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added filters for the text and
2555         unicode directories, added new files, removed old files.
2556
2557 2010-11-03  Gabor Loki  <loki@webkit.org>
2558
2559         Reviewed by Andreas Kling.
2560
2561         Remove unused initializeWeakRandomNumberGenerator
2562         https://bugs.webkit.org/show_bug.cgi?id=48899
2563
2564         WeakRandom class is used instead of weakRandomNumber and its initializer.
2565
2566         * wtf/RandomNumberSeed.h:
2567
2568 2010-11-03  Gabor Loki  <loki@webkit.org>
2569
2570         Reviewed by Geoffrey Garen.
2571
2572         Unused class: JSFastMath with JSValue64
2573         https://bugs.webkit.org/show_bug.cgi?id=48835
2574
2575         Remove unused JSFastMath class.
2576
2577         * runtime/JSImmediate.h:
2578
2579 2010-11-02  Adam Roben  <aroben@apple.com>
2580
2581         Windows build fix after r71127
2582
2583         MSVC isn't smart enough to figure out that the definition of the global
2584         nullptr variable isn't needed, so we provide one for it.
2585
2586         Fixes <http://webkit.org/b/48862> Windows build is broken due to
2587         undefined symbol nullptr
2588
2589         Reviewed by Anders Carlsson.
2590
2591         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export nullptr.
2592
2593         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added NullPtr.cpp and let VS
2594         resort the files.
2595
2596         * wtf/NullPtr.cpp: Added.
2597
2598 2010-11-02  Martin Robinson  <mrobinson@igalia.com>
2599
2600         Reviewed by Xan Lopez.
2601
2602         Remove special handling of HashTableDeletedValue in PlatformRefPtr and manually manage memory that cannot be controlled by HashTraits
2603         https://bugs.webkit.org/show_bug.cgi?id=48841
2604
2605         Remove special handling of HashTableDeletedValue in PlatformRefPtr.
2606         This is better handled on a case-by-case basis, when HashTraits
2607         cannot account for it.
2608
2609         * wtf/PlatformRefPtr.h:
2610         (WTF::PlatformRefPtr::~PlatformRefPtr):
2611         (WTF::PlatformRefPtr::clear):
2612         (WTF::::operator):
2613
2614 2010-10-29  Oliver Hunt  <oliver@apple.com>
2615
2616         Reviewed by Gavin Barraclough.
2617
2618         REGRESSION: r69429-r69611: Crash in JSC::Interpreter::privateExecute
2619         https://bugs.webkit.org/show_bug.cgi?id=47573
2620
2621         I think the interpreter portion of this was introduced by
2622         an incorrect but silent merge when I updated prior to committing.
2623         The JIT change is basically just a correctness fix, but it is
2624         needed to prevent the testcase from asserting in debug builds.
2625
2626         The basic problem is incorrectly setting the activation object
2627         on an arguments object.  The crash was due to us setting a null
2628         activation in the interpreter, in the jit we were setting the
2629         activation of a strict mode arguments object.
2630
2631         * interpreter/Interpreter.cpp:
2632         (JSC::Interpreter::privateExecute):
2633         * jit/JITStubs.cpp:
2634         (JSC::DEFINE_STUB_FUNCTION):
2635         * wtf/Platform.h:
2636
2637 2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
2638
2639         Reviewed by Adam Roben and David Kilzer.
2640
2641         Fix and cleanup of build systems
2642         https://bugs.webkit.org/show_bug.cgi?id=48342
2643
2644         * Configurations/FeatureDefines.xcconfig: Add missing ENABLE_FULLSCREEN_API
2645
2646 2010-10-28  Kwang Yul Seo  <skyul@company100.net>
2647
2648         Reviewed by Darin Adler.
2649
2650         Include stddef.h unconditionally in Assertions.h
2651         https://bugs.webkit.org/show_bug.cgi?id=48573
2652
2653         There is no reason to have stddef.h include be MSVC-only.
2654
2655         * wtf/Assertions.h:
2656
2657 2010-10-28  Herczeg Zoltan  <zherczeg@webkit.org>
2658
2659         Rubber stamped by Csaba Osztrogonác.
2660
2661         Try to fix interpreter build.
2662
2663         Needed parentheses around assignment to avoid GCC warning after
2664         http://trac.webkit.org/changeset/70703
2665
2666         * interpreter/Interpreter.cpp:
2667         (JSC::Interpreter::privateExecute):
2668
2669 2010-10-28  Peter Varga  <pvarga@inf.u-szeged.hu>
2670
2671         Reviewed by Csaba Osztrogonác.
2672
2673         resetAssertionMatches() is an unused function in YARR Interpreter
2674         https://bugs.webkit.org/show_bug.cgi?id=48503
2675
2676         The resetAssertionMatches() function is removed from YARR Interpreter
2677         because it's never called.
2678
2679         * yarr/RegexInterpreter.cpp:
2680         (JSC::Yarr::Interpreter::resetMatches):
2681
2682 2010-10-28  Zoltan Herczeg  <zherczeg@webkit.org>
2683
2684         Reviewed by Andreas Kling.
2685
2686         Wrong instruction form for BKPT
2687         https://bugs.webkit.org/show_bug.cgi?id=48427
2688
2689         One '0' is missing from BKPT instruction.
2690         Thanks for Jacob Bramley for reporting this error.
2691
2692         * assembler/ARMAssembler.h:
2693
2694 2010-10-28  Xan Lopez  <xlopez@igalia.com>
2695
2696         Try to fix Snow Leopard build.
2697
2698         * jit/JITPropertyAccess.cpp:
2699         (JSC::JIT::testPrototype):
2700
2701 2010-10-28  Xan Lopez  <xlopez@igalia.com>
2702
2703         Reviewed by Oliver Hunt.
2704
2705         Do not have two different asCell APIs in JSValue
2706         https://bugs.webkit.org/show_bug.cgi?id=47979
2707
2708         Remove JSCell* asCell(JSValue) in favor of only using
2709         JSValue::asCell().
2710
2711         * API/APICast.h:
2712         (toRef):
2713         * jit/JITPropertyAccess32_64.cpp:
2714         (JSC::JIT::testPrototype):
2715         * jit/JITStubs.cpp:
2716         (JSC::JITThunks::tryCachePutByID):
2717         (JSC::JITThunks::tryCacheGetByID):
2718         (JSC::DEFINE_STUB_FUNCTION):
2719         * runtime/GetterSetter.h:
2720         (JSC::asGetterSetter):
2721         * runtime/JSByteArray.h:
2722         (JSC::asByteArray):
2723         * runtime/JSCell.h:
2724         (JSC::JSCell::getCallData):
2725         (JSC::JSCell::getConstructData):
2726         * runtime/JSString.h:
2727         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
2728         (JSC::asString):
2729         * runtime/JSValue.h:
2730         * runtime/Operations.cpp:
2731         (JSC::jsIsObjectType):
2732         * runtime/Operations.h:
2733         (JSC::normalizePrototypeChain):
2734         * runtime/Protect.h:
2735         (JSC::gcProtect):
2736         (JSC::gcUnprotect):
2737
2738 2010-10-27  Chao-ying Fu  <fu@mips.com>
2739
2740         Reviewed by Oliver Hunt.
2741
2742         Support emit_op_mod() for MIPS on JSVALUE32_64
2743         https://bugs.webkit.org/show_bug.cgi?id=46511
2744
2745         This patch uses MIPS div instructions for op_mod to improve performance.
2746
2747         * jit/JITArithmetic32_64.cpp:
2748         (JSC::JIT::emit_op_mod):
2749
2750 2010-10-27  Brent Fulgham  <bfulgham@webkit.org>
2751
2752         Unreviewed build correction.
2753
2754         * wtf/Platform.h: Make sure ACCELERATED_COMPOSITING is
2755         turned off in the WinCairo port.  This isn't supported (yet.)
2756
2757 2010-10-27  Chris Rogers  <crogers@google.com>
2758
2759         Reviewed by Chris Marrin.
2760
2761         Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
2762         https://bugs.webkit.org/show_bug.cgi?id=48279
2763
2764         * Configurations/FeatureDefines.xcconfig:
2765
2766 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
2767
2768         Windows build fix.
2769
2770         * jit/JITStubs.cpp:
2771         (JSC::jitThrow):
2772
2773 2010-10-27  Gavin Barraclough  <barraclough@apple.com>
2774
2775         Reviewed by Oliver Hunt.
2776
2777         Bug 48365 - Remove output parameters from JITStackFrame
2778
2779         The JIT stub functions presently use the stackframe to provide a couple of additional return values.
2780           * In the case of uncaught exceptions the exception value is returned on the stackframe.exception property.
2781           * In the case of caught exceptions the updated value for the callFrame register is returned on the stackframe.callFrame property.
2782
2783         Change exception returns such that exceptions are always returned on JSGlobalData::exception.
2784         Change op_catch such that the new CallFrame value is returned from op_throw / vm_throw in regT0.
2785
2786         * JavaScriptCore.xcodeproj/project.pbxproj:
2787         * debugger/Debugger.cpp:
2788         (JSC::evaluateInGlobalCallFrame):
2789         * debugger/DebuggerCallFrame.cpp:
2790         (JSC::DebuggerCallFrame::evaluate):
2791         * interpreter/CachedCall.h:
2792         (JSC::CachedCall::CachedCall):
2793         (JSC::CachedCall::call):
2794         * interpreter/CallFrame.h:
2795         (JSC::ExecState::exception):
2796         * interpreter/Interpreter.cpp:
2797         (JSC::Interpreter::callEval):
2798         (JSC::Interpreter::Interpreter):
2799         (JSC::Interpreter::execute):
2800         (JSC::Interpreter::executeCall):
2801         (JSC::Interpreter::executeConstruct):
2802         (JSC::Interpreter::prepareForRepeatCall):
2803         (JSC::Interpreter::privateExecute):
2804         * interpreter/Interpreter.h:
2805         * jit/JITCode.h:
2806         (JSC::JITCode::execute):
2807         * jit/JITOpcodes.cpp:
2808         (JSC::JIT::emit_op_catch):
2809         * jit/JITOpcodes32_64.cpp:
2810         (JSC::JIT::emit_op_catch):
2811         * jit/JITStubs.cpp:
2812         (JSC::ctiTrampoline):
2813         (JSC::jitThrow):
2814         (JSC::DEFINE_STUB_FUNCTION):
2815         * jit/JITStubs.h:
2816         * runtime/ArrayPrototype.cpp:
2817         (JSC::arrayProtoFuncFilter):
2818         (JSC::arrayProtoFuncMap):
2819         (JSC::arrayProtoFuncEvery):
2820         (JSC::arrayProtoFuncForEach):
2821         (JSC::arrayProtoFuncSome):
2822         (JSC::arrayProtoFuncReduce):
2823         (JSC::arrayProtoFuncReduceRight):
2824         * runtime/CallData.cpp:
2825         (JSC::call):
2826         * runtime/Completion.cpp:
2827         (JSC::evaluate):
2828         * runtime/ConstructData.cpp:
2829         (JSC::construct):
2830         * runtime/ExceptionHelpers.cpp:
2831         (JSC::createErrorForInvalidGlobalAssignment):
2832         (JSC::throwOutOfMemoryError):
2833         (JSC::throwStackOverflowError):
2834         * runtime/ExceptionHelpers.h:
2835         * runtime/JSArray.cpp:
2836         (JSC::JSArray::sort):
2837         * runtime/JSGlobalObjectFunctions.cpp:
2838         (JSC::globalFuncEval):
2839         * runtime/StringPrototype.cpp:
2840         (JSC::stringProtoFuncReplace):
2841
2842 2010-10-27  Gabor Loki  <loki@webkit.org>
2843
2844         Reviewed by Oliver Hunt.
2845
2846         https://bugs.webkit.org/show_bug.cgi?id=48060
2847         Speed up op_jeq_null and op_jneq_null.
2848
2849         For both opcodes the NullTag and UndefinedTag are checked to control the
2850         jump. These values can be simply checked by AboveOrEqual or Below
2851         condition if they are the two highest unsigned integers from JSValue's
2852         Tag field.
2853
2854         * jit/JITOpcodes32_64.cpp:
2855         (JSC::JIT::emit_op_jeq_null):
2856         (JSC::JIT::emit_op_jneq_null):
2857         * runtime/JSValue.h:
2858
2859 2010-10-25  Geoffrey Garen  <ggaren@apple.com>
2860
2861         Reviewed by Oliver Hunt.
2862
2863         https://bugs.webkit.org/show_bug.cgi?id=41948
2864         REGRESSION(r60392): Registerfile can be unwound too far following an exception
2865         
2866         SunSpider reports no change.
2867
2868         * interpreter/Interpreter.cpp:
2869         (JSC::Interpreter::throwException): Walk the stack to calculate the high
2870         water mark currently in use. It's not safe to assume that the current
2871         CallFrame's high water mark is the highest high water mark because
2872         calls do not always set up at the end of a CallFrame. A large caller
2873         CallFrame can encompass a small callee CallFrame.
2874
2875         * jit/JITOpcodes.cpp:
2876         (JSC::JIT::privateCompileCTINativeCall):
2877         * jit/JITOpcodes32_64.cpp:
2878         (JSC::JIT::privateCompileCTINativeCall): Make sure to set a 0 CodeBlock
2879         in the CallFrame of a host call, like the Interpreter does, instead of
2880         leaving the CodeBlock field uninitialized. The backtracing code requires
2881         a valid CodeBlock field in each CallFrame.
2882
2883 2010-10-27  Gabor Loki  <loki@webkit.org>
2884
2885         Reviewed by Csaba Osztrogonác.
2886
2887         Add cmn to branch32(reg, imm) on ARM
2888         https://bugs.webkit.org/show_bug.cgi?id=48062
2889
2890         The conditional comparison can be done with cmn if the imm value is
2891         negative and can fit into the cmn instruction.
2892
2893         * assembler/MacroAssemblerARM.h:
2894         (JSC::MacroAssemblerARM::branch32):
2895
2896 2010-10-26  Oliver Hunt  <oliver@apple.com>
2897
2898         Interpreter build fix.
2899
2900         * interpreter/Interpreter.cpp:
2901         (JSC::Interpreter::privateExecute):
2902
2903 2010-10-25  Oliver Hunt  <oliver@apple.com>
2904
2905         Reviewed by Gavin Barraclough.
2906
2907         Remove exec and globalData arguments from jsNumber
2908         https://bugs.webkit.org/show_bug.cgi?id=48270
2909
2910         Remove the now unused exec and globalData arguments from jsNumber
2911         and mechanically update all users of jsNumber.
2912
2913         * API/JSValueRef.cpp:
2914         (JSValueMakeNumber):
2915         * bytecompiler/BytecodeGenerator.cpp:
2916         (JSC::BytecodeGenerator::emitLoad):
2917         * bytecompiler/NodesCodegen.cpp:
2918         (JSC::ArrayNode::emitBytecode):
2919         * jit/JITArithmetic.cpp:
2920         (JSC::JIT::emit_op_mod):
2921         * jit/JITArithmetic32_64.cpp:
2922         (JSC::JIT::emit_op_mod):
2923         * jit/JITOpcodes.cpp:
2924         (JSC::JIT::emit_op_jfalse):
2925         (JSC::JIT::emit_op_jtrue):
2926         * jit/JITStubs.cpp:
2927         (JSC::DEFINE_STUB_FUNCTION):
2928         * jsc.cpp:
2929         (functionRun):
2930         * runtime/Arguments.cpp:
2931         (JSC::Arguments::getOwnPropertySlot):
2932         (JSC::Arguments::getOwnPropertyDescriptor):
2933         * runtime/ArrayConstructor.cpp:
2934         (JSC::ArrayConstructor::ArrayConstructor):
2935         * runtime/ArrayPrototype.cpp:
2936         (JSC::arrayProtoFuncPop):
2937         (JSC::arrayProtoFuncPush):
2938         (JSC::arrayProtoFuncShift):
2939         (JSC::arrayProtoFuncSplice):
2940         (JSC::arrayProtoFuncUnShift):
2941         (JSC::arrayProtoFuncFilter):
2942         (JSC::arrayProtoFuncMap):
2943         (JSC::arrayProtoFuncEvery):
2944         (JSC::arrayProtoFuncForEach):
2945         (JSC::arrayProtoFuncSome):
2946         (JSC::arrayProtoFuncReduce):
2947         (JSC::arrayProtoFuncReduceRight):
2948         (JSC::arrayProtoFuncIndexOf):
2949         (JSC::arrayProtoFuncLastIndexOf):
2950         * runtime/BooleanConstructor.cpp:
2951         (JSC::BooleanConstructor::BooleanConstructor):
2952         * runtime/CachedTranscendentalFunction.h:
2953         (JSC::CachedTranscendentalFunction::operator()):
2954         * runtime/DateConstructor.cpp:
2955         (JSC::DateConstructor::DateConstructor):
2956         (JSC::dateParse):
2957         (JSC::dateNow):
2958         (JSC::dateUTC):
2959         * runtime/DateInstance.cpp:
2960         (JSC::DateInstance::DateInstance):
2961         * runtime/DatePrototype.cpp:
2962         (JSC::dateProtoFuncGetFullYear):
2963         (JSC::dateProtoFuncGetUTCFullYear):
2964         (JSC::dateProtoFuncGetMonth):
2965         (JSC::dateProtoFuncGetUTCMonth):
2966         (JSC::dateProtoFuncGetDate):
2967         (JSC::dateProtoFuncGetUTCDate):
2968         (JSC::dateProtoFuncGetDay):
2969         (JSC::dateProtoFuncGetUTCDay):
2970         (JSC::dateProtoFuncGetHours):
2971         (JSC::dateProtoFuncGetUTCHours):
2972         (JSC::dateProtoFuncGetMinutes):
2973         (JSC::dateProtoFuncGetUTCMinutes):
2974         (JSC::dateProtoFuncGetSeconds):
2975         (JSC::dateProtoFuncGetUTCSeconds):
2976         (JSC::dateProtoFuncGetMilliSeconds):
2977         (JSC::dateProtoFuncGetUTCMilliseconds):
2978         (JSC::dateProtoFuncGetTimezoneOffset):
2979         (JSC::dateProtoFuncSetTime):
2980         (JSC::setNewValueFromTimeArgs):
2981         (JSC::setNewValueFromDateArgs):
2982         (JSC::dateProtoFuncSetYear):
2983         (JSC::dateProtoFuncGetYear):
2984         * runtime/Error.cpp:
2985         (JSC::addErrorSourceInfo):
2986         (JSC::addErrorDivotInfo):
2987         * runtime/ErrorConstructor.cpp:
2988         (JSC::ErrorConstructor::ErrorConstructor):
2989         * runtime/FunctionConstructor.cpp:
2990         (JSC::FunctionConstructor::FunctionConstructor):
2991         * runtime/FunctionPrototype.cpp:
2992         (JSC::FunctionPrototype::FunctionPrototype):
2993         * runtime/JSArray.cpp:
2994         (JSC::JSArray::getOwnPropertySlot):
2995         (JSC::JSArray::getOwnPropertyDescriptor):
2996         * runtime/JSByteArray.cpp:
2997         (JSC::JSByteArray::JSByteArray):
2998         * runtime/JSByteArray.h:
2999         (JSC::JSByteArray::getIndex):
3000         * runtime/JSFunction.cpp:
3001         (JSC::JSFunction::JSFunction):
3002         (JSC::JSFunction::lengthGetter):
3003         (JSC::JSFunction::getOwnPropertyDescriptor):
3004         * runtime/JSGlobalObject.cpp:
3005         (JSC::JSGlobalObject::reset):
3006         * runtime/JSGlobalObjectFunctions.cpp:
3007         (JSC::globalFuncParseInt):
3008         (JSC::globalFuncParseFloat):
3009         * runtime/JSNumberCell.h:
3010         (JSC::JSValue::JSValue):
3011         (JSC::jsNaN):
3012         (JSC::JSValue::toJSNumber):
3013         * runtime/JSONObject.cpp:
3014         (JSC::unwrapBoxedPrimitive):
3015         (JSC::PropertyNameForFunctionCall::value):
3016         (JSC::JSONStringify):
3017         * runtime/JSString.cpp:
3018         (JSC::JSString::getStringPropertyDescriptor):
3019         * runtime/JSString.h:
3020         (JSC::JSString::getStringPropertySlot):
3021         * runtime/JSValue.h:
3022         (JSC::jsDoubleNumber):
3023         (JSC::jsNumber):
3024         (JSC::jsNaN):
3025         (JSC::JSValue::JSValue):
3026         (JSC::JSValue::toJSNumber):
3027         * runtime/LiteralParser.cpp:
3028         (JSC::LiteralParser::parse):
3029         * runtime/MathObject.cpp:
3030         (JSC::MathObject::MathObject):
3031         (JSC::mathProtoFuncAbs):
3032         (JSC::mathProtoFuncACos):
3033         (JSC::mathProtoFuncASin):
3034         (JSC::mathProtoFuncATan):
3035         (JSC::mathProtoFuncATan2):
3036         (JSC::mathProtoFuncCeil):
3037         (JSC::mathProtoFuncCos):
3038         (JSC::mathProtoFuncExp):
3039         (JSC::mathProtoFuncFloor):
3040         (JSC::mathProtoFuncLog):
3041         (JSC::mathProtoFuncMax):
3042         (JSC::mathProtoFuncMin):
3043         (JSC::mathProtoFuncPow):
3044         (JSC::mathProtoFuncRandom):
3045         (JSC::mathProtoFuncRound):
3046         (JSC::mathProtoFuncSin):
3047         (JSC::mathProtoFuncSqrt):
3048         (JSC::mathProtoFuncTan):
3049         * runtime/NativeErrorConstructor.cpp:
3050         (JSC::NativeErrorConstructor::NativeErrorConstructor):
3051         * runtime/NumberConstructor.cpp:
3052         (JSC::NumberConstructor::NumberConstructor):
3053         (JSC::numberConstructorNaNValue):
3054         (JSC::numberConstructorNegInfinity):
3055         (JSC::numberConstructorPosInfinity):
3056         (JSC::numberConstructorMaxValue):
3057         (JSC::numberConstructorMinValue):
3058         (JSC::constructWithNumberConstructor):
3059         (JSC::callNumberConstructor):
3060         * runtime/NumberPrototype.cpp:
3061         (JSC::NumberPrototype::NumberPrototype):
3062         * runtime/ObjectConstructor.cpp:
3063         (JSC::ObjectConstructor::ObjectConstructor):
3064         * runtime/Operations.cpp:
3065         (JSC::jsAddSlowCase):
3066         * runtime/Operations.h:
3067         (JSC::jsAdd):
3068         * runtime/PrototypeFunction.cpp:
3069         (JSC::PrototypeFunction::PrototypeFunction):
3070         * runtime/RegExpConstructor.cpp:
3071         (JSC::RegExpConstructor::RegExpConstructor):
3072         (JSC::RegExpMatchesArray::fillArrayInstance):
3073         * runtime/RegExpObject.cpp:
3074         (JSC::regExpObjectLastIndex):
3075         * runtime/StringConstructor.cpp:
3076         (JSC::StringConstructor::StringConstructor):
3077         * runtime/StringPrototype.cpp:
3078         (JSC::StringPrototype::StringPrototype):
3079         (JSC::stringProtoFuncReplace):
3080         (JSC::stringProtoFuncCharCodeAt):
3081         (JSC::stringProtoFuncIndexOf):
3082         (JSC::stringProtoFuncLastIndexOf):
3083         (JSC::stringProtoFuncSearch):
3084         (JSC::stringProtoFuncLocaleCompare):
3085
3086 2010-10-25  David Tapuska  <dtapuska@rim.com>
3087
3088         Reviewed by David Kilzer.
3089
3090         Enable VFP if our compiler settings indicated we had a hardware
3091         VFP.
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=46096
3094
3095         * assembler/MacroAssemblerARM.cpp:
3096         (JSC::isVFPPresent):
3097
3098 2010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3099
3100         Unreviewed, rolling out r70451.
3101         http://trac.webkit.org/changeset/70451
3102         https://bugs.webkit.org/show_bug.cgi?id=48249
3103
3104         Broke set-unloaded-frame-location.html under Qt (Requested by
3105         caseq on #webkit).
3106
3107         * GNUmakefile.am:
3108         * JavaScriptCore.gypi:
3109         * JavaScriptCore.xcodeproj/project.pbxproj:
3110         * wtf/text/TextPosition.h: Removed.
3111
3112 2010-10-25  Patrick Gansterer  <paroga@webkit.org>
3113
3114         Reviewed by David Kilzer.
3115
3116         Replace _countof with WTF_ARRAY_LENGTH
3117         https://bugs.webkit.org/show_bug.cgi?id=48229
3118
3119         * wtf/Platform.h:
3120
3121 2010-10-25  Peter Rybin  <peter.rybin@gmail.com>
3122
3123         Reviewed by Adam Barth.
3124
3125         HTML parser should provide script column position within HTML document to JavaScript engine
3126         https://bugs.webkit.org/show_bug.cgi?id=45271
3127
3128         Adds TextPosition* classes -- a structure that stores line/column/generation
3129         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
3130         wrappers that emphasize whether int number is used as zero-based or
3131         one-based.
3132
3133         * GNUmakefile.am:
3134         * JavaScriptCore.gypi:
3135         * JavaScriptCore.xcodeproj/project.pbxproj:
3136         * wtf/text/TextPosition.h: Added.
3137         (WTF::TextPosition::TextPosition):
3138         (WTF::TextPosition::minimumPosition):
3139         (WTF::TextPosition::belowRangePosition):
3140         (WTF::ZeroBasedNumber::fromZeroBasedInt):
3141         (WTF::ZeroBasedNumber::ZeroBasedNumber):
3142         (WTF::ZeroBasedNumber::zeroBasedInt):
3143         (WTF::ZeroBasedNumber::base):
3144         (WTF::ZeroBasedNumber::belowBase):
3145         (WTF::OneBasedNumber::fromOneBasedInt):
3146         (WTF::OneBasedNumber::OneBasedNumber):
3147         (WTF::OneBasedNumber::oneBasedInt):
3148         (WTF::OneBasedNumber::convertAsZeroBasedInt):
3149         (WTF::OneBasedNumber::convertToZeroBased):
3150         (WTF::OneBasedNumber::base):
3151         (WTF::OneBasedNumber::belowBase):
3152         (WTF::toZeroBasedTextPosition):
3153         (WTF::toOneBasedTextPosition):
3154         (WTF::ZeroBasedNumber::convertToOneBased):
3155
3156 2010-10-24  Kwang Yul Seo  <skyul@company100.net>
3157
3158         Reviewed by David Kilzer.
3159
3160         Check endianness with __BIG_ENDIAN in RVCT.
3161         https://bugs.webkit.org/show_bug.cgi?id=46122
3162
3163         RVCT defines __BIG_ENDIAN if compiling for a big-endian target.
3164
3165         * wtf/Platform.h:
3166
3167 2010-10-24  Dan Bernstein  <mitz@apple.com>
3168
3169         Rubber-stamped by Dave Kilzer.
3170
3171         Removed empty directories.
3172
3173         * JavaScriptCore: Removed.
3174         * JavaScriptCore/runtime: Removed.
3175
3176 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
3177
3178         Unreviewed, fix typo of last build fix.
3179
3180         * wtf/DateMath.cpp:
3181
3182 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
3183
3184         Unreviewed build fix for chromium.
3185
3186         * wtf/DateMath.cpp: Added missing include.
3187
3188 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
3189
3190         Reviewed by David Kilzer.
3191
3192         Add WTF_ARRAY_LENGTH macro to WTF
3193         https://bugs.webkit.org/show_bug.cgi?id=32828
3194
3195         Unify the different implementations and usages.
3196
3197         * interpreter/Interpreter.cpp:
3198         (JSC::Interpreter::privateExecute):
3199         * runtime/DatePrototype.cpp:
3200         (JSC::formatLocaleDate):
3201         * runtime/JSGlobalObject.cpp:
3202         (JSC::JSGlobalObject::reset):
3203         * runtime/JSONObject.cpp:
3204         (JSC::Stringifier::appendQuotedString):
3205         (JSC::Stringifier::toJSON):
3206         (JSC::Stringifier::appendStringifiedValue):
3207         * runtime/UString.cpp:
3208         (JSC::UString::number):
3209         * wtf/DateMath.cpp:
3210         (WTF::parseDateFromNullTerminatedCharacters):
3211         * wtf/StdLibExtras.h:
3212
3213 2010-10-24  Dirk Schulze  <krit@webkit.org>
3214
3215         Reviewed by Nikolas Zimmermann.
3216
3217         Filter example Chiseled from SVG Wow! is slow
3218         https://bugs.webkit.org/show_bug.cgi?id=48174
3219
3220         Added 'using WTF::ByteArray;' at the end of ByteArray.h
3221
3222         * wtf/ByteArray.h:
3223
3224 2010-10-24  Patrick Gansterer  <paroga@webkit.org>
3225
3226         Reviewed by David Kilzer.
3227
3228         Inline WTF::bitwise_cast and fix style
3229         https://bugs.webkit.org/show_bug.cgi?id=48208
3230
3231         * wtf/StdLibExtras.h:
3232         (WTF::bitwise_cast):
3233         (WTF::bitCount):
3234
3235 2010-10-23  Xan Lopez  <xlopez@igalia.com>
3236
3237         Reviewed by Sam Weinig.
3238
3239         Unify globalData APIs
3240         https://bugs.webkit.org/show_bug.cgi?id=47969
3241
3242         Make JSGlobalObject::globalData return a reference and adapt
3243         callers. This unifies the API with the existing
3244         CallFrame::globalData, which also returns a reference.
3245
3246         * debugger/Debugger.cpp:
3247         (JSC::evaluateInGlobalCallFrame):
3248         * interpreter/CallFrame.h:
3249         * interpreter/Interpreter.cpp:
3250         (JSC::Interpreter::dumpRegisters):
3251         * jsc.cpp:
3252         (runWithScripts):
3253         * parser/JSParser.cpp:
3254         (JSC::jsParse):
3255         * parser/Parser.cpp:
3256         (JSC::Parser::parse):
3257         * parser/Parser.h:
3258         (JSC::Parser::parse):
3259         * runtime/Error.cpp:
3260         (JSC::createError):
3261         (JSC::createEvalError):
3262         (JSC::createRangeError):
3263         (JSC::createReferenceError):
3264         (JSC::createSyntaxError):
3265         (JSC::createTypeError):
3266         (JSC::createURIError):
3267         * runtime/FunctionConstructor.cpp:
3268         (JSC::constructFunction):
3269         * runtime/JSGlobalObject.cpp:
3270         (JSC::JSGlobalObject::~JSGlobalObject):
3271         (JSC::JSGlobalObject::markChildren):
3272         * runtime/JSGlobalObject.h:
3273         (JSC::JSGlobalObject::globalData):
3274
3275 2010-10-23  Dimitri Glazkov  <dglazkov@chromium.org>
3276
3277         Unreviewed, rolling out r70369.
3278         http://trac.webkit.org/changeset/70369
3279         https://bugs.webkit.org/show_bug.cgi?id=47974
3280
3281         Caused weird artifacts in expected results.
3282
3283         * wtf/Platform.h:
3284
3285 2010-10-23  Martin Robinson  <mrobinson@igalia.com>
3286
3287         Reviewed by Xan Lopez.
3288
3289         Crashes randomly in cairo_scaled_font_destroy
3290         https://bugs.webkit.org/show_bug.cgi?id=46794
3291
3292         Make PlatformRefPtr aware of hashTableDeletedValue. When PlatformRefPtr
3293         goes away this should probably be handled in the future via some special
3294         hooks in RefCounted (or its contained type).
3295
3296         * wtf/PlatformRefPtr.h:
3297         (WTF::PlatformRefPtr::~PlatformRefPtr):
3298         (WTF::PlatformRefPtr::clear):
3299         (WTF::::operator):
3300
3301 2010-10-22  Adam Roben  <aroben@apple.com>
3302
3303         Remove the QuartzCorePresent.h mechanism
3304
3305         This header was used to detect whether QuartzCore headers were present
3306         on the system. Everyone should have these headers now so we no longer
3307         need to detect.
3308
3309         Reviewed by Sam Weinig.
3310
3311         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Remove
3312         code to generate QuartzCorePresent.h.
3313
3314         * wtf/Platform.h: Stop including QuartzCorePresent.h on Windows and
3315         collapse all USE_ACCELERATED_COMPOSITING settings into one #ifdef.
3316
3317 2010-10-22  Adam Barth  <abarth@webkit.org>
3318
3319         Unreviewed, rolling out r70290.
3320         http://trac.webkit.org/changeset/70290
3321         https://bugs.webkit.org/show_bug.cgi?id=48111
3322
3323         Undelete Android build files.
3324
3325         * Android.mk: Added.
3326
3327 2010-10-22  Zoltan Herczeg  <zherczeg@webkit.org>
3328
3329         Reviewed by Csaba Osztrogonác.
3330
3331         JSC interpreter regressions after r69940
3332         https://bugs.webkit.org/show_bug.cgi?id=47839
3333
3334         Wrong "if": It should test whether the result exists,
3335         and not the opposite. It is an interpreter bug, hence
3336         the bots does not capture it.
3337
3338         * interpreter/Interpreter.cpp:
3339         (JSC::Interpreter::resolveBase):
3340
3341 2010-10-21  Adam Barth  <abarth@webkit.org>
3342
3343         Reviewed by David Levin.
3344
3345         Remove Android build system
3346         https://bugs.webkit.org/show_bug.cgi?id=48111
3347
3348         * Android.mk: Removed.
3349
3350 2010-10-21  Kwang Yul Seo  <skyul@company100.net>
3351
3352         Reviewed by Kent Tamura.
3353
3354         [BREWMP] Add a String constructor which takes AECHAR*
3355         https://bugs.webkit.org/show_bug.cgi?id=45043
3356
3357         Add String(const AECHAR*) constructor for convenience.
3358
3359         * wtf/text/WTFString.h:
3360
3361 2010-10-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3362
3363         Reviewed by Martin Robinson.
3364
3365         [GTK] Use GCharsetConverter instead of g_iconv in TextCodecGtk
3366         https://bugs.webkit.org/show_bug.cgi?id=47896
3367
3368         * wtf/gobject/GTypedefs.h:
3369
3370 2010-10-21  Adam Barth  <abarth@webkit.org>
3371
3372         Unreviewed, rolling out r70174.
3373         http://trac.webkit.org/changeset/70174
3374         https://bugs.webkit.org/show_bug.cgi?id=41948
3375
3376         This patch reverts a change that causes
3377         http/tests/xmlhttprequest/origin-whitelisting-removal.html to crash.
3378
3379         * interpreter/Interpreter.cpp:
3380         (JSC::Interpreter::throwException):
3381
3382 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
3383
3384         Fix the EFL build.
3385
3386         * wtf/CMakeLists.txt:
3387
3388 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
3389
3390         Fix Windows build: export needed symbols.
3391
3392         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3393
3394 2010-10-19  Simon Fraser  <simon.fraser@apple.com>
3395
3396         Reviewed by Gavin Barraclough.
3397
3398         https://bugs.webkit.org/show_bug.cgi?id=47851
3399         
3400         Add methods to DecimalNumber to return the buffer length
3401         required for decimal and exponential output.
3402         
3403         Make some of the DecimalNumber code non-inline (no
3404         effect on Sunspider), adding DecimalNumber.cpp to various
3405         build systems.
3406         
3407         Make some DecimalNumber methods 'const'.
3408
3409         * Android.mk:
3410         * Android.v8.wtf.mk:
3411         * GNUmakefile.am:
3412         * JavaScriptCore.exp:
3413         * JavaScriptCore.gypi:
3414         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3415         * JavaScriptCore.xcodeproj/project.pbxproj:
3416         * runtime/NumberPrototype.cpp:
3417         (JSC::numberProtoFuncToExponential):
3418         (JSC::numberProtoFuncToFixed):
3419         (JSC::numberProtoFuncToPrecision):
3420         * wtf/DecimalNumber.cpp: Added.
3421         (WTF::DecimalNumber::bufferLengthForStringDecimal):
3422         (WTF::DecimalNumber::bufferLengthForStringExponential):
3423         (WTF::DecimalNumber::toStringDecimal):
3424         (WTF::DecimalNumber::toStringExponential):
3425         * wtf/DecimalNumber.h:
3426         (WTF::DecimalNumber::sign):
3427         (WTF::DecimalNumber::exponent):
3428         (WTF::DecimalNumber::significand):
3429         (WTF::DecimalNumber::precision):
3430         * wtf/dtoa.cpp:
3431         (WTF::dtoa):
3432         * wtf/dtoa.h:
3433         * wtf/wtf.pri:
3434
3435 2010-10-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3436
3437         Unreviewed, rolling out r70165.
3438         http://trac.webkit.org/changeset/70165
3439         https://bugs.webkit.org/show_bug.cgi?id=48007
3440
3441         It broke tests on Qt bot (Requested by Ossy on #webkit).
3442
3443         * GNUmakefile.am:
3444         * JavaScriptCore.gypi:
3445         * JavaScriptCore.xcodeproj/project.pbxproj:
3446         * wtf/text/TextPosition.h: Removed.
3447
3448 2010-10-20  Brian Weinstein  <bweinstein@apple.com>
3449
3450         Reviewed by Adam Roben.
3451
3452         Fix the Windows build after r70165. Move the copying of JavaScript headers from JavaScriptCore's post-build
3453         step to JavaScriptCoreGenerated, so the copying is done even when a cpp file in JavaScriptCore is changed.
3454
3455         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
3456         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3457
3458 2010-10-20  Dumitru Daniliuc  <dumi@chromium.org>
3459
3460         Unreviewed, fixing the Win build.
3461
3462         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3463
3464 2010-10-20  Geoffrey Garen  <ggaren@apple.com>
3465
3466         Reviewed by Darin Adler.
3467         
3468         https://bugs.webkit.org/show_bug.cgi?id=41948
3469         REGRESSION(r60392): Registerfile can be unwound too far following an exception
3470
3471         * interpreter/Interpreter.cpp:
3472         (JSC::Interpreter::throwException): Walk the stack to calculate the high
3473         water mark currently in use. It's not safe to assume that the current
3474         CallFrame's high water mark is the highest high water mark because
3475         calls do not always set up at the end of a CallFrame. A large caller
3476         CallFrame can encompass a small callee CallFrame.
3477
3478 2010-10-20  Peter Rybin  <peter.rybin@gmail.com>
3479
3480         Reviewed by Adam Barth.
3481
3482         HTML parser should provide script column position within HTML document to JavaScript engine
3483         https://bugs.webkit.org/show_bug.cgi?id=45271
3484
3485         Adds TextPosition* classes -- a structure that stores line/column/generation
3486         level coordinates inside text document. Adds *BasedNumber classes -- typesafe int
3487         wrappers that emphasize whether int number is used as zero-based or
3488         one-based.
3489
3490         * GNUmakefile.am:
3491         * JavaScriptCore.gypi:
3492         * JavaScriptCore.xcodeproj/project.pbxproj:
3493         * wtf/text/TextPosition.h: Added.
3494         (WTF::TextPosition::TextPosition):
3495         (WTF::TextPosition::minimumPosition):
3496         (WTF::TextPosition::belowRangePosition):
3497         (WTF::ZeroBasedNumber::fromZeroBasedInt):
3498         (WTF::ZeroBasedNumber::ZeroBasedNumber):
3499         (WTF::ZeroBasedNumber::zeroBasedInt):
3500         (WTF::ZeroBasedNumber::base):
3501         (WTF::ZeroBasedNumber::belowBase):
3502         (WTF::OneBasedNumber::fromOneBasedInt):
3503         (WTF::OneBasedNumber::OneBasedNumber):
3504         (WTF::OneBasedNumber::oneBasedInt):
3505         (WTF::OneBasedNumber::convertAsZeroBasedInt):
3506         (WTF::OneBasedNumber::convertToZeroBased):
3507         (WTF::OneBasedNumber::base):
3508         (WTF::OneBasedNumber::belowBase):
3509         (WTF::toZeroBasedTextPosition):
3510         (WTF::toOneBasedTextPosition):
3511         (WTF::ZeroBasedNumber::convertToOneBased):
3512
3513 2010-10-19  Kwang Yul Seo  <skyul@company100.net>
3514
3515         Reviewed by David Kilzer.
3516
3517         [BREWMP] Turn off JIT for simulator build
3518         https://bugs.webkit.org/show_bug.cgi?id=47937
3519
3520         We don't need to test x86 JIT.
3521
3522         * wtf/Platform.h:
3523
3524 2010-10-19  Oliver Hunt  <oliver@apple.com>
3525
3526         Reviewed by Geoffrey Garen.
3527
3528         Remove support for JSVALUE32 from JSC
3529         https://bugs.webkit.org/show_bug.cgi?id=47948
3530
3531         Remove all the code for supporting JSVALUE32 from JSC.
3532
3533         * jit/JIT.cpp:
3534         (JSC::JIT::privateCompileMainPass):
3535         (JSC::JIT::privateCompileSlowCases):
3536         * jit/JIT.h:
3537         * jit/JITArithmetic.cpp:
3538         (JSC::JIT::emit_op_lshift):
3539         (JSC::JIT::emitSlow_op_lshift):
3540         (JSC::JIT::emit_op_rshift):
3541         (JSC::JIT::emitSlow_op_rshift):
3542         (JSC::JIT::emit_op_urshift):
3543         (JSC::JIT::emitSlow_op_urshift):
3544         (JSC::JIT::emit_op_jnless):
3545         (JSC::JIT::emitSlow_op_jnless):
3546         (JSC::JIT::emit_op_jless):
3547         (JSC::JIT::emitSlow_op_jless):
3548         (JSC::JIT::emit_op_jlesseq):
3549         (JSC::JIT::emitSlow_op_jlesseq):
3550         (JSC::JIT::emit_op_bitand):
3551         (JSC::JIT::emit_op_post_inc):
3552         (JSC::JIT::emit_op_post_dec):
3553         (JSC::JIT::emit_op_pre_inc):
3554         (JSC::JIT::emit_op_pre_dec):
3555         (JSC::JIT::emit_op_mod):
3556         (JSC::JIT::emitSlow_op_mod):
3557         * jit/JITCall.cpp:
3558         * jit/JITInlineMethods.h:
3559         (JSC::JIT::emitGetFromCallFrameHeaderPtr):
3560         (JSC::JIT::emitGetFromCallFrameHeader32):
3561         * jit/JITOpcodes.cpp:
3562         (JSC::JIT::emit_op_loop_if_lesseq):
3563         (JSC::JIT::emit_op_bitnot):
3564         (JSC::JIT::emit_op_next_pname):
3565         * jit/JITPropertyAccess.cpp:
3566         (JSC::JIT::emit_op_get_by_val):
3567         (JSC::JIT::emit_op_put_by_val):
3568         * jit/JITStubs.h:
3569         * jit/JSInterfaceJIT.h:
3570         * jit/SpecializedThunkJIT.h:
3571         (JSC::SpecializedThunkJIT::returnDouble):
3572         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
3573         * jit/ThunkGenerators.cpp:
3574         (JSC::sqrtThunkGenerator):
3575         (JSC::powThunkGenerator):
3576         * runtime/Collector.cpp:
3577         (JSC::isPossibleCell):
3578         (JSC::typeName):
3579         * runtime/JSCell.h:
3580         * runtime/JSGlobalData.cpp:
3581         (JSC::JSGlobalData::JSGlobalData):
3582         * runtime/JSGlobalData.h:
3583         * runtime/JSGlobalObject.h:
3584         (JSC::Structure::prototypeForLookup):
3585         * runtime/JSImmediate.h:
3586         (JSC::reinterpretIntptrToDouble):
3587         (JSC::JSImmediate::isIntegerNumber):
3588         (JSC::JSImmediate::isDouble):
3589         (JSC::JSImmediate::areBothImmediateIntegerNumbers):
3590         (JSC::JSImmediate::makeDouble):
3591         (JSC::JSImmediate::doubleValue):
3592         (JSC::JSImmediate::toBoolean):
3593         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
3594         (JSC::JSImmediate::from):
3595         (JSC::JSImmediate::toDouble):
3596         (JSC::JSFastMath::rightShiftImmediateNumbers):
3597         * runtime/JSNumberCell.cpp:
3598         * runtime/JSNumberCell.h:
3599         * runtime/JSObject.h:
3600         (JSC::JSObject::JSObject):
3601         * runtime/JSValue.h:
3602         * runtime/NumberObject.h: