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