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