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