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