2011-01-10 Michael Saboff <msaboff@apple.com>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-01-10  Michael Saboff  <msaboff@apple.com>
2
3         Reviewed by Geoffrey Garen.
4
5         ASSERTION Failure in JSC::binaryChop
6         https://bugs.webkit.org/show_bug.cgi?id=25614
7
8         Changed JITStubs::cti_register_file_check() to use the current stack's
9         return PC to find the bytecode for handling the exception in the prior
10         frame.  Also added the appropriate arrity check routine call to the
11         JIT to bytecode vector (m_callReturnIndexVector) in the CodeBlock.
12
13         * jit/JIT.cpp:
14         (JSC::JIT::privateCompile): Changed the arrity check call location
15         so that it gets added to the m_calls list so that it's included in
16         CodeBlock::m_callReturnIndexVector.
17         * jit/JITStubs.cpp:
18         (JSC::DEFINE_STUB_FUNCTION): Use the current call frame's return PC.
19
20 2011-01-10  Daniel Bates  <dbates@rim.com>
21
22         Reviewed by Martin Robinson.
23
24         Remove extraneous COMPILER(GCC) condition when checking GCC_VERSION_AT_LEAST()
25         https://bugs.webkit.org/show_bug.cgi?id=52178
26
27         It is sufficient to test GCC_VERSION_AT_LEAST() instead of both COMPILER(GCC) and
28         GCC_VERSION_AT_LEAST(). Notice GCC_VERSION_AT_LEAST() is defined to be 0 when we
29         are not compiling with GCC.
30
31         Fixes style issues at the callsites (i.e. replace comma with comma-space in
32         macro function argument list). Also, makes a spelling correction in a comment.
33
34         * jit/ExecutableAllocator.h:
35         (JSC::ExecutableAllocator::cacheFlush):
36         * wtf/Platform.h:
37
38 2011-01-10  Geoffrey Garen  <ggaren@apple.com>
39
40         Build fix: removed some uses of nextNumber that I missed last time.
41
42         * runtime/Heap.cpp:
43         (JSC::Heap::reset):
44         (JSC::Heap::collectAllGarbage):
45
46 2011-01-10  Daniel Bates  <dbates@rim.com>
47
48         Reviewed by Darin Adler.
49
50         Use __builtin_expect when compiling using RVCT in GNU mode
51         https://bugs.webkit.org/show_bug.cgi?id=51866
52
53         We should only use __builtin_expect if we are compiling with GCC or RVCT 3 or higher in GNU mode
54         as pointed out by Siddharth Mathur per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0202h/Cjabddedbde.html>.
55
56         * wtf/AlwaysInline.h:
57         * wtf/Platform.h: Removed define WTF_COMPILER_RVCT4_OR_GREATER. Instead added macro
58         function RVCT_VERSION_AT_LEAST so that we can test for an arbitrary minimum RVCT
59         version.
60
61 2011-01-10  Geoffrey Garen  <ggaren@apple.com>
62
63         Reviewed by Oliver Hunt.
64
65         Moved Collector.* => Heap.*, since the file contains a class named "Heap".
66
67         * API/JSCallbackObject.cpp:
68         * Android.mk:
69         * CMakeLists.txt:
70         * GNUmakefile.am:
71         * JavaScriptCore.gypi:
72         * JavaScriptCore.pro:
73         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
74         * JavaScriptCore.xcodeproj/project.pbxproj:
75         * interpreter/Interpreter.cpp:
76         * interpreter/RegisterFile.h:
77         * jit/JITStubs.cpp:
78         * runtime/Collector.cpp: Removed.
79         * runtime/Collector.h: Removed.
80         * runtime/CollectorHeapIterator.h:
81         * runtime/GCActivityCallbackCF.cpp:
82         * runtime/Heap.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
83         * runtime/Heap.h: Copied from JavaScriptCore/runtime/Collector.h.
84         * runtime/InitializeThreading.cpp:
85         * runtime/JSCell.h:
86         * runtime/JSGlobalData.cpp:
87         * runtime/JSGlobalData.h:
88         * runtime/JSLock.cpp:
89         * runtime/JSNumberCell.h:
90         * runtime/MachineStackMarker.cpp:
91         * runtime/MemoryStatistics.h:
92         * runtime/Protect.h:
93         * runtime/UString.cpp:
94         * runtime/WeakGCMap.h:
95         * runtime/WeakGCPtr.h:
96
97 2011-01-10  Xan Lopez  <xlopez@igalia.com>
98
99         Reviewed by Gavin Barraclough.
100
101         Remove unused isString() case in JSString::toPrimitiveString()
102         https://bugs.webkit.org/show_bug.cgi?id=52167
103
104         We never call toPrimitiveString() with strings, so remove the
105         check and add an ASSERT ensuring this never happens. 0.7% overall
106         progression in sunspider, since one of the call sites is very hot.
107
108         * runtime/JSString.h:
109         (JSC::JSValue::toPrimitiveString):
110
111 2011-01-10  Peter Varga  <pvarga@inf.u-szeged.hu>
112
113         Reviewed by Gavin Barraclough.
114
115         Rename the existing YARR files and classes
116         https://bugs.webkit.org/show_bug.cgi?id=51872
117
118         Replace the "Regex" prefix with "Yarr" in the name of YARR files and classes.
119
120         * Android.mk:
121         * CMakeLists.txt:
122         * GNUmakefile.am:
123         * JavaScriptCore.gypi:
124         * JavaScriptCore.pro:
125         * JavaScriptCore.xcodeproj/project.pbxproj:
126         * runtime/RegExp.cpp:
127         (JSC::RegExp::compile):
128         (JSC::RegExp::match):
129         (JSC::RegExp::printTraceData):
130         * yarr/YarrInterpreter.cpp: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.cpp.
131         (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
132         (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
133         (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
134         (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
135         (JSC::Yarr::Interpreter::allocDisjunctionContext):
136         (JSC::Yarr::Interpreter::freeDisjunctionContext):
137         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
138         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
139         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
140         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
141         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
142         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
143         (JSC::Yarr::Interpreter::InputStream::InputStream):
144         (JSC::Yarr::Interpreter::InputStream::next):
145         (JSC::Yarr::Interpreter::InputStream::rewind):
146         (JSC::Yarr::Interpreter::InputStream::read):
147         (JSC::Yarr::Interpreter::InputStream::readPair):
148         (JSC::Yarr::Interpreter::InputStream::readChecked):
149         (JSC::Yarr::Interpreter::InputStream::reread):
150         (JSC::Yarr::Interpreter::InputStream::prev):
151         (JSC::Yarr::Interpreter::InputStream::getPos):
152         (JSC::Yarr::Interpreter::InputStream::setPos):
153         (JSC::Yarr::Interpreter::InputStream::atStart):
154         (JSC::Yarr::Interpreter::InputStream::atEnd):
155         (JSC::Yarr::Interpreter::InputStream::checkInput):
156         (JSC::Yarr::Interpreter::InputStream::uncheckInput):
157         (JSC::Yarr::Interpreter::InputStream::isNotAvailableInput):
158         (JSC::Yarr::Interpreter::testCharacterClass):
159         (JSC::Yarr::Interpreter::checkCharacter):
160         (JSC::Yarr::Interpreter::checkCasedCharacter):
161         (JSC::Yarr::Interpreter::checkCharacterClass):
162         (JSC::Yarr::Interpreter::tryConsumeBackReference):
163         (JSC::Yarr::Interpreter::matchAssertionBOL):
164         (JSC::Yarr::Interpreter::matchAssertionEOL):
165         (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
166         (JSC::Yarr::Interpreter::backtrackPatternCharacter):
167         (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
168         (JSC::Yarr::Interpreter::matchCharacterClass):
169         (JSC::Yarr::Interpreter::backtrackCharacterClass):
170         (JSC::Yarr::Interpreter::matchBackReference):
171         (JSC::Yarr::Interpreter::backtrackBackReference):
172         (JSC::Yarr::Interpreter::recordParenthesesMatch):
173         (JSC::Yarr::Interpreter::resetMatches):
174         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
175         (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
176         (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
177         (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
178         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
179         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
180         (JSC::Yarr::Interpreter::matchParenthesesTerminalEnd):
181         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
182         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
183         (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
184         (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
185         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
186         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
187         (JSC::Yarr::Interpreter::matchParentheses):
188         (JSC::Yarr::Interpreter::backtrackParentheses):
189         (JSC::Yarr::Interpreter::lookupForBeginChars):
190         (JSC::Yarr::Interpreter::matchDisjunction):
191         (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
192         (JSC::Yarr::Interpreter::interpret):
193         (JSC::Yarr::Interpreter::Interpreter):
194         (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
195         (JSC::Yarr::ByteCompiler::ByteCompiler):
196         (JSC::Yarr::ByteCompiler::compile):
197         (JSC::Yarr::ByteCompiler::checkInput):
198         (JSC::Yarr::ByteCompiler::assertionBOL):
199         (JSC::Yarr::ByteCompiler::assertionEOL):
200         (JSC::Yarr::ByteCompiler::assertionWordBoundary):
201         (JSC::Yarr::ByteCompiler::atomPatternCharacter):
202         (JSC::Yarr::ByteCompiler::atomCharacterClass):
203         (JSC::Yarr::ByteCompiler::atomBackReference):
204         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
205         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
206         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
207         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
208         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
209         (JSC::Yarr::ByteCompiler::popParenthesesStack):
210         (JSC::Yarr::ByteCompiler::dumpDisjunction):
211         (JSC::Yarr::ByteCompiler::closeAlternative):
212         (JSC::Yarr::ByteCompiler::closeBodyAlternative):
213         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
214         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
215         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
216         (JSC::Yarr::ByteCompiler::regexBegin):
217         (JSC::Yarr::ByteCompiler::regexEnd):
218         (JSC::Yarr::ByteCompiler::alternativeBodyDisjunction):
219         (JSC::Yarr::ByteCompiler::alternativeDisjunction):
220         (JSC::Yarr::ByteCompiler::emitDisjunction):
221         (JSC::Yarr::byteCompile):
222         (JSC::Yarr::interpret):
223         * yarr/YarrInterpreter.h: Renamed from Source/JavaScriptCore/yarr/RegexInterpreter.h.
224         (JSC::Yarr::ByteTerm::ByteTerm):
225         (JSC::Yarr::ByteTerm::BOL):
226         (JSC::Yarr::ByteTerm::CheckInput):
227         (JSC::Yarr::ByteTerm::EOL):
228         (JSC::Yarr::ByteTerm::WordBoundary):
229         (JSC::Yarr::ByteTerm::BackReference):
230         (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
231         (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
232         (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
233         (JSC::Yarr::ByteTerm::AlternativeBegin):
234         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
235         (JSC::Yarr::ByteTerm::AlternativeEnd):
236         (JSC::Yarr::ByteTerm::SubpatternBegin):
237         (JSC::Yarr::ByteTerm::SubpatternEnd):
238         (JSC::Yarr::ByteTerm::invert):
239         (JSC::Yarr::ByteTerm::capture):
240         (JSC::Yarr::ByteDisjunction::ByteDisjunction):
241         (JSC::Yarr::BytecodePattern::BytecodePattern):
242         (JSC::Yarr::BytecodePattern::~BytecodePattern):
243         * yarr/YarrJIT.cpp: Renamed from Source/JavaScriptCore/yarr/RegexJIT.cpp.
244         (JSC::Yarr::YarrGenerator::optimizeAlternative):
245         (JSC::Yarr::YarrGenerator::matchCharacterClassRange):
246         (JSC::Yarr::YarrGenerator::matchCharacterClass):
247         (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
248         (JSC::Yarr::YarrGenerator::jumpIfAvailableInput):
249         (JSC::Yarr::YarrGenerator::checkInput):
250         (JSC::Yarr::YarrGenerator::atEndOfInput):
251         (JSC::Yarr::YarrGenerator::notAtEndOfInput):
252         (JSC::Yarr::YarrGenerator::jumpIfCharEquals):
253         (JSC::Yarr::YarrGenerator::jumpIfCharNotEquals):
254         (JSC::Yarr::YarrGenerator::readCharacter):
255         (JSC::Yarr::YarrGenerator::storeToFrame):
256         (JSC::Yarr::YarrGenerator::storeToFrameWithPatch):
257         (JSC::Yarr::YarrGenerator::loadFromFrame):
258         (JSC::Yarr::YarrGenerator::loadFromFrameAndJump):
259         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::IndirectJumpEntry):
260         (JSC::Yarr::YarrGenerator::IndirectJumpEntry::addJump):
261         (JSC::Yarr::YarrGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
262         (JSC::Yarr::YarrGenerator::GenerationState::GenerationState):
263         (JSC::Yarr::YarrGenerator::GenerationState::addIndirectJumpEntry):
264         (JSC::Yarr::YarrGenerator::GenerationState::emitIndirectJumpTable):
265         (JSC::Yarr::YarrGenerator::GenerationState::incrementParenNestingLevel):
266         (JSC::Yarr::YarrGenerator::GenerationState::decrementParenNestingLevel):
267         (JSC::Yarr::YarrGenerator::GenerationState::addParenthesesTail):
268         (JSC::Yarr::YarrGenerator::GenerationState::emitParenthesesTail):
269         (JSC::Yarr::YarrGenerator::GenerationState::addJumpToNextInteration):
270         (JSC::Yarr::YarrGenerator::GenerationState::addJumpsToNextInteration):
271         (JSC::Yarr::YarrGenerator::GenerationState::addDataLabelToNextIteration):
272         (JSC::Yarr::YarrGenerator::GenerationState::linkToNextIteration):
273         (JSC::Yarr::YarrGenerator::BacktrackDestination::BacktrackDestination):
274         (JSC::Yarr::YarrGenerator::BacktrackDestination::clear):
275         (JSC::Yarr::YarrGenerator::BacktrackDestination::clearDataLabel):
276         (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDestination):
277         (JSC::Yarr::YarrGenerator::BacktrackDestination::isStackOffset):
278         (JSC::Yarr::YarrGenerator::BacktrackDestination::isLabel):
279         (JSC::Yarr::YarrGenerator::BacktrackDestination::isJumpList):
280         (JSC::Yarr::YarrGenerator::BacktrackDestination::hasDataLabel):
281         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTarget):
282         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyTo):
283         (JSC::Yarr::YarrGenerator::BacktrackDestination::addBacktrackJump):
284         (JSC::Yarr::YarrGenerator::BacktrackDestination::setStackOffset):
285         (JSC::Yarr::YarrGenerator::BacktrackDestination::setLabel):
286         (JSC::Yarr::YarrGenerator::BacktrackDestination::setNextBacktrackLabel):
287         (JSC::Yarr::YarrGenerator::BacktrackDestination::copyBacktrackToLabel):
288         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackToLabel):
289         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackJumpList):
290         (JSC::Yarr::YarrGenerator::BacktrackDestination::setBacktrackSourceLabel):
291         (JSC::Yarr::YarrGenerator::BacktrackDestination::setDataLabel):
292         (JSC::Yarr::YarrGenerator::BacktrackDestination::setSubDataLabelPtr):
293         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkToNextBacktrack):
294         (JSC::Yarr::YarrGenerator::BacktrackDestination::getStackOffset):
295         (JSC::Yarr::YarrGenerator::BacktrackDestination::getLabel):
296         (JSC::Yarr::YarrGenerator::BacktrackDestination::getBacktrackJumps):
297         (JSC::Yarr::YarrGenerator::BacktrackDestination::getDataLabel):
298         (JSC::Yarr::YarrGenerator::BacktrackDestination::jumpToBacktrack):
299         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
300         (JSC::Yarr::YarrGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
301         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracks):
302         (JSC::Yarr::YarrGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
303         (JSC::Yarr::YarrGenerator::TermGenerationState::TermGenerationState):
304         (JSC::Yarr::YarrGenerator::TermGenerationState::resetAlternative):
305         (JSC::Yarr::YarrGenerator::TermGenerationState::alternativeValid):
306         (JSC::Yarr::YarrGenerator::TermGenerationState::nextAlternative):
307         (JSC::Yarr::YarrGenerator::TermGenerationState::alternative):
308         (JSC::Yarr::YarrGenerator::TermGenerationState::isLastAlternative):
309         (JSC::Yarr::YarrGenerator::TermGenerationState::resetTerm):
310         (JSC::Yarr::YarrGenerator::TermGenerationState::termValid):
311         (JSC::Yarr::YarrGenerator::TermGenerationState::nextTerm):
312         (JSC::Yarr::YarrGenerator::TermGenerationState::term):
313         (JSC::Yarr::YarrGenerator::TermGenerationState::isLastTerm):
314         (JSC::Yarr::YarrGenerator::TermGenerationState::getSubParenNum):
315         (JSC::Yarr::YarrGenerator::TermGenerationState::isMainDisjunction):
316         (JSC::Yarr::YarrGenerator::TermGenerationState::setParenthesesTail):
317         (JSC::Yarr::YarrGenerator::TermGenerationState::getParenthesesTail):
318         (JSC::Yarr::YarrGenerator::TermGenerationState::lookaheadTerm):
319         (JSC::Yarr::YarrGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
320         (JSC::Yarr::YarrGenerator::TermGenerationState::inputOffset):
321         (JSC::Yarr::YarrGenerator::TermGenerationState::clearBacktrack):
322         (JSC::Yarr::YarrGenerator::TermGenerationState::jumpToBacktrack):
323         (JSC::Yarr::YarrGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
324         (JSC::Yarr::YarrGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
325         (JSC::Yarr::YarrGenerator::TermGenerationState::addBacktrackJump):
326         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackDataLabel):
327         (JSC::Yarr::YarrGenerator::TermGenerationState::setBackTrackStackOffset):
328         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLabel):
329         (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracks):
330         (JSC::Yarr::YarrGenerator::TermGenerationState::linkAlternativeBacktracksTo):
331         (JSC::Yarr::YarrGenerator::TermGenerationState::setBacktrackLink):
332         (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktracks):
333         (JSC::Yarr::YarrGenerator::TermGenerationState::chainBacktrackJumps):
334         (JSC::Yarr::YarrGenerator::TermGenerationState::getBacktrackDestination):
335         (JSC::Yarr::YarrGenerator::TermGenerationState::propagateBacktrackingFrom):
336         (JSC::Yarr::YarrGenerator::ParenthesesTail::ParenthesesTail):
337         (JSC::Yarr::YarrGenerator::ParenthesesTail::processBacktracks):
338         (JSC::Yarr::YarrGenerator::ParenthesesTail::setNextIteration):
339         (JSC::Yarr::YarrGenerator::ParenthesesTail::addAfterParenJump):
340         (JSC::Yarr::YarrGenerator::ParenthesesTail::generateCode):
341         (JSC::Yarr::YarrGenerator::generateAssertionBOL):
342         (JSC::Yarr::YarrGenerator::generateAssertionEOL):
343         (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
344         (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
345         (JSC::Yarr::YarrGenerator::generatePatternCharacterSingle):
346         (JSC::Yarr::YarrGenerator::generatePatternCharacterPair):
347         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
348         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
349         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
350         (JSC::Yarr::YarrGenerator::generateCharacterClassSingle):
351         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
352         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
353         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
354         (JSC::Yarr::YarrGenerator::generateParenthesesDisjunction):
355         (JSC::Yarr::YarrGenerator::generateParenthesesSingle):
356         (JSC::Yarr::YarrGenerator::generateParenthesesGreedyNoBacktrack):
357         (JSC::Yarr::YarrGenerator::generateParentheticalAssertion):
358         (JSC::Yarr::YarrGenerator::generateTerm):
359         (JSC::Yarr::YarrGenerator::generateDisjunction):
360         (JSC::Yarr::YarrGenerator::generateEnter):
361         (JSC::Yarr::YarrGenerator::generateReturn):
362         (JSC::Yarr::YarrGenerator::YarrGenerator):
363         (JSC::Yarr::YarrGenerator::generate):
364         (JSC::Yarr::YarrGenerator::compile):
365         (JSC::Yarr::jitCompile):
366         * yarr/YarrJIT.h: Renamed from Source/JavaScriptCore/yarr/RegexJIT.h.
367         (JSC::Yarr::YarrCodeBlock::YarrCodeBlock):
368         (JSC::Yarr::YarrCodeBlock::~YarrCodeBlock):
369         (JSC::Yarr::YarrCodeBlock::setFallBack):
370         (JSC::Yarr::YarrCodeBlock::isFallBack):
371         (JSC::Yarr::YarrCodeBlock::set):
372         (JSC::Yarr::YarrCodeBlock::execute):
373         (JSC::Yarr::YarrCodeBlock::getAddr):
374         (JSC::Yarr::execute):
375         * yarr/YarrParser.h: Renamed from Source/JavaScriptCore/yarr/RegexParser.h.
376         (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
377         (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
378         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
379         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
380         (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
381         (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
382         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
383         (JSC::Yarr::Parser::Parser):
384         (JSC::Yarr::Parser::parseEscape):
385         (JSC::Yarr::Parser::parseAtomEscape):
386         (JSC::Yarr::Parser::parseCharacterClassEscape):
387         (JSC::Yarr::Parser::parseCharacterClass):
388         (JSC::Yarr::Parser::parseParenthesesBegin):
389         (JSC::Yarr::Parser::parseParenthesesEnd):
390         (JSC::Yarr::Parser::parseQuantifier):
391         (JSC::Yarr::Parser::parseTokens):
392         (JSC::Yarr::Parser::parse):
393         (JSC::Yarr::Parser::saveState):
394         (JSC::Yarr::Parser::restoreState):
395         (JSC::Yarr::Parser::atEndOfPattern):
396         (JSC::Yarr::Parser::peek):
397         (JSC::Yarr::Parser::peekIsDigit):
398         (JSC::Yarr::Parser::peekDigit):
399         (JSC::Yarr::Parser::consume):
400         (JSC::Yarr::Parser::consumeDigit):
401         (JSC::Yarr::Parser::consumeNumber):
402         (JSC::Yarr::Parser::consumeOctal):
403         (JSC::Yarr::Parser::tryConsume):
404         (JSC::Yarr::Parser::tryConsumeHex):
405         (JSC::Yarr::parse):
406         * yarr/YarrPattern.cpp: Renamed from Source/JavaScriptCore/yarr/RegexPattern.cpp.
407         (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
408         (JSC::Yarr::CharacterClassConstructor::reset):
409         (JSC::Yarr::CharacterClassConstructor::append):
410         (JSC::Yarr::CharacterClassConstructor::putChar):
411         (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
412         (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
413         (JSC::Yarr::CharacterClassConstructor::putRange):
414         (JSC::Yarr::CharacterClassConstructor::charClass):
415         (JSC::Yarr::CharacterClassConstructor::addSorted):
416         (JSC::Yarr::CharacterClassConstructor::addSortedRange):
417         (JSC::Yarr::BeginCharHelper::BeginCharHelper):
418         (JSC::Yarr::BeginCharHelper::addBeginChar):
419         (JSC::Yarr::BeginCharHelper::merge):
420         (JSC::Yarr::BeginCharHelper::addCharacter):
421         (JSC::Yarr::BeginCharHelper::linkHotTerms):
422         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
423         (JSC::Yarr::YarrPatternConstructor::~YarrPatternConstructor):
424         (JSC::Yarr::YarrPatternConstructor::reset):
425         (JSC::Yarr::YarrPatternConstructor::assertionBOL):
426         (JSC::Yarr::YarrPatternConstructor::assertionEOL):
427         (JSC::Yarr::YarrPatternConstructor::assertionWordBoundary):
428         (JSC::Yarr::YarrPatternConstructor::atomPatternCharacter):
429         (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass):
430         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBegin):
431         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassAtom):
432         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassRange):
433         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn):
434         (JSC::Yarr::YarrPatternConstructor::atomCharacterClassEnd):
435         (JSC::Yarr::YarrPatternConstructor::atomParenthesesSubpatternBegin):
436         (JSC::Yarr::YarrPatternConstructor::atomParentheticalAssertionBegin):
437         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
438         (JSC::Yarr::YarrPatternConstructor::atomBackReference):
439         (JSC::Yarr::YarrPatternConstructor::copyDisjunction):
440         (JSC::Yarr::YarrPatternConstructor::copyTerm):
441         (JSC::Yarr::YarrPatternConstructor::quantifyAtom):
442         (JSC::Yarr::YarrPatternConstructor::disjunction):
443         (JSC::Yarr::YarrPatternConstructor::regexBegin):
444         (JSC::Yarr::YarrPatternConstructor::regexEnd):
445         (JSC::Yarr::YarrPatternConstructor::regexError):
446         (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
447         (JSC::Yarr::YarrPatternConstructor::setupDisjunctionOffsets):
448         (JSC::Yarr::YarrPatternConstructor::setupOffsets):
449         (JSC::Yarr::YarrPatternConstructor::checkForTerminalParentheses):
450         (JSC::Yarr::YarrPatternConstructor::optimizeBOL):
451         (JSC::Yarr::YarrPatternConstructor::addBeginTerm):
452         (JSC::Yarr::YarrPatternConstructor::setupDisjunctionBeginTerms):
453         (JSC::Yarr::YarrPatternConstructor::setupAlternativeBeginTerms):
454         (JSC::Yarr::YarrPatternConstructor::setupBeginChars):
455         (JSC::Yarr::compile):
456         (JSC::Yarr::YarrPattern::YarrPattern):
457         * yarr/YarrPattern.h: Renamed from Source/JavaScriptCore/yarr/RegexPattern.h.
458         (JSC::Yarr::CharacterRange::CharacterRange):
459         (JSC::Yarr::CharacterClassTable::create):
460         (JSC::Yarr::CharacterClassTable::CharacterClassTable):
461         (JSC::Yarr::CharacterClass::CharacterClass):
462         (JSC::Yarr::PatternTerm::PatternTerm):
463         (JSC::Yarr::PatternTerm::ForwardReference):
464         (JSC::Yarr::PatternTerm::BOL):
465         (JSC::Yarr::PatternTerm::EOL):
466         (JSC::Yarr::PatternTerm::WordBoundary):
467         (JSC::Yarr::PatternTerm::invert):
468         (JSC::Yarr::PatternTerm::capture):
469         (JSC::Yarr::PatternTerm::quantify):
470         (JSC::Yarr::PatternAlternative::PatternAlternative):
471         (JSC::Yarr::PatternAlternative::lastTerm):
472         (JSC::Yarr::PatternAlternative::removeLastTerm):
473         (JSC::Yarr::PatternAlternative::setOnceThrough):
474         (JSC::Yarr::PatternAlternative::onceThrough):
475         (JSC::Yarr::PatternDisjunction::PatternDisjunction):
476         (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
477         (JSC::Yarr::PatternDisjunction::addNewAlternative):
478         (JSC::Yarr::TermChain::TermChain):
479         (JSC::Yarr::BeginChar::BeginChar):
480         (JSC::Yarr::YarrPattern::~YarrPattern):
481         (JSC::Yarr::YarrPattern::reset):
482         (JSC::Yarr::YarrPattern::containsIllegalBackReference):
483         (JSC::Yarr::YarrPattern::newlineCharacterClass):
484         (JSC::Yarr::YarrPattern::digitsCharacterClass):
485         (JSC::Yarr::YarrPattern::spacesCharacterClass):
486         (JSC::Yarr::YarrPattern::wordcharCharacterClass):
487         (JSC::Yarr::YarrPattern::nondigitsCharacterClass):
488         (JSC::Yarr::YarrPattern::nonspacesCharacterClass):
489         (JSC::Yarr::YarrPattern::nonwordcharCharacterClass):
490
491 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
492
493         Windows build fix.
494
495         * parser/SyntaxChecker.h:
496
497 2011-01-10  Dave Tapuska  <dtapuska@rim.com>
498
499         Reviewed by Gavin Barraclough.
500
501         Add CTI ASM versions for RVCT ARM THUMB2 mode.
502
503         https://bugs.webkit.org/show_bug.cgi?id=52154
504
505         * jit/JITStubs.cpp:
506         (JSC::ctiTrampoline):
507         (JSC::ctiVMThrowTrampoline):
508         (JSC::ctiOpThrowNotCaught):
509
510 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
511
512         Qt build fix.
513
514         * JavaScriptCore.pro:
515
516 2011-01-10  Gavin Barraclough  <barraclough@apple.com>
517
518         Reviewed by Oliver Hunt.
519
520         Bug 52079 - Syntax errors should be early errors.
521
522         From chapter 16 the spec:
523             An implementation must report most errors at the time the relevant ECMAScript language construct is
524             evaluated. An early error is an error that can be detected and reported prior to the evaluation of
525             any construct in the Program containing the error. An implementation must report early errors in a
526             Program prior to the first evaluation of that Program. Early errors in eval code are reported at
527             the time eval is called but prior to evaluation of any construct within the eval code. All errors
528             that are not early errors are runtime errors.
529
530             An implementation must treat any instance of the following kinds of errors as an early error:
531                 * Any syntax error."
532
533         * JavaScriptCore.xcodeproj/project.pbxproj:
534             Added new files.
535         * bytecode/CodeBlock.cpp:
536             Removed op_throw_syntax_error.
537         * bytecode/Opcode.h:
538             Removed op_throw_syntax_error.
539         * bytecompiler/BytecodeGenerator.cpp:
540         (JSC::BytecodeGenerator::generate):
541             If m_expressionTooDeep then throw a runtime error.
542         (JSC::BytecodeGenerator::BytecodeGenerator):
543             Initialize m_expressionTooDeep.
544         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
545             Sets m_expressionTooDeep.
546         * bytecompiler/BytecodeGenerator.h:
547             Added m_expressionTooDeep, removed emitThrowSyntaxError.
548         * bytecompiler/NodesCodegen.cpp:
549         (JSC::RegExpNode::emitBytecode):
550         (JSC::ContinueNode::emitBytecode):
551         (JSC::BreakNode::emitBytecode):
552         (JSC::ReturnNode::emitBytecode):
553         (JSC::LabelNode::emitBytecode):
554             Conditions that threw syntax error are now handled during parsing;
555             during bytecompilation these are now just ASSERTs.
556         * interpreter/Interpreter.cpp:
557         (JSC::Interpreter::privateExecute):
558         * jit/JIT.cpp:
559         (JSC::JIT::privateCompileMainPass):
560         * jit/JIT.h:
561         * jit/JITOpcodes.cpp:
562         * jit/JITOpcodes32_64.cpp:
563         * jit/JITStubs.cpp:
564         * jit/JITStubs.h:
565             Removed op_throw_syntax_error.
566         * parser/ASTBuilder.h:
567         (JSC::ASTBuilder::createRegExp):
568             Renamed; added syntax check.
569         * parser/JSParser.cpp:
570         (JSC::JSParser::breakIsValid):
571         (JSC::JSParser::hasLabel):
572         (JSC::JSParser::Scope::Scope):
573         (JSC::JSParser::Scope::setIsFunction):
574         (JSC::JSParser::Scope::isFunctionBoundary):
575         (JSC::JSParser::ScopeRef::hasContainingScope):
576         (JSC::JSParser::ScopeRef::containingScope):
577         (JSC::JSParser::AutoPopScopeRef::AutoPopScopeRef):
578         (JSC::JSParser::AutoPopScopeRef::~AutoPopScopeRef):
579         (JSC::JSParser::AutoPopScopeRef::setPopped):
580         (JSC::JSParser::popScopeInternal):
581         (JSC::JSParser::popScope):
582         (JSC::jsParse):
583         (JSC::JSParser::JSParser):
584         (JSC::JSParser::parseProgram):
585         (JSC::JSParser::parseBreakStatement):
586         (JSC::JSParser::parseContinueStatement):
587         (JSC::JSParser::parseReturnStatement):
588         (JSC::JSParser::parseTryStatement):
589         (JSC::JSParser::parseFunctionInfo):
590         (JSC::JSParser::parseExpressionOrLabelStatement):
591         (JSC::JSParser::parsePrimaryExpression):
592         * parser/JSParser.h:
593         * parser/Nodes.h:
594         * parser/Parser.cpp:
595         (JSC::Parser::parse):
596         * parser/SyntaxChecker.h:
597         (JSC::SyntaxChecker::createRegExp):
598             Renamed; added syntax check.
599         * runtime/ExceptionHelpers.cpp:
600         (JSC::createOutOfMemoryError):
601         (JSC::throwOutOfMemoryError):
602         * runtime/ExceptionHelpers.h:
603             Broke out createOutOfMemoryError.
604         * runtime/Executable.cpp:
605         (JSC::EvalExecutable::compileInternal):
606         (JSC::ProgramExecutable::compileInternal):
607         (JSC::FunctionExecutable::compileForCallInternal):
608         (JSC::FunctionExecutable::compileForConstructInternal):
609             Add check for exception after bytecode generation.
610         * runtime/RegExpConstructor.cpp:
611         (JSC::constructRegExp):
612         * runtime/RegExpPrototype.cpp:
613         (JSC::regExpProtoFuncCompile):
614             RegExp error prefixes not included in error string.
615         * yarr/RegexParser.h:
616         (JSC::Yarr::Parser::parse):
617             Removed regexBegin/regexEnd/regexError.
618         * yarr/RegexPattern.cpp:
619         (JSC::Yarr::RegexPatternConstructor::regexBegin):
620             Removed regexEnd/regexError.
621         (JSC::Yarr::compileRegex):
622             Add call to regexBegin (no longer called from the parser).
623         * yarr/YarrSyntaxChecker.cpp: Added.
624         (JSC::Yarr::SyntaxChecker::assertionBOL):
625         (JSC::Yarr::SyntaxChecker::assertionEOL):
626         (JSC::Yarr::SyntaxChecker::assertionWordBoundary):
627         (JSC::Yarr::SyntaxChecker::atomPatternCharacter):
628         (JSC::Yarr::SyntaxChecker::atomBuiltInCharacterClass):
629         (JSC::Yarr::SyntaxChecker::atomCharacterClassBegin):
630         (JSC::Yarr::SyntaxChecker::atomCharacterClassAtom):
631         (JSC::Yarr::SyntaxChecker::atomCharacterClassRange):
632         (JSC::Yarr::SyntaxChecker::atomCharacterClassBuiltIn):
633         (JSC::Yarr::SyntaxChecker::atomCharacterClassEnd):
634         (JSC::Yarr::SyntaxChecker::atomParenthesesSubpatternBegin):
635         (JSC::Yarr::SyntaxChecker::atomParentheticalAssertionBegin):
636         (JSC::Yarr::SyntaxChecker::atomParenthesesEnd):
637         (JSC::Yarr::SyntaxChecker::atomBackReference):
638         (JSC::Yarr::SyntaxChecker::quantifyAtom):
639         (JSC::Yarr::SyntaxChecker::disjunction):
640         (JSC::Yarr::checkSyntax):
641         * yarr/YarrSyntaxChecker.h: Added.
642             Check RegExp syntax.
643
644 2011-01-10  Adam Roben  <aroben@apple.com>
645
646         Roll out r75289
647
648         It was causing assertion failures. See <http://webkit.org/b/52156>.
649
650         * wtf/StackBounds.cpp:
651         (WTF::StackBounds::initialize):
652
653 2011-01-08  Patrick Gansterer  <paroga@webkit.org>
654
655         Reviewed by Darin Adler.
656
657         Unify string table adding in AtomicString
658         https://bugs.webkit.org/show_bug.cgi?id=51927
659
660         Move code for adding a string into a separate function.
661         This removes multiple occurrence of the same logic.
662
663         * wtf/text/AtomicString.cpp:
664         (WTF::addToStringTable): Added.
665         (WTF::AtomicString::add): Use addToStringTable().
666         (WTF::AtomicString::fromUTF8): Ditto.
667
668 2011-01-07  Geoffrey Garen  <ggaren@apple.com>
669
670         Reviewed by Gavin Barraclough.
671
672         Split machine stack marking functions into their own class (MachineStackMarker)
673         https://bugs.webkit.org/show_bug.cgi?id=52088
674
675         * API/APIShims.h:
676         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Moved registerThread()
677         call behind an #ifdef because we shouldn't be registering threads at all
678         if we don't support usage on multiple threads.
679
680         * Android.mk:
681         * CMakeLists.txt:
682         * GNUmakefile.am:
683         * JavaScriptCore.gypi:
684         * JavaScriptCore.pro:
685         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
686         * JavaScriptCore.xcodeproj/project.pbxproj: Updated projects.
687
688         * runtime/Collector.cpp:
689         (JSC::Heap::Heap):
690         (JSC::Heap::destroy):
691         (JSC::Heap::markRoots):
692         * runtime/Collector.h:
693         (JSC::Heap::machineStackMarker): Moved code to machineStackMarker.
694
695         * runtime/JSGlobalData.h:
696         (JSC::JSGlobalData::makeUsableFromMultipleThreads): Removed an unnecessary
697         level of indirection, to make Heap less of a God class.
698
699         * runtime/MachineStackMarker.h: Copied from Source/JavaScriptCore/runtime/Collector.h.
700         * runtime/MachineStackMarker.cpp: Copied from Source/JavaScriptCore/runtime/Collector.cpp.
701         (JSC::MachineStackMarker::MachineStackMarker):
702         (JSC::MachineStackMarker::~MachineStackMarker):
703         (JSC::MachineStackMarker::makeUsableFromMultipleThreads):
704         (JSC::MachineStackMarker::registerThread):
705         (JSC::MachineStackMarker::unregisterThread):
706         (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
707         (JSC::MachineStackMarker::markCurrentThreadConservatively):
708         (JSC::MachineStackMarker::markOtherThreadConservatively):
709         (JSC::MachineStackMarker::markMachineStackConservatively): Moved code from Heap.
710
711 2011-01-07  Gavin Barraclough  <barraclough@apple.com>
712
713         Reviewed by Geoff Garen.
714
715         Bug 26276 - Need a mechanism to determine stack extent on WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE platforms
716
717         Fix for win32.  The base of the stack is stored in the "deallocation stack" field of the
718         Thread Information Block - see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block
719         for more information!
720
721         * wtf/StackBounds.cpp:
722         (WTF::StackBounds::initialize):
723
724 2011-01-07  Adam Roben  <aroben@apple.com>
725
726         Update react-to-vsprops-changes.py after r74855
727
728         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
729
730 2011-01-07  Carlos Garcia Campos  <cgarcia@igalia.com>
731
732         Reviewed by Martin Robinson.
733
734         [GTK] Port scrollbar painting to GtkStyleContext
735         https://bugs.webkit.org/show_bug.cgi?id=52051
736
737         * wtf/gobject/GTypedefs.h: Add GtkStyleContext forward
738         declaration.
739
740 2011-01-07  Daniel Bates  <dbates@rim.com>
741
742         Reviewed by Martin Robinson.
743
744         Enable PCRE computed gotos when compiling with RCVT 4.0 or greater in GNU mode
745         https://bugs.webkit.org/show_bug.cgi?id=52034
746
747         Derived from a patch by Eli Fidler.
748
749         RVCT 4 or greater in GNU mode supports the computed goto GNU language extension
750         as per <http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/ch03s07s12.html>.
751
752         * pcre/pcre_exec.cpp: Modified to check for feature, HAVE(COMPUTED_GOTO), instead
753         of hardcoding the GCC compiler.
754         * wtf/Platform.h: Define WTF_COMPILER_RVCT4_OR_GREATER if __ARMCC_VERSION >= 400000.
755
756 2011-01-06  Gavin Barraclough  <barraclough@apple.com>
757
758         Reviewed by Geoff Garen.
759
760         Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
761
762         The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
763         destructor early, in order to release wrappers once we know we no longer intend to use them.
764         Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
765         lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
766         A sequence of events that triggers the bug would look like this:
767
768         (1) Create a DOMWrapperWorld.
769         (2) Register a timer in the world.
770         (3) Call unregisterWorld() on the world.
771         (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
772         (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
773             called forgetWorld() none exists.
774         (6) Attempt to add a wrapper to a NULL map.
775
776         Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
777
778         * runtime/WeakGCMap.h:
779         (JSC::WeakGCMap::clear):
780
781 2011-01-06  Gavin Barraclough  <barraclough@apple.com>
782
783         Reviewed by Darin Adler.
784
785         Bug 52021 - zeroDouble broken on ARMv7
786
787         The bug here is that zeroDouble was working incorrectly,
788         leading to op_loop_if_true failing - specifically in the
789         case where the value being checked is 0.0 encoded as a
790         double (rather than an integer immediate).
791
792         Additionally this patch removes a redundant duplicate compare
793         in some (many) case.
794
795         * assembler/ARMv7Assembler.h:
796         (JSC::ARMv7Assembler::vcmp_F64):
797         (JSC::ARMv7Assembler::vcmpz_F64):
798         * assembler/MacroAssemblerARM.h:
799         (JSC::MacroAssemblerARM::branchDoubleNonZero):
800         (JSC::MacroAssemblerARM::branchDoubleZeroOrNaN):
801         * assembler/MacroAssemblerARMv7.h:
802         (JSC::MacroAssemblerARMv7::branchDouble):
803         (JSC::MacroAssemblerARMv7::branchDoubleNonZero):
804         (JSC::MacroAssemblerARMv7::branchDoubleZeroOrNaN):
805         (JSC::MacroAssemblerARMv7::compare32):
806         * assembler/MacroAssemblerMIPS.h:
807         (JSC::MacroAssemblerMIPS::branchDoubleNonZero):
808         (JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN):
809         * assembler/MacroAssemblerX86Common.h:
810         (JSC::MacroAssemblerX86Common::branchDoubleNonZero):
811         (JSC::MacroAssemblerX86Common::branchDoubleZeroOrNaN):
812         * jit/JITOpcodes32_64.cpp:
813         (JSC::JIT::emit_op_jfalse):
814         (JSC::JIT::emit_op_jtrue):
815
816 2011-01-06  Michael Saboff  <msaboff@apple.com>
817
818         Reviewed by Gavin Barraclough.
819
820         Added debug code to compare the results of JIT regexp with 
821         interpreted regexp and displays discrepencies.  This debug code is
822         controlled by the ENABLE_YARR_JIT_DEBUG macro in wtf/Platform.h and
823         is only valid if ENABLE_YARR_JIT is enabled.
824
825         Fixed a discovered problem in RegExp::printTraceData, changing
826         m_pattern to the getter pattern().
827         Also deleted an extraneous semicolon.
828
829         Enhancement: Add Regexp Debug Compare between JIT and Interpreter
830         https://bugs.webkit.org/show_bug.cgi?id=51834
831
832         * runtime/RegExp.cpp:
833         (JSC::RegExp::compile):
834         (JSC::RegExp::match):
835         (JSC::RegExp::printTraceData):
836         * wtf/Platform.h:
837
838 2011-01-06  Patrick Gansterer  <paroga@webkit.org>
839
840         Reviewed by Eric Seidel.
841
842         [WINCE] Remove JSC::g_stackBase
843         https://bugs.webkit.org/show_bug.cgi?id=51779
844
845         * wtf/StackBounds.cpp:
846
847 2011-01-06  Joone Hur  <joone.hur@collabora.co.uk>
848
849         Reviewed by Eric Seidel.
850
851         WML Parser should treat line/column number in a consistent way
852         https://bugs.webkit.org/show_bug.cgi?id=51601
853
854         Add the equality operators to TextPosition class.
855
856         * wtf/text/TextPosition.h:
857         (WTF::TextPosition::operator==): Added.
858         (WTF::TextPosition::operator!=): Added.
859         (WTF::TextPosition::belowRangePosition): Use belowBase() instead of base().
860         (WTF::ZeroBasedNumber::operator==): Added.
861         (WTF::ZeroBasedNumber::operator!=): Added.
862         (WTF::OneBasedNumber::operator==): Added.
863         (WTF::OneBasedNumber::operator!=): Added.
864
865 2011-01-06  Patrick Gansterer  <paroga@webkit.org>
866
867         Reviewed by Gavin Barraclough.
868
869         [WINCE] Determine stack extent
870         https://bugs.webkit.org/show_bug.cgi?id=26276
871
872         Scan the stack for writeable pages and use the limits.
873
874         * wtf/StackBounds.cpp:
875         (WTF::detectGrowingDownward):
876         (WTF::isPageWritable):
877         (WTF::getLowerStackBound):
878         (WTF::getUpperStackBound):
879         (WTF::StackBounds::initialize):
880
881 2011-01-05  Steve Falkenburg  <sfalken@apple.com>
882
883         Windows build fix.
884
885         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Revert change to additional library search path needed to find ICU.
886
887 2011-01-05  Steve Falkenburg  <sfalken@apple.com>
888
889         Reviewed by Darin Adler.
890
891         Debug and Release builds on Windows clobber each other
892         https://bugs.webkit.org/show_bug.cgi?id=49185
893         
894         Changes the structure of WebKitBuild build products directory so we
895         completely separate each build configuration into independent directories.
896         
897         Although we previously had per-configuration directories for obj, this change adds
898         per-configuration directories for bin, lib, obj, and include. Each configuration's
899         build products are stored within a directory inside of WebKitBuild.
900         
901         Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
902         defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
903         
904         For PGO, $(ConfigurationBuildDir) points to the same directory (Release_PGO) to allow
905         for proper operation of the instrumentation/optimization scripts.
906
907         * JavaScriptCore.vcproj/JavaScriptCore.make:
908         * JavaScriptCore.vcproj/JavaScriptCore.sln:
909         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
910         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
911         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
912         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj:
913         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops:
914         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Added.
915         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
916         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
917         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
918         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
919         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
920         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
921         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
922         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
923         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
924         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
925         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
926         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
927         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
928         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
929         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
930         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
931
932 2011-01-05  Brent Fulgham  <bfulgham@webkit.org>
933
934         Unreviewed build fix.
935
936         * wtf/Encoder.h: Add <stdint.h> include for systems that
937         do not natively know about uint8_t, etc.
938
939 2011-01-05  Patrick Gansterer  <paroga@webkit.org>
940
941         Reviewed by Andreas Kling.
942
943         [CMake] Fix the usage of SOURCE_GROUP
944         https://bugs.webkit.org/show_bug.cgi?id=51739
945
946         * CMakeLists.txt:
947
948 2011-01-05  Andras Becsi  <abecsi@webkit.org>
949
950         Reviewed by Csaba Osztrogonác.
951
952         [Qt][V8] Fix the build after recent changes.
953
954         * pcre/pcre.pri: Correct the path after Source was introduced.
955
956 2011-01-04  Steve Falkenburg  <sfalken@apple.com>
957
958         Build fix. Update path to FindSafari after source code reorganization.
959
960         * JavaScriptCore.vcproj/JavaScriptCore.sln:
961
962 2011-01-04  Daniel Bates  <dbates@rim.com>
963
964         Fix the Android build after changeset 74975 <http://trac.webkit.org/changeset/74975>
965         (https://bugs.webkit.org/show_bug.cgi?id=51855).
966
967         * wtf/ThreadingPthreads.cpp: Add include of PassOwnPtr.h.
968         (WTF::runThreadWithRegistration): Use -> instead of . to dereference pointer.
969
970 2011-01-04  Martin Robinson  <mrobinson@igalia.com>
971
972         Try to fix the EFL build.
973
974         * wtf/CMakeLists.txt: Remove PlatformRefPtr from the CMake source list.
975
976 2011-01-04  James Robinson  <jamesr@chromium.org>
977
978         Reviewed by Darin Adler.
979
980         StackBounds initialization in WTFThreadData should be guarded by #if USE(JSC)
981         https://bugs.webkit.org/show_bug.cgi?id=51881
982
983         The StackBounds class is only used by JavaScriptCore.
984
985         * wtf/WTFThreadData.cpp:
986         (WTF::WTFThreadData::WTFThreadData):
987         * wtf/WTFThreadData.h:
988         (WTF::WTFThreadData::resetCurrentIdentifierTable):
989
990 2011-01-03  Martin Robinson  <mrobinson@igalia.com>
991
992         Reviewed by Darin Adler.
993
994         Remove the last non-GObject usage of PlatformRefPtr and move the code to GRefPtr
995         https://bugs.webkit.org/show_bug.cgi?id=51846
996
997         * GNUmakefile.am: Remove PlatformRefPtr.h from the sources list.
998         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Ditto.
999         * jit/ExecutableAllocator.h: Change references to PlatformRefPtr to RefPtr.
1000         (JSC::ExecutableAllocator::cacheFlush): Ditto.
1001         * wtf/PlatformRefPtr.h: Removed.
1002         * wtf/RandomNumber.cpp: Change references to PlatformRefPtr to RefPtr.
1003         (WTF::randomNumber): Ditto.
1004         * wtf/brew/RefPtrBrew.h: Ditto.
1005         (WTF::refIfNotNull): Added.
1006         (WTF::derefIfNotNull): Added.
1007         * wtf/brew/ShellBrew.h: Change references to PlatformRefPtr to RefPtr.
1008         (WTF::createRefPtrInstance): Modified to return a RefPtr.
1009         * wtf/gobject/GRefPtr.cpp: 
1010         (WTF::refGPtr): Moved from PlatformRefPtr here.
1011         (WTF::derefGPtr): Ditto.
1012         * wtf/gobject/GRefPtr.h: Ditto.
1013         (WTF::GRefPtr::GRefPtr): Ditto.
1014         (WTF::GRefPtr::~GRefPtr): Ditto.
1015         (WTF::GRefPtr::clear): Ditto.
1016         (WTF::GRefPtr::isHashTableDeletedValue): Ditto.
1017         (WTF::GRefPtr::get): Ditto.
1018         (WTF::GRefPtr::operator*): Ditto.
1019         (WTF::GRefPtr::operator->): Ditto.
1020         (WTF::GRefPtr::operator!): Ditto.
1021         (WTF::GRefPtr::operator UnspecifiedBoolType): Ditto.
1022         (WTF::GRefPtr::hashTableDeletedValue): Ditto.
1023         (WTF::::operator): Ditto.
1024         (WTF::::swap): Ditto.
1025         (WTF::swap): Ditto.
1026         (WTF::operator==): Ditto.
1027         (WTF::operator!=): Ditto.
1028         (WTF::static_pointer_cast): Ditto.
1029         (WTF::const_pointer_cast): Ditto.
1030         (WTF::getPtr): Ditto.
1031         (WTF::adoptGRef): Ditto.
1032         (WTF::refGPtr): Ditto.
1033         (WTF::derefGPtr): Ditto.
1034
1035 2011-01-04  Daniel Bates  <dbates@rim.com>
1036
1037         Reviewed by Adam Roben.
1038
1039         LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails
1040         https://bugs.webkit.org/show_bug.cgi?id=51860
1041
1042         * wtf/ThreadingWin.cpp:
1043         (WTF::createThreadInternal):
1044
1045 2011-01-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1046
1047         Reviewed by Ariya Hidayat.
1048
1049         [Qt][Symbian] Make sure that WebKit headers are included before platform headers on Symbian
1050         https://bugs.webkit.org/show_bug.cgi?id=31273
1051
1052         On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
1053         are included before platform headers. On all other platforms continue to use
1054         INCLUDEPATH (as before). This is a continuation of r65877.
1055
1056         No new tests as there is no new functionality.
1057
1058         * JavaScriptCore.pri:
1059
1060 2011-01-04  Darin Adler  <darin@apple.com>
1061
1062         Try to fix Windows build.
1063
1064         * wtf/ThreadingWin.cpp: Added include of PassOwnPtr.h. Fixed paragraphing
1065         of conditional includes.
1066         (WTF::wtfThreadEntryPoint): Use -> instead of . to dereference pointer.
1067         (WTF::createThreadInternal): Tweaked #if to not need separate macro.
1068
1069 2011-01-04  Daniel Bates  <dbates@rim.com>
1070
1071         Reviewed by Adam Roben.
1072
1073         Extract ThreadFunctionInvocation into separate file and share between Apple Windows and Android
1074         https://bugs.webkit.org/show_bug.cgi?id=51855
1075
1076         Both the Apple Windows and Android ports implement a similar adapter structure,
1077         called ThreadFunctionInvocation and ThreadData respectively, as part of
1078         their thread creation process. Instead, we should share such an adapter
1079         structure and remove duplicate code.
1080
1081         * JavaScriptCore.gypi: Added header wtf/ThreadFunctionInvocation.h.
1082         * wtf/ThreadFunctionInvocation.h: Added.
1083         (WTF::ThreadFunctionInvocation::ThreadFunctionInvocation):
1084         * wtf/ThreadingPthreads.cpp: Removed Android-specific structure ThreadData; Instead, use ThreadFunctionInvocation.
1085         (WTF::runThreadWithRegistration):
1086         (WTF::createThreadInternal): 
1087         * wtf/ThreadingWin.cpp: Moved structure ThreadFunctionInvocation to its own file so that
1088         it can be shared with the Android implementation of createThreadInternal().
1089         (WTF::wtfThreadEntryPoint): Use OwnPtr to hold passed instance of ThreadFunctionInvocation.
1090
1091 2011-01-04  Daniel Bates  <dbates@rim.com>
1092
1093         Reviewed by Darin Adler.
1094
1095         Use __builtin_expect when compiling using RVCT in GNU mode
1096         https://bugs.webkit.org/show_bug.cgi?id=51866
1097
1098         Derived from a patch by Dave Tapuska.
1099
1100         * wtf/AlwaysInline.h:
1101
1102 2011-01-03  Darin Adler  <darin@apple.com>
1103
1104         Reviewed by Brady Eidson.
1105
1106         * wtf/Forward.h: Added Decoder and Encoder.
1107
1108 2011-01-03  Brady Eidson  <beidson@apple.com>
1109
1110         Reviewed by Darin Adler.
1111
1112         Add Encode/Decode machinery Darin and I plan to work with for back/forward stuff in WebKit2.
1113
1114         Starting out with a pure virtual interface to be implemented in WK2, but we might change that later.
1115
1116         * GNUmakefile.am:
1117         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1118         * JavaScriptCore.xcodeproj/project.pbxproj:
1119         * wtf/CMakeLists.txt:
1120
1121         * wtf/Decoder.h: Added.
1122         * wtf/Encoder.h: Added.
1123
1124 2011-01-03  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1125
1126         Unreviewed build fix.
1127
1128         [Qt] Add NullPtr.cpp introduced in r71155 to the Qt build system.
1129
1130         This fix is required for builds where HAVE(NULLPTR) is false
1131         (e.g. some MSVC and Symbian builds).
1132
1133         * wtf/wtf.pri:
1134
1135 2011-01-02  Dan Bernstein  <mitz@apple.com>
1136
1137         Rubber-stamped by Simon Fraser.
1138
1139         <rdar://problem/8812159> Update copyright strings
1140
1141         * Info.plist:
1142
1143 2011-01-02  Csaba Osztrogonác  <ossy@webkit.org>
1144
1145         Fix GTK+ build after r74855.
1146
1147         Reviewed by Xan Lopez.
1148
1149         * GNUmakefile.am: Fix include pathes.
1150
1151 2011-01-02  Adam Barth  <abarth@webkit.org>
1152
1153         One more .. missing in the Qt build.
1154
1155         * jsc.pro:
1156
1157 2011-01-02  Xan Lopez  <xlopez@igalia.com>
1158
1159         Fix GTK+ build.
1160
1161         * GNUmakefile.am: add -I$(srcdir)/Source to the JSC cppflags so
1162         that anyone can include its headers without adding the prefix
1163         'Source/'.
1164
1165 2011-01-02  Carl Lobo  <carllobo@gmail.com>
1166
1167         Reviewed by Adam Barth.
1168
1169         Fix Windows Build for non-production where VSPropsRedirectionDir is not defined.
1170         https://bugs.webkit.org/show_bug.cgi?id=51797
1171
1172         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1173         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
1174         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1175         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1176         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1177
1178 2011-01-01  Adam Barth  <abarth@webkit.org>
1179
1180         Fix relative include paths in an attempt to fix the Qt build.
1181
1182         * JavaScriptCore.pri:
1183         * JavaScriptCore.pro:
1184
1185 2011-01-01  Adam Barth  <abarth@webkit.org>
1186
1187         Another speculative build fix for GTK.
1188
1189         * GNUmakefile.am:
1190
1191 2011-01-01  Adam Barth  <abarth@webkit.org>
1192
1193         Speculative build fix for GTK.  Update the paths in GNUmakefile to
1194         include "Source".
1195
1196         * GNUmakefile.am:
1197
1198 2011-01-01  Adam Barth  <abarth@webkit.org>
1199
1200         Update relative paths in JavaScriptCore.gyp to account for the extra
1201         level of directories.
1202
1203         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1204
1205 2010-12-31  Patrick Gansterer  <paroga@webkit.org>
1206
1207         Reviewed by Darin Adler.
1208
1209         Add a fast case for ASCII strings in HashAndUTF8CharactersTranslator::equal
1210         https://bugs.webkit.org/show_bug.cgi?id=50517
1211
1212         This change shows about 2% performance win on the xml-parser benchmark.
1213
1214         * wtf/text/AtomicString.cpp:
1215         (WTF::HashAndUTF8CharactersTranslator::equal):
1216
1217 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
1218
1219         Reviewed by Ariya Hidayat.
1220
1221         [CMake] Add WTF_HEADERS
1222         https://bugs.webkit.org/show_bug.cgi?id=51741
1223
1224         Add the WTF headers to show them in Visual Studio.
1225
1226         * wtf/CMakeLists.txt:
1227         * wtf/CMakeListsWinCE.txt:
1228
1229 2010-12-30  Konstantin Tokarev  <annulen@yandex.ru>
1230
1231         Reviewed by David Kilzer.
1232
1233         [Qt] Don't build wtf/TCSystemAlloc.cpp if --system-malloc option is
1234         used
1235         https://bugs.webkit.org/show_bug.cgi?id=51672
1236
1237         * wtf/wtf.pri: Replaced USE_SYSTEM_MALLOC with USE_SYSTEM_MALLOC=1
1238
1239 2010-12-30  Patrick Gansterer  <paroga@webkit.org>
1240
1241         Reviewed by Darin Adler.
1242
1243         Use OS(WINDOWS) instead of COMPILER(MSVC) in FastMalloc.cpp
1244         https://bugs.webkit.org/show_bug.cgi?id=51743
1245
1246         Most of the ifdefs belong to windows and not to the MSVC compiler.
1247
1248         * wtf/FastMalloc.cpp:
1249
1250 2010-12-29  Gavin Barraclough  <barraclough@apple.com>
1251
1252         Reviewed by Sam Weinig.
1253
1254         Bug 51724 - In strict mode string literals should allow \0, but disallow \8 and \9.
1255
1256         * parser/Lexer.cpp:
1257         (JSC::Lexer::parseString):
1258
1259 2010-12-29  Helder Correia  <helder@sencha.com>
1260
1261         Reviewed by Eric Seidel.
1262
1263         <VT> and <FF> are not valid JSON whitespace characters
1264         https://bugs.webkit.org/show_bug.cgi?id=51671
1265
1266         Vertical Tab and Form Feed are not allowed white spaces by the JSON
1267         RFC 4627: http://www.ietf.org/rfc/rfc4627.txt (2. JSON Grammar).
1268
1269         Tests: ietestcenter/Javascript/15.12.1.1-0-2.html
1270                ietestcenter/Javascript/15.12.1.1-0-3.html
1271
1272         * runtime/LiteralParser.cpp:
1273         (JSC::isJSONWhiteSpace):
1274         (JSC::LiteralParser::Lexer::lex):
1275
1276 2010-12-28  Helder Correia  <helder@sencha.com>
1277
1278         Reviewed by Eric Seidel.
1279
1280         JSON.stringify must exist as a function taking 3 parameters
1281         https://bugs.webkit.org/show_bug.cgi?id=51667
1282
1283         The reported function length is 1 instead.
1284
1285         Test: ietestcenter/Javascript/15.12.3-0-2.html
1286
1287         * runtime/JSONObject.cpp:
1288
1289 2010-12-28  Helder Correia  <helder@sencha.com>
1290
1291         Reviewed by Sam Weinig.
1292
1293         JSON.parse must exist as a function taking 2 parameters
1294         https://bugs.webkit.org/show_bug.cgi?id=51666
1295
1296         Support for revivers was introduced in bug 26591, but the function
1297         length has since remained unchanged.
1298
1299         Test: ietestcenter/Javascript/15.12.2-0-2.html
1300
1301         * runtime/JSONObject.cpp:
1302
1303 2010-12-27  Jake Helfert  <jake@jakeonthenet.com>
1304
1305         Reviewed and reworked by Darin Adler.
1306
1307         Building WebKit with Visual Studio 2010 fails due
1308         to ambiguous assignment operator errors.
1309         https://bugs.webkit.org/show_bug.cgi?id=51116
1310
1311         * wtf/NullPtr.h: Added a HAVE(NULLPTR) definition for use with
1312         Platform.h HAVE macro, and included the Visual Studio 2010 compiler
1313         as one of the ones that has nullptr.
1314         * wtf/NullPtr.cpp: Updated condition to match.
1315         
1316         * wtf/PassOwnArrayPtr.h: Don't include the operator=(nullptr_t)
1317         overload if we are compiling in loose mode and the compiler has
1318         nullptr, because assignment of 0 will otherwise encounter
1319         ambiguitity with this overload and the overload for loose mode
1320         that takes a raw pointer. The conditional can be removed when we
1321         get rid of loose mode.
1322         * wtf/PassOwnPtr.h: Ditto.
1323
1324         * wtf/PassRefPtr.h: Don't include the operator=(nullptr_t) overload
1325         if the compiler has nullptr, because assignment of 0 would be
1326         ambiguous with the overload that takes a raw pointer. The conditional
1327         can be removed if we ever decide we no longer need to support
1328         assigning 0, but might need a way to catch that usage on older compilers.
1329         * wtf/RefPtr.h: Ditto.
1330         * wtf/RetainPtr.h: Ditto
1331
1332         * JavaScriptCore.xcodeproj/project.pbxproj: Added NullPtr.cpp,
1333         accidentally omitted when the file was first added.
1334
1335 2010-12-26  Xan Lopez  <xlopez@igalia.com>
1336
1337         Reviewed by Eric Seidel.
1338
1339         [GTK] Add standalone target for JSC
1340         https://bugs.webkit.org/show_bug.cgi?id=51607
1341
1342         * GNUmakefile.am: add convenience target to only build jsc and its
1343         dependencies.
1344
1345 2010-12-24  Patrick Gansterer  <paroga@webkit.org>
1346
1347         Reviewed by Eric Seidel.
1348
1349         [WINCE] Add CPU(MIPS) detection
1350         https://bugs.webkit.org/show_bug.cgi?id=51342
1351
1352         WinCE usually defines MIPS and _MIPS_.
1353
1354         * wtf/Platform.h:
1355
1356 2010-12-23  Gavin Barraclough  <barraclough@apple.com>
1357
1358         Reviewed by Sam Weinig.
1359
1360         Rename RegexCompiler.cpp to RegexPattern.cpp.
1361         Implicitly call compileRegex from RegexPattern's constructor.
1362
1363         * Android.mk:
1364         * CMakeLists.txt:
1365         * GNUmakefile.am:
1366         * JavaScriptCore.gypi:
1367         * JavaScriptCore.pro:
1368         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1369         * JavaScriptCore.xcodeproj/project.pbxproj:
1370         * runtime/RegExp.cpp:
1371         (JSC::RegExp::compile):
1372         * yarr/RegexCompiler.cpp: Removed.
1373         * yarr/RegexCompiler.h: Removed.
1374         * yarr/RegexInterpreter.cpp:
1375         * yarr/RegexJIT.cpp:
1376         * yarr/RegexPattern.cpp: Copied from JavaScriptCore/yarr/RegexCompiler.cpp.
1377         (JSC::Yarr::compileRegex):
1378         (JSC::Yarr::RegexPattern::RegexPattern):
1379         * yarr/RegexPattern.h:
1380
1381 2010-12-23  Patrick Gansterer  <paroga@webkit.org>
1382
1383         Unreviewed build fix for WinCE after r74360.
1384
1385         Move the OS(WINDOWS) section after the OS(WINCE) section
1386         and add missing argument to the getStackMax call.
1387
1388         * wtf/StackBounds.cpp:
1389         (WTF::StackBounds::initialize):
1390
1391 2010-12-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1392
1393         Unreviewed build fix.
1394
1395         [Symbian] Make sure OSAllocatorSymbian builds
1396
1397         This patch only addresses the build problem.
1398
1399         https://bugs.webkit.org/show_bug.cgi?id=51128 tracks the full
1400         (re)implementation of the Symbian allocator.
1401
1402         * wtf/OSAllocatorSymbian.cpp:
1403         (WTF::OSAllocator::reserveUncommitted):
1404         (WTF::OSAllocator::reserveAndCommit):
1405         (WTF::OSAllocator::commit):
1406
1407 2010-12-22  Dan Bernstein  <mitz@apple.com>
1408
1409         Changed WebKitTools to Tools.
1410
1411         * JavaScriptCore.vcproj/JavaScriptCore.sln:
1412
1413 2010-12-22  Dan Bernstein  <mitz@apple.com>
1414
1415         Rubber-stamped by Mark Rowe.
1416
1417         Changed WebKitTools to Tools in script build phases.
1418
1419         * JavaScriptCore.xcodeproj/project.pbxproj:
1420
1421 2010-12-22  Andrei Popescu  <andreip@google.com>
1422
1423         Unreviewed build fix.
1424
1425         Fix Chromium Linux shared library build.
1426         [Chromium] r74431 broke the Chromium Linux shared library build
1427         https://bugs.webkit.org/show_bug.cgi?id=51462
1428
1429         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1430         * JavaScriptCore.gypi:
1431
1432 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1433
1434         Unreviewed, rolling out r74462.
1435         http://trac.webkit.org/changeset/74462
1436         https://bugs.webkit.org/show_bug.cgi?id=51449
1437
1438         broke chromium win (Requested by tonyg-cr on #webkit).
1439
1440         * JavaScriptCore.gypi:
1441
1442 2010-12-21  Tony Gentilcore  <tonyg@chromium.org>
1443
1444         Unreviewed build fix.
1445
1446         [chromium] Build fix after r74431
1447         https://bugs.webkit.org/show_bug.cgi?id=51447
1448
1449         * JavaScriptCore.gypi:
1450
1451 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1452
1453         Windows build fix.
1454
1455         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1456
1457 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1458
1459         Windows build fix.
1460
1461         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1462
1463 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1464
1465         Speculative build fix.
1466
1467         * jit/ExecutableAllocator.cpp:
1468         (JSC::ExecutableAllocator::underMemoryPressure):
1469
1470 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1471
1472         Reviewed by Oliver Hunt.
1473
1474         Bug 26276 - Need a mechanism to determine stack extent
1475
1476         This patch adds accurate stack size calculation for:
1477             DARWIN, QNX, UNIX
1478         We still need to fix:
1479             WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
1480
1481         * wtf/StackBounds.cpp:
1482         (WTF::StackBounds::initialize):
1483
1484 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1485
1486          Reviewed by Geoff Garen.
1487  
1488         <rdar://problem/8765333> CRASH running out of executable memory, loading io9.com
1489         https://bugs.webkit.org/show_bug.cgi?id=51443
1490
1491         The problem here is that each page uses a reasonable amount of memory, (~4Mb),
1492         and that when miultiple pages are open we keep all JIT code for all functions
1493         in all pages alive.
1494
1495         Add a check to detect high memory pressure situations in the executable allocator
1496         (>50% of available memory allocated), and upon a top level entry into JSC (no code
1497         running on the stack) in this situation throw away all JIT code.
1498
1499         * JavaScriptCore.exp:
1500         * debugger/Debugger.cpp:
1501         (JSC::Debugger::recompileAllJSFunctions): stop passing exec to recompile.
1502         * jit/ExecutableAllocator.h:
1503         * jit/ExecutableAllocatorFixedVMPool.cpp:
1504         (JSC::ExecutablePool::systemAlloc): Count allocations.
1505         (JSC::ExecutablePool::systemRelease): Count deallocations.
1506         (JSC::ExecutablePool::underMemoryPressure): Check memory pressure.
1507         * jit/ExecutableAllocatorPosix.cpp:
1508         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
1509         * jit/ExecutableAllocatorWin.cpp:
1510         (JSC::ExecutablePool::underMemoryPressure): Stub out; only meaningful with FixedVMPool.
1511         * runtime/Executable.cpp:
1512         (JSC::FunctionExecutable::recompile): Remove ExecState argument to recompile.
1513         * runtime/Executable.h:
1514         * runtime/JSGlobalData.cpp:
1515         (JSC::JSGlobalData::recompileAllJSFunctions): throws away all JIT code.
1516         * runtime/JSGlobalData.h:
1517         * runtime/JSGlobalObject.h:
1518         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): add check / call to throw away.
1519
1520 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1521
1522         Reviewed by Geoff Garen.
1523
1524         <rdar://problem/8241425> JIT executable memory excessive usage due to regex caching
1525         https://bugs.webkit.org/show_bug.cgi?id=51434
1526
1527         Reduce the amount of memory the RegExpCache can hold on to on iOS.
1528         Currently the RegExpCache can hold 256 RegExp objects. If each falls into a separate
1529         ExecutablePool, with a common size of 16Kb, this means we end up holding onto 4Mb of
1530         memory. Firstly, we can reduce this by simply reducing the size of the cache to 32
1531         entries. Secondly, we can use a separate set of ExecutablePools for JIT code generated
1532         from RegExp objects. This helps in two ways (1) it increases the probability that
1533         RegExps in the cache share the same pool, and (2) it means that a RegExp can't end
1534         up holding on to a large ExecutablePool containing a translation of JS code.
1535         (A RegExp could end up keeping a larger RegExp alive that happened to be sharing the
1536         same pool, but large RegExp patterns are less common).
1537
1538         * runtime/JSGlobalData.h:
1539         * runtime/RegExpCache.h:
1540         * yarr/RegexJIT.cpp:
1541         (JSC::Yarr::RegexGenerator::compile):
1542
1543 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1544
1545         Windows build fix.
1546
1547         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1548
1549 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1550
1551         Eeeep! build fix!
1552
1553         * wtf/OSAllocator.h:
1554         (WTF::OSAllocator::decommitAndRelease):
1555
1556 2010-12-21  Gavin Barraclough  <barraclough@apple.com>
1557
1558         Ooops, fixed typo in comment.
1559
1560         * wtf/OSAllocator.h:
1561
1562 2010-12-21  Geoffrey Garen  <ggaren@apple.com>
1563
1564         Reviewed by Gavin Barraclough & Oliver Hunt.
1565
1566         Added PageAllocationAligned, a cross-platform abstraction for memory allocations with arbitrary alignment requirements
1567         https://bugs.webkit.org/show_bug.cgi?id=51359
1568         
1569         I think this patch fixes <rdar://problem/8107952> [5.0.1] WER crash in
1570         Heap::allocateBlock (1902752929), and some other leaks and crashes as well.
1571
1572         * Android.mk:
1573         * CMakeLists.txt:
1574         * GNUmakefile.am:
1575         * JavaScriptCore.gypi:
1576         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1577         * JavaScriptCore.xcodeproj/project.pbxproj: Updated build files.
1578
1579         * runtime/AlignedMemoryAllocator.h: Removed. Supplanted by
1580         PageAllocationAligned.
1581
1582         * runtime/Collector.cpp:
1583         (JSC::Heap::destroy):
1584         (JSC::Heap::allocateBlock):
1585         (JSC::Heap::freeBlock):
1586         (JSC::Heap::addWeakGCHandle):
1587         * runtime/Collector.h: Switched from AlignedMemoryAllocator to
1588         PageAllocationAligned.
1589
1590         * runtime/GCHandle.cpp:
1591         * runtime/GCHandle.h: Ditto.
1592
1593         * wtf/PageAllocation.h:
1594         (WTF::PageAllocation::PageAllocation): Removed aligned memory allocation
1595         functions. Supplanted by PageAllocationAligned.
1596
1597         * wtf/PageAllocationAligned.cpp: Added.
1598         (WTF::PageAllocationAligned::allocate):
1599         (WTF::PageAllocationAligned::deallocate):
1600         * wtf/PageAllocationAligned.h: Added.
1601         (WTF::PageAllocationAligned::PageAllocationAligned): New cross-platform
1602         class for doing aligned memory allocation. This class properly matches
1603         allocation and deallocation library calls, fixing a long-standing bug
1604         in PageAllocation.
1605
1606         * wtf/Platform.h: Removed some defunction VM platform defines.
1607
1608         * wtf/wtf.pri: Updated build files.
1609
1610 2010-12-21  Oliver Hunt  <oliver@apple.com>
1611
1612         Reviewed by Gavin Barraclough.
1613
1614         ASSERTION FAILED: base->index() == m_codeBlock->argumentsRegister() while loading taobao.com
1615         https://bugs.webkit.org/show_bug.cgi?id=49006
1616
1617         This problem was caused by having a parameter named 'arguments'.
1618         The fix is to treat parameters named 'arguments' as shadowing
1619         the actual arguments property, and so logically turn the function
1620         into one that doesn't "use" arguments.
1621
1622         This required a bit of fiddling in the parser to ensure we correctly
1623         propagate the 'feature' of shadowing is set correctly.
1624
1625         * bytecompiler/BytecodeGenerator.cpp:
1626         (JSC::BytecodeGenerator::createArgumentsIfNecessary):
1627           Change assertion to an early return as we may now reference
1628           a property named 'arguments' without being in a function that
1629           has the ArgumentsFeature
1630         * parser/JSParser.cpp:
1631         (JSC::JSParser::Scope::Scope):
1632         (JSC::JSParser::Scope::declareParameter):
1633         (JSC::JSParser::Scope::shadowsArguments):
1634         (JSC::JSParser::parseProgram):
1635         (JSC::JSParser::parseFormalParameters):
1636         (JSC::JSParser::parseFunctionInfo):
1637         * parser/Nodes.h:
1638         (JSC::ScopeNode::usesArguments):
1639
1640 2010-12-21  Daniel Bates  <dbates@rim.com>
1641
1642         Reviewed by Eric Seidel and Darin Adler.
1643
1644         Deallocate GregorianDateTime.timeZone (if allocated) when copying so that we don't leak memory.
1645         https://bugs.webkit.org/show_bug.cgi?id=51367
1646
1647         Inspired by a patch by George Staikos.
1648
1649         * wtf/DateMath.cpp:
1650         (JSC::msToGregorianDateTime): Modified to set timeZone to nullptr since timeZone is now
1651         of type OwnPtrArray<char>.
1652         * wtf/DateMath.h: Change timeZone to type OwnArrayPtr<char>; Removed destructor since it is no longer needed.
1653         (JSC::GregorianDateTime::GregorianDateTime): Modified to use OwnPtrArray semantics for timeZone.
1654         (JSC::GregorianDateTime::operator tm): Ditto.
1655         (JSC::GregorianDateTime::copyFrom): Ditto.
1656
1657 2010-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1658
1659         Unreviewed, rolling out r74402.
1660         http://trac.webkit.org/changeset/74402
1661         https://bugs.webkit.org/show_bug.cgi?id=51402
1662
1663         This patch broke the Windows 7 Release Layout Tests (Requested
1664         by jessieberlin on #webkit).
1665
1666         * wtf/StackBounds.cpp:
1667         (WTF::estimateStackBound):
1668         (WTF::StackBounds::initialize):
1669
1670 2010-12-21  Peter Varga  <pvarga@inf.u-szeged.hu>
1671
1672         Reviewed by Csaba Osztrogonác.
1673
1674         Unify the name of parentheses in YARR: rename parenthesis to
1675         parentheses.
1676
1677         * yarr/RegexCompiler.cpp:
1678         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
1679
1680 2010-12-21  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1681
1682         Reviewed by Andreas Kling.
1683
1684         [Qt] Set BUILDING_QT__ consistently
1685         https://bugs.webkit.org/show_bug.cgi?id=51341
1686
1687         * JavaScriptCore.pri: Remove the definition of BUILDING_QT__ as it
1688         is already defined in WebKit.pri.
1689
1690 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
1691
1692         Reviewed by Oliver Hunt.
1693
1694         Bug 26276 - Need a mechanism to determine stack extent
1695
1696         This patch adds accurate stack size calculation for:
1697             DARWIN, WINDOWS, QNX, UNIX
1698         We still need to fix:
1699             SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE
1700
1701         * wtf/StackBounds.cpp:
1702         (WTF::StackBounds::initialize):
1703
1704 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
1705
1706         PPC build fix; stop using std::swap on PageAllocation/PageReservation,
1707         this was failing on some compilers since the lack of default construction
1708         for the m_executable/m_writable fields meant the value being swapped may
1709         not have been fully initialized.
1710
1711         * wtf/PageAllocation.h:
1712         (WTF::PageAllocation::deallocate):
1713         * wtf/PageBlock.h:
1714         * wtf/PageReservation.h:
1715         (WTF::PageReservation::deallocate):
1716
1717 2010-12-20  Oliver Hunt  <oliver@apple.com>
1718
1719         Reviewed by Geoffrey Garen.
1720
1721         |delete name| in strict mode code should be an early error
1722         https://bugs.webkit.org/show_bug.cgi?id=50431
1723
1724         Disallow the |delete IDENTIFIER| production in strict mode, and removed
1725         a bunch of now unnecessary code.
1726
1727         * parser/JSParser.cpp:
1728         (JSC::JSParser::Scope::collectFreeVariables):
1729         (JSC::jsParse):
1730         (JSC::JSParser::parseProgram):
1731         (JSC::JSParser::parseUnaryExpression):
1732         * parser/JSParser.h:
1733         * parser/Parser.cpp:
1734         (JSC::Parser::parse):
1735         * parser/Parser.h:
1736         (JSC::Parser::parse):
1737
1738 2010-12-20  Gavin Barraclough  <barraclough@apple.com>
1739
1740         Reviewed by Olver Hunt.
1741
1742         Bug 51358 - Should check stack depth rather than using recursion limits in byte compilation
1743
1744         The current implementation of recursion limit checking is not safe on smaller stacks.
1745         Switch to using a common mechanism, shared with the parser, to check recursion limits.
1746
1747         Make bytecompiler use StackBounds. Empirical testing shows emitStrcat to have the largest
1748         footprint on the stack, at just under 1k on x86-64.  Given this, the default recursion
1749         check (requiring 4k of available space to recurse) seems reasonable.
1750
1751         * bytecompiler/BytecodeGenerator.cpp:
1752         (JSC::BytecodeGenerator::BytecodeGenerator):
1753         * bytecompiler/BytecodeGenerator.h:
1754         (JSC::BytecodeGenerator::emitNode):
1755         (JSC::BytecodeGenerator::emitNodeInConditionContext):
1756         * bytecompiler/NodesCodegen.cpp:
1757         (JSC::BinaryOpNode::emitStrcat):
1758
1759 2010-12-20  Tony Gentilcore  <tonyg@chromium.org>
1760
1761         Unreviewed build fix.
1762
1763         Include pthread to fix chromium mac build (broken by r74360)
1764         https://bugs.webkit.org/show_bug.cgi?id=51356
1765
1766         * wtf/StackBounds.cpp:
1767
1768 2010-12-20  Xan Lopez  <xlopez@igalia.com>
1769
1770         Reviewed by Gustavo Noronha.
1771
1772         * GNUmakefile.am: add missing files.
1773
1774 2010-12-18  Gavin Barraclough  <barraclough@apple.com>
1775
1776         Reviewed by Oliver Hunt.
1777
1778         Bug 26276 - Need a mechanism to determine stack extent
1779
1780         This patch adds a class 'StackBounds', to hold information about the machine stack.
1781         The implementation of this class broadly adheres to the current implmentation of
1782         stack limit checking, and as such does not solve the problem of determining stack
1783         extent, but gives us a common place to do so.
1784
1785         Currently two mechanism are provided to determine the stack origin (the point the
1786         stack is growing away from). currentThreadStackBase() in Collector provides a
1787         more accurate determination of the stack origin, so use this to calculate
1788         StackBounds::m_origin; WTFThreadData::approximatedStackStart is less accurate, and
1789         as such can be removed.  Cache the StackBounds on WTFThreadData such that they
1790         need only be determined once per thread, and for non-API contexts cache this
1791         information in JSGlobalData, to save a thread-specific access.
1792
1793         For the time being retain the estimate of stack size used by JSC's parser
1794         (128 * sizeof(void*) * 1024), with a view to replacing this with something more
1795         accurate in the near future.
1796
1797         * parser/JSParser.cpp:
1798         (JSC::JSParser::canRecurse):
1799         (JSC::JSParser::JSParser):
1800             Change to use StackBounds.
1801         * runtime/Collector.cpp:
1802         (JSC::Heap::registerThread):
1803         (JSC::Heap::markCurrentThreadConservativelyInternal):
1804             Change to use StackBounds, cached on JSGlobalData.
1805         * runtime/JSGlobalData.cpp:
1806         (JSC::JSGlobalData::JSGlobalData):
1807         * runtime/JSGlobalData.h:
1808         (JSC::JSGlobalData::stack):
1809             Add a cached copy of StackBounds.
1810         * wtf/StackBounds.cpp: Copied from JavaScriptCore/runtime/Collector.cpp.
1811         (WTF::estimateStackBound):
1812         (WTF::StackBounds::initialize):
1813         (WTF::getStackMax):
1814             Copy code from Collector.cpp to determine stack origin.
1815         * wtf/StackBounds.h: Added.
1816         (WTF::StackBounds::StackBounds):
1817             No argument constructor; returns a null StackBounds.
1818         (WTF::StackBounds::currentThreadStackBounds):
1819             Returns a StackBounds object representing the stack limits
1820             of the current thread.
1821         (WTF::StackBounds::origin):
1822             Returns to stack origin (the point the stack is growing away
1823             from; the highest extent of the stack on machines where the
1824             stack grows downwards.
1825         (WTF::StackBounds::recursionLimit):
1826             Returns a limit value that is 'a comfortable distance from
1827             the end of the stack'. Our concept of this is currently 1 page
1828             away from the end, however the default value may be tuned in
1829             the future, and clients may override passing a larger delta;
1830             should only be called on StackBounds object representing the
1831             stack of the thread this method is called on (checked by
1832             checkConsistency).
1833         (WTF::StackBounds::recursionCheck):
1834             Checks whether we are currently 'a comfortable distance from
1835             the end of the stack'. Our concept of this is currently 1 page
1836             away from the end, however the default value may be tuned in
1837             the future, and clients may override passing a larger delta
1838             to apply when checking, if they wish to do so. This method
1839             should only be called on StackBounds object representing the
1840             stack of the thread this method is called on (checked by
1841             checkConsistency).
1842         (WTF::StackBounds::current):
1843             Approximate current stack position. On machines where the stack
1844             is growing downwards this is the lowest address that might need
1845             conservative collection.
1846         (WTF::StackBounds::isGrowingDownward):
1847             True for all platforms other than WINCE, which has to check.
1848         (WTF::StackBounds::checkConsistency):
1849             This is called in methods that shoulds only be operating on a
1850             valid set of bounds; as such we expect m_origin != m_bounds
1851             (i.e. stack size != zero) - we're really testing that this
1852             object is not null (the constructor initializes both fields
1853             to zero).  Also checks that current() is within the stack's
1854             bounds.
1855         * wtf/WTFThreadData.cpp:
1856         (WTF::WTFThreadData::WTFThreadData):
1857         * wtf/WTFThreadData.h:
1858         (WTF::WTFThreadData::stack):
1859             Add the StackBounds member variable.
1860
1861 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
1862
1863         Reviewed by Sam Weinig.
1864
1865         Factored common page set management into a new PageBlock base class
1866         https://bugs.webkit.org/show_bug.cgi?id=51285
1867
1868         * Android.mk:
1869         * CMakeLists.txt:
1870         * GNUmakefile.am:
1871         * JavaScriptCore.gypi:
1872         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1873         * JavaScriptCore.xcodeproj/project.pbxproj:
1874         * interpreter/RegisterFile.h:
1875         (JSC::RegisterFile::RegisterFile):
1876         * jit/ExecutableAllocator.cpp:
1877         (JSC::ExecutableAllocator::intializePageSize):
1878         * wtf/PageAllocation.cpp: Removed.
1879         * wtf/PageAllocation.h:
1880         (WTF::PageAllocation::deallocate):
1881         (WTF::PageAllocation::PageAllocation):
1882         * wtf/PageReservation.h:
1883         (WTF::PageReservation::commit):
1884         (WTF::PageReservation::decommit):
1885         (WTF::PageReservation::deallocate):
1886         (WTF::PageReservation::PageReservation):
1887         * wtf/wtf.pri:
1888
1889 2010-12-17  Michael Saboff  <msaboff@apple.com>
1890
1891         Reviewed by Oliver Hunt.
1892
1893         RegExp Jit'ed expression crashes clicking link on yelp.com
1894         https://bugs.webkit.org/show_bug.cgi?id=51284
1895
1896         When transitioning between an non-repeating beginning of line
1897         anchored expression and the remaining refactored repeating 
1898         expression, we should not clear any residual datalabel in 
1899         state's m_backtrack.  It will be resolved and cleared in subsequent
1900         code when linkAlternativeBacktracks() is called for the repeating
1901         alternative(s).
1902
1903         * yarr/RegexJIT.cpp:
1904         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
1905         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
1906
1907 2010-12-17  Dan Bernstein  <mitz@apple.com>
1908
1909         Rubber-stamped by Mark Rowe.
1910
1911         Updated for the renaming of WebKitTools to Tools
1912
1913         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
1914
1915 2010-12-17  Ariya Hidayat  <ariya@sencha.com>
1916
1917         Reviewed by Oliver Hunt.
1918
1919         [JSC] parseAssignmentExpression should use TreeBuilder::CreatesAST
1920         https://bugs.webkit.org/show_bug.cgi?id=51268
1921
1922         * parser/JSParser.cpp:
1923         (JSC::JSParser::parseAssignmentExpression):
1924
1925 2010-12-17  Geoffrey Garen  <ggaren@apple.com>
1926
1927         Reviewed by Oliver Hunt.
1928
1929         Removed RChunk from PageAllocation/PageReservation, since it's now unused.
1930         https://bugs.webkit.org/show_bug.cgi?id=51276
1931
1932         * wtf/PageAllocation.h:
1933         (WTF::PageAllocation::PageAllocation):
1934         * wtf/PageReservation.h:
1935         (WTF::PageReservation::PageReservation):
1936
1937 2010-12-17  Oliver Hunt  <oliver@apple.com>
1938
1939         Reviewed by Gavin Barraclough.
1940
1941         Incorrect encoding of some constants in ARMv7 JIT
1942         https://bugs.webkit.org/show_bug.cgi?id=51273
1943         <rdar://problem/8650210>
1944
1945         When using immediate encoding 3 we need to write the byte
1946         that holds a duplicated value.
1947
1948         * assembler/ARMv7Assembler.h:
1949         (JSC::ARMThumbImmediate::makeEncodedImm):
1950
1951 2010-12-16  Evan Martin  <evan@chromium.org>
1952
1953         Reviewed by Darin Fisher.
1954
1955         [chromium] useless warnings when building on Windows
1956         https://bugs.webkit.org/show_bug.cgi?id=50985
1957
1958         Disable some compiler warnings that aren't indicative of real problems.
1959
1960         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1961
1962 2010-12-16  Pratik Solanki  <psolanki@apple.com>
1963
1964         Reviewed by Geoffrey Garen.
1965
1966         https://bugs.webkit.org/show_bug.cgi?id=51166
1967         ExecutableAllocator::cacheFlush should call sys_cache_control
1968
1969         * jit/ExecutableAllocator.h:
1970         (JSC::ExecutableAllocator::cacheFlush): Use the more correct and forward looking API -
1971         sys_cache_control(kCacheFunctionPrepareForExecution,...).
1972
1973 2010-12-16  Ariya Hidayat  <ariya@sencha.com>
1974
1975         Reviewed by Andreas Kling.
1976
1977         [JSC] Const correctness in ASTBuilder and SyntaxChecker
1978         https://bugs.webkit.org/show_bug.cgi?id=51141
1979
1980         * parser/ASTBuilder.h:
1981         (JSC::ASTBuilder::getName):
1982         (JSC::ASTBuilder::getType):
1983         (JSC::ASTBuilder::isResolve):
1984         * parser/SyntaxChecker.h:
1985         (JSC::SyntaxChecker::operatorStackPop):
1986
1987 2010-12-15  Kenneth Russell  <kbr@google.com>
1988
1989         Reviewed by James Robinson.
1990
1991         Web Audio API: port FFTFrame to MKL
1992         https://bugs.webkit.org/show_bug.cgi?id=50986
1993
1994         Fixed bug in log2 emulation function provided for Windows port of
1995         Web Audio API.
1996
1997         * wtf/MathExtras.h:
1998         (log2):
1999
2000 2010-12-14  Mark Rowe  <mrowe@apple.com>
2001
2002         Reviewed by Sam Weinig.
2003
2004         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
2005
2006         * wtf/text/WTFString.h: Prevent String from being implicitly convertable to bool.
2007         It was previously implicitly convertible to bool on Mac via operator NSString*,
2008         but since that always has a non-zero return value it would give unexpected results.
2009
2010 2010-12-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2011
2012         Reviewed by Eric Seidel.
2013
2014         [Qt] [Symbian] Do not use pkg-config on Symbian as it is not supported
2015         https://bugs.webkit.org/show_bug.cgi?id=50231
2016
2017         Guard CONFIG+=link_pkgconfig with !symbian.
2018
2019         * jsc.pro:
2020
2021 2010-12-14  Cameron Zwarich  <zwarich@apple.com>
2022
2023         Not reviewed.
2024
2025         Revert accidental change disabling the JIT for most platforms.
2026
2027         * wtf/Platform.h:
2028
2029 2010-12-13  Cameron Zwarich  <zwarich@apple.com>
2030
2031         Reviewed by Eric Seidel.
2032
2033         Clang fails to build the JSC interpreter
2034         https://bugs.webkit.org/show_bug.cgi?id=51016
2035
2036         Clang does not allow indirect gotos out of scopes with cleanup. GCC 4.2 allows
2037         them, but it does not correctly generate the cleanup, causing a leak if the
2038         cleanup decrements a reference count.
2039
2040         * interpreter/Interpreter.cpp:
2041         (JSC::Interpreter::privateExecute): Put an Identifier into its own scope.
2042
2043 2010-12-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2044
2045         Reviewed by Martin Robinson.
2046
2047         [GTK] Simplify context-menu handling code
2048         https://bugs.webkit.org/show_bug.cgi?id=49658
2049
2050         * wtf/PlatformRefPtr.h: Add leakRef()
2051
2052 2010-12-13  Cameron Zwarich  <zwarich@apple.com>
2053
2054         Reviewed by Gavin Barraclough.
2055
2056         JavaScriptCore should not use "asm volatile" outside of a function
2057         https://bugs.webkit.org/show_bug.cgi?id=50991
2058
2059         * jit/JITStubs.cpp: Remove the volatile keyword from asm statements.
2060
2061 2010-12-13  Steve Falkenburg  <sfalken@apple.com>
2062
2063         Windows production build fix.
2064         Try copying ICU 4.6 in addition to 4.4 and 4.2.
2065
2066         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
2067
2068 2010-12-13  Michael Saboff  <msaboff@apple.com>
2069
2070         Reviewed by Oliver Hunt.
2071
2072         REGRESSION: mobileme mail viewing is broken
2073         https://bugs.webkit.org/show_bug.cgi?id=50884
2074
2075         Fixed problem where simple parenthesis (those without capture and
2076         with a fixed count) where not propagating backtrack to labels for 
2077         nested parentheses.  Also added the nesting level for the parentheses 
2078         state created in that case as well.
2079
2080         * yarr/RegexJIT.cpp:
2081         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyBacktrackToLabel):
2082         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
2083         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
2084         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2085
2086 2010-12-13  Peter Varga  <pvarga@inf.u-szeged.hu>
2087
2088         Reviewed by Gavin Barraclough.
2089
2090         Reduce the size of the RegexStackSpaceForBackTrackInfoParentheses in YARR
2091         https://bugs.webkit.org/show_bug.cgi?id=49385
2092
2093         Remove the BackTrackInfoParentheses struct prevBegin and prevEnd members.
2094
2095         * yarr/RegexInterpreter.cpp:
2096         (JSC::Yarr::Interpreter::matchParentheses):
2097         (JSC::Yarr::Interpreter::backtrackParentheses):
2098         * yarr/RegexPattern.h:
2099
2100 2010-12-10  Michael Saboff  <msaboff@apple.com>
2101
2102         Reviewed by Gavin Barraclough.
2103
2104         REGRESSION Hang inside Yarr::RegexCodeBlock::execute when visiting
2105         bugs.webkit.org
2106         https://bugs.webkit.org/show_bug.cgi?id=50816
2107
2108         First nested parentheses of the second or greater alternative
2109         where backtracking to the prior parentheses.  Changed the default
2110         handling of initial parentheses for all alternatives to go back
2111         to the immediate outer paren.
2112
2113         * yarr/RegexJIT.cpp:
2114         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
2115         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
2116         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastTerm):
2117         (JSC::Yarr::RegexGenerator::TermGenerationState::getTermIndex):
2118         (JSC::Yarr::RegexGenerator::TermGenerationState::setParenthesesTail):
2119         (JSC::Yarr::RegexGenerator::TermGenerationState::getParenthesesTail):
2120         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
2121         (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
2122         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
2123         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2124
2125 2010-12-11  Patrick Gansterer  <paroga@webkit.org>
2126
2127         Reviewed by Darin Adler.
2128
2129         Add an overload to makeString for Vector<char>
2130         https://bugs.webkit.org/show_bug.cgi?id=50123
2131
2132         Also cleanup StringTypeAdapter.
2133
2134         * wtf/text/StringConcatenate.h:
2135
2136 2010-12-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
2137
2138         Reviewed by Eric Seidel.
2139
2140         [Qt] Build fix for Symbian: don't compile POSIX memory management implementation 
2141         https://bugs.webkit.org/show_bug.cgi?id=50707
2142
2143         * wtf/wtf.pri:
2144
2145 2010-12-10  Steve Falkenburg  <sfalken@apple.com>
2146
2147         Windows production build fix.
2148         
2149         Don't stop if react-to-vsprops-changes.py exits with an error,
2150         since this will occur in production builds.
2151
2152         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
2153
2154 2010-12-10  Brian Weinstein  <bweinstein@apple.com>
2155
2156         Reviewed by Adam Roben.
2157
2158         Turn on USE(CROSS_PLATFORM_CONTEXT_MENUS) for Windows.
2159
2160         * wtf/Platform.h:
2161
2162 2010-12-10  Martin Robinson  <mrobinson@igalia.com>
2163
2164         Unreviewed, rolling out r73703.
2165         http://trac.webkit.org/changeset/73703
2166         https://bugs.webkit.org/show_bug.cgi?id=49658
2167
2168         This patch is causing crashes on the GTK+ bots.
2169
2170         * wtf/PlatformRefPtr.h:
2171
2172 2010-12-10  Patrick Gansterer  <paroga@webkit.org>
2173
2174         Reviewed by Eric Seidel.
2175
2176         Cleanup StringWx.cpp
2177         https://bugs.webkit.org/show_bug.cgi?id=50525
2178
2179         Use StringImpl::createUninitialized to avoid memcpy and fix style issues.
2180
2181         * wtf/wx/StringWx.cpp:
2182         (WTF::String::String):
2183
2184 2010-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2185
2186         Reviewed by Martin Robinson.
2187
2188         [GTK] Simplify context-menu handling code
2189         https://bugs.webkit.org/show_bug.cgi?id=49658
2190
2191         * wtf/PlatformRefPtr.h:
2192
2193 2010-12-09  Michael Saboff  <msaboff@apple.com>
2194
2195         Reviewed by Gavin Barraclough.
2196
2197         REGRESSION (r73065?): A regex no longer works 
2198         https://bugs.webkit.org/show_bug.cgi?id=50570
2199
2200         Changed the handling of adjacent parentheses backtracks in two ways.
2201         First, only outer most paren backtracks default to back tracking
2202         to the "next character" looping code.  Second, added a jump around 
2203         backtracks that fall through to the next backtrack where the
2204         second backtrack has some greedy processing before the backtracking
2205         from outside the parentheses code.
2206         Also cleaned up extraneous white spce, removing white space at the
2207         end of or that makes up a whole line.
2208
2209         * yarr/RegexJIT.cpp:
2210         (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
2211         (JSC::Yarr::RegexGenerator::GenerationState::incrementParenNestingLevel):
2212         (JSC::Yarr::RegexGenerator::GenerationState::decrementParenNestingLevel):
2213         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
2214         (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
2215         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
2216         (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
2217         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
2218         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2219
2220 2010-12-09  Michael Saboff  <msaboff@apple.com>
2221
2222         Reviewed by Geoffrey Garen.
2223
2224         Addressed the "FIXME" issues in array sort for toString() methods that
2225         mutate the array in either size or contents.  The change is to mark
2226         the temporary array contents so that they are not garbage collected
2227         and to make sure the array is large enough to hold the contents
2228         of the sorted temporary vector.
2229         https://bugs.webkit.org/show_bug.cgi?id=50718
2230
2231         * runtime/Collector.cpp:
2232         (JSC::Heap::addTempSortVector):
2233         (JSC::Heap::removeTempSortVector):
2234         (JSC::Heap::markTempSortVectors):
2235         (JSC::Heap::markRoots):
2236         * runtime/Collector.h:
2237         * runtime/JSArray.cpp:
2238         (JSC::JSArray::sort):
2239         * runtime/JSValue.h:
2240
2241 2010-12-09  Michael Saboff  <msaboff@apple.com>
2242
2243         Reviewed by Darin Adler.
2244
2245         Changed setting of backtrack labels to not overwrite a prior
2246         label.  Where losing prior labe which then reverted back to 
2247         next character label.
2248         https://bugs.webkit.org/show_bug.cgi?id=50579
2249
2250         * yarr/RegexJIT.cpp:
2251         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
2252
2253 2010-12-08  Gavin Barraclough  <barraclough@apple.com>
2254
2255         Reviewed by Sam Weinig.
2256
2257         Permit Character Class Escape in CharacterRange in Character Class.
2258         https://bugs.webkit.org/show_bug.cgi?id=50483
2259         https://bugs.webkit.org/show_bug.cgi?id=50538
2260         https://bugs.webkit.org/show_bug.cgi?id=50654
2261         https://bugs.webkit.org/show_bug.cgi?id=50646
2262
2263         We recently tightened up our spec conformance in generating syntax
2264         error in these cases, however testing in the wild has shown this
2265         to be problematic. This reverts the previous change in allowing
2266         class escapes (e.g. \d) in ranges in character classes ([]), but
2267         does retain some closer conformance to the spec in only allowing
2268         ranges that would be permitted per the grammar rules in the spec
2269         (e.g. in /[\d-a-z]/ "a-z" cannot be considered as a range).
2270
2271         * yarr/RegexParser.h:
2272         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
2273         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
2274         (JSC::Yarr::Parser::parse):
2275
2276 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
2277
2278         Reviewed by Sam Weinig.
2279
2280         Try to fix crash-on-launch seen on Windows builder.
2281
2282         * wtf/OSAllocatorWin.cpp:
2283         (WTF::OSAllocator::release): Disabled an ASSERT, because it checks for
2284         a bug that hasn't been fixed yet.
2285
2286 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
2287
2288         Try to fix Windows build.
2289
2290         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2291
2292 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
2293
2294         Try to fix Windows build.
2295
2296         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def
2297         file to remove a symbol -- the next build failure will say which symbol
2298         to add back.
2299
2300 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
2301
2302         Try to fix Windows build.
2303
2304         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Updated .def file.
2305
2306 2010-12-08  Geoffrey Garen  <ggaren@apple.com>
2307
2308         Try to fix GTK Linux build.
2309
2310         * jit/ExecutableAllocator.cpp:
2311         (JSC::ExecutablePool::systemAlloc):
2312         * runtime/AlignedMemoryAllocator.h:
2313         (JSC::::AlignedMemoryAllocator): Updated for Usage enum moving to OSAllocator.
2314
2315 2010-12-07  Geoffrey Garen  <ggaren@apple.com>
2316
2317         Reviewed by Sam Weinig.
2318
2319         Migrated OS-specific allocation code from PageReservation and PageAllocation to OSAllocator
2320         https://bugs.webkit.org/show_bug.cgi?id=50653
2321
2322         * JavaScriptCore.exp: Updated for new function signature.
2323
2324         * interpreter/RegisterFile.h:
2325         (JSC::RegisterFile::RegisterFile):
2326         (JSC::RegisterFile::grow):
2327         * jit/ExecutableAllocatorFixedVMPool.cpp:
2328         (JSC::FixedVMPoolAllocator::reuse):
2329         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): Removed checkAllocatedOkay.
2330         OSAllocator is now the central location for verifying that allocation succeeds.
2331         This allowed me to remove some complicating cross-platform cruft.
2332
2333         * runtime/AlignedMemoryAllocator.h:
2334         (JSC::::allocate): Updated for code motion.
2335
2336         * wtf/OSAllocator.h: Added Usage, writable, and executable parameters, to
2337         support VM features required by clients of PageAllocation and PageReservation.
2338
2339         * wtf/OSAllocatorPosix.cpp:
2340         (WTF::OSAllocator::reserve):
2341         (WTF::OSAllocator::reserveAndCommit):
2342         (WTF::OSAllocator::commit): Moved PageAllocation support for randomizing
2343         executable memory here.
2344
2345         * wtf/OSAllocatorSymbian.cpp:
2346         (WTF::OSAllocator::reserve):
2347         (WTF::OSAllocator::reserveAndCommit):
2348         (WTF::OSAllocator::commit): Updated for new function signatures.
2349
2350         * wtf/OSAllocatorWin.cpp:
2351         (WTF::protection):
2352         (WTF::OSAllocator::reserve):
2353         (WTF::OSAllocator::reserveAndCommit):
2354         (WTF::OSAllocator::commit):
2355         (WTF::OSAllocator::release): Updated for new function signatures. Moved
2356         some protection-related and WINCE-related code from PageAllocation here.
2357
2358         * wtf/PageAllocation.cpp: Nixed cross-platform lastError abstraction, since
2359         it was only used by checkAllocatedOkay, which is now gone.
2360
2361         * wtf/PageAllocation.h:
2362         (WTF::PageAllocation::allocate):
2363         (WTF::PageAllocation::allocateAligned):
2364         (WTF::PageAllocation::deallocate):
2365         (WTF::PageAllocation::isPowerOfTwo):
2366         (WTF::PageAllocation::systemAllocateAligned): Removed system* functions,
2367         and replaced calls to them with calls to OSAllocator.
2368
2369         * wtf/PageReservation.h:
2370         (WTF::PageReservation::commit):
2371         (WTF::PageReservation::decommit):
2372         (WTF::PageReservation::reserve):
2373         (WTF::PageReservation::deallocate):
2374         (WTF::PageReservation::PageReservation): Ditto. Added m_writable and
2375         m_executable because these flags are now required when committing memory.
2376
2377 2010-12-08  Chris Rogers  <crogers@google.com>
2378
2379         Reviewed by Kenneth Russell.
2380
2381         Add web audio files to mac port Xcode projects
2382         https://bugs.webkit.org/show_bug.cgi?id=50721
2383
2384         * JavaScriptCore.xcodeproj/project.pbxproj:
2385
2386 2010-12-08  Oliver Hunt  <oliver@apple.com>
2387
2388         Reviewed by Gavin Barraclough.
2389
2390         Marking the active global object re-enters through markConservatively
2391         https://bugs.webkit.org/show_bug.cgi?id=50711
2392
2393         draining of the MarkStack is not allowed to be re-entrant, we got away
2394         with this simply due to the logic in MarkStack::drain implicitly handling
2395         changes that could be triggered by the re-entry.
2396
2397         Just to be safe this patch removes the re-entry through markConservatively
2398         so we don't accidentally introduce such an issue in future.  I've also
2399         added an assertion to catch such errors.
2400
2401         * runtime/Collector.cpp:
2402         (JSC::Heap::markConservatively):
2403         (JSC::Heap::markCurrentThreadConservativelyInternal):
2404         (JSC::Heap::markOtherThreadConservatively):
2405         * runtime/JSArray.h:
2406         (JSC::MarkStack::drain):
2407         * runtime/MarkStack.h:
2408         (JSC::MarkStack::MarkStack):
2409
2410 2010-12-08  Chris Marrin  <cmarrin@apple.com>
2411
2412         Reviewed by Simon Fraser.
2413
2414         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
2415         https://bugs.webkit.org/show_bug.cgi?id=49388
2416
2417         Added a WTF_PLATFORM_CA flag. Set when platform is MAC or IOS or (WINDOWS AND CG)
2418         which was decided was the best way to identify a build with CoreAnimation
2419
2420         * wtf/Platform.h:
2421
2422 2010-12-07  Anders Carlsson  <andersca@apple.com>
2423
2424         Build fix follow up build fix.
2425
2426         * pcre/pcre_ucp_searchfuncs.cpp:
2427         (jsc_pcre_ucp_othercase):
2428
2429 2010-12-07  Anders Carlsson  <andersca@apple.com>
2430
2431         Reviewed by Darin Adler.
2432
2433         Fix clang++ build
2434         https://bugs.webkit.org/show_bug.cgi?id=50645
2435
2436         Explicitly cast offset to int.
2437
2438         * pcre/pcre_ucp_searchfuncs.cpp:
2439         (jsc_pcre_ucp_othercase):
2440
2441 2010-12-07  Kenneth Russell  <kbr@google.com>
2442
2443         Reviewed by David Levin.
2444
2445         Fix compilation of core web audio files on Windows
2446         https://bugs.webkit.org/show_bug.cgi?id=50603
2447
2448         Added log2 definition to MathExtras.h on Windows platform.
2449
2450         * wtf/MathExtras.h:
2451         (log2):
2452
2453 2010-12-07  Antti Koivisto  <antti@apple.com>
2454
2455         Reviewed by Gavin Barraclough.
2456
2457         https://bugs.webkit.org/show_bug.cgi?id=50412
2458         http://www.wunderground.com/US/CA/Hayward.html causes big memory spike during page loading 
2459         
2460         Creating a substring caused the original string be flattened if it was in the rope form. This could use
2461         significant amount of memory by reducing buffer sharing between strings.
2462         
2463         Add a rope specific substring function that constructs the substring by reusing the rope fibers
2464         instead of flattening the rope.
2465         
2466         No change observed in SunSpider.
2467
2468         * runtime/JSString.cpp:
2469         (JSC::JSString::substringFromRope):
2470         * runtime/JSString.h:
2471         (JSC::jsSubstring):
2472         * runtime/StringPrototype.cpp:
2473         (JSC::stringProtoFuncSubstr):
2474         (JSC::stringProtoFuncSubstring):
2475
2476 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
2477
2478         Reviewed by Gavin Barraclough.
2479
2480         Simplified some ASLR-related code in PageAllocation/Reservation
2481         https://bugs.webkit.org/show_bug.cgi?id=50599
2482         
2483         Removed reserveAt, allocateAt, and friends, since they all existed to
2484         serve one feature: ASLR for executable memory on x86_64 on Mac. Moved
2485         ASLR code down into systemAllocate -- now, any time you allocate
2486         executable memory on a supporting platform, the memory's location is
2487         randomized.
2488
2489         * jit/ExecutableAllocatorFixedVMPool.cpp:
2490         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator): No need for the caller
2491         to randomize anything.
2492
2493         * wtf/PageAllocation.h:
2494         (WTF::PageAllocation::systemAllocate): Removed some *At() functions, and
2495         beefed up executable allocation with randomization.
2496
2497         * wtf/PageReservation.h:
2498         (WTF::PageReservation::systemReserve): Removed some *At() functions.
2499
2500 2010-12-06  Geoffrey Garen  <ggaren@apple.com>
2501
2502         Reviewed by Maciej Stachowiak.
2503
2504         reserveAndCommit doesn't commit on MADVISE_FREE_REUSE systems
2505         https://bugs.webkit.org/show_bug.cgi?id=50588
2506         
2507         * wtf/OSAllocatorPosix.cpp:
2508         (WTF::OSAllocator::reserve):
2509         (WTF::OSAllocator::reserveAndCommit):
2510         (WTF::OSAllocator::commit): Tightened up some comments. Changed
2511         reserveAndCommit to actually commit on MADVISE_FREE_REUSE systems.
2512
2513 2010-12-06  Patrick Gansterer  <paroga@webkit.org>
2514
2515         Reviewed by Andreas Kling.
2516
2517         [WINCE] Add build system
2518         https://bugs.webkit.org/show_bug.cgi?id=50522
2519
2520         * CMakeListsWinCE.txt: Added.
2521         * shell/CMakeListsWinCE.txt: Added.
2522         * wtf/CMakeListsWinCE.txt: Added.
2523
2524 2010-12-06  John Tantalo  <john.tantalo@gmail.com>
2525
2526         Reviewed by Geoffrey Garen.
2527
2528         jsc does not ignore shebang
2529         https://bugs.webkit.org/show_bug.cgi?id=49576
2530
2531         * jsc.cpp:
2532         (fillBufferWithContentsOfFile):
2533           - translate shebang into a valid JavaScript comment so the lexer ignores it
2534
2535 2010-12-05  Adam Roben  <aroben@apple.com>
2536
2537         Windows production build fix
2538
2539         Put spaces after trailing backslashes when setting
2540         %WebKitVSPropsRedirectionDir%. According to MSDN
2541         <http://msdn.microsoft.com/en-us/library/2kzfk8c7(v=VS.80).aspx>:
2542
2543            A backslash ( \ ) followed by a newline character is interpreted as
2544            a space in the command; use a backslash at the end of a line to
2545            continue a command onto the next line. NMAKE interprets the
2546            backslash literally if any other character, including a space or
2547            tab, follows the backslash.
2548
2549         * JavaScriptCore.vcproj/JavaScriptCore.make:
2550
2551 2010-12-04  Patrick Gansterer  <paroga@webkit.org>
2552
2553         Unreviewed, build fix after r69132.
2554
2555         * shell/CMakeLists.txt: Fix directory name (jsc -> shell).
2556
2557 2010-12-04  Xan Lopez  <xlopez@igalia.com>
2558
2559         Reviewed by Martin Robinson.
2560
2561         [GTK] Drop GdkDrawable usage, it's deprecated in GTK+3.x and we can use GdkWindow
2562         https://bugs.webkit.org/show_bug.cgi?id=50451
2563
2564         * wtf/gobject/GTypedefs.h: add GdkWindow defines.
2565
2566 2010-12-03  Gavin Barraclough  <barraclough@apple.com>
2567
2568         Rubber stamped by Oliver Hunt.
2569
2570         Bug 50509 - set* methods on MacroAssembler are awfully named.
2571
2572         Methods set32 and setTest32 compare 32-bit operands, and set a 32-bit results based on the comparison.
2573         set8 compares 32-bit operands, and sets an 8-bit result based on the comparison.
2574         setTest8 compares 8-bit operands, and sets a 32-bit result based on the comparison.
2575
2576         Rename to clarify.
2577
2578         set32 -> set32Compare32
2579         setTest32 -> set32Test32
2580         set8 -> set8Compare32
2581         setTest8 -> set32Test8
2582
2583         * assembler/MacroAssembler.h:
2584         (JSC::MacroAssembler::setPtr):
2585         * assembler/MacroAssemblerARM.h:
2586         (JSC::MacroAssemblerARM::set32Compare32):
2587         (JSC::MacroAssemblerARM::set8Compare32):
2588         (JSC::MacroAssemblerARM::set32Test32):
2589         (JSC::MacroAssemblerARM::set32Test8):
2590         * assembler/MacroAssemblerARMv7.h:
2591         (JSC::MacroAssemblerARMv7::set32Compare32):
2592         (JSC::MacroAssemblerARMv7::set8Compare32):
2593         (JSC::MacroAssemblerARMv7::set32Test32):
2594         (JSC::MacroAssemblerARMv7::set32Test8):
2595         * assembler/MacroAssemblerMIPS.h:
2596         (JSC::MacroAssemblerMIPS::set8Compare32):
2597         (JSC::MacroAssemblerMIPS::set32Compare32):
2598         (JSC::MacroAssemblerMIPS::set32Test8):
2599         (JSC::MacroAssemblerMIPS::set32Test32):
2600         * assembler/MacroAssemblerX86Common.h:
2601         (JSC::MacroAssemblerX86Common::set8Compare32):
2602         (JSC::MacroAssemblerX86Common::set32Compare32):
2603         (JSC::MacroAssemblerX86Common::set32Test8):
2604         (JSC::MacroAssemblerX86Common::set32Test32):
2605         * jit/JITOpcodes.cpp:
2606         (JSC::JIT::emit_op_eq):
2607         (JSC::JIT::emit_op_neq):
2608         (JSC::JIT::compileOpStrictEq):
2609         (JSC::JIT::emit_op_eq_null):
2610         (JSC::JIT::emit_op_neq_null):
2611         * jit/JITOpcodes32_64.cpp:
2612         (JSC::JIT::emit_op_eq):
2613         (JSC::JIT::emit_op_neq):
2614         (JSC::JIT::compileOpStrictEq):
2615         (JSC::JIT::emit_op_eq_null):
2616         (JSC::JIT::emit_op_neq_null):
2617
2618 2010-12-03  Oliver Hunt  <oliver@apple.com>
2619
2620         Reviewed by Geoff Garen.
2621
2622         Incorrect logic for returning memory at the end of linking.
2623         Reviewed by Geoff Garen.
2624
2625         At the end of linking we return any space at the end of the
2626         allocated executable region that was saved due to branch
2627         compaction.  This is currently by done by subtracting the
2628         different from the m_freePtr in the allocation pool.  This
2629         can be incorrect if your allocation was made from a new
2630         page that was not selected for subsequent allocations.
2631
2632         This patch corrects this behaviour by verifying that the
2633         memory being returned actually comes from the current
2634         allocation pool.
2635
2636         * assembler/LinkBuffer.h:
2637         (JSC::LinkBuffer::linkCode):
2638         * jit/ExecutableAllocator.h:
2639         (JSC::ExecutablePool::tryShrink):
2640
2641 2010-12-03  Michael Saboff  <msaboff@apple.com>
2642
2643         Reviewed by Gavin Barraclough
2644
2645         Changes to significantly reduce branches to branches in JIT'ed
2646         parentheses backtrack processing.  The changes include the following:
2647         - Taking the backtracking processing out of line and adding it as
2648           code at the end of the JIT'ed routine.
2649         - Allow backtracks to be direct via an indirect branch for an address
2650           pushed onto the stack.  If the use of an indirect branch is from a
2651           conditional jump, then we emit a trampoline at the end of the 
2652           routine.
2653         - Propogate backtracks instead of adding trampolines.  Backtracks are
2654           propogated to where they are used.  This change also eliminated 
2655           trampoline branch code that aren't used.
2656         - Added global expression state to keep track of parentheses tail
2657           code and indirect branches.
2658         Other changes made to support these changes.
2659         - Split invertOrCapture flag on Patterns to two separate flags.  Added
2660           getters for these flags.  Rippled these changes to both the JIT 
2661           and interpreter code.
2662         - Split BacktrackDestination out off TermGenerationState struct.
2663           This is done to hold references to a backtrack for later code
2664           generation.
2665         https://bugs.webkit.org/show_bug.cgi?id=50295
2666
2667         * assembler/ARMAssembler.h:
2668         (JSC::ARMAssembler::JmpDst::isSet):
2669         * assembler/ARMv7Assembler.h:
2670         (JSC::ARMv7Assembler::JmpDst::isSet):
2671         * assembler/AbstractMacroAssembler.h:
2672         (JSC::AbstractMacroAssembler::Label::isSet):
2673         (JSC::AbstractMacroAssembler::DataLabelPtr::isUsed):
2674         (JSC::AbstractMacroAssembler::DataLabelPtr::used):
2675         (JSC::AbstractMacroAssembler::JumpList::clear):
2676         * assembler/MIPSAssembler.h:
2677         (JSC::MIPSAssembler::JmpDst::isSet):
2678         * assembler/X86Assembler.h:
2679         (JSC::X86Assembler::JmpDst::isSet):
2680         * yarr/RegexCompiler.cpp:
2681         (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
2682         (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
2683         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
2684         (JSC::Yarr::RegexPatternConstructor::setupAlternativeBeginTerms):
2685         * yarr/RegexInterpreter.cpp:
2686         (JSC::Yarr::ByteCompiler::atomParenthesesOnceBegin):
2687         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalBegin):
2688         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
2689         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
2690         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionEnd):
2691         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternEnd):
2692         (JSC::Yarr::ByteCompiler::atomParenthesesOnceEnd):
2693         (JSC::Yarr::ByteCompiler::atomParenthesesTerminalEnd):
2694         (JSC::Yarr::ByteCompiler::emitDisjunction):
2695         * yarr/RegexInterpreter.h:
2696         (JSC::Yarr::ByteTerm::ByteTerm):
2697         (JSC::Yarr::ByteTerm::BackReference):
2698         (JSC::Yarr::ByteTerm::invert):
2699         (JSC::Yarr::ByteTerm::capture):
2700         * yarr/RegexJIT.cpp:
2701         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::IndirectJumpEntry):
2702         (JSC::Yarr::RegexGenerator::IndirectJumpEntry::addJump):
2703         (JSC::Yarr::RegexGenerator::GenerationState::GenerationState):
2704         (JSC::Yarr::RegexGenerator::GenerationState::addIndirectJumpEntry):
2705         (JSC::Yarr::RegexGenerator::GenerationState::emitIndirectJumpTable):
2706         (JSC::Yarr::RegexGenerator::GenerationState::addParenthesesTail):
2707         (JSC::Yarr::RegexGenerator::GenerationState::emitParenthesesTail):
2708         (JSC::Yarr::RegexGenerator::GenerationState::addJumpToNextInteration):
2709         (JSC::Yarr::RegexGenerator::GenerationState::addJumpsToNextInteration):
2710         (JSC::Yarr::RegexGenerator::GenerationState::addDataLabelToNextIteration):
2711         (JSC::Yarr::RegexGenerator::GenerationState::linkToNextIteration):
2712         (JSC::Yarr::RegexGenerator::BacktrackDestination::BacktrackDestination):
2713         (JSC::Yarr::RegexGenerator::BacktrackDestination::clear):
2714         (JSC::Yarr::RegexGenerator::BacktrackDestination::clearDataLabel):
2715         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDestination):
2716         (JSC::Yarr::RegexGenerator::BacktrackDestination::isStackOffset):
2717         (JSC::Yarr::RegexGenerator::BacktrackDestination::isLabel):
2718         (JSC::Yarr::RegexGenerator::BacktrackDestination::isJumpList):
2719         (JSC::Yarr::RegexGenerator::BacktrackDestination::haveDataLabel):
2720         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTarget):
2721         (JSC::Yarr::RegexGenerator::BacktrackDestination::copyTo):
2722         (JSC::Yarr::RegexGenerator::BacktrackDestination::addBacktrackJump):
2723         (JSC::Yarr::RegexGenerator::BacktrackDestination::setStackOffset):
2724         (JSC::Yarr::RegexGenerator::BacktrackDestination::setLabel):
2725         (JSC::Yarr::RegexGenerator::BacktrackDestination::setNextBacktrackLabel):
2726         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackToLabel):
2727         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackJumpList):
2728         (JSC::Yarr::RegexGenerator::BacktrackDestination::setBacktrackSourceLabel):
2729         (JSC::Yarr::RegexGenerator::BacktrackDestination::setDataLabel):
2730         (JSC::Yarr::RegexGenerator::BacktrackDestination::setSubDataLabelPtr):
2731         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkToNextBacktrack):
2732         (JSC::Yarr::RegexGenerator::BacktrackDestination::getStackOffset):
2733         (JSC::Yarr::RegexGenerator::BacktrackDestination::getLabel):
2734         (JSC::Yarr::RegexGenerator::BacktrackDestination::getBacktrackJumps):
2735         (JSC::Yarr::RegexGenerator::BacktrackDestination::getDataLabel):
2736         (JSC::Yarr::RegexGenerator::BacktrackDestination::jumpToBacktrack):
2737         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkDataLabelToHereIfExists):
2738         (JSC::Yarr::RegexGenerator::BacktrackDestination::plantJumpToBacktrackIfExists):
2739         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracks):
2740         (JSC::Yarr::RegexGenerator::BacktrackDestination::linkAlternativeBacktracksTo):
2741         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
2742         (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
2743         (JSC::Yarr::RegexGenerator::TermGenerationState::isLastAlternative):
2744         (JSC::Yarr::RegexGenerator::TermGenerationState::clearBacktrack):
2745         (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
2746         (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
2747         (JSC::Yarr::RegexGenerator::TermGenerationState::linkDataLabelToBacktrackIfExists):
2748         (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
2749         (JSC::Yarr::RegexGenerator::TermGenerationState::setDataLabelPtr):
2750         (JSC::Yarr::RegexGenerator::TermGenerationState::setBackTrackStackOffset):
2751         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLabel):
2752         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
2753         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
2754         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackLink):
2755         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktracks):
2756         (JSC::Yarr::RegexGenerator::TermGenerationState::chainBacktrackJumps):
2757         (JSC::Yarr::RegexGenerator::TermGenerationState::getBacktrackDestination):
2758         (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
2759         (JSC::Yarr::RegexGenerator::ParenthesesTail::ParenthesesTail):
2760         (JSC::Yarr::RegexGenerator::ParenthesesTail::processBacktracks):
2761         (JSC::Yarr::RegexGenerator::ParenthesesTail::setNextIteration):
2762         (JSC::Yarr::RegexGenerator::ParenthesesTail::generateCode):
2763         (JSC::Yarr::RegexGenerator::generateAssertionBOL):
2764         (JSC::Yarr::RegexGenerator::generateAssertionEOL):
2765         (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
2766         (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
2767         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
2768         (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
2769         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
2770         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
2771         (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
2772         (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
2773         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
2774         (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
2775         (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
2776         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2777         (JSC::Yarr::RegexGenerator::generateParenthesesGreedyNoBacktrack):
2778         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
2779         (JSC::Yarr::RegexGenerator::generateDisjunction):
2780         (JSC::Yarr::RegexGenerator::compile):
2781         * yarr/RegexPattern.h:
2782         (JSC::Yarr::PatternTerm::PatternTerm):
2783         (JSC::Yarr::PatternTerm::invert):
2784         (JSC::Yarr::PatternTerm::capture):
2785
2786 2010-12-03  Chris Rogers  <crogers@google.com>
2787
2788         Reviewed by Kenneth Russell.
2789
2790         First steps to adding web audio files to build systems
2791         https://bugs.webkit.org/show_bug.cgi?id=49952
2792
2793         * wtf/Complex.h:
2794
2795 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
2796
2797         Reviewed by Andreas Kling.
2798
2799         Move StringWx.cpp into wtf directory
2800         https://bugs.webkit.org/show_bug.cgi?id=50060
2801
2802         * wtf/wx/StringWx.cpp: Renamed from WebCore/platform/text/wx/StringWx.cpp.
2803         (WTF::String::String):
2804
2805 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
2806
2807         Reviewed by Andreas Kling.
2808
2809         Move StringBrew.cpp into wtf directory
2810         https://bugs.webkit.org/show_bug.cgi?id=50058
2811
2812         * wtf/brew/StringBrew.cpp: Renamed from WebCore/platform/text/brew/StringBrew.cpp.
2813         (WTF::String::String):
2814
2815 2010-12-03  Patrick Gansterer  <paroga@webkit.org>
2816
2817         Reviewed by Andreas Kling.
2818
2819         Move StringHaiku.cpp into wtf directory
2820         https://bugs.webkit.org/show_bug.cgi?id=50057
2821
2822         * wtf/haiku/StringHaiku.cpp: Renamed from WebCore/platform/text/haiku/StringHaiku.cpp.
2823         (WTF::String::String):
2824         (WTF::String::operator BString):
2825
2826 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
2827
2828         Try to fix Windows build.
2829
2830         * runtime/GCActivityCallback.cpp:
2831         (JSC::DefaultGCActivityCallback::synchronize): Added a non-CF implementation.
2832
2833 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
2834
2835         Reviewed by Gavin Barraclough.
2836
2837         Fixed <rdar://problem/8310571> CrashTracer: 60 crashes in Photo Booth at
2838         com.apple.JavaScriptCore: JSC::Heap::markRoots + 746
2839         
2840         * API/APIShims.h:
2841         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Call our new
2842         synchronize() function.
2843
2844         * runtime/Collector.cpp:
2845         (JSC::Heap::activityCallback):
2846         * runtime/Collector.h: Added an activityCallback() accessor, for the
2847         call above.
2848
2849         * runtime/GCActivityCallback.h:
2850         (JSC::GCActivityCallback::synchronize):
2851         * runtime/GCActivityCallbackCF.cpp:
2852         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
2853         (JSC::DefaultGCActivityCallback::~DefaultGCActivityCallback):
2854         (JSC::DefaultGCActivityCallback::operator()):
2855         (JSC::DefaultGCActivityCallback::synchronize): Track the run loop we're
2856         scheduled in. If we begin/resume execution within a new run loop, reschedule
2857         on it. This prevents a crash when using a lockless context group on
2858         multiple threads -- the crash would happen if the GC timer scheduled on
2859         thread A, then you continued execution on thread B, then the thread A
2860         timer fired.
2861
2862 2010-12-02  Darin Adler  <darin@apple.com>
2863
2864         * wtf/ASCIICType.h: Fix wrong type from last check-in.
2865
2866 2010-12-02  Darin Adler  <darin@apple.com>
2867
2868         Try to fix certain builds (Qt Windows).
2869
2870         * wtf/ASCIICType.h: Added an overload for unsigned because in obsolete
2871         versions of ICU, UChar32 can be a typedef for unsigned. Adding this
2872         overload should make us compatible with these old ICUs.
2873
2874 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
2875
2876         Reviewed by Darin Adler.
2877
2878         Add AtomicString::fromUTF8
2879         https://bugs.webkit.org/show_bug.cgi?id=45594
2880
2881         Unicode::calculateStringHashFromUTF8 creates a StringHash out of UTF8 input data and
2882         calculates the required length for the UTF16 conversation in one step.
2883         This is then used in a specialized translator for the string table of AtomicString.
2884
2885         * JavaScriptCore.exp:
2886         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2887         * wtf/text/AtomicString.cpp:
2888         (WTF::CStringTranslator::equal):
2889         (WTF::HashAndUTF8CharactersTranslator::hash):
2890         (WTF::HashAndUTF8CharactersTranslator::equal):
2891         (WTF::HashAndUTF8CharactersTranslator::translate):
2892         (WTF::AtomicString::add):
2893         (WTF::AtomicString::addSlowCase):
2894         (WTF::AtomicString::find):
2895         (WTF::AtomicString::fromUTF8):
2896         * wtf/text/AtomicString.h:
2897         * wtf/text/StringImpl.h:
2898         * wtf/text/WTFString.h:
2899         * wtf/unicode/UTF8.cpp:
2900         (WTF::Unicode::readUTF8Sequence):
2901         (WTF::Unicode::convertUTF8ToUTF16):
2902         (WTF::Unicode::calculateStringHashFromUTF8):
2903         (WTF::Unicode::equalUTF16WithUTF8):
2904         * wtf/unicode/UTF8.h:
2905
2906 2010-12-02  Geoffrey Garen  <ggaren@apple.com>
2907
2908         Reviewed by Sam Weinig.
2909
2910         Added a little hardening to OSAllocator.
2911
2912         * wtf/OSAllocatorPosix.cpp:
2913         (WTF::OSAllocator::release):
2914         * wtf/OSAllocatorWin.cpp:
2915         (WTF::OSAllocator::reserve):
2916         (WTF::OSAllocator::reserveAndCommit):
2917         (WTF::OSAllocator::commit):
2918         (WTF::OSAllocator::decommit):
2919         (WTF::OSAllocator::release): CRASH() if the OS's virtual memory system
2920         reports an error.
2921
2922 2010-12-02  Csaba Osztrogonác  <ossy@webkit.org>
2923
2924         Reviewed by Geoffrey Garen.
2925
2926         [Qt] Make platform managing of OSAllocator better than r73106
2927         https://bugs.webkit.org/show_bug.cgi?id=50385
2928
2929         * wtf/OSAllocatorPosix.cpp: Remove platform specific guard.
2930         * wtf/OSAllocatorSymbian.cpp: Remove platform specific guard.
2931         * wtf/OSAllocatorWin.cpp: Remove platform specific guard.
2932         * wtf/wtf.pri: Add the correct platform specific source file instead of all of them.
2933
2934 2010-12-02  Patrick Gansterer  <paroga@webkit.org>
2935
2936         Reviewed by Andreas Kling.
2937
2938         [WINCE] Use GetTickCount() for srand()
2939         https://bugs.webkit.org/show_bug.cgi?id=50338
2940
2941         time() is not a native function on WinCE, so use GetTickCount() instead.
2942
2943         * wtf/RandomNumberSeed.h:
2944         (WTF::initializeRandomNumberGenerator):
2945
2946 2010-12-02  Norbert Leser  <norbert.leser@nokia.com>
2947
2948         Reviewed by Laszlo Gombos.
2949
2950         [Qt] [Symbian] Reintroduce compiler optimizations for JSC
2951         https://bugs.webkit.org/show_bug.cgi?id=50270
2952
2953         Add compiler optimization (symbian ARM target) which was lost after split from WebCore.
2954         Tested via Sunspider and V8 - both of which show significant performance improvement.
2955
2956         * JavaScriptCore.pro:
2957
2958 2010-12-02  Peter Varga  <pvarga@inf.u-szeged.hu>
2959
2960         Reviewed by Gavin Barraclough.
2961
2962         Move regex parsing and fallback handling to runtime/RegExp.cpp
2963         https://bugs.webkit.org/show_bug.cgi?id=50015
2964
2965         * runtime/RegExp.cpp:
2966         (JSC::RegExp::RegExp):
2967         (JSC::RegExp::create):
2968         (JSC::RegExp::compile):
2969         (JSC::RegExp::match):
2970         (JSC::RegExp::printTraceData):
2971         * runtime/RegExp.h:
2972         (JSC::RegExp::pattern):
2973         * yarr/RegexInterpreter.cpp:
2974         * yarr/RegexInterpreter.h:
2975         * yarr/RegexJIT.cpp:
2976         (JSC::Yarr::RegexGenerator::compile):
2977         (JSC::Yarr::jitCompileRegex):
2978         * yarr/RegexJIT.h:
2979         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
2980         (JSC::Yarr::RegexCodeBlock::setFallBack):
2981         (JSC::Yarr::RegexCodeBlock::isFallBack):
2982         (JSC::Yarr::executeRegex):
2983
2984 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2985
2986         Try to fix the GTK build.
2987
2988         * GNUmakefile.am: Use a full path to OSAllocator*.cpp.
2989
2990 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2991
2992         Try to fix the EFL Linux build.
2993
2994         * CMakeListsEfl.txt: Added OSAllocator to the project.
2995
2996 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
2997
2998         Try to fix the Qt build: Include all OS files for Qt's sake, and then
2999         use #ifdefs in the files to exclude things based on OS.
3000         
3001         This is a pretty bad way to manage platforms -- hopefully we can
3002         fix the Qt build system and move away from this in the future.
3003
3004         * wtf/OSAllocatorPosix.cpp:
3005         * wtf/OSAllocatorSymbian.cpp:
3006         * wtf/OSAllocatorWin.cpp:
3007         * wtf/wtf.pri:
3008
3009 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3010
3011         Try to fix the Chromium build.
3012         
3013         * JavaScriptCore.gypi: This is a Windows build file, so use OSAllocatorWin.cpp.
3014
3015 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3016
3017         Try to fix the GTK build.
3018
3019         * GNUmakefile.am: Added OSAllocator to another project.
3020
3021 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3022
3023         Try to fix the GTK Linux build.
3024
3025         * JavaScriptCore.gypi: Added OSAllocator to the project.
3026
3027 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3028
3029         Try to fix the Qt Linux build.
3030
3031         * wtf/OSAllocatorPosix.cpp: Use the right errno.h.
3032
3033 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3034
3035         Try to fix Windows build: export some more symbols.
3036
3037         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3038
3039 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3040
3041         Try to fix the Qt Linux build.
3042
3043         * wtf/wtf.pri: Use the POSIX OSAllocator for Qt Linux.
3044
3045 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3046
3047         Windows build fix: commit doesn't have a return value.
3048
3049         * wtf/OSAllocatorWin.cpp:
3050         (WTF::OSAllocator::commit):
3051
3052 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3053
3054         Build fix: Export some symbols.
3055
3056         * JavaScriptCore.exp:
3057
3058 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3059
3060         Build fix.
3061
3062         * JavaScriptCore.xcodeproj/project.pbxproj: Export OSAllocator.h as private
3063         so other projects can see it.
3064
3065         * wtf/OSAllocatorPosix.cpp: #include UnusedParam.h for UNUSED_PARAM.
3066
3067 2010-12-01  Geoffrey Garen  <ggaren@apple.com>
3068
3069         Reviewed by Sam Weinig.
3070
3071         Baby step toward a cross-platform virtual memory abstraction: created
3072         an all-static OSAllocator class and changed MarkStack to use it.
3073
3074         * JavaScriptCore.exp: These functions are inlined now.
3075
3076         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added OSAllocatorWin.cpp.
3077
3078         * JavaScriptCore.xcodeproj/project.pbxproj: Added OSAllocatorPosix.cpp.
3079
3080         * runtime/MarkStack.h:
3081         (JSC::MarkStack::allocateStack):
3082         (JSC::MarkStack::releaseStack): Use OSAllocator instead of rolling our
3083         own platform-specific code.
3084
3085         * runtime/MarkStackNone.cpp: Removed. Nothing used this.
3086
3087         * runtime/MarkStackPosix.cpp: 
3088         * runtime/MarkStackSymbian.cpp:
3089         * runtime/MarkStackWin.cpp: Removed custom platform-specific code, since
3090         we use the OSAllocator abstraction now.
3091
3092         * wtf/OSAllocator.h: Added.
3093         * wtf/OSAllocatorPosix.cpp: Added.
3094         (WTF::OSAllocator::reserve):
3095         (WTF::OSAllocator::reserveAndCommit):
3096         (WTF::OSAllocator::commit):
3097         (WTF::OSAllocator::decommit):
3098         (WTF::OSAllocator::release):
3099         * wtf/OSAllocatorSymbian.cpp: Added.
3100         (WTF::OSAllocator::reserve):
3101         (WTF::OSAllocator::reserveAndCommit):
3102         (WTF::OSAllocator::commit):
3103         (WTF::OSAllocator::decommit):
3104         (WTF::OSAllocator::release):
3105         * wtf/OSAllocatorWin.cpp: Added.
3106         (WTF::OSAllocator::reserve):
3107         (WTF::OSAllocator::reserveAndCommit):
3108         (WTF::OSAllocator::commit):
3109         (WTF::OSAllocator::decommit):
3110         (WTF::OSAllocator::release): The new OSAllocator abstraction.
3111
3112         * wtf/wtf.pri: Added OSAllocatorSymbian.cpp.
3113
3114 2010-12-01  Steve Falkenburg  <sfalken@apple.com>
3115
3116         Reviewed by Adam Roben.
3117
3118         WinCairo build should not use link-time code generation (LTCG)
3119         https://bugs.webkit.org/show_bug.cgi?id=50353
3120
3121         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3122         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3123         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
3124         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
3125
3126 010-12-01  Steve Falkenburg  <sfalken@apple.com>
3127
3128         Reviewed by Adam Roben.
3129
3130         vcproj changes can't be applied cleanly by the Windows EWS bot
3131         https://bugs.webkit.org/show_bug.cgi?id=50328
3132
3133         * JavaScriptCore.vcproj/JavaScriptCore.sln: Modified property svn:eol-style.
3134         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Modified property svn:eol-style.
3135         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Added property svn:eol-style.
3136         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Added property svn:eol-style.
3137         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added property svn:eol-style.
3138         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Modified property svn:eol-style.
3139         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Added property svn:eol-style.
3140         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Modified property svn:eol-style.
3141         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Modified property svn:eol-style.
3142         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added property svn:eol-style.
3143         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Modified property svn:eol-style.
3144         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added property svn:eol-style.
3145         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Modified property svn:eol-style.
3146         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added property svn:eol-style.
3147
3148 2010-12-01  Gavin Barraclough  <barraclough@apple.com>
3149
3150         Reviewed by Sam Weinig.
3151
3152         Bug 50298 - /()()()()()()()()()(?:(\10a|b)(X|Y))+/.exec("bXXaYYaY") ASSERTs
3153
3154         For unmatched subpattens we previously used to set the subpattern end to -1,
3155         but now we only set the start value. E.g. consider the following:
3156             /a(b)?c/.exec("ac");
3157         Previously we would generate an internal results array of:
3158             [ 0, 2, -1, -1 ]
3159         Since fairly recently we have generated results of:
3160             [ 0, 2, -1, ??? ]
3161         (With the end index of the subpattern uninitialized).
3162
3163         Update these ASSERTs to account for this.
3164
3165         Also, when stripping out self-referencing backreferences, (e.g. /(\1)/) we
3166         were checking the wrong property on the pattern term. We should have been
3167         looking at term.parentheses.subpatternId, but instead were checking
3168         term.subpatternId. The latter is actually only the subpatternId for
3169         back reference terms. Rename this to backReferenceSubpatternId.
3170
3171         * yarr/RegexInterpreter.cpp:
3172         (JSC::Yarr::Interpreter::matchBackReference):
3173         (JSC::Yarr::Interpreter::backtrackBackReference):
3174
3175 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
3176
3177         Rubber stamped by Sam Weinig.
3178
3179         Bug 50297 - \s in YARR should match BOMs.
3180
3181         From section 15.10.2.12 CharacterClassEscape contains:
3182
3183         The production CharacterClassEscape :: s evaluates by returning the set of characters containing the
3184         characters that are on the right-hand side of the WhiteSpace (7.2) or LineTerminator (7.3) productions.
3185
3186         Table 2 in section 7.2 contains:
3187
3188         \uFEFF Byte Order Mark <BOM>
3189
3190         * create_regex_tables:
3191             Add BOM to spaces table.
3192
3193 2010-11-30  Gavin Barraclough  <barraclough@apple.com>
3194
3195         Reviewed by Darin Adler.
3196
3197         Fixed review comments following bug #48101.
3198         Mostly typos, plus gave quantifyInfinite a symbolic name.
3199
3200         * yarr/RegexCompiler.cpp:
3201         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
3202         (JSC::Yarr::RegexPatternConstructor::checkForTerminalParentheses):
3203         * yarr/RegexInterpreter.cpp:
3204         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
3205         (JSC::Yarr::Interpreter::matchParenthesesTerminalBegin):
3206         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalBegin):
3207         (JSC::Yarr::Interpreter::backtrackParenthesesTerminalEnd):
3208         * yarr/RegexJIT.cpp:
3209         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
3210         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
3211         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
3212         * yarr/RegexParser.h:
3213         (JSC::Yarr::Parser::parseTokens):
3214         (JSC::Yarr::parse):
3215
3216 2010-11-30  Steve Falkenburg  <sfalken@apple.com>
3217
3218         Reviewed by Darin Adler.
3219
3220         WTF project missing build-stopping code from its pre-build event
3221         https://bugs.webkit.org/show_bug.cgi?id=50281
3222
3223         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd:
3224
3225 2010-11-30  Patrick Gansterer  <paroga@webkit.org>
3226
3227         Reviewed by Darin Adler.
3228
3229         Cleanup UTF8.cpp
3230         https://bugs.webkit.org/show_bug.cgi?id=49581
3231
3232         Use macros and functions instead of range values directly.
3233
3234         * wtf/unicode/UTF8.cpp:
3235         (WTF::Unicode::inlineUTF8SequenceLength):
3236         (WTF::Unicode::UTF8SequenceLength):
3237         (WTF::Unicode::convertUTF16ToUTF8):
3238         (WTF::Unicode::readUTF8Sequence):
3239         (WTF::Unicode::convertUTF8ToUTF16):
3240         * wtf/unicode/UnicodeMacrosFromICU.h: Added U_IS_SUPPLEMENTARY macro.
3241
3242 2010-11-30  Geoffrey Garen  <ggaren@apple.com>
3243
3244         Reviewed by Gavin Barraclough.
3245
3246         Fixed a crash seen when using a PageAllocation to store itself.
3247
3248         * wtf/PageAllocation.h:
3249         (WTF::PageAllocation::systemDeallocate): Zero out m_base before unmapping
3250         it, in case unmapping m_base unmaps the PageAllocation.
3251
3252         * wtf/BumpPointerAllocator.h:
3253         (WTF::BumpPointerPool::destroy): Now this work-around isn't needed!
3254
3255 2010-11-30  Xan Lopez  <xlopez@igalia.com>
3256
3257         Reviewed by Darin Adler.
3258
3259         m_hasNonEnumerableProperties is never initialized in Structure
3260         https://bugs.webkit.org/show_bug.cgi?id=50266
3261
3262         * runtime/Structure.cpp:
3263         (JSC::Structure::Structure): initialize member variable.
3264
3265 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
3266
3267         Windows build fix (part 1). Use correct environment variable syntax in cmd files.
3268
3269         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd:
3270         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd:
3271         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd:
3272         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd:
3273         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
3274         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd:
3275         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd:
3276         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd:
3277         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd:
3278         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd:
3279
3280 2010-11-29  Dan Bernstein  <mitz@apple.com>
3281
3282         Reviewed by Darin Adler.
3283
3284         WTF support for <rdar://problem/8650085> adding word-prefix search options to the text search API.
3285         https://bugs.webkit.org/show_bug.cgi?id=50038
3286
3287         * wtf/unicode/UnicodeMacrosFromICU.h: Copied additional macros from icu/unicode/utf16.h.
3288
3289 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
3290
3291         Reviewed by Darin Adler.
3292
3293         JavaScriptCore projects on Windows should use cmd files for build events
3294         https://bugs.webkit.org/show_bug.cgi?id=50193
3295
3296         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
3297         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Added.
3298         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Added.
3299         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Added.
3300         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added property svn:eol-style.
3301         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added property svn:eol-style.
3302         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
3303         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Added.
3304         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Added.
3305         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Added.
3306         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
3307         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Added.
3308         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Added.
3309         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Added.
3310
3311 2010-11-29  Dai Mikurube  <dmikurube@google.com>
3312
3313         Reviewed by Kent Tamura.
3314
3315         when empty, clicking "down" on outer-spin-button returns "max value"
3316         https://bugs.webkit.org/show_bug.cgi?id=45491
3317
3318         It is required to calculate UTC/DST offsets to retrieve the current local milliseconds for
3319         date/time type inputs. WTF::currentTimeMS() returns a UTC time, and WTF::getLocalTime()
3320         returns a struct tm, not milliseconds.
3321
3322         Calculating milliseconds from a struct tm is not simple since timegm() cannot be used in all
3323         environments. This calculation is already done in calculateUTCOffset(), and complicated.
3324         Duplicating this complicated calculation is unreasonable because of maintainability.
3325         To achieve this without duplication, we must call calculate{UTC|DST}Offset in some way.
3326
3327         * JavaScriptCore.exp:
3328         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3329         * wtf/DateMath.cpp: Changed calculateUTCOffset() and calculateDSTOffset() to external functions.
3330         (WTF::calculateUTCOffset):
3331         (WTF::calculateDSTOffset):
3332         * wtf/DateMath.h:
3333
3334 2010-11-29  Chris Rogers  <crogers@google.com>
3335
3336         Reviewed by Kenneth Russell.
3337
3338         Switch web audio code to use FloatPoint3D instead of Vector3
3339         https://bugs.webkit.org/show_bug.cgi?id=50186
3340
3341         * wtf/Vector3.h: Removed.
3342
3343 2010-11-29  Steve Falkenburg  <sfalken@apple.com>
3344
3345         Reviewed by Adam Roben.
3346
3347         Add a mechanism for Windows pre-build/pre-link/post-build events to be separated into individual cmd files
3348         https://bugs.webkit.org/show_bug.cgi?id=49858
3349
3350         We're migrating our prebuild/prelink/postbuild steps out of vcproj and vsprops files:
3351         - To simplify editing (editing vsprops build steps is confusing).
3352         - For more readable diffs.
3353
3354         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
3355         * JavaScriptCore.vcproj/WTF/WTFPostBuild.cmd: Added.
3356         * JavaScriptCore.vcproj/WTF/WTFPreBuild.cmd: Added.
3357
3358 2010-11-29  Geoffrey Garen  <ggaren@apple.com>
3359
3360         Reviewed by Gavin Barraclough.
3361
3362         Improved accuracy of command-line SunSpider.
3363
3364         * jsc.cpp:
3365         (functionRun): Changed the "run" function to run a given test in
3366         its own global object. Previously, all tests ran in the same global
3367         object, which created name conflicts, and made globals from previous
3368         tests artificially survive into later tests.
3369         
3370         Also changed "run" to return the elapsed milliseconds when running a
3371         given test, for slightly more accurate numbers.
3372
3373         (functionCheckSyntax): Ditto on returning elapsed milliseconds.
3374
3375 2010-11-29  Darin Adler  <darin@apple.com>
3376
3377         Reviewed by Andreas Kling.
3378
3379         Remove a couple unneeded overflow checks
3380         https://bugs.webkit.org/show_bug.cgi?id=49816
3381
3382         * wtf/text/CString.cpp:
3383         (WTF::CString::init): Use an ASSERT instead of
3384         an overflow check with CRASH.
3385
3386 2010-11-29  Adam Roben  <aroben@apple.com>
3387
3388         Robustify react-to-vsprops-changes.py against changes to its location
3389         or the location of the .vsprops files
3390
3391         Suggested by John Sullivan.
3392
3393         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
3394         Removed file_modification_times.
3395         (main): Use glob.glob to find the .vsprops files and assert that we found some.
3396
3397 2010-11-29  Adam Roben  <aroben@apple.com>
3398
3399         Touch wtf/Platform.h whenever any .vsprops file changes
3400
3401         This will cause all files to be recompiled, which will make changes to
3402         preprocessor macros (e.g., ENABLE_*) actually take effect.
3403
3404         Fixes <http://webkit.org/b/50167> Windows build fails when ENABLE_*
3405         macros are changed (because not enough files are rebuilt)
3406
3407         Reviewed by John Sullivan.
3408
3409         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
3410         (main): Touch wtf/Platform.h if it's older than any .vsprops file. Also
3411         added some comments and logging to make it clearer what the script is
3412         doing and why.
3413
3414 2010-11-29  Adam Roben  <aroben@apple.com>
3415
3416         Update react-to-vsprops-changes.py after r72555
3417
3418         .vsprops files are no longer accessed relative to $WebKitLibrariesDir.
3419
3420         Fixes <http://webkit.org/b/50166> REGRESSION (r72555):
3421         react-to-vsprops-changes.py no longer works for people with a
3422         non-default $WebKitLibrariesDir
3423
3424         Reviewed by John Sullivan.
3425
3426         * JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py:
3427         (main): Always look in WebKitLibraries/win for .vsprops files, not in
3428         $WebKitLibrariesDir.
3429
3430 2010-11-28  Gavin Barraclough  <barraclough@apple.com>
3431
3432         Reviewed by Sam Weinig.
3433
3434         Bug 48100 - YARR allows what seems like a bogus character-class range
3435
3436         Per ECMA-262 character classes containing character ranges containing
3437         character classes are invalid, eg:
3438             /[\d-x]/
3439             /[x-\d]/