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