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