78160b7fca383032d95238d1bb3257a5ae6d703f
[WebKit.git] / JavaScriptCore / ChangeLog
1 2010-05-12  Gavin Barraclough  <barraclough@apple.com>
2
3         Reviewed by Oliver Hunt.
4
5         https://bugs.webkit.org/show_bug.cgi?id=39039
6         Provide support for separate bytecode/JIT code translations for call/construct usage
7         This will allow us to produce code generated specifically for use as a constructor, not for general function use.
8
9         * bytecode/CodeBlock.cpp:
10         (JSC::CodeBlock::CodeBlock):
11         (JSC::CodeBlock::unlinkCallers):
12         * bytecode/CodeBlock.h:
13         (JSC::CodeBlock::getBytecodeIndex):
14         (JSC::CodeBlock::getJITCode):
15         (JSC::CodeBlock::executablePool):
16         (JSC::GlobalCodeBlock::GlobalCodeBlock):
17         (JSC::FunctionCodeBlock::FunctionCodeBlock):
18         * interpreter/Interpreter.cpp:
19         (JSC::Interpreter::executeCall):
20         (JSC::Interpreter::executeConstruct):
21         (JSC::Interpreter::prepareForRepeatCall):
22         (JSC::Interpreter::execute):
23         (JSC::Interpreter::privateExecute):
24         * interpreter/Interpreter.h:
25         * jit/JIT.cpp:
26         (JSC::JIT::unlinkCallOrConstruct):
27         (JSC::JIT::linkConstruct):
28         * jit/JIT.h:
29         * jit/JITCall.cpp:
30         (JSC::JIT::compileOpCall):
31         (JSC::JIT::compileOpCallSlowCase):
32         * jit/JITOpcodes.cpp:
33         (JSC::JIT::privateCompileCTIMachineTrampolines):
34         * jit/JITOpcodes32_64.cpp:
35         (JSC::JIT::privateCompileCTIMachineTrampolines):
36         * jit/JITPropertyAccess.cpp:
37         (JSC::JIT::emitSlow_op_get_by_val):
38         * jit/JITPropertyAccess32_64.cpp:
39         (JSC::JIT::emitSlow_op_get_by_val):
40         * jit/JITStubs.cpp:
41         (JSC::DEFINE_STUB_FUNCTION):
42         * jit/JITStubs.h:
43         (JSC::JITThunks::ctiVirtualConstructLink):
44         (JSC::JITThunks::ctiVirtualConstruct):
45         (JSC::):
46         * jit/SpecializedThunkJIT.h:
47         (JSC::SpecializedThunkJIT::finalize):
48         * runtime/Arguments.h:
49         (JSC::JSActivation::copyRegisters):
50         * runtime/ArrayPrototype.cpp:
51         (JSC::isNumericCompareFunction):
52         * runtime/Executable.cpp:
53         (JSC::FunctionExecutable::~FunctionExecutable):
54         (JSC::FunctionExecutable::compileForCall):
55         (JSC::FunctionExecutable::compileForConstruct):
56         (JSC::EvalExecutable::generateJITCode):
57         (JSC::ProgramExecutable::generateJITCode):
58         (JSC::FunctionExecutable::generateJITCodeForCall):
59         (JSC::FunctionExecutable::generateJITCodeForConstruct):
60         (JSC::FunctionExecutable::markAggregate):
61         (JSC::FunctionExecutable::reparseExceptionInfo):
62         (JSC::EvalExecutable::reparseExceptionInfo):
63         (JSC::FunctionExecutable::recompile):
64         * runtime/Executable.h:
65         (JSC::ExecutableBase::ExecutableBase):
66         (JSC::ExecutableBase::isHostFunction):
67         (JSC::ExecutableBase::generatedJITCodeForCall):
68         (JSC::ExecutableBase::generatedJITCodeForConstruct):
69         (JSC::NativeExecutable::NativeExecutable):
70         (JSC::EvalExecutable::jitCode):
71         (JSC::ProgramExecutable::jitCode):
72         (JSC::FunctionExecutable::bytecodeForCall):
73         (JSC::FunctionExecutable::isGeneratedForCall):
74         (JSC::FunctionExecutable::generatedBytecodeForCall):
75         (JSC::FunctionExecutable::bytecodeForConstruct):
76         (JSC::FunctionExecutable::isGeneratedForConstruct):
77         (JSC::FunctionExecutable::generatedBytecodeForConstruct):
78         (JSC::FunctionExecutable::symbolTable):
79         (JSC::FunctionExecutable::FunctionExecutable):
80         (JSC::FunctionExecutable::jitCodeForCall):
81         (JSC::FunctionExecutable::jitCodeForConstruct):
82         * runtime/JSActivation.h:
83         (JSC::JSActivation::JSActivationData::JSActivationData):
84         * runtime/JSFunction.cpp:
85         (JSC::JSFunction::~JSFunction):
86         (JSC::JSFunction::call):
87         (JSC::JSFunction::construct):
88         * runtime/JSGlobalData.cpp:
89         (JSC::JSGlobalData::numericCompareFunction):
90
91 2010-05-12  Oliver Hunt  <oliver@apple.com>
92
93         build fix
94
95         <rdar://problem/7977960> REGRESSION (r59282): Tiger PPC build broken
96
97         * runtime/UString.h:
98         (JSC::tryMakeString):
99
100 2010-05-12  Oliver Hunt  <oliver@apple.com>
101
102         Reviewed by Gavin Barraclough.
103
104         <rdar://7969718> Incorrect 32-bit codegen for op_jnlesseq
105         https://bugs.webkit.org/show_bug.cgi?id=39038
106
107         Correct the use of incorrect comparison operators.
108
109         * jit/JITArithmetic32_64.cpp:
110         (JSC::JIT::emit_op_jlesseq):
111         (JSC::JIT::emitBinaryDoubleOp):
112
113 2010-05-12  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
114
115         Reviewed by Eric Seidel.
116
117         JavaScriptCore: fix build when some optimizations are disabled
118         https://bugs.webkit.org/show_bug.cgi?id=38800
119
120         Remove outdated UNUSED_PARAMs when using JIT but with
121         ENABLE_JIT_OPTIMIZE_CALL and ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
122         disabled.
123
124         * jit/JITOpcodes.cpp:
125         * jit/JITOpcodes32_64.cpp:
126
127 2010-05-12  Oliver Hunt  <oliver@apple.com>
128
129         Reviewed by Gavin Barraclough.
130
131         Work around GCC stupidity by either explicitly inlining or by
132         using ALWAYS_INLINE
133
134         * runtime/StringPrototype.cpp:
135         (JSC::stringProtoFuncReplace):
136         * runtime/UString.h:
137         (JSC::UString::~UString):
138         * wtf/RefPtr.h:
139         (WTF::RefPtr::RefPtr):
140         (WTF::RefPtr::~RefPtr):
141         * wtf/text/StringImpl.h:
142         (WebCore::StringImpl::create):
143         (WebCore::StringImpl::tryCreateUninitialized):
144
145 2010-05-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
146
147         Reviewed by Kenneth Rohde Christiansen.
148
149         [Qt] Detect debug mode consistently
150         https://bugs.webkit.org/show_bug.cgi?id=38863
151
152         * JavaScriptCore.pri:
153         * JavaScriptCore.pro:
154         * jsc.pro:
155         * qt/api/QtScript.pro:
156
157 2010-05-12  Peter Varga  <pvarga@inf.u-szeged.hu>
158
159         Reviewed by Gavin Barraclough.
160
161         Remove a direct jump in generatePatternCharacterGreedy() and
162         generatePatternCharacterClassGreedy() functions if quantityCount of the term
163         is unlimited.
164         https://bugs.webkit.org/show_bug.cgi?id=38898
165
166         * yarr/RegexJIT.cpp:
167         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
168         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
169
170 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
171
172         Reviewed by Gavin Barraclough.
173
174         Slight simplification to the calling convention: read RegisterFile::end()
175         from an absolute address, instead of from a pointer to the RegisterFile
176         on the stack.
177         
178         SunSpider reports no change.
179         
180         This should free us to remove the RegisterFile argument from the stack.
181
182         * jit/JIT.cpp:
183         (JSC::JIT::privateCompile):
184
185 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
186
187         Possible Gtk build fix - use ALWAYS_INLINE on functions that were inlined.
188
189         * wtf/text/AtomicString.h:
190         (WebCore::AtomicString::add): Use ALWAYS_INLINE.
191         * wtf/text/WTFString.h:
192         (WebCore::String::length): Ditto.
193         (WebCore::String::isEmpty): Ditto.
194
195 2010-05-11  Anders Carlsson  <andersca@apple.com>
196
197         Reviewed by Sam Weinig.
198
199         Add a compile time assert that sizeof(String) == sizeof(AtomicString).
200
201         * wtf/text/AtomicString.cpp:
202
203 2010-05-11  Anders Carlsson  <andersca@apple.com>
204
205         Reviewed by Mark Rowe.
206
207         https://bugs.webkit.org/show_bug.cgi?id=38961
208         Move some member variables around to reduce class sizes.
209         
210         Make AtomicString no longer inherit from FastAllocBase.
211
212         Since AtomicString's first (and only) member variable, a RefPtr, also inherits from FastAllocBase this
213         was causing the size of AtomicString to contain sizeof(void*) bytes of padding.
214
215         * wtf/text/AtomicString.h:
216
217 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
218
219         Reviewed by Maciej Stachowiak.
220         Patch by Gavin Barraclough.
221         
222         Rest of REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
223         https://bugs.webkit.org/show_bug.cgi?id=38930
224         <rdar://problem/7937188>
225         
226         Inline string functions that are commonly used in WTFString, CString, and AtomicString.
227
228         * JavaScriptCore.exp: Remove exports of inline functions.
229         * wtf/text/AtomicString.cpp:
230         (WebCore::AtomicString::addSlowCase): Rename add to addSlowCase, and inline the fast path
231             of add.
232         * wtf/text/AtomicString.h:
233         (WebCore::AtomicString::add): Inline the fast path of add.
234         * wtf/text/CString.cpp: Inline implementation of data and length in the header.
235         * wtf/text/CString.h:
236         (WTF::CString::data): Inline implementation of data.
237         (WTF::CString::length): Inline implementation of length.
238         * wtf/text/WTFString.cpp: Remove implementations of functions to be inlined.
239         * wtf/text/WTFString.h:
240         (WebCore::String::String): Inline implementation.
241         (WebCore::String::length): Ditto.
242         (WebCore::String::characters): Ditto.
243         (WebCore::String::operator[]): Ditto.
244         (WebCore::String::isEmpty): Ditto.
245
246 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
247
248         Reviewed by Steve Falkenburg and Jon Honeycutt.
249         Patch by Gavin Barraclough.
250         
251         REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
252         https://bugs.webkit.org/show_bug.cgi?id=38930
253         <rdar://problem/7937188>
254         
255         When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
256         on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
257         
258         We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
259         WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
260         on Strings.
261
262         * GNUmakefile.am: Add new file to build system.
263         * JavaScriptCore.gypi: Ditto.
264         * JavaScriptCore.pro: Ditto.
265         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
266             handled in WebCore.
267         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
268             here (the post build step is in JavaScriptCoreCommon.vsprops).
269         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
270             by WebCore into the WebKitOutputDir directory.
271         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
272         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
273         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
274         * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
275         * wtf/text/AtomicString.cpp: Moved code to StringStatics.
276         * wtf/text/StringImpl.cpp: Ditto.
277         * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
278             the rest of the files can be compiled in WebCore.
279         (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
280         (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.
281
282 2010-05-11  Alice Liu  <alice.liu@apple.com>
283
284         Rubber-stamped by Gavin Barraclough.
285
286         Fix build error when enabling debugging block in WebKit win painting code
287
288         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
289
290 2010-05-11  Mark Rowe  <mrowe@apple.com>
291
292         Fix the world.
293
294         In r59162 a change was made to WebCore's FeatureDefines.xcconfig that enabled FILE_READER and FILE_WRITER.
295         The author and reviewer of that patch ignored the carefully-worded warning at the top of that file asking
296         that changes to the file be kept in sync across JavaScriptCore, WebCore and WebKit, as well as being kept
297         in sync with build-webkit.  This led to WebCore and WebKit having different views of Document's vtable
298         and results in crashes in Safari shortly after launch when virtual function calls resulted in the wrong
299         function in WebCore being called.
300
301         We fix this by bringing the FeatureDefines.xcconfig files in to sync.  Based on the ChangeLog message and
302         other changes in r59162 it appears that enabling FILE_WRITER was unintentional so that particular change
303         has been reverted.
304
305         * Configurations/FeatureDefines.xcconfig:
306
307 2010-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
308
309         Unreviewed, rolling out r59171.
310         http://trac.webkit.org/changeset/59171
311         https://bugs.webkit.org/show_bug.cgi?id=38933
312
313         "Broke the world" (Requested by bweinstein on #webkit).
314
315         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
316         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
317         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
318         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
319         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
320         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
321         * JavaScriptCore.xcodeproj/project.pbxproj:
322         * wtf/text/AtomicString.cpp:
323         (WebCore::AtomicString::init):
324         * wtf/text/StringImpl.cpp:
325         (WebCore::StringImpl::empty):
326         * wtf/text/StringStatics.cpp: Removed.
327
328 2010-05-11  Brian Weinstein  <bweinstein@apple.com>
329
330         Reviewed by Steve Falkenburg.
331         Patch by Gavin Barraclough.
332         
333         REGRESSION (r57900-57919): 3% PLT Regression from moving strings into WTF.
334         https://bugs.webkit.org/show_bug.cgi?id=38930
335         <rdar://problem/7937188>
336         
337         When the String classes were moved from WebCore to WTF, it meant that on Windows, all operations
338         on Strings in WebCore had to cross a DLL boundary (from WebKit.dll to JavaScript.dll).
339         
340         We fix this by refactoring some of the WTF string code, so the code in AtomicString, StringImpl, and
341         WTFString can be built by both WebCore and WTF, and we don't need to talk across a DLL to do operations
342         on Strings.
343
344         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Remove string exports, because these are now
345             handled in WebCore.
346         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove the post-build step that was added
347             here (the post build step is in JavaScriptCoreCommon.vsprops).
348         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Copy the three cpp files that need to be compiled
349             by WebCore into the WebKitOutputDir directory.
350         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Add the StringStatics file.
351         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Add the three WTF string cpp files to this project.
352         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Remove the need to link against WTF.lib (since jsc links against JavaScriptCore).
353         * JavaScriptCore.xcodeproj/project.pbxproj: Add the StringStatics file.
354         * wtf/text/AtomicString.cpp: Moved code to StringStatics.
355         * wtf/text/StringImpl.cpp: Ditto.
356         * wtf/text/StringStatics.cpp: Added. Move functions in WTF Strings that define static variables to here, so 
357             the rest of the files can be compiled in WebCore.
358         (WebCore::StringImpl::empty): Moved from StringImpl.cpp to here.
359         (WebCore::AtomicString::init): Moved from AtomicString.cpp to here.
360
361 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
362
363         Fixed test failures seen on SnowLeopard buildbot.
364
365         * runtime/JSString.cpp:
366         (JSC::JSString::replaceCharacter): Don't use size_t and wtf::notFound.
367         Instead, use the individual types and notFound values of the string APIs
368         we're using, since they're not necessarily the same in 64bit.
369
370 2010-05-11  Geoffrey Garen  <ggaren@apple.com>
371
372         Reviewed by Oliver Hunt and Darin Adler.
373
374         Start using ropes in String.prototype.replace.
375         
376         1%-1.5% speedup on SunSpider.
377
378         * runtime/JSString.cpp:
379         (JSC::JSString::resolveRope): Updated for RopeImpl refactoring.
380
381         (JSC::JSString::replaceCharacter): Added a replaceCharacter function, which creates
382         a rope for the resulting replacement.
383
384         * runtime/JSString.h: A few changes here:
385         (JSC::):
386         (JSC::RopeBuilder::RopeIterator::RopeIterator):
387         (JSC::RopeBuilder::RopeIterator::operator++):
388         (JSC::RopeBuilder::RopeIterator::operator*):
389         (JSC::RopeBuilder::RopeIterator::operator!=):
390         (JSC::RopeBuilder::RopeIterator::WorkItem::WorkItem):
391         (JSC::RopeBuilder::RopeIterator::WorkItem::operator!=):
392         (JSC::RopeBuilder::RopeIterator::skipRopes): Created a RopeIterator abstraction.
393         We use this to do a substring find without having to resolve the rope.
394         (We could use this iterator when resolving ropes, too, but resolving
395         ropes backwards is usually more efficient.)
396
397         (JSC::RopeBuilder::JSString): Added constructors for 2 & 3 UStrings.
398
399         (JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
400         (JSC::RopeBuilder::size): Updated for RopeImpl refactoring.
401
402         * runtime/Operations.h: Updated for RopeImpl refactoring.
403         (JSC::jsString): Added jsString functions for 2 & 3 UStrings.
404
405         * runtime/RopeImpl.cpp:
406         (JSC::RopeImpl::derefFibersNonRecursive):
407         * runtime/RopeImpl.h:
408         (JSC::RopeImpl::initializeFiber):
409         (JSC::RopeImpl::size):
410         (JSC::RopeImpl::fibers):
411         (JSC::RopeImpl::deref):
412         (JSC::RopeImpl::RopeImpl): A little refactoring to make this patch easier:
413         Moved statics to the top of the class; put multi-statement functions on
414         multiple lines; renamed "fiberCount" to "size" to match other collections;
415         changed the "fibers" accessor to return the fibers buffer, instead of an
416         item in the buffer, to make iteration easier.
417
418         * runtime/StringPrototype.cpp:
419         (JSC::stringProtoFuncReplace): Don't resolve a rope unless we need to. Do
420         use our new replaceCharacter function if possible. Do use a rope to
421         represent splicing three strings together.
422
423 2010-05-10  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
424
425         Reviewed by Darin Adler.
426
427         [Qt] Disable JIT support for mingw-w64
428         https://bugs.webkit.org/show_bug.cgi?id=38747
429
430         Disale JIT for mingw-w64 as it is reportedly
431         unstable.
432
433         Thanks for Vanboxem Rruben for the investigation.
434
435         * wtf/Platform.h:
436
437 2010-05-09  Fumitoshi Ukai  <ukai@chromium.org>
438
439         Reviewed by Eric Seidel.
440
441         JavaScriptCore/wtf/MD5.h: checksum should take a reference to output.
442         https://bugs.webkit.org/show_bug.cgi?id=38723
443
444         * JavaScriptCore.exp:
445         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
446         * wtf/MD5.cpp:
447         (WTF::expectMD5):
448           Fix for checksum change.
449         (WTF::MD5::checksum):
450           Take a reference to output, instead of returning the result by value, to reduce coping for performance.
451         * wtf/MD5.h:
452
453 2010-05-09  Oliver Hunt  <oliver@apple.com>
454
455         Build fix.
456
457         Fix accidental repeat addition of emit_op_new_regexp
458
459         * jit/JITOpcodes.cpp:
460
461 2010-05-09  Oliver Hunt  <oliver@apple.com>
462
463         Reviewed by Gavin Barraclough.
464
465         REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
466         https://bugs.webkit.org/show_bug.cgi?id=38828
467         <rdar://problem/7961634>
468
469         Rollout r57955
470
471         * bytecode/CodeBlock.cpp:
472         (JSC::regexpToSourceString):
473         (JSC::regexpName):
474         (JSC::CodeBlock::dump):
475         (JSC::CodeBlock::shrinkToFit):
476         * bytecode/CodeBlock.h:
477         (JSC::CodeBlock::addRegExp):
478         (JSC::CodeBlock::regexp):
479         * bytecode/Opcode.h:
480         * bytecompiler/BytecodeGenerator.cpp:
481         (JSC::BytecodeGenerator::addRegExp):
482         (JSC::BytecodeGenerator::emitNewRegExp):
483         * bytecompiler/BytecodeGenerator.h:
484         * bytecompiler/NodesCodegen.cpp:
485         (JSC::RegExpNode::emitBytecode):
486         * interpreter/Interpreter.cpp:
487         (JSC::Interpreter::privateExecute):
488         * jit/JIT.cpp:
489         (JSC::JIT::privateCompileMainPass):
490         * jit/JIT.h:
491         * jit/JITOpcodes.cpp:
492         (JSC::JIT::emit_op_new_regexp):
493         * jit/JITStubs.cpp:
494         (JSC::DEFINE_STUB_FUNCTION):
495         * jit/JITStubs.h:
496         (JSC::):
497
498 2010-05-09  Geoffrey Garen  <ggaren@apple.com>
499
500         Reviewed by Oliver Hunt.
501
502         Reserve a large-ish initial capacity for Lexer::m_buffer16.
503         
504         SunSpider says 0.3% faster.
505         
506         m_buffer16 is used when parsing complex strings -- for example, strings
507         with escape sequences in them. These kinds of strings can be really long,
508         and we want to avoid repeatedly copying as we grow m_buffer16.
509         
510         The net memory cost is quite low, since it's proporitional to source
511         code we already have in memory, and we throw away m_buffer16 right when
512         we're done parsing.
513
514         * parser/Lexer.cpp:
515         (JSC::Lexer::Lexer): No need to reserve initial capacity in our constructor,
516         since setCode will be called before we're asked to lex anything.
517         (JSC::Lexer::setCode): Reserve enough space to lex half the source code
518         as a complex string without having to copy.
519         (JSC::Lexer::clear): No need to reserve initial capacity here either,
520         since setCode will be called before we're asked to lex anything.
521
522 2010-05-09  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
523
524         Reviewed by Eric Seidel.
525
526         [Qt] Remove YARR configuration rules from Qt make system
527         https://bugs.webkit.org/show_bug.cgi?id=38819
528
529         Setting YARR based on JIT seeting is now in Platform.h 
530         for all ports. This patch essentially reverses r49238.
531
532         * JavaScriptCore.pri:
533
534 2010-05-09  Oliver Hunt  <oliver@apple.com>
535
536         Reviewed by Maciej Stachowiak.
537
538         Improve string indexing performance
539         https://bugs.webkit.org/show_bug.cgi?id=38814
540
541         Add an assembly stub to do indexed loads from strings much
542         more cheaply than the current stub dispatch logic.  We can
543         do this because we are able to make guarantees about the
544         register contents when entering the stub so the call overhead
545         is negligible.
546
547         * jit/JIT.h:
548         * jit/JITInlineMethods.h:
549         * jit/JITOpcodes.cpp:
550         * jit/JITPropertyAccess.cpp:
551         (JSC::JIT::stringGetByValStubGenerator):
552         (JSC::JIT::emitSlow_op_get_by_val):
553            Moved from JITOpcodes.cpp to keep the slowcase next to
554            the normal case codegen as we do for everything else.
555         * jit/JITPropertyAccess32_64.cpp:
556         (JSC::JIT::stringGetByValStubGenerator):
557         (JSC::JIT::emitSlow_op_get_by_val):
558         * jit/JSInterfaceJIT.h:
559         (JSC::JSInterfaceJIT::emitFastArithImmToInt):
560
561 2010-05-09  Maciej Stachowiak  <mjs@apple.com>
562
563         Fixed version of: "Optimized o[s] where o is a cell and s is a string"
564         https://bugs.webkit.org/show_bug.cgi?id=38815
565         
566         Fixed the previous patch for this from Geoff Garen.
567         
568         The two problems were a missing exception check and a PropertySlot
569         initialized improperly, leading to crashes and failures in the case
570         of getters accessed with bracket syntax.
571
572     Previous patch:
573
574         Optimized o[s] where o is a cell and s is a string, removing some old
575         code that wasn't really tuned for the JIT.
576         
577         SunSpider says 0.8% faster.
578
579         * jit/JITStubs.cpp:
580         (JSC::DEFINE_STUB_FUNCTION):
581         * runtime/JSCell.h:
582
583 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
584
585         Unreviewed, build fix.
586
587         Fix missing terminating ' character warning
588
589         The warning has been only seen on the Gtk buildbots.
590
591         * wtf/Platform.h:
592
593 2010-05-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
594
595         Reviewed by Gavin Barraclough.
596
597         Refactor YARR and YARR_JIT default rules in Platform.h
598         https://bugs.webkit.org/show_bug.cgi?id=38727
599
600         Turn on YARR and YARR JIT by default of JIT is enabled.
601         Ports can overrule this default decisions as they wish.
602
603         * wtf/Platform.h:
604
605 2010-05-08  Oliver Hunt  <oliver@apple.com>
606
607         Reviewed by Gavin Barraclough.
608
609         Split JSVALUE32_64 code out of JITOpcodes.cpp and into JITOpcodes32_64.cpp
610         https://bugs.webkit.org/show_bug.cgi?id=38808
611
612         * GNUmakefile.am:
613         * JavaScriptCore.gypi:
614         * JavaScriptCore.pro:
615         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
616         * JavaScriptCore.xcodeproj/project.pbxproj:
617         * jit/JITOpcodes.cpp:
618         * jit/JITOpcodes32_64.cpp: Added.
619         (JSC::JIT::privateCompileCTIMachineTrampolines):
620         (JSC::JIT::emit_op_mov):
621         (JSC::JIT::emit_op_end):
622         (JSC::JIT::emit_op_jmp):
623         (JSC::JIT::emit_op_loop_if_lesseq):
624         (JSC::JIT::emitSlow_op_loop_if_lesseq):
625         (JSC::JIT::emit_op_new_object):
626         (JSC::JIT::emit_op_instanceof):
627         (JSC::JIT::emitSlow_op_instanceof):
628         (JSC::JIT::emit_op_new_func):
629         (JSC::JIT::emit_op_get_global_var):
630         (JSC::JIT::emit_op_put_global_var):
631         (JSC::JIT::emit_op_get_scoped_var):
632         (JSC::JIT::emit_op_put_scoped_var):
633         (JSC::JIT::emit_op_tear_off_activation):
634         (JSC::JIT::emit_op_tear_off_arguments):
635         (JSC::JIT::emit_op_new_array):
636         (JSC::JIT::emit_op_resolve):
637         (JSC::JIT::emit_op_to_primitive):
638         (JSC::JIT::emitSlow_op_to_primitive):
639         (JSC::JIT::emit_op_strcat):
640         (JSC::JIT::emit_op_resolve_base):
641         (JSC::JIT::emit_op_resolve_skip):
642         (JSC::JIT::emit_op_resolve_global):
643         (JSC::JIT::emitSlow_op_resolve_global):
644         (JSC::JIT::emit_op_not):
645         (JSC::JIT::emitSlow_op_not):
646         (JSC::JIT::emit_op_jfalse):
647         (JSC::JIT::emitSlow_op_jfalse):
648         (JSC::JIT::emit_op_jtrue):
649         (JSC::JIT::emitSlow_op_jtrue):
650         (JSC::JIT::emit_op_jeq_null):
651         (JSC::JIT::emit_op_jneq_null):
652         (JSC::JIT::emit_op_jneq_ptr):
653         (JSC::JIT::emit_op_jsr):
654         (JSC::JIT::emit_op_sret):
655         (JSC::JIT::emit_op_eq):
656         (JSC::JIT::emitSlow_op_eq):
657         (JSC::JIT::emit_op_neq):
658         (JSC::JIT::emitSlow_op_neq):
659         (JSC::JIT::compileOpStrictEq):
660         (JSC::JIT::emit_op_stricteq):
661         (JSC::JIT::emitSlow_op_stricteq):
662         (JSC::JIT::emit_op_nstricteq):
663         (JSC::JIT::emitSlow_op_nstricteq):
664         (JSC::JIT::emit_op_eq_null):
665         (JSC::JIT::emit_op_neq_null):
666         (JSC::JIT::emit_op_resolve_with_base):
667         (JSC::JIT::emit_op_new_func_exp):
668         (JSC::JIT::emit_op_throw):
669         (JSC::JIT::emit_op_get_pnames):
670         (JSC::JIT::emit_op_next_pname):
671         (JSC::JIT::emit_op_push_scope):
672         (JSC::JIT::emit_op_pop_scope):
673         (JSC::JIT::emit_op_to_jsnumber):
674         (JSC::JIT::emitSlow_op_to_jsnumber):
675         (JSC::JIT::emit_op_push_new_scope):
676         (JSC::JIT::emit_op_catch):
677         (JSC::JIT::emit_op_jmp_scopes):
678         (JSC::JIT::emit_op_switch_imm):
679         (JSC::JIT::emit_op_switch_char):
680         (JSC::JIT::emit_op_switch_string):
681         (JSC::JIT::emit_op_new_error):
682         (JSC::JIT::emit_op_debug):
683         (JSC::JIT::emit_op_enter):
684         (JSC::JIT::emit_op_enter_with_activation):
685         (JSC::JIT::emit_op_create_arguments):
686         (JSC::JIT::emit_op_init_arguments):
687         (JSC::JIT::emit_op_convert_this):
688         (JSC::JIT::emitSlow_op_convert_this):
689         (JSC::JIT::emit_op_profile_will_call):
690         (JSC::JIT::emit_op_profile_did_call):
691
692 2010-05-08  Gabor Loki  <loki@webkit.org>
693
694         Reviewed by Gavin Barraclough.
695
696         Fix halfword loads on ARM
697         https://bugs.webkit.org/show_bug.cgi?id=38741
698
699         The BaseIndex and ImplicitAddress are contain 32bit wide offset, but
700         the load16 functions were working with 8 bit data (encoded in the
701         instruction). If the offset cannot be encoded in an instruction, it
702         should be stored in a temporary register.
703
704         * assembler/ARMAssembler.h:
705         (JSC::ARMAssembler::getOffsetForHalfwordDataTransfer):
706         * assembler/MacroAssemblerARM.h:
707         (JSC::MacroAssemblerARM::load16):
708
709 2010-05-08  Gabor Loki  <loki@webkit.org>
710
711         Reviewed by Gavin Barraclough.
712
713         Fix spanning branch instruction on Cortex-A8 with Thumb-2 JIT
714         https://bugs.webkit.org/show_bug.cgi?id=38280
715
716         If the 32-bit Thumb-2 branch instruction spans two 4KiB regions and
717         the target of the branch falls within the first region it is
718         possible for the processor to incorrectly determine the branch
719         instruction, and it is also possible in some cases for the processor
720         to enter a deadlock state.
721
722         * assembler/ARMv7Assembler.h:
723         (JSC::ARMv7Assembler::linkJumpAbsolute):
724
725 2010-05-08  Adam Barth  <abarth@webkit.org>
726
727         Reviewed by Darin Fisher.
728
729         [WTFURL] Add a buffer for managing the output of the canonicalizer
730         https://bugs.webkit.org/show_bug.cgi?id=38671
731
732         The canonicalizer produces a stream of canonicalized characters, which
733         we will store in a URLBuffer.  URLBuffer is quite similar to Vector,
734         but serves as an abstraction to isolate us from the underlying
735         character storage.  In the case of WebKit, we'll probably implement a
736         subclass of URLBuffer with Vector.  In Chromium, the backing store is a
737         std::string, which avoids an unnecessary memcpy that would be caused by
738         using Vector instead.
739
740         * wtf/url/src/URLBuffer.h: Added.
741         (WTF::URLBuffer::URLBuffer):
742         (WTF::URLBuffer::~URLBuffer):
743         (WTF::URLBuffer::at):
744         (WTF::URLBuffer::set):
745         (WTF::URLBuffer::capacity):
746         (WTF::URLBuffer::length):
747         (WTF::URLBuffer::data):
748         (WTF::URLBuffer::setLength):
749         (WTF::URLBuffer::append):
750         (WTF::URLBuffer::grow):
751
752 2010-05-08  Eric Seidel  <eric@webkit.org>
753
754         Unreviewed, just reverting commit.
755
756         REGRESSION(59000): r59000 contained all sorts of changes it should not have, needs revert.
757         https://bugs.webkit.org/show_bug.cgi?id=38798
758
759         * bytecompiler/BytecodeGenerator.cpp:
760         (JSC::BytecodeGenerator::emitResolve):
761         * jit/JITOpcodes.cpp:
762         (JSC::JIT::emit_op_resolve_global):
763
764 2010-05-04  Jer Noble  <jer.noble@apple.com>
765
766         Reviewed by Maciej Stachowiak
767
768         Safari pegs CPU and drops tons of frames using HTML5 Vimeo player
769         <https://bugs.webkit.org/show_bug.cgi?id=34005>
770         <rdar://problem/7569713>
771         
772         Added cancelCallOnMainThread.  callOnMainThread should always now be paired
773         with cancelCallOnMainThread in situations where the refcon passed to callOnMainThread
774         may be dealloced before the main thread function can be dispatched.  
775         
776         * wtf/MainThread.cpp:
777         (WTF::FunctionWithContext::operator == ): Supports the FunctionWithContextFinder predicate functor.
778         (WTF::FunctionWithContextFinder::FunctionWithContextFinder):  Predicate functor for use with Dequeue::findIf
779         (WTF::FunctionWithContextFinder::operator()):
780         (WTF::cancelCallOnMainThread):
781         * wtf/MainThread.h:
782
783 2010-05-07  Oliver Hunt  <oliver@apple.com>
784
785         Windows build fix.
786
787         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
788
789 2010-05-07  Eric Seidel  <eric@webkit.org>
790
791         Unreviewed, rolling out r58990.
792         http://trac.webkit.org/changeset/58990
793
794         Broke 4 tests on Snow Leopard and Qt.
795
796         * jit/JITStubs.cpp:
797         (JSC::DEFINE_STUB_FUNCTION):
798         * runtime/JSCell.h:
799
800 2010-05-07  Oliver Hunt  <oliver@apple.com>
801
802         Reviewed by Gavin Barraclough.
803
804         Optimize access to the global object from a function that uses eval
805         https://bugs.webkit.org/show_bug.cgi?id=38644
806
807         Fix bug where cross scope access to a global var (vs. property) would
808         be allowed without checking for intervening dynamic scopes.
809
810         * bytecompiler/BytecodeGenerator.cpp:
811         (JSC::BytecodeGenerator::emitResolve):
812
813 2010-05-07  Oliver Hunt  <oliver@apple.com>
814
815         32-bit buildfix.
816
817         Macro expansion I stab at thee!
818
819         * jit/JITOpcodes.cpp:
820         (JSC::JIT::emit_op_resolve_global):
821
822 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
823
824         Reviewed by Darin Adler.
825
826         Optimized o[s] where o is a cell and s is a string, removing some old
827         code that wasn't really tuned for the JIT.
828         
829         SunSpider says 0.8% faster.
830
831         * jit/JITStubs.cpp:
832         (JSC::DEFINE_STUB_FUNCTION):
833         * runtime/JSCell.h:
834
835 2010-05-07  Oliver Hunt  <oliver@apple.com>
836
837         Windows build fix.
838
839         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
840
841 2010-05-07  Oliver Hunt  <oliver@apple.com>
842
843         Reviewed by Geoffrey Garen.
844
845         Optimize access to the global object from a function that uses eval
846         https://bugs.webkit.org/show_bug.cgi?id=38644
847
848         Add op_resolve_global_dynamic, a variant of op_resolve_global that
849         checks each node in the scope chain for dynamically inserted properties
850         and falls back to the normal resolve logic in that case.
851
852         * JavaScriptCore.exp:
853         * bytecode/CodeBlock.cpp:
854         (JSC::isGlobalResolve):
855         (JSC::CodeBlock::printStructures):
856         (JSC::CodeBlock::dump):
857         (JSC::CodeBlock::derefStructures):
858         * bytecode/Opcode.h:
859         * bytecompiler/BytecodeGenerator.cpp:
860         (JSC::BytecodeGenerator::findScopedProperty):
861            Now take an additional reference parameter to used to indicate that
862            there were nodes that may gain dynamic properties
863         (JSC::BytecodeGenerator::emitResolve):
864         (JSC::BytecodeGenerator::emitResolveBase):
865         (JSC::BytecodeGenerator::emitResolveWithBase):
866            deal with additional argument to findScopedProperty
867         * bytecompiler/BytecodeGenerator.h:
868         * bytecompiler/NodesCodegen.cpp:
869         (JSC::FunctionCallResolveNode::emitBytecode):
870         (JSC::PostfixResolveNode::emitBytecode):
871         (JSC::PrefixResolveNode::emitBytecode):
872         (JSC::ReadModifyResolveNode::emitBytecode):
873         (JSC::AssignResolveNode::emitBytecode):
874            These functions use findScopedProperty directly in order to
875            optimise lookup.  They cannot trivially handle any degree of
876            dynamism in the lookup so we just give up in such case.
877         * interpreter/Interpreter.cpp:
878         (JSC::Interpreter::resolveGlobalDynamic):
879         (JSC::Interpreter::execute):
880         (JSC::Interpreter::privateExecute):
881         * interpreter/Interpreter.h:
882         * jit/JIT.cpp:
883         (JSC::JIT::privateCompileMainPass):
884         (JSC::JIT::privateCompileSlowCases):
885         * jit/JIT.h:
886         * jit/JITOpcodes.cpp:
887         (JSC::JIT::emit_op_resolve_global):
888         (JSC::JIT::emit_op_resolve_global_dynamic):
889         (JSC::JIT::emitSlow_op_resolve_global):
890         (JSC::JIT::emitSlow_op_resolve_global_dynamic):
891            Happily resolve_global_dynamic can share the slow case!
892         * jit/JITStubs.h:
893         (JSC::):
894         * runtime/JSActivation.cpp:
895         (JSC::JSActivation::isDynamicScope):
896         * runtime/JSActivation.h:
897         * runtime/JSGlobalObject.cpp:
898         (JSC::JSGlobalObject::isDynamicScope):
899         * runtime/JSGlobalObject.h:
900         * runtime/JSStaticScopeObject.cpp:
901         (JSC::JSStaticScopeObject::isDynamicScope):
902         * runtime/JSStaticScopeObject.h:
903         * runtime/JSVariableObject.h:
904
905 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
906
907         Reviewed by Gavin Barraclough.
908
909         Fixed Sputnik failure seen on buildbot.
910
911         * runtime/NumberPrototype.cpp:
912         (JSC::numberProtoFuncToString): Cast to unsigned before checking magnitude,
913         to efficiently exclude negative numbers, which require two characters
914         instead of one.
915
916 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
917
918         Reviewed by Alexey Proskuryakov.
919         
920         Slightly more effective way to guarantee a compile-time constant, at
921         least on gcc.
922
923         * runtime/NumberPrototype.cpp:
924         (JSC::numberProtoFuncToString): Use pointer notation instead of array
925         notation, so the compiler treats the string and its contents as constant.
926
927 2010-05-07  Adam Barth  <abarth@webkit.org>
928
929         Reviewed by Alexey Proskuryakov.
930
931         [WTFURL] Add core URL parser
932         https://bugs.webkit.org/show_bug.cgi?id=38572
933
934         This patch adds the core of the URL parser.  The URL parser uses a
935         templated notion of a code unit to support different string types.
936         Later we'll add some non-templated APIs with concrete types that
937         clients can use more conveniently.
938
939         The URLParser has a couple calls to ASSERT(), which I've commented out
940         for now.  I'm not 100% sure how to handle the dependency issues there
941         yet, so I've punted on the issue for now.
942
943         Also, there are a number of methods that are declared public in this
944         patch that are only used by the canonicalizer.  My plan is to make
945         those private or protected and make the canonicalizer a friend of the
946         parser.  The details will be in a later patch.
947
948         * wtf/url/src/URLComponent.h:
949         (WTF::URLComponent::fromRange):
950         (WTF::URLComponent::isNonEmpty):
951         (WTF::URLComponent::isEmptyOrInvalid):
952         * wtf/url/src/URLParser.h: Added.
953         (WTF::URLParser::):
954         (WTF::URLParser::isPossibleAuthorityTerminator):
955         (WTF::URLParser::parseAuthority):
956         (WTF::URLParser::extractScheme):
957         (WTF::URLParser::parseAfterScheme):
958         (WTF::URLParser::parseStandardURL):
959         (WTF::URLParser::parsePath):
960         (WTF::URLParser::parsePathURL):
961         (WTF::URLParser::parseMailtoURL):
962         (WTF::URLParser::parsePort):
963         (WTF::URLParser::extractFileName):
964         (WTF::URLParser::extractQueryKeyValue):
965         (WTF::URLParser::isURLSlash):
966         (WTF::URLParser::shouldTrimFromURL):
967         (WTF::URLParser::trimURL):
968         (WTF::URLParser::consecutiveSlashes):
969         (WTF::URLParser::isPortDigit):
970         (WTF::URLParser::nextAuthorityTerminator):
971         (WTF::URLParser::parseUserInfo):
972         (WTF::URLParser::parseServerInfo):
973
974 2010-05-07  Geoffrey Garen  <ggaren@apple.com>
975
976         Reviewed by Oliver Hunt.
977
978         Added a fast path for number-to-character conversion via
979         Number.prototype.toString base 36.
980         
981         0.7% speedup on SunSpider.
982
983         * runtime/NumberPrototype.cpp:
984         (JSC::numberProtoFuncToString): Made radix interpretation a little more
985         efficient by keeping it in int space. Turned "const char" into
986         "static const char" just in case. Added a fast path for base 36
987         conversion of something that will turn into a character.
988
989 2010-05-07  Adam Barth  <abarth@webkit.org>
990
991         Reviewed by Darin Fisher.
992
993         [WTFURL] Add a malloc-backed URLBuffer
994         https://bugs.webkit.org/show_bug.cgi?id=38694
995
996         This patch adds a URLBuffer that uses new/delete to manage the backing
997         store for the buffer.
998
999         * wtf/url/src/RawURLBuffer.h: Added.
1000         (WTF::RawURLBuffer::RawURLBuffer):
1001         (WTF::RawURLBuffer::~RawURLBuffer):
1002         (WTF::RawURLBuffer::resize):
1003
1004 2010-05-06  Fumitoshi Ukai  <ukai@chromium.org>
1005
1006         Reviewed by Alexey Proskuryakov.
1007
1008         JavaScriptCore/wtf/RandomNumber.h should provide using WTF::*
1009         https://bugs.webkit.org/show_bug.cgi?id=38719
1010
1011         * wtf/RandomNumber.h:
1012           Add using directives.
1013
1014 2010-05-06  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1015
1016         Reviewed by Kenneth Rohde Christiansen.
1017
1018         [Qt] Enable YARR_JIT for X86 Mac for QtWebKit
1019         https://bugs.webkit.org/show_bug.cgi?id=38668
1020
1021         * wtf/Platform.h:
1022
1023 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
1024
1025         Reviewed by Geoff Garen.
1026
1027         Bug 38714 - Add result caching for Math.sin
1028
1029         Math.sin is frequently called with the same operand, caching the result should
1030         improve performance.  CachedTranscendentalFunction adds a generic mechanism to
1031         cache results for pure functions with the signature "double func(double)", and
1032         where NaN maps to NaN.
1033
1034         CachedTranscendentalFunction uses a very simple hash function designed to be
1035         fast to execute since we cannot cache the result, and trivial to JIT generate,
1036         should we wish to do so.
1037
1038         * JavaScriptCore.xcodeproj/project.pbxproj:
1039         * runtime/CachedTranscendentalFunction.h: Added.
1040         (JSC::CachedTranscendentalFunction::CachedTranscendentalFunction):
1041         (JSC::CachedTranscendentalFunction::~CachedTranscendentalFunction):
1042         (JSC::CachedTranscendentalFunction::operator()):
1043         (JSC::CachedTranscendentalFunction::initialize):
1044         (JSC::CachedTranscendentalFunction::hash):
1045         * runtime/JSGlobalData.h:
1046         * runtime/MathObject.cpp:
1047         (JSC::mathProtoFuncSin):
1048         * wtf/Platform.h:
1049
1050 2010-05-06  Geoffrey Garen  <ggaren@apple.com>
1051
1052         Windows build fix.
1053
1054         * bytecode/SamplingTool.cpp:
1055         (JSC::SamplingFlags::sample): Use a cast, so Windows will be happy when
1056         this code is enabled.
1057         * wtf/Platform.h: Reverted last change to this file, which seems to have
1058         been accidental.
1059
1060 2010-05-06  Gavin Barraclough  <barraclough@apple.com>
1061
1062         Reviewed by Oliver Hunt.
1063
1064         Add compile switch to make debugger keyword plant breakpoint instructions.
1065
1066         * bytecompiler/BytecodeGenerator.cpp:
1067         (JSC::BytecodeGenerator::emitDebugHook):
1068         * jit/JITOpcodes.cpp:
1069         (JSC::JIT::emit_op_debug):
1070         * wtf/Platform.h:
1071
1072 2010-05-06  Oliver Hunt  <oliver@apple.com>
1073
1074         Build fix
1075
1076         Fix ARM builds
1077
1078         * assembler/MacroAssemblerARM.h:
1079         (JSC::MacroAssemblerARM::load16):
1080         * assembler/MacroAssemblerARMv7.h:
1081         (JSC::MacroAssemblerARMv7::load16):
1082
1083 2010-05-06  Oliver Hunt  <oliver@apple.com>
1084
1085         Reviewed by Geoffrey Garen.
1086
1087         Improve performance of single character string compares
1088         https://bugs.webkit.org/show_bug.cgi?id=38659
1089
1090         Add logic to the jit to identify comparisons to single character string literals
1091         and then just perform the comparison inline, rather than ignoring the evidence
1092         and attempting to perform an integer comparison.
1093
1094         Multiple changes required -- add jnlesseq opcode, add helper function to identify
1095         single character string constants, add a helper to load single character strings.
1096         Then add the 32_64 and normal codepaths to the JIT.
1097
1098         * assembler/MacroAssemblerX86Common.h:
1099         (JSC::MacroAssemblerX86Common::load16):
1100         * bytecode/CodeBlock.cpp:
1101         (JSC::CodeBlock::dump):
1102         * bytecode/Opcode.h:
1103         * bytecompiler/BytecodeGenerator.cpp:
1104         (JSC::BytecodeGenerator::emitJumpIfTrue):
1105         * interpreter/Interpreter.cpp:
1106         (JSC::Interpreter::privateExecute):
1107         * jit/JIT.cpp:
1108         (JSC::JIT::privateCompileMainPass):
1109         (JSC::JIT::privateCompileSlowCases):
1110         * jit/JIT.h:
1111         * jit/JITArithmetic.cpp:
1112         (JSC::JIT::emit_op_jnless):
1113         (JSC::JIT::emitSlow_op_jnless):
1114         (JSC::JIT::emit_op_jless):
1115         (JSC::JIT::emitSlow_op_jless):
1116         (JSC::JIT::emit_op_jlesseq):
1117         (JSC::JIT::emit_op_jnlesseq):
1118         (JSC::JIT::emitSlow_op_jlesseq):
1119         (JSC::JIT::emitSlow_op_jnlesseq):
1120         * jit/JITArithmetic32_64.cpp:
1121         (JSC::JIT::emit_op_jnless):
1122         (JSC::JIT::emitSlow_op_jnless):
1123         (JSC::JIT::emit_op_jless):
1124         (JSC::JIT::emitSlow_op_jless):
1125         (JSC::JIT::emit_op_jlesseq):
1126         (JSC::JIT::emit_op_jnlesseq):
1127         (JSC::JIT::emitSlow_op_jlesseq):
1128         (JSC::JIT::emitSlow_op_jnlesseq):
1129         (JSC::JIT::emitBinaryDoubleOp):
1130         * jit/JITInlineMethods.h:
1131         (JSC::JIT::emitLoadCharacterString):
1132         (JSC::JIT::isOperandConstantImmediateChar):
1133         * jit/JSInterfaceJIT.h:
1134         (JSC::ThunkHelpers::stringImplDataOffset):
1135         (JSC::ThunkHelpers::jsStringLengthOffset):
1136         (JSC::ThunkHelpers::jsStringValueOffset):
1137          Moved from ThunkGenerators to make it possible to share.
1138         * jit/ThunkGenerators.cpp:
1139
1140 2010-05-06  Martin Robinson  <mrobinson@webkit.org>
1141
1142         Reviewed by Gustavo Noronha Silva.
1143
1144         [GTK] Enable DOM clipboard and drag-and-drop access
1145         https://bugs.webkit.org/show_bug.cgi?id=30623
1146
1147         Convert dragging portion of drag-and-drop to use DataObjectGtk.
1148
1149         * wtf/gobject/GRefPtr.h: Add forward declarations for GObject functions.
1150
1151 2010-05-06  Steve Block  <steveblock@google.com>
1152
1153         Reviewed by Eric Seidel.
1154
1155         MAC_JAVA_BRIDGE should be renamed JAVA_BRIDGE
1156         https://bugs.webkit.org/show_bug.cgi?id=38544
1157
1158         * wtf/Platform.h:
1159
1160 2010-05-06  Adam Barth  <abarth@webkit.org>
1161
1162         Reviewed by Maciej Stachowiak.
1163
1164         [WTFURL] Add a class to represent the segments of a URL
1165         https://bugs.webkit.org/show_bug.cgi?id=38566
1166
1167         When paired with a string, this class represents a parsed URL.
1168
1169         * wtf/url/src/URLSegments.cpp: Added.
1170         (WTF::URLSegments::length):
1171         (WTF::URLSegments::charactersBefore):
1172         * wtf/url/src/URLSegments.h: Added.
1173         (WTF::URLSegments::):
1174         (WTF::URLSegments::URLSegments):
1175         * wtf/url/wtfurl.gyp:
1176
1177 2010-05-05  Tony Gentilcore  <tonyg@chromium.org>
1178
1179         Reviewed by Adam Barth.
1180
1181         Adding comment with link to RefPtr documentation.
1182         https://bugs.webkit.org/show_bug.cgi?id=38601
1183
1184         * wtf/RefPtr.h:
1185
1186 2010-05-05  Gavin Barraclough  <barraclough@apple.com>
1187
1188         Reviewed by Darin Adler.
1189
1190         Bug 38604 - workers-gc2 crashing on Qt
1191
1192         This appears to be due to a couple of issues.
1193         (1) When the atomic string table is deleted it does not clear the 'inTable' bit
1194         on AtomicStrings - it implicitly assumes that all AtomicStrings have already
1195         been deleted at this point (otherwise they will crash in their destructor when
1196         they try to remove themselves from the atomic string table).
1197         (2) We don't fix the ordering in which WTF::WTFThreadData and
1198         WebCore::ThreadGlobalData are destructed.
1199
1200         We should make sure that ThreadGlobalData is cleaned up before worker threads
1201         terminate and WTF::WTFThreadData is destroyed, and we should clear the inTable
1202         bit of members on atomic string table destruction.
1203
1204         WTF changes (fix issue 1, above) - ensure inTable property is cleared when the
1205         atomic string table is destroyed (also, rename InTable to IsAtomic, to make it
1206         clear which table we are refering to!)
1207
1208         * wtf/text/AtomicString.cpp:
1209         (WebCore::AtomicStringTable::destroy):
1210         (WebCore::CStringTranslator::translate):
1211         (WebCore::UCharBufferTranslator::translate):
1212         (WebCore::HashAndCharactersTranslator::translate):
1213         (WebCore::AtomicString::add):
1214         * wtf/text/StringImpl.cpp:
1215         (WebCore::StringImpl::~StringImpl):
1216         * wtf/text/StringImpl.h:
1217         (WebCore::StringImpl::isAtomic):
1218         (WebCore::StringImpl::setIsAtomic):
1219         * wtf/text/StringImplBase.h:
1220
1221 2010-05-05  Oliver Hunt  <oliver@apple.com>
1222
1223         Reviewed by Geoffrey Garen.
1224
1225         Make Array.join specialised for actual arrays
1226         https://bugs.webkit.org/show_bug.cgi?id=38592
1227
1228         Bring Array.join in line with the other array methods by specialising for
1229         this === an array.
1230
1231         * runtime/ArrayPrototype.cpp:
1232         (JSC::arrayProtoFuncJoin):
1233
1234 2010-05-04  Yongjun Zhang  <yongjun_zhang@apple.com>
1235
1236         Reviewed by Darin Adler.
1237
1238         WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
1239         https://bugs.webkit.org/show_bug.cgi?id=38535
1240
1241         Don't call asFunction if callee is not a FunctionType to prevent assertion failure
1242         in JSCell::isObject().
1243
1244         * debugger/DebuggerCallFrame.cpp:
1245         (JSC::DebuggerCallFrame::functionName):
1246         (JSC::DebuggerCallFrame::calculatedFunctionName):
1247
1248 2010-05-04  Steve Falkenburg  <sfalken@apple.com>
1249
1250         Remove redundant exports to fix Windows build warnings.
1251
1252         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1253
1254 2010-05-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1255
1256         Reviewed by Holger Freyther.
1257
1258         Fix a memory leak inside the QScriptValue.
1259
1260         QSciptValuePrivate::toString should release all temporary variables.
1261
1262         [Qt] QScriptValue::toString have a memory leak.
1263         https://bugs.webkit.org/show_bug.cgi?id=38112
1264
1265         * qt/api/qscriptvalue_p.h:
1266         (QScriptValuePrivate::toString):
1267
1268 2010-05-04  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1269
1270         Reviewed by Darin Adler.
1271
1272         Does not work on SPARC because of alignment issues
1273         https://bugs.webkit.org/show_bug.cgi?id=38455
1274
1275         Use AllocAlignmentInteger instead of void* on pageheap_memory to
1276         avoid crashing at runtime in some architectures. Investigated by
1277         Mike Hommey <mh@glandium.org>, change suggested by Darin Adler.
1278
1279         * wtf/FastMalloc.cpp:
1280
1281 2010-05-04  Adam Barth  <abarth@webkit.org>
1282
1283         Reviewed by Maciej Stachowiak.
1284
1285         Add first WTFURL file
1286         https://bugs.webkit.org/show_bug.cgi?id=38470
1287
1288         This class represents a component of a URL, such as the scheme or path.
1289         Essentially, the class is an index into a string buffer.
1290
1291         * wtf/url: Added.
1292             - There was some discussion about where to put the URL library.
1293               There are a number of reasonable options, but putting the library
1294               in the WTF directory seems like a reasonable alternative.  This
1295               location will make more sense once WTF is moved out of
1296               JavaScriptCore and into a top-level directory.
1297         * wtf/url/src: Added.
1298             - I've added this extra directory to the usual structure because we
1299               eventually want a "public" folder that defines the public
1300               interface to this library that clients outside of svn.webkit.org
1301               can rely upon, much like the various subfolders of the WebKit
1302               directory often define a public API.
1303         * wtf/url/src/URLComponent.h: Added.
1304             - I've added this somewhat trivial class to get the ball rolling.
1305         (WTF::URLComponent::URLComponent):
1306         (WTF::URLComponent::isValid):
1307         (WTF::URLComponent::isNonempty):
1308         (WTF::URLComponent::reset):
1309         (WTF::URLComponent::operator==):
1310         (WTF::URLComponent::begin):
1311         (WTF::URLComponent::setBegin):
1312         (WTF::URLComponent::length):
1313         (WTF::URLComponent::setLength):
1314         (WTF::URLComponent::end):
1315         * wtf/url/wtfurl.gyp: Added.
1316             - WTFURL will be an independently buildable library, hence the
1317               beginnings of a wtfurl.gyp file.
1318
1319 2010-05-03  Stephanie Lewis  <slewis@apple.com>
1320
1321         Reviewed by Geoff Garen.
1322
1323         https://bugs.webkit.org/show_bug.cgi?id=38368
1324         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 
1325         (return memory quicker).
1326         Instead of returning everything but the smallest spans spread out 
1327         the spans kept over several size lists.
1328
1329         * wtf/FastMalloc.cpp:
1330         (WTF::TCMalloc_PageHeap::scavenge):
1331
1332 2010-05-03  James Robinson  <jamesr@chromium.org>
1333
1334         Reviewed by Eric Seidel.
1335
1336         Clean up a few compiler warnings
1337         https://bugs.webkit.org/show_bug.cgi?id=38073
1338
1339         * wtf/text/StringImpl.cpp:
1340         (WebCore::StringImpl::ascii):
1341
1342 2010-05-03  Gavin Barraclough  <barraclough@apple.com>
1343
1344         Reviewed by NOBODY (reverting previous commit).
1345
1346         Rolling out r58114 - this introduced memory leaks of
1347         AtomicStrings then workers terminated.
1348
1349         * GNUmakefile.am:
1350         * JavaScriptCore.gypi:
1351         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1352         * JavaScriptCore.xcodeproj/project.pbxproj:
1353         * jit/ThunkGenerators.cpp:
1354         (JSC::ThunkHelpers::stringImplDataOffset):
1355         * runtime/Identifier.cpp:
1356         (JSC::IdentifierTable::~IdentifierTable):
1357         (JSC::IdentifierTable::add):
1358         (JSC::IdentifierCStringTranslator::hash):
1359         (JSC::IdentifierCStringTranslator::equal):
1360         (JSC::IdentifierCStringTranslator::translate):
1361         (JSC::Identifier::add):
1362         (JSC::IdentifierUCharBufferTranslator::hash):
1363         (JSC::IdentifierUCharBufferTranslator::equal):
1364         (JSC::IdentifierUCharBufferTranslator::translate):
1365         (JSC::Identifier::addSlowCase):
1366         * runtime/Identifier.h:
1367         * runtime/JSGlobalData.cpp:
1368         (JSC::JSGlobalData::JSGlobalData):
1369         (JSC::JSGlobalData::~JSGlobalData):
1370         * runtime/JSGlobalData.h:
1371         * wtf/WTFThreadData.cpp:
1372         (WTF::WTFThreadData::WTFThreadData):
1373         (WTF::WTFThreadData::~WTFThreadData):
1374         * wtf/WTFThreadData.h:
1375         (JSC::IdentifierTable::remove):
1376         (JSC::IdentifierTable::literalTable):
1377         (WTF::WTFThreadData::atomicStringTable):
1378         * wtf/text/AtomicString.cpp:
1379         (WebCore::AtomicStringTable::create):
1380         (WebCore::AtomicStringTable::table):
1381         (WebCore::AtomicStringTable::destroy):
1382         (WebCore::stringTable):
1383         (WebCore::CStringTranslator::hash):
1384         (WebCore::CStringTranslator::equal):
1385         (WebCore::CStringTranslator::translate):
1386         (WebCore::operator==):
1387         (WebCore::AtomicString::add):
1388         (WebCore::equal):
1389         (WebCore::UCharBufferTranslator::hash):
1390         (WebCore::UCharBufferTranslator::equal):
1391         (WebCore::UCharBufferTranslator::translate):
1392         (WebCore::HashAndCharactersTranslator::hash):
1393         (WebCore::HashAndCharactersTranslator::equal):
1394         (WebCore::HashAndCharactersTranslator::translate):
1395         (WebCore::AtomicString::find):
1396         (WebCore::AtomicString::remove):
1397         * wtf/text/AtomicStringTable.h: Removed.
1398         * wtf/text/StringImpl.cpp:
1399         (WebCore::StringImpl::~StringImpl):
1400         * wtf/text/StringImpl.h:
1401         (WebCore::StringImpl::inTable):
1402         (WebCore::StringImpl::setInTable):
1403         (WebCore::equal):
1404         * wtf/text/StringImplBase.h:
1405         (WTF::StringImplBase::StringImplBase):
1406
1407 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
1408
1409         Reviewed by Kevin Ollivier.
1410
1411         [wx] Implement scheduleDispatchFunctionsOnMainThread for wx port.
1412         https://bugs.webkit.org/show_bug.cgi?id=38480
1413
1414         * wtf/wx/MainThreadWx.cpp:
1415         (wxCallAfter::wxCallAfter):
1416         (wxCallAfter::OnCallback):
1417         (WTF::scheduleDispatchFunctionsOnMainThread):
1418
1419 2010-05-03  Kevin Watters  <kevinwatters@gmail.com>
1420
1421         Reviewed by Kevin Ollivier.
1422
1423         [wx] Build and use Mac's ComplexTextController to support complex text in wx.
1424         https://bugs.webkit.org/show_bug.cgi?id=38482
1425
1426         * wtf/Platform.h:
1427
1428 2010-05-03  Oliver Hunt  <oliver@apple.com>
1429
1430         Reviewed by Maciej Stachowiak.
1431
1432         Interpreter crashes due to incorrect refcounting of cached structures.
1433         https://bugs.webkit.org/show_bug.cgi?id=38491
1434         rdar://problem/7926160
1435
1436         Make sure we ref/deref structures used for cached custom property getters
1437
1438         * bytecode/CodeBlock.cpp:
1439         (JSC::CodeBlock::derefStructures):
1440         (JSC::CodeBlock::refStructures):
1441
1442 2010-05-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1443
1444         Reviewed by Eric Seidel.
1445
1446         [Qt] Enable JIT for QtWebKit on Symbian
1447         https://bugs.webkit.org/show_bug.cgi?id=38339
1448
1449         JIT on Symbian has been stable for quite some time, it
1450         is time to turn it on by default.
1451
1452         * wtf/Platform.h:
1453
1454 2010-04-29  Oliver Hunt  <oliver@apple.com>
1455
1456         Reviewed by Gavin Barraclough.
1457
1458         Add codegen support for unsigned right shift
1459         https://bugs.webkit.org/show_bug.cgi?id=38375
1460
1461         Expose unsigned right shift in the macro assembler, and make use of it
1462         from the jit.  Currently if the result is outside the range 0..2^31-1
1463         we simply fall back to the slow case, even in JSVALUE64 and JSVALUE32_64
1464         where technically we could still return an immediate value.
1465
1466         * assembler/MacroAssemblerARM.h:
1467         (JSC::MacroAssemblerARM::urshift32):
1468         * assembler/MacroAssemblerARMv7.h:
1469         (JSC::MacroAssemblerARMv7::urshift32):
1470         * assembler/MacroAssemblerX86Common.h:
1471         (JSC::MacroAssemblerX86Common::urshift32):
1472         * assembler/X86Assembler.h:
1473         (JSC::X86Assembler::):
1474         (JSC::X86Assembler::shrl_i8r):
1475         (JSC::X86Assembler::shrl_CLr):
1476            Add unsigned right shift to the x86 assembler
1477         * jit/JIT.cpp:
1478         (JSC::JIT::privateCompileMainPass):
1479         (JSC::JIT::privateCompileSlowCases):
1480            op_rshift no longer simply get thrown to a stub function
1481         * jit/JIT.h:
1482         * jit/JITArithmetic.cpp:
1483         (JSC::JIT::emit_op_urshift):
1484         (JSC::JIT::emitSlow_op_urshift):
1485           JSVALUE32 and JSVALUE64 implementation.  Only supports
1486           double lhs in JSVALUE64.
1487         * jit/JITArithmetic32_64.cpp:
1488         (JSC::JIT::emit_op_rshift):
1489         (JSC::JIT::emitSlow_op_rshift):
1490         (JSC::JIT::emit_op_urshift):
1491         (JSC::JIT::emitSlow_op_urshift):
1492           Refactor right shift code to have shared implementation between signed
1493           and unsigned versions.
1494
1495 2010-04-29  Oliver Hunt  <oliver@apple.com>
1496
1497         Reviewed by Gavin Barraclough.
1498
1499         Handle double on righthand side of a right shift
1500         https://bugs.webkit.org/show_bug.cgi?id=38363
1501
1502         In 64-bit we support right shift of a double, and there's no
1503         reason not to in 32-bit either.  This is a 1.1% sunspider
1504         improvement in 32bit.
1505
1506         Given high performance javascript code frequently makes
1507         use of bit operators to perform double->int conversion i'll
1508         follow this patch up with similar patches for bitwise 'and'
1509         and 'or'.
1510
1511         * jit/JITArithmetic32_64.cpp:
1512         (JSC::JIT::emit_op_rshift):
1513         (JSC::JIT::emitSlow_op_rshift):
1514
1515 2010-04-29  Oliver Hunt  <oliver@apple.com>
1516
1517         Reviewed by Geoff Garen.
1518
1519         Hoist JSVALUE32_64 arithmetic implementations into a separate file.
1520
1521         * GNUmakefile.am:
1522         * JavaScriptCore.gypi:
1523         * JavaScriptCore.pro:
1524         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1525         * JavaScriptCore.xcodeproj/project.pbxproj:
1526         * jit/JITArithmetic.cpp:
1527         (JSC::JIT::emitSlow_op_jnless):
1528         (JSC::JIT::emitSlow_op_jless):
1529         (JSC::JIT::emitSlow_op_jnlesseq):
1530         (JSC::JIT::emit_op_mod):
1531         (JSC::JIT::compileBinaryArithOpSlowCase):
1532         (JSC::JIT::emit_op_div):
1533         (JSC::JIT::compileBinaryArithOp):
1534         * jit/JITArithmetic32_64.cpp: Added.
1535         (JSC::JIT::emit_op_negate):
1536         (JSC::JIT::emitSlow_op_negate):
1537         (JSC::JIT::emit_op_jnless):
1538         (JSC::JIT::emitSlow_op_jnless):
1539         (JSC::JIT::emit_op_jless):
1540         (JSC::JIT::emitSlow_op_jless):
1541         (JSC::JIT::emit_op_jnlesseq):
1542         (JSC::JIT::emitSlow_op_jnlesseq):
1543         (JSC::JIT::emit_op_lshift):
1544         (JSC::JIT::emitSlow_op_lshift):
1545         (JSC::JIT::emit_op_rshift):
1546         (JSC::JIT::emitSlow_op_rshift):
1547         (JSC::JIT::emit_op_bitand):
1548         (JSC::JIT::emitSlow_op_bitand):
1549         (JSC::JIT::emit_op_bitor):
1550         (JSC::JIT::emitSlow_op_bitor):
1551         (JSC::JIT::emit_op_bitxor):
1552         (JSC::JIT::emitSlow_op_bitxor):
1553         (JSC::JIT::emit_op_bitnot):
1554         (JSC::JIT::emitSlow_op_bitnot):
1555         (JSC::JIT::emit_op_post_inc):
1556         (JSC::JIT::emitSlow_op_post_inc):
1557         (JSC::JIT::emit_op_post_dec):
1558         (JSC::JIT::emitSlow_op_post_dec):
1559         (JSC::JIT::emit_op_pre_inc):
1560         (JSC::JIT::emitSlow_op_pre_inc):
1561         (JSC::JIT::emit_op_pre_dec):
1562         (JSC::JIT::emitSlow_op_pre_dec):
1563         (JSC::JIT::emit_op_add):
1564         (JSC::JIT::emitAdd32Constant):
1565         (JSC::JIT::emitSlow_op_add):
1566         (JSC::JIT::emit_op_sub):
1567         (JSC::JIT::emitSub32Constant):
1568         (JSC::JIT::emitSlow_op_sub):
1569         (JSC::JIT::emitBinaryDoubleOp):
1570         (JSC::JIT::emit_op_mul):
1571         (JSC::JIT::emitSlow_op_mul):
1572         (JSC::JIT::emit_op_div):
1573         (JSC::JIT::emitSlow_op_div):
1574         (JSC::JIT::emit_op_mod):
1575         (JSC::JIT::emitSlow_op_mod):
1576
1577 2010-04-29  Zoltan Herczeg  <zherczeg@webkit.org>
1578
1579         Reviewed by Oliver Hunt
1580
1581         Add sqrt() instruction support for ARM assembler (using VFP)
1582         https://bugs.webkit.org/show_bug.cgi?id=38312
1583
1584         * assembler/ARMAssembler.h:
1585         (JSC::ARMAssembler::):
1586         (JSC::ARMAssembler::fsqrtd_r):
1587         * assembler/MacroAssemblerARM.h:
1588         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
1589         (JSC::MacroAssemblerARM::sqrtDouble):
1590
1591 2010-04-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1592
1593         Reviewed by Simon Hausmann.
1594
1595         [Qt] Refactor qtscriptglobal.h
1596         https://bugs.webkit.org/show_bug.cgi?id=37953
1597
1598         Use the same pattern in qtscriptglobal.h as in 
1599         qwebkitglobal.h without checking for specific OSs.
1600
1601         * qt/api/qtscriptglobal.h:
1602
1603 2010-04-29  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
1604
1605         Reviewed by Simon Hausmann.
1606
1607         Small cleanup.
1608
1609         QScriptValuePrivate constructor shouldn't take QScriptEngine pointer
1610         as a parameter, because it breaks a private / public separation rule.
1611         QScriptEnginePrivate::get(QScriptEngine*) should return
1612         a QScriptEnginePrivate pointer instead of a QScriptEnginePtr, it simplifies
1613         implementation.
1614
1615         [Qt] QScriptValuePrivate class needs some cleanup.
1616         https://bugs.webkit.org/show_bug.cgi?id=37729
1617
1618         * qt/api/qscriptengine_p.h:
1619         (QScriptEnginePrivate::get):
1620         * qt/api/qscriptvalue.cpp:
1621         (QScriptValue::QScriptValue):
1622         * qt/api/qscriptvalue_p.h:
1623         (QScriptValuePrivate::QScriptValuePrivate):
1624
1625 2010-04-29  Kwang Yul Seo  <skyul@company100.net>
1626
1627         Reviewed by Simon Hausmann.
1628
1629         [WINCE] Export g_stackBase with JS_EXPORTDATA
1630         https://bugs.webkit.org/show_bug.cgi?id=37437
1631
1632         Export g_stackBase with JS_EXPORTDATA as it is used by SharedTimerWince.cpp.
1633
1634         * runtime/Collector.cpp:
1635
1636 2010-04-28  Oliver Hunt  <oliver@apple.com>
1637
1638         Do an unordered compare so that we don't treat NaN incorrectly.
1639
1640         RS=Gavin Barraclough
1641
1642         * jit/ThunkGenerators.cpp:
1643         (JSC::powThunkGenerator):
1644
1645 2010-04-28  Oliver Hunt  <oliver@apple.com>
1646
1647         Reviewed by Gavin Barraclough.
1648
1649         Add fast paths for Math.pow and Math.sqrt
1650         https://bugs.webkit.org/show_bug.cgi?id=38294
1651
1652         Add specialized thunks for Math.pow and Math.sqrt.
1653         This requires adding a sqrtDouble function to the MacroAssembler
1654         and sqrtsd to the x86 assembler.
1655
1656         Math.pow is slightly more complicated, in that we have
1657         to implement exponentiation ourselves rather than relying
1658         on hardware support.  The inline exponentiation is restricted
1659         to positive integer exponents on a numeric base.  Exponentiation
1660         is finally performed through the "Exponentiation by Squaring"
1661         algorithm.
1662
1663         * assembler/AbstractMacroAssembler.h:
1664         (JSC::AbstractMacroAssembler::ImmPtr::ImmPtr):
1665         * assembler/MacroAssemblerARM.h:
1666         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
1667         (JSC::MacroAssemblerARM::loadDouble):
1668         (JSC::MacroAssemblerARM::sqrtDouble):
1669         * assembler/MacroAssemblerARMv7.h:
1670         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
1671         (JSC::MacroAssemblerARMv7::sqrtDouble):
1672         * assembler/MacroAssemblerX86.h:
1673         (JSC::MacroAssemblerX86::loadDouble):
1674         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
1675         * assembler/MacroAssemblerX86Common.h:
1676         (JSC::MacroAssemblerX86Common::sqrtDouble):
1677         * assembler/MacroAssemblerX86_64.h:
1678         (JSC::MacroAssemblerX86_64::loadDouble):
1679         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
1680         * assembler/X86Assembler.h:
1681         (JSC::X86Assembler::):
1682         (JSC::X86Assembler::movsd_mr):
1683         (JSC::X86Assembler::sqrtsd_rr):
1684         (JSC::X86Assembler::X86InstructionFormatter::twoByteOp):
1685         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
1686         * create_hash_table:
1687         * jit/JIT.h:
1688         * jit/JITInlineMethods.h:
1689         * jit/JITOpcodes.cpp:
1690         * jit/JITStubs.h:
1691         (JSC::JITThunks::ctiNativeCallThunk):
1692         * jit/JSInterfaceJIT.h:
1693         (JSC::JSInterfaceJIT::emitLoadDouble):
1694         (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber):
1695         (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber):
1696         (JSC::JSInterfaceJIT::emitLoadInt32):
1697         * jit/SpecializedThunkJIT.h:
1698         (JSC::SpecializedThunkJIT::loadDoubleArgument):
1699         (JSC::SpecializedThunkJIT::loadInt32Argument):
1700         (JSC::SpecializedThunkJIT::returnJSValue):
1701         (JSC::SpecializedThunkJIT::returnDouble):
1702         (JSC::SpecializedThunkJIT::finalize):
1703         * jit/ThunkGenerators.cpp:
1704         (JSC::sqrtThunkGenerator):
1705         (JSC::powThunkGenerator):
1706         * jit/ThunkGenerators.h:
1707         * runtime/Executable.h:
1708         (JSC::NativeExecutable::NativeExecutable):
1709         * runtime/JSFunction.cpp:
1710         (JSC::JSFunction::JSFunction):
1711
1712 2010-04-28  Mike Thole  <mthole@apple.com>
1713
1714         Reviewed by Mark Rowe.
1715
1716         Reenable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK now that an
1717         exports file for it has been added.
1718
1719         * wtf/Platform.h:
1720
1721 2010-04-28  Mike Thole  <mthole@apple.com>
1722
1723         Build fix, not reviewed.
1724
1725         * wtf/Platform.h:
1726         Disable WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK until an exports file is created.
1727
1728 2010-04-28  Mike Thole  <mthole@apple.com>
1729
1730         Reviewed by David Kilzer.
1731
1732         Add canAuthenticateAgainstProtectionSpace() to frame loader so that a protection space 
1733         can be inspected before attempting to authenticate against it
1734         https://bugs.webkit.org/show_bug.cgi?id=38271
1735
1736         * wtf/Platform.h: Add WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK define.
1737
1738 2010-04-28  Darin Adler  <darin@apple.com>
1739
1740         Reviewed by Sam Weinig.
1741
1742         Don't use CFAbsoluteTimeGetCurrent on Mac OS X, since it's just a cover
1743         for gettimeofday anyway.
1744
1745         * wtf/CurrentTime.cpp:
1746         (WTF::currentTime): Remove the CF version of this. Change the "other POSIX"
1747         version to pass 0 for the time zone instead of ignoring a return value.
1748         Also get rid of unneeded type casts, since operations involving both
1749         integers and doubles are always evaluated as doubles in C without explicit
1750         type casting.
1751
1752 2010-04-28  Darin Fisher  <darin@chromium.org>
1753
1754         Reviewed by David Levin.
1755
1756         [Chromium] callOnMainThread should equate to MessageLoop::PostTask
1757         https://bugs.webkit.org/show_bug.cgi?id=38276
1758
1759         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1760         * wtf/MainThread.cpp:
1761         * wtf/chromium/ChromiumThreading.h:
1762         * wtf/chromium/MainThreadChromium.cpp:
1763         (WTF::initializeMainThread):
1764         (WTF::callOnMainThread):
1765         (WTF::callOnMainThreadAndWait):
1766         (WTF::setMainThreadCallbacksPaused):
1767         (WTF::isMainThread):
1768
1769 2010-04-28  Simon Hausmann  <simon.hausmann@nokia.com>, Kent Hansen <kent.hansen@nokia.com>
1770
1771         Reviewed by Darin Adler.
1772
1773         JSC's currentThreadStackBase is not reentrant on some platforms
1774         https://bugs.webkit.org/show_bug.cgi?id=37195
1775
1776         This function needs to be reentrant to avoid memory corruption on platforms where
1777         the implementation uses global variables.
1778
1779         This patch adds a mutex lock where necessary and makes the Symbian implementation
1780         reentrant.
1781
1782         * runtime/Collector.cpp:
1783         (JSC::currentThreadStackBaseMutex):
1784         (JSC::currentThreadStackBase):
1785
1786 2010-04-28  Thiago Macieira <thiago.macieira@nokia.com>
1787
1788         Reviewed by Simon Hausmann.
1789
1790         Fix compilation with gcc 3.4.
1791
1792         AtomicStringImpl.h:29: error: base `WebCore::StringImpl' with only
1793         non-default constructor in class without a constructor
1794
1795         * wtf/text/AtomicStringImpl.h:
1796         (WebCore::AtomicStringImpl::AtomicStringImpl): Provide a default constructor.
1797         * wtf/text/StringImpl.h: Allow AtomicStringImpl to call a StringImpl constructor through a friend declaration.
1798
1799 2010-04-27  Stephanie Lewis  <slewis@apple.com>
1800
1801         Fix Tiger build.
1802
1803         * wtf/FastMalloc.cpp:
1804         (WTF::TCMalloc_PageHeap::Carve):
1805
1806 2010-04-26  Stephanie Lewis  <slewis@apple.com>
1807
1808         Reviewed by Geoff Garen.
1809
1810         https://bugs.webkit.org/show_bug.cgi?id=38154 FastMalloc calls madvise too often.
1811         <rdar://problem/7834433> REGRESSSION: 1.5% PLT regression due to 56028 (return memory quicker).  
1812         To save on madvise calls when recommitting memory recommit the entire span and then carve it
1813         instead of carving the span up and only committing the part that will be used immediately.
1814
1815         * wtf/FastMalloc.cpp:
1816         (WTF::TCMalloc_PageHeap::New):
1817         (WTF::TCMalloc_PageHeap::AllocLarge):
1818         (WTF::TCMalloc_PageHeap::Carve):
1819
1820 2010-04-26  Oliver Hunt  <oliver@apple.com>
1821
1822         Reviewed by Maciej Stachowiak.
1823
1824         Add specialized thunks for a char code related string functions
1825         https://bugs.webkit.org/show_bug.cgi?id=38177
1826
1827         This is a simple extension to my prior patch.  Basically hoist the
1828         existing character loading logic from the charCodeAt thunk and into
1829         a helper function, then add a helper to load strings from the small
1830         string cache.  This allows trivial implementations of fromCharCode
1831         and charAt. 
1832
1833         * create_hash_table:
1834         * jit/SpecializedThunkJIT.h:
1835         (JSC::SpecializedThunkJIT::returnJSCell):
1836         (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
1837         * jit/ThunkGenerators.cpp:
1838         (JSC::stringCharLoad):
1839         (JSC::charToString):
1840         (JSC::charCodeAtThunkGenerator):
1841         (JSC::charAtThunkGenerator):
1842         (JSC::fromCharCodeThunkGenerator):
1843         * jit/ThunkGenerators.h:
1844         * runtime/SmallStrings.h:
1845         (JSC::SmallStrings::singleCharacterStrings):
1846         * runtime/StringConstructor.cpp:
1847         (JSC::StringConstructor::StringConstructor):
1848
1849 2010-04-27  Thomas Zander <t.zander@nokia.com>
1850
1851         Reviewed by Simon Hausmann.
1852
1853         [Qt] Fix the build on Symbian on Linux using the Makefile based mkspec
1854
1855         * JavaScriptCore.pri: It is necessary to specify the library search path
1856         when linking against JavaScriptCore.
1857
1858 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1859
1860         Reviewed by Simon Hausmann.
1861
1862         Compile fix for Visual Studio 2010
1863         https://bugs.webkit.org/show_bug.cgi?id=37867
1864
1865         Patch by Prasanth Ullattil <prasanth.ullattil@nokia.com>
1866
1867         * runtime/Structure.cpp:
1868         (JSC::Structure::transitionTableAdd):
1869         * wtf/MathExtras.h:
1870         * wtf/Platform.h:
1871
1872 2010-04-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1873
1874         Reviewed by Simon Hausmann.
1875
1876         Rename COMPILER(MSVC7) to COMPILER(MSVC7_OR_LOWER)
1877
1878         * config.h:
1879         (JSC::Structure::transitionTableAdd):
1880         * wtf/Assertions.h:
1881         * wtf/Atomics.h:
1882         * wtf/CurrentTime.h:
1883         (WTF::getLocalTime):
1884         * wtf/Platform.h:
1885         * wtf/StaticConstructors.h:
1886         * wtf/StringExtras.h:
1887         * wtf/Vector.h:
1888         (WTF::::append):
1889
1890 2010-04-15  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1891
1892         Reviewed by Tor Arne Vestbø.
1893
1894         [Qt] Fix Mac build break.
1895
1896         https://bugs.webkit.org/show_bug.cgi?id=37867
1897         - Make sure JavaScriptCore's debug_and_release config follows that
1898           of WebCore.
1899         - Use different name for JavaScriptCore target in debug and release
1900           since they might be written in the same path at the same time on
1901           parallel builds
1902         - Consolidate the DESTDIR determination logic in JavaScriptCore.pri
1903
1904         * JavaScriptCore.pri:
1905         * JavaScriptCore.pro:
1906
1907 2010-04-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1908
1909         Reviewed by Kenneth Rohde Christiansen.
1910
1911         [Qt] Make sure WebKit is not compiled using C++0x.
1912         https://bugs.webkit.org/show_bug.cgi?id=37867
1913
1914         As the rest of Qt compiles in the C++0x mode, people might start
1915         compiling it in this mode. WebKit don't support this yet.
1916
1917         Patch by Thiago Macieira <thiago.macieira@nokia.com>
1918
1919         * JavaScriptCore.pro:
1920
1921 2010-04-26  Oliver Hunt  <oliver@apple.com>
1922
1923         Fix windows
1924
1925         * jit/SpecializedThunkJIT.h:
1926         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
1927
1928 2010-04-26  Oliver Hunt  <oliver@apple.com>
1929
1930         Reviewed by Gavin Barraclough.
1931
1932         Need to support more efficient dispatch of lightweight builtins
1933         https://bugs.webkit.org/show_bug.cgi?id=38155
1934
1935         The problem with calling lightweight builtins is that marshalling
1936         the call from the nitro calling convention to the system calling
1937         convention is very expensive relative to the cost of the actually
1938         evaluating the function.  To work around this problem this patch
1939         adds the ability to define a custom thunk for a builtin.
1940
1941         This allows us to use high performance custom implementations of
1942         the common and sensible versions of simple builtins.  This patch
1943         includes a simple (use of which is currently hardcoded) thunk for
1944         charCodeAt.
1945
1946         This adds a JSInterfaceJIT subclass called SpecializedThunkJIT
1947         that has helper functions to remove (or at least reduce) the need
1948         to have separate thunk implementations for each JSValue encoding.
1949
1950         * GNUmakefile.am:
1951         * JavaScriptCore.pro:
1952         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1953         * JavaScriptCore.xcodeproj/project.pbxproj:
1954           Many project file updates
1955
1956         * create_hash_table:
1957           Add thunk generation callbacks to the hash tables, currently
1958           we hardcode the script to only support charCodeAt
1959
1960         * jit/JITStubCall.h:
1961         * jit/JITStubs.cpp:
1962         (JSC::JITThunks::~JITThunks):
1963         (JSC::JITThunks::specializedThunk):
1964         * jit/JITStubs.h:
1965         * jit/SpecializedThunkJIT.h: Added.
1966         (JSC::SpecializedThunkJIT::SpecializedThunkJIT):
1967         (JSC::SpecializedThunkJIT::loadCellArgument):
1968         (JSC::SpecializedThunkJIT::loadJSStringArgument):
1969         (JSC::SpecializedThunkJIT::loadInt32Argument):
1970         (JSC::SpecializedThunkJIT::appendFailure):
1971         (JSC::SpecializedThunkJIT::returnInt32):
1972         (JSC::SpecializedThunkJIT::finalize):
1973         (JSC::SpecializedThunkJIT::argumentToVirtualRegister):
1974         (JSC::SpecializedThunkJIT::tagReturnAsInt32):
1975         * jit/ThunkGenerators.cpp: Added.
1976         (JSC::ThunkHelpers::stringImplDataOffset):
1977         (JSC::ThunkHelpers::jsStringLengthOffset):
1978         (JSC::ThunkHelpers::jsStringValueOffset):
1979         (JSC::charCodeAtThunkGenerator):
1980         * jit/ThunkGenerators.h: Added.
1981         * runtime/Executable.h:
1982         (JSC::NativeExecutable::NativeExecutable):
1983         * runtime/JSFunction.cpp:
1984         (JSC::JSFunction::JSFunction):
1985         * runtime/JSFunction.h:
1986         * runtime/JSGlobalData.h:
1987         (JSC::JSGlobalData::getThunk):
1988         * runtime/JSString.h:
1989         (JSC::):
1990         * runtime/JSValue.h:
1991           Protect some of the JSVALUE32 and JSVALUE32_64 only constants
1992           and function behind appropriate USE() guards to make it harder
1993           to use the wrong flags for the target build.
1994         * runtime/Lookup.cpp:
1995         (JSC::HashTable::createTable):
1996         (JSC::setUpStaticFunctionSlot):
1997         * runtime/Lookup.h:
1998         (JSC::HashEntry::initialize):
1999         (JSC::HashEntry::generator):
2000         (JSC::HashEntry::):
2001           Make the lookup tables use a specialized thunkGenerator
2002           if present
2003         * wtf/text/StringImpl.h:
2004
2005 2010-04-26  Oliver Hunt  <oliver@apple.com>
2006
2007         Build fix
2008
2009         * runtime/JSImmediate.h:
2010         * runtime/JSValue.h:
2011
2012 2010-04-26  Oliver Hunt  <oliver@apple.com>
2013
2014         Reviewed by Gavin Barraclough.
2015
2016         Factor some basic JS interface logic out of JIT and into a superclass
2017         https://bugs.webkit.org/show_bug.cgi?id=38163
2018
2019         Create JSInterfaceJIT to hold some common low level functions for
2020         interacting with the JS RegisterFile.  Doing this separately from
2021         https://bugs.webkit.org/show_bug.cgi?id=38155 to ease reviewing.
2022
2023         * JavaScriptCore.xcodeproj/project.pbxproj:
2024         * jit/JIT.h:
2025         * jit/JITInlineMethods.h:
2026         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
2027         * jit/JSInterfaceJIT.h: Added.
2028         (JSC::JSInterfaceJIT::emitLoadJSCell):
2029         (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
2030         (JSC::JSInterfaceJIT::emitLoadInt32):
2031         (JSC::JSInterfaceJIT::tagFor):
2032         (JSC::JSInterfaceJIT::payloadFor):
2033         (JSC::JSInterfaceJIT::addressFor):
2034
2035 2010-04-26  Sam Weinig  <sam@webkit.org>
2036
2037         Fix Tiger build.
2038
2039         * wtf/mac/MainThreadMac.mm:
2040         (WTF::isMainThread):
2041
2042 2010-04-26  Geoffrey Garen  <ggaren@apple.com>
2043
2044         Reviewed by Sam Weinig.
2045
2046         <rdar://problem/7766413>
2047         
2048         Fixed a crash seen when using the JavaScriptCore API with WebKit.
2049         
2050         No layout test because DumpRenderTree doesn't use the JavaScriptCore API
2051         in this way.
2052
2053         * interpreter/RegisterFile.cpp:
2054         (JSC::RegisterFile::setGlobalObject):
2055         (JSC::RegisterFile::clearGlobalObject):
2056         (JSC::RegisterFile::globalObject):
2057         * interpreter/RegisterFile.h:
2058         (JSC::RegisterFile::RegisterFile): Use WeakGCPtr for managing m_globalObject,
2059         since it's a weak pointer. (We never noticed this error before because,
2060         in WebKit, global objects always have a self-reference in a global variable,
2061         so marking the register file's global variables would keep m_globalObject
2062         alive. In the JavaScriptCore API, you can allocate a global object with
2063         no self-reference.)
2064
2065         * runtime/JSActivation.h: Removed unneeded #include.
2066
2067         * runtime/JSGlobalObject.cpp:
2068         (JSC::JSGlobalObject::~JSGlobalObject): Don't use ==, since a weak
2069         pointer is 0 when the object it points to runs its destructor.
2070
2071         * runtime/WeakGCPtr.h:
2072         (JSC::WeakGCPtr::clear): Changed to return a bool indicating whether the
2073         clear actually happened.
2074         (JSC::WeakGCPtr::assign): Changed to forbid assignment of 0 as a shorthand
2075         for calling clear(). A client should never clear by assigning 0, since
2076         clear() should be conditional on whether the object doing the clearing
2077         is still pointed to by the weak pointer. (Otherwise, a zombie object might
2078         clear a pointer to a new, valid object.)
2079
2080 2010-04-25  Sam Weinig  <sam@webkit.org>
2081
2082         Reviewed by Maciej Stachowiak.
2083
2084         Fix for https://bugs.webkit.org/show_bug.cgi?id=38097
2085         Disentangle initializing the main thread from initializing threading
2086
2087         This is the first step in getting rid of the WEB_THREAD #define and
2088         paving the way to allowing mac both WebKit and WebKit2 to use the same
2089         WebCore.
2090
2091         * JavaScriptCore.exp: Export initializeMainThread and initializeMainThreadToProcessMainThread.
2092         * JavaScriptCore.xcodeproj/project.pbxproj: Sort files.
2093
2094         * wtf/MainThread.cpp:
2095         (WTF::mainThreadInitializationMutex):
2096         (WTF::mainThreadFunctionQueueMutex):
2097         (WTF::initializeMainThread):
2098         (WTF::deprecatedInitializeMainThread):
2099         * wtf/MainThread.h:
2100         Added Mac only initializeMainThreadToProcessMainThread which sets up callOnMainThread
2101         and isMainThead calls to assume that WebCore's main thread is also the
2102         process's main thread. Since it is possible that both initializeMainThread
2103         and initializeMainThreadToProcessMainThread could be called, the first one called
2104         wins (either will work).
2105
2106         * wtf/Threading.h: Moved to top of file.
2107
2108         * wtf/ThreadingPthreads.cpp:
2109         (WTF::initializeThreading): Remove call to initializeMainThread.
2110         * wtf/ThreadingWin.cpp:
2111         (WTF::initializeThreading): Ditto.
2112         * wtf/gtk/ThreadingGtk.cpp:
2113         (WTF::initializeThreading): Ditto.
2114
2115         * wtf/mac/MainThreadMac.mm:
2116         (WTF::initializeMainThreadPlatform):
2117         (WTF::initializeMainThreadToProcessMainThread):
2118         (WTF::scheduleDispatchFunctionsOnMainThread):
2119         (WTF::isMainThread):
2120         Add runtime switch between the old behavior of using the system's main
2121         thread and a stored pointer to the main thread. Tiger always uses the
2122         system's main thread.
2123
2124         * wtf/qt/ThreadingQt.cpp:
2125         (WTF::initializeThreading): Remove call to initializeMainThread.
2126         * wtf/win/MainThreadWin.cpp:
2127         (WTF::initializeMainThreadPlatform): Add call to initializeCurrentThreadInternal
2128         removed from initializeThreading.
2129
2130 2010-04-26  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2131
2132         Reviewed by Kenneth Rohde Christiansen.
2133
2134         Fix a memory leak in the QScriptString.
2135
2136         QScriptStringPrivate's constructor shouldn't call JSStringRetain as
2137         QScriptConverter implicitly pass a JSStringRef ownership.
2138
2139         [Qt] QScriptStringPrivate c'tor problem
2140         https://bugs.webkit.org/show_bug.cgi?id=38110
2141
2142         * qt/api/qscriptstring_p.h:
2143         (QScriptStringPrivate::QScriptStringPrivate):
2144
2145 2010-04-24  Darin Adler  <darin@apple.com>
2146
2147         Reviewed by Dan Bernstein.
2148
2149         REGRESSION (r56560): Crash in parseFloat if passed invalid UTF-16 data
2150         https://bugs.webkit.org/show_bug.cgi?id=38083
2151         rdar://problem/7901044
2152
2153         Tests: fast/js/ToNumber.html
2154                fast/js/parseFloat.html
2155
2156         * runtime/JSGlobalObjectFunctions.cpp:
2157         (JSC::parseInt): Added a FIXME comment about a problem I noticed.
2158         (JSC::parseFloat): Added a FIXME comment about a problem I noticed;
2159         covered by test cases in the test I added.
2160         * runtime/UString.cpp:
2161         (JSC::UString::toDouble): Added FIXME comments about two problems I
2162         noticed; covered by test cases in the tests I added. Added a return
2163         statement so we don't crash when illegal UTF-16 sequences are present.
2164
2165 2010-04-24  Anton Muhin  <antonm@chromium.org>
2166
2167         Reviewed by Darin Adler.
2168
2169         Allow to construct HashTraits<WebCore::QualifiedName>::constructDeletedValue
2170
2171         Former implementation attempted to use AtomicString(HashTableDeletedValue)
2172         however those values cannot be used that way: one cannot construct
2173         QualifiedNameImpl out of such AtomicString as we'll try to lookup this string
2174         in the table, for example.
2175         https://bugs.webkit.org/show_bug.cgi?id=37722
2176
2177         * wtf/RefPtr.h: expose hash table deleted value
2178
2179 2010-04-23  Sam Weinig  <sam@webkit.org>
2180
2181         Reviewed by David Levin.
2182
2183         Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
2184         Split up Threading.h
2185
2186         Move bits for of Threading.h into 3 new files.
2187         - Atomics.h for atomic operations.
2188         - ThreadSafeShared.h for the ThreadSafeShared class.
2189         - ThreadingPrimitives.h for the primitives and platform types.
2190
2191         Basic threading operations (creation, etc.) remain in Threading.h.
2192
2193         * GNUmakefile.am:
2194         * JavaScriptCore.gypi:
2195         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2196         * JavaScriptCore.xcodeproj/project.pbxproj:
2197         * wtf/Atomics.h: Copied from wtf/Threading.h.
2198         * wtf/ThreadSafeShared.h: Copied from wtf/Threading.h.
2199         * wtf/Threading.h:
2200         * wtf/ThreadingPrimitives.h: Copied from wtf/Threading.h.
2201
2202 2010-04-23  Sam Weinig  <sam@webkit.org>
2203
2204         Fix Qt build.
2205
2206         * wtf/qt/MainThreadQt.cpp: #include <QThread>
2207
2208 2010-04-22  Sam Weinig  <sam@webkit.org>
2209
2210         Reviewed by Anders Carlsson.
2211
2212         Fix for https://bugs.webkit.org/show_bug.cgi?id=38022
2213         Move isMainThread predicate function to MainThread.h
2214
2215         * wtf/MainThread.cpp:
2216         (WTF::initializeMainThread):
2217         (WTF::isMainThread):
2218         * wtf/MainThread.h:
2219         * wtf/Threading.h:
2220         * wtf/ThreadingPthreads.cpp:
2221         (WTF::initializeThreading):
2222         * wtf/ThreadingWin.cpp:
2223         (WTF::initializeThreading):
2224         * wtf/gtk/ThreadingGtk.cpp:
2225         (WTF::initializeThreading):
2226         * wtf/mac/MainThreadMac.mm:
2227         (WTF::initializeMainThreadPlatform):
2228         (WTF::isMainThread):
2229         * wtf/qt/MainThreadQt.cpp:
2230         (WTF::isMainThread):
2231         * wtf/qt/ThreadingQt.cpp:
2232         (WTF::initializeThreading):
2233         * wtf/text/AtomicString.cpp:
2234
2235 2010-04-23  Gabor Rapcsanyi  <rgabor@inf.u-szeged.hu>
2236
2237         Reviewed by Laszlo Gombos.
2238
2239         Add RVCT support for Linux
2240
2241         Developed in cooperation with Gabor Loki.
2242
2243         * API/JSStringRef.h:
2244         * jit/ExecutableAllocator.h:
2245         * jit/ExecutableAllocatorPosix.cpp:
2246         (JSC::ExecutableAllocator::cacheFlush):
2247         * jit/JITStubs.cpp:
2248         * wtf/MathExtras.h:
2249         * wtf/unicode/qt4/UnicodeQt4.h:
2250
2251 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
2252
2253         Reviewed by Laszlo Gombos.
2254
2255         [WIN] Move OwnPtrWin.cpp into platform specific folder.
2256         https://bugs.webkit.org/show_bug.cgi?id=38042
2257
2258         * JavaScriptCore.gypi:
2259         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2260         * wtf/OwnPtrWin.cpp: Removed.
2261         * wtf/win/OwnPtrWin.cpp: Copied from JavaScriptCore/wtf/OwnPtrWin.cpp.
2262
2263 2010-04-23  Patrick Gansterer  <paroga@paroga.com>
2264
2265         Reviewed by Laszlo Gombos.
2266
2267         [BREWMP] Move OwnPtrBrew.cpp into platform specific folder.
2268         https://bugs.webkit.org/show_bug.cgi?id=38042
2269
2270         * wtf/OwnPtrBrew.cpp: Removed.
2271         * wtf/brew/OwnPtrBrew.cpp: Copied from JavaScriptCore/wtf/OwnPtrBrew.cpp.
2272
2273 2010-04-22  Steve Block  <steveblock@google.com>
2274
2275         Reviewed by Adam Barth.
2276
2277         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
2278         https://bugs.webkit.org/show_bug.cgi?id=37948
2279
2280         * wtf/MathExtras.h:
2281
2282 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
2283
2284         Unreviewed build fix.
2285
2286         * wtf/MD5.cpp: fix include path of CString.h
2287
2288 2010-04-22  Fumitoshi Ukai  <ukai@chromium.org>
2289
2290         Reviewed by Adam Barth.
2291
2292         MD5 is required for WebSocket new protocol implementation
2293         https://bugs.webkit.org/show_bug.cgi?id=37913
2294
2295         * GNUmakefile.am:
2296         * JavaScriptCore.exp:
2297         * JavaScriptCore.gypi:
2298         * JavaScriptCore.pro:
2299         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2300         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2301         * JavaScriptCore.xcodeproj/project.pbxproj:
2302         * wtf/MD5.cpp: Added.
2303         * wtf/MD5.h: Added.
2304
2305 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
2306
2307         Reviewed by NOBODY (build fix).
2308         Errk, accidentally committed commenting out two ASSERTs! reverting.
2309
2310         * runtime/Collector.cpp:
2311         (JSC::Heap::protect):
2312         (JSC::Heap::unprotect):
2313
2314 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
2315
2316         Reviewed by Geoff Garen.
2317
2318         https://bugs.webkit.org/show_bug.cgi?id=38006
2319         Change lifetime of JSC::IdentifierTables used by WebCores to match AtomicStringTable
2320
2321         Presently JSC's IdentifierTables are owned by the JSGlobalData.  For
2322         JSGlobalData objects created via the API this should continue to be the case,
2323         but for the JSGlobalData objects used by WebCore (the main thread's common
2324         global data, and those for workers) use a IdentifierTable provided (and owned)
2325         by wtfThreadData.  This allow the lifetime of these IdentifierTable to match
2326         those of the corresponding AtomicStringTables.
2327
2328         * API/APIShims.h:
2329         (JSC::APIEntryShim::APIEntryShim):
2330         * API/JSContextRef.cpp:
2331         (JSContextGroupCreate):
2332         * runtime/Collector.cpp:
2333         (JSC::Heap::protect):
2334         (JSC::Heap::unprotect):
2335         (JSC::Heap::markRoots):
2336         * runtime/JSGlobalData.cpp:
2337         (JSC::JSGlobalData::JSGlobalData):
2338         (JSC::JSGlobalData::~JSGlobalData):
2339         (JSC::JSGlobalData::createContextGroup):
2340         (JSC::JSGlobalData::create):
2341         (JSC::JSGlobalData::sharedInstance):
2342         * runtime/JSGlobalData.h:
2343         (JSC::JSGlobalData::):
2344         (JSC::JSGlobalData::isSharedInstance):
2345         * runtime/JSLock.cpp:
2346         (JSC::JSLock::JSLock):
2347         (JSC::JSLock::lock):
2348         (JSC::JSLock::unlock):
2349         (JSC::JSLock::DropAllLocks::DropAllLocks):
2350         * wtf/WTFThreadData.cpp:
2351         (WTF::WTFThreadData::WTFThreadData):
2352         (WTF::WTFThreadData::~WTFThreadData):
2353
2354 2010-04-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2355
2356         Unreviewed, rolling out r58110.
2357         http://trac.webkit.org/changeset/58110
2358         https://bugs.webkit.org/show_bug.cgi?id=38007
2359
2360         Caused an internal compiler error on Qt (Requested by abarth
2361         on #webkit).
2362
2363         * wtf/MathExtras.h:
2364
2365 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
2366
2367         Reviewed by NOBODY (windows build fix).
2368
2369         * API/JSWeakObjectMapRefPrivate.cpp:
2370
2371 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
2372
2373         Reviewed by NOBODY (windows build fix).
2374
2375         * API/JSBase.cpp:
2376         * API/JSCallbackObject.cpp:
2377
2378 2010-04-22  Gavin Barraclough  <barraclough@apple.com>
2379
2380         Reviewed by Geoff Garen.
2381
2382         https://bugs.webkit.org/show_bug.cgi?id=37978
2383         Unify JSC::IdentifierTable and WebCore::AtomicStringTable implementations.
2384
2385         These two classes both implement a HashSet of uniqued StringImpls, with
2386         translator classes to avoid unnecessary object creation. The only difference
2387         between the classes is which flag (isIdentifier or inTable) is set.
2388         Combine the two classes using a template predicated on which flag to use.
2389
2390         New class AtomicStringTable created, containing all the goodness from
2391         IdentifierTable & AtomicStringTable, expect for Identifier's literalTable,
2392         which has been moved onto JSGlobalData. Removed duplicate string translator
2393         classes. Renamed StringImpl's inTable flag to more explicit 'isAtomic',
2394         and set this on the empty string (which matches Identifier behaviour, and
2395         removes a redundant check for zero-length).
2396
2397         * GNUmakefile.am:
2398         * JavaScriptCore.gypi:
2399         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2400         * JavaScriptCore.xcodeproj/project.pbxproj:
2401         * runtime/Identifier.cpp:
2402         (JSC::createLiteralTable):
2403         (JSC::deleteLiteralTable):
2404         (JSC::Identifier::add):
2405         (JSC::Identifier::addSlowCase):
2406         * runtime/Identifier.h:
2407         * runtime/JSGlobalData.cpp:
2408         (JSC::JSGlobalData::JSGlobalData):
2409         (JSC::JSGlobalData::~JSGlobalData):
2410         * runtime/JSGlobalData.h:
2411         * wtf/WTFThreadData.cpp:
2412         (WTF::WTFThreadData::WTFThreadData):
2413         (WTF::WTFThreadData::~WTFThreadData):
2414         * wtf/WTFThreadData.h:
2415         (WTF::WTFThreadData::atomicStringTable):
2416         * wtf/text/AtomicString.cpp:
2417         (WebCore::table):
2418         (WebCore::operator==):
2419         (WebCore::AtomicString::add):
2420         (WebCore::AtomicString::find):
2421         (WebCore::AtomicString::remove):
2422         * wtf/text/AtomicStringTable.h: Added.
2423         (WTF::CStringTranslator::hash):
2424         (WTF::CStringTranslator::equal):
2425         (WTF::CStringTranslator::translate):
2426         (WTF::UCharBufferTranslator::hash):
2427         (WTF::UCharBufferTranslator::equal):
2428         (WTF::UCharBufferTranslator::translate):
2429         (WTF::HashAndCharactersTranslator::hash):
2430         (WTF::HashAndCharactersTranslator::equal):
2431         (WTF::HashAndCharactersTranslator::translate):
2432         (WTF::IdentifierOrAtomicStringTable::remove):
2433         (WTF::::~IdentifierOrAtomicStringTable):
2434         (WTF::::add):
2435         (WTF::::find):
2436         * wtf/text/StringImpl.cpp:
2437         (WebCore::StringImpl::~StringImpl):
2438         * wtf/text/StringImpl.h:
2439         (WebCore::StringImpl::isAtomic):
2440         (WebCore::StringImpl::setIsAtomic):
2441         (WebCore::equal):
2442         * wtf/text/StringImplBase.h:
2443         (WTF::StringImplBase::StringImplBase):
2444
2445 2010-04-22  Steve Block  <steveblock@google.com>
2446
2447         Reviewed by Adam Barth.
2448
2449         Update Android to use isfinite, isinf, isnan and signbit from namespace std.
2450         https://bugs.webkit.org/show_bug.cgi?id=37948
2451
2452         * wtf/MathExtras.h:
2453
2454 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2455
2456         Reviewed by Kenneth Rohde Christiansen.
2457
2458         [Qt] Remove dependency of JSC to QtGui
2459         https://bugs.webkit.org/show_bug.cgi?id=37867
2460
2461         The patch also make sure that hal.h is in the include path on Symbian.
2462         The dependency to QtGui took care of that before.
2463
2464         Patch by Thiago Macieira <thiago.macieira@nokia.com>
2465              and Rohan McGovern <rohan.mcgovern@nokia.com>
2466
2467         * JavaScriptCore.pri:
2468         * JavaScriptCore.pro:
2469
2470 2010-04-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2471
2472         Reviewed by Tor Arne Vestbø.
2473
2474         [Qt] Corrects symbols visibility for JavaScriptCore.
2475
2476         https://bugs.webkit.org/show_bug.cgi?id=37867
2477
2478         * JavaScriptCore.pro:
2479
2480 2010-04-22  Gabor Loki  <loki@webkit.org>
2481
2482         Reviewed by Gavin Barraclough.
2483
2484         Use BLX and BX to keep happy the return stack predictor above ARMv4
2485         https://bugs.webkit.org/show_bug.cgi?id=37862
2486
2487         Inspired by Jacob Bramley's patch from JaegerMonkey
2488
2489         * assembler/ARMAssembler.cpp:
2490         (JSC::ARMAssembler::executableCopy):
2491         * assembler/ARMAssembler.h:
2492         (JSC::ARMAssembler::):
2493         (JSC::ARMAssembler::bx):
2494         (JSC::ARMAssembler::blx):
2495         (JSC::ARMAssembler::loadBranchTarget):
2496         (JSC::ARMAssembler::jmp):
2497         (JSC::ARMAssembler::getLdrImmAddress):
2498         * assembler/MacroAssemblerARM.h:
2499         (JSC::MacroAssemblerARM::jump):
2500         (JSC::MacroAssemblerARM::nearCall):
2501         (JSC::MacroAssemblerARM::call):
2502         (JSC::MacroAssemblerARM::ret):
2503         (JSC::MacroAssemblerARM::prepareCall):
2504         (JSC::MacroAssemblerARM::call32):
2505
2506 2010-04-21  Andy Estes  <aestes@apple.com>
2507
2508         Rubber stamped by Mark Rowe.
2509
2510         Export WTF::deleteOwnedPtr(HFONT).
2511
2512         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2513
2514 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2515
2516         Rubber Stamped by Oliver Hunt.
2517
2518         Make SmallStrings store an array of RefPtr<StringImpl>,
2519         instead of a direct array of StringImpls.  This allows
2520         us to remove a friend (and a layering violation) from
2521         WTF::StringImpl, and makes it so that all StringImpls
2522         are individually heap allocated.
2523
2524         * runtime/SmallStrings.cpp:
2525         (JSC::SmallStringsStorage::rep):
2526         (JSC::SmallStringsStorage::SmallStringsStorage):
2527         * wtf/text/StringImpl.h:
2528
2529 2010-04-21  Sam Weinig  <sam@webkit.org>
2530
2531         Reviewed by Geoffrey Garen.
2532
2533         Fix for https://bugs.webkit.org/show_bug.cgi?id=37937
2534         Wean JavaScriptCore off calls to isMainThread()
2535
2536         - Replace use of isMainThread() for interpreter reentry checks
2537           with a stored value on the JSGlobalData.
2538         - Replace use of isMainThread() for useMainThread only check in the
2539           collector with a stored exclusive thread.
2540
2541         * API/JSContextRef.cpp:
2542         (JSContextGroupCreate):
2543         Always default to a small stack type for uses of the JSC API. It is
2544         unlikely that the interpreter reentry required on the web will be as
2545         important for other uses of JavaScriptCore. 
2546
2547         * JavaScriptCore.exp: 
2548         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2549         Update exports.
2550
2551         * interpreter/Interpreter.cpp:
2552         (JSC::Interpreter::execute):
2553         (JSC::Interpreter::prepareForRepeatCall):
2554         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
2555
2556         * interpreter/Interpreter.h:
2557         Rename MaxMainThreadReentryDepth to MaxLargeThreadReentryDepth and 
2558         MaxSecondaryThreadReentryDepth to MaxSmallThreadReentryDepth.
2559
2560         * jsc.cpp:
2561         (main): Use the a large stack for jsc since it is always using the
2562         main thread.
2563         
2564         * runtime/ArrayPrototype.cpp:
2565         (JSC::arrayProtoFuncToString):
2566         (JSC::arrayProtoFuncToLocaleString):
2567         (JSC::arrayProtoFuncJoin):
2568         Use new stored JSGlobalData::maxReentryDepth instead of isMainThread().
2569
2570         * runtime/Collector.cpp:
2571         (JSC::Heap::registerThread):
2572         Use the concept of making JSC run on an exclusiveThread instead of
2573         forcing a mainThreadOnly assertion.
2574         
2575         * runtime/JSGlobalData.cpp:
2576         (JSC::JSGlobalData::JSGlobalData):
2577         (JSC::JSGlobalData::createNonDefault):
2578         (JSC::JSGlobalData::create):
2579         (JSC::JSGlobalData::createLeaked):
2580         (JSC::JSGlobalData::sharedInstance):
2581         * runtime/JSGlobalData.h:
2582         Add ThreadStackType argument to JSGlobalData constructors and set
2583         maxReentryDepth based on it.
2584
2585 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2586
2587         Reviewed by NOBODY (windows build fix pt. 3).
2588
2589         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2590
2591 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2592
2593         Reviewed by NOBODY (windows build fix pt. 2).
2594
2595         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2596
2597 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2598
2599         Reviewed by NOBODY (Qt build fix).
2600
2601         * JavaScriptCore.gypi:
2602         * JavaScriptCore.pro:
2603         * wtf/qt/StringQt.cpp: Copied from WebCore/platform/text/qt/StringQt.cpp.
2604
2605 2010-04-21  Gavin Barraclough  <barraclough@apple.com>
2606
2607         Reviewed by NOBODY (windows build fix).
2608
2609         * API/JSValueRef.cpp:
2610         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2611         * runtime/Identifier.cpp:
2612         (JSC::IdentifierTable::~IdentifierTable):
2613         (JSC::IdentifierTable::add):
2614         * runtime/Identifier.h:
2615         * wtf/WTFThreadData.h:
2616         (JSC::IdentifierTable::remove):
2617         (JSC::IdentifierTable::literalTable):
2618         * wtf/text/StringImpl.cpp:
2619         (WebCore::StringImpl::~StringImpl):
2620
2621 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2622
2623         Reviewed by Oliver Hunt, Darin Adler.
2624
2625         Bug 37906 - Remove JSC::UStringImpl; unify with StringImpl.
2626
2627         JSC::UStringImpl and WebCore::StringImpl (soon to be renamed to
2628         WTF::StringImpl) are almost identical.  Remove duplication of code by unifying
2629         the two, move missing features from UStringImpl into StringImpl & delete the
2630         class UStringImpl.
2631
2632         * API/JSClassRef.cpp:
2633         * API/JSContextRef.cpp:
2634         * GNUmakefile.am:
2635         * JavaScriptCore.exp:
2636         * JavaScriptCore.pro:
2637         * JavaScriptCore.xcodeproj/project.pbxproj:
2638         * bytecode/EvalCodeCache.h:
2639         * bytecode/JumpTable.cpp:
2640         * profiler/ProfileNode.cpp:
2641         * runtime/Identifier.cpp:
2642         (JSC::Identifier::add):
2643         * runtime/Identifier.h:
2644         (JSC::Identifier::equal):
2645         * runtime/UString.cpp:
2646         * runtime/UString.h:
2647         (WTF::):
2648         * runtime/UStringImpl.cpp: Removed.
2649         * runtime/UStringImpl.h:
2650         * wtf/text/StringHash.h:
2651         (WebCore::StringHash::equal):
2652         (WebCore::CaseFoldingHash::equal):
2653         * wtf/text/StringImpl.cpp:
2654         (WebCore::StringImpl::~StringImpl):
2655         (WebCore::StringImpl::empty):
2656         (WebCore::StringImpl::sharedBuffer):
2657         (WebCore::equal):
2658         * wtf/text/StringImpl.h:
2659         (WebCore::StringImpl::StringImpl):
2660         (WebCore::StringImpl::create):
2661         (WebCore::StringImpl::tryCreateUninitialized):
2662         (WebCore::StringImpl::cost):
2663         (WebCore::StringImpl::isIdentifier):
2664         (WebCore::StringImpl::setIsIdentifier):
2665         (WebCore::StringImpl::computeHash):
2666         (WebCore::StringImpl::copyChars):
2667         (WebCore::StringImpl::):
2668
2669 2010-04-21  Patrick Gansterer  <paroga@paroga.com>
2670
2671         Reviewed by Darin Adler.
2672
2673         Added missing #include "Lookup.h" in LUT source files.
2674         https://bugs.webkit.org/show_bug.cgi?id=37903
2675
2676         * runtime/ArrayPrototype.cpp:
2677         * runtime/DatePrototype.cpp:
2678         * runtime/JSONObject.cpp:
2679         * runtime/MathObject.cpp:
2680         * runtime/NumberConstructor.cpp:
2681         * runtime/RegExpConstructor.cpp:
2682         * runtime/RegExpObject.cpp:
2683         * runtime/StringPrototype.cpp:
2684
2685 2010-04-21  Gustavo Sverzut Barbieri  <barbieri@profusion.mobi>
2686
2687         Reviewed by Nikolas Zimmermann.
2688
2689         Add missing EFL JavaScriptCore file.
2690         http://webkit.org/b/37854
2691
2692         * wtf/efl: Added.
2693         * wtf/efl/MainThreadEfl.cpp: Added.
2694         (WTF::initializeMainThreadPlatform):
2695         (WTF::timeoutFired):
2696         (WTF::scheduleDispatchFunctionsOnMainThread):
2697
2698 2010-04-20  Xan Lopez  <xlopez@igalia.com>
2699
2700         Another attempt to fix the build.
2701
2702         * GNUmakefile.am:
2703
2704 2010-04-20  Oliver Hunt  <oliver@apple.com>
2705
2706         Reviewed by Maciej Stachowiak.
2707
2708         [ES5] RegExp literals are constants that should be persistent across multiple function calls.
2709         https://bugs.webkit.org/show_bug.cgi?id=37908
2710
2711         Dump the separate RegExp constant pool, and just use the standard JS constant pool
2712         in codeblock.  This allows us to drop op_new_regexp and all associated code as well.
2713
2714         * bytecode/CodeBlock.cpp:
2715         (JSC::CodeBlock::dump):
2716         (JSC::CodeBlock::shrinkToFit):
2717         * bytecode/CodeBlock.h:
2718         * bytecode/Opcode.h:
2719         * bytecompiler/BytecodeGenerator.cpp:
2720         (JSC::BytecodeGenerator::emitLoad):
2721         * bytecompiler/BytecodeGenerator.h:
2722         * bytecompiler/NodesCodegen.cpp:
2723         (JSC::RegExpNode::emitBytecode):
2724         * interpreter/Interpreter.cpp:
2725         (JSC::Interpreter::privateExecute):
2726         * jit/JIT.cpp:
2727         (JSC::JIT::privateCompileMainPass):
2728         * jit/JIT.h:
2729         * jit/JITOpcodes.cpp:
2730         * jit/JITStubs.cpp:
2731         * jit/JITStubs.h:
2732         (JSC::):
2733
2734 2010-04-20  Oliver Hunt  <oliver@apple.com>
2735
2736         Fix license on create_regex_tables
2737
2738         * create_regex_tables:
2739
2740 2010-04-20  Oliver Hunt  <oliver@apple.com>
2741
2742         Reviewed by NOBODY (Build fix).
2743
2744         Fix gtk
2745
2746         * GNUmakefile.am:
2747         * make-generated-sources.sh:
2748
2749 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2750
2751         Reviewed by Oliver Hunt.
2752
2753         Bug 37895 - Share common code from UStringImplBase with StringImpl
2754
2755         The implementation of StringImpl & UStringImpl is very similar.  Restructure
2756         StringImpl to match UStringImpl, moving the flags and length into a base class,
2757         so that this can be shared between both string types to increase code reuse.
2758
2759         * JavaScriptCore.xcodeproj/project.pbxproj:
2760         * runtime/RopeImpl.h:
2761         (JSC::RopeImpl::RopeImpl):
2762         * runtime/UStringImpl.h:
2763         (JSC::UStringImpl::UStringImpl):
2764         * wtf/text/StringImpl.h:
2765         (WebCore::StringImpl::StringImpl):
2766         (WebCore::StringImpl::characters):
2767         * wtf/text/StringImplBase.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
2768         (WTF::StringImplBase::length):
2769         (WTF::StringImplBase::operator new):
2770         (WTF::StringImplBase::StringImplBase):
2771
2772 2010-04-20  Oliver Hunt  <oliver@apple.com>
2773
2774         Reviewed by Gavin Barraclough.
2775
2776         Autogenerate yarr character tables
2777         https://bugs.webkit.org/show_bug.cgi?id=37877
2778
2779         Use a python script to automatically generate character tables
2780         for the builtin YARR character classes.  This allows us to generate
2781         actual tables as well, by using these tables we can both increase
2782         performance of the check (for complex builtins) and reduce the actual
2783         code size.
2784
2785         4-8% win on string-unpack-code, but lots of noise on other tests so
2786         i'm only confident saying its a 1% win overall.
2787
2788         * DerivedSources.make:
2789         * JavaScriptCore.xcodeproj/project.pbxproj:
2790         * assembler/AbstractMacroAssembler.h:
2791         (JSC::AbstractMacroAssembler::ExtendedAddress::ExtendedAddress):
2792         * assembler/MacroAssembler.h:
2793         (JSC::MacroAssembler::branchTest8):
2794         * assembler/MacroAssemblerX86Common.h:
2795         (JSC::MacroAssemblerX86Common::branchTest8):
2796         * assembler/MacroAssemblerX86_64.h:
2797         (JSC::MacroAssemblerX86_64::branchTest8):
2798         * assembler/X86Assembler.h:
2799         (JSC::X86Assembler::cmpb_im):
2800         (JSC::X86Assembler::testb_im):
2801         * bytecode/SamplingTool.cpp:
2802         (JSC::SamplingTool::dump):
2803         * create_regex_tables: Added.
2804         * yarr/RegexCompiler.cpp:
2805         (JSC::Yarr::CharacterClassConstructor::charClass):
2806         * yarr/RegexJIT.cpp:
2807         (JSC::Yarr::RegexGenerator::matchCharacterClass):
2808         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
2809         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
2810         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
2811         * yarr/RegexPattern.h:
2812         (JSC::Yarr::CharacterClassTable::create):
2813         (JSC::Yarr::CharacterClassTable::CharacterClassTable):
2814         (JSC::Yarr::CharacterClass::CharacterClass):
2815
2816 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2817
2818         Reviewed by NOBODY (speculative windows fix - missed a bit!).
2819
2820         * wtf/text/AtomicString.h:
2821
2822 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2823
2824         Reviewed by NOBODY (speculative windows fix).
2825
2826         * wtf/text/AtomicString.h:
2827
2828 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2829
2830         Reviewed by NOBODY (windows build fix).
2831
2832         Add missing .def file entries.
2833
2834         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2835
2836 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2837
2838         Reviewed by Geoff Garen.
2839
2840         Bug 37869 - Move URopeImpl to its own .h/.cpp
2841         
2842         Currently Ropes are implemented by the class URopeImpl, which is defined in
2843         UStringImpl.h, and then typedefed to the name JSString::Rope. Remove the
2844         typedef, and rename all uses of URopeImpl and JSString::Rope to just RopeImpl.
2845
2846         Move RopeImpl to its own header, and remove all remaining references to ropes
2847         from UStringImpl (rename UStringOrRopeImpl to UStringImplBase, rename or move
2848         the isRope & deref methods from UStringOrRopeImpl).
2849
2850         * JavaScriptCore.xcodeproj/project.pbxproj:
2851         * runtime/JSString.cpp:
2852         (JSC::JSString::resolveRope):
2853         * runtime/JSString.h:
2854         (JSC::):
2855         (JSC::RopeBuilder::JSString):
2856         (JSC::RopeBuilder::~JSString):
2857         (JSC::RopeBuilder::appendStringInConstruct):
2858         (JSC::RopeBuilder::JSStringFinalizerStruct::):
2859         * runtime/RopeImpl.cpp: Copied from JavaScriptCore/runtime/UStringImpl.cpp.
2860         (JSC::RopeImpl::derefFibersNonRecursive):
2861         (JSC::RopeImpl::destructNonRecursive):
2862         * runtime/RopeImpl.h: Copied from JavaScriptCore/runtime/UStringImpl.h.
2863         (JSC::RopeImpl::tryCreateUninitialized):
2864         (JSC::RopeImpl::isRope):
2865         (JSC::RopeImpl::deref):
2866         (JSC::RopeImpl::RopeImpl):
2867         * runtime/UStringImpl.cpp:
2868         * runtime/UStringImpl.h:
2869         (JSC::UStringImplBase::isInvalid):
2870         (JSC::UStringImplBase::ref):
2871         (JSC::UStringImplBase::UStringImplBase):
2872         (JSC::UStringImplBase::):
2873         (JSC::UStringImpl::UStringImpl):
2874
2875 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2876
2877         Reviewed by Geoff Garen.
2878
2879         Bug 37828 - Move WebCore's String classes to WTF
2880
2881         Move these classes up to WTF so they are available to all clients of WTF (in
2882         particular JSC).
2883
2884         As a first patch, making the most minimal change possible, since this patch
2885         could easily grow rather large since we'll have to change every class forward
2886         declaration ( e.g. every "namespace WebCore { class String; }" much change to
2887         "namespace WTF { class String; }").
2888
2889         Moving the files, but leaving the classes logically in the WebCore namespace -
2890         which is technically a layering violation - I'll come back and fix this up in a
2891         subsequent patch.
2892
2893         * Android.mk:
2894         * Android.v8.wtf.mk:
2895         * GNUmakefile.am:
2896         * JavaScriptCore.exp:
2897         * JavaScriptCore.gypi:
2898         * JavaScriptCore.pro:
2899         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2900         * JavaScriptCore.xcodeproj/project.pbxproj:
2901         * config.h:
2902         * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h.
2903         * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp.
2904         * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h.
2905         * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h.
2906         * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h.
2907         * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h.
2908         * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp.
2909         * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h.
2910         * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp.
2911         (WebCore::charactersToFloat):
2912         * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h.
2913
2914 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
2915
2916         [Qt] Unreviewed speculative buildfix for WinCE after r57882
2917         https://bugs.webkit.org/show_bug.cgi?id=37701
2918
2919         * JavaScriptCore.pri: missing wince* case added.
2920
2921 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2922
2923         Reviewed by NOBODY (build fix).
2924         Speculative Chromium/Win build fix, attempt #2.
2925
2926         * config.h:
2927
2928 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2929
2930         Reviewed by NOBODY (build fix).
2931         Speculative Chromium/Win build fix.
2932
2933         * config.h: JS_EXPORTDATA should do nothing on !JSC builds.
2934
2935 2010-04-20  Csaba Osztrogonác  <ossy@webkit.org>
2936
2937         Reviewed by Simon Hausmann.
2938
2939         [Qt] Target(WebCore,jsc,...) must depends on static library of JavaScriptCore
2940         https://bugs.webkit.org/show_bug.cgi?id=37701
2941
2942         * JavaScriptCore.pri: dependency added.
2943
2944 2010-04-20  Gavin Barraclough  <barraclough@apple.com>
2945
2946         Rubber stamped by Maciej Stachowiak (relanding r57829).
2947         Added missing JS_EXPORTDATA
2948
2949         * API/APIShims.h:
2950         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2951         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2952         (JSC::APICallbackShim::APICallbackShim):
2953         (JSC::APICallbackShim::~APICallbackShim):
2954         * API/JSContextRef.cpp:
2955         * Android.mk:
2956         * Android.v8.wtf.mk:
2957         * GNUmakefile.am:
2958         * JavaScriptCore.exp:
2959         * JavaScriptCore.gypi:
2960         * JavaScriptCore.pro:
2961         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2962         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2963         * JavaScriptCore.xcodeproj/project.pbxproj:
2964         * runtime/Completion.cpp:
2965         (JSC::checkSyntax):
2966         (JSC::evaluate):
2967         * runtime/Identifier.cpp:
2968         (JSC::Identifier::remove):
2969         (JSC::Identifier::checkCurrentIdentifierTable):
2970         * runtime/Identifier.h:
2971         * runtime/InitializeThreading.cpp:
2972         (JSC::initializeThreadingOnce):
2973         * runtime/JSGlobalData.cpp:
2974         (JSC::JSGlobalData::create):
2975         * wtf/WTFThreadData.cpp: Copied from JavaScriptCore/wtf/WTFThreadData.cpp.
2976         * wtf/WTFThreadData.h: Copied from JavaScriptCore/wtf/WTFThreadData.h.
2977
2978 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
2979
2980         Reviewed by NOBODY (rolling out r57829).
2981         This broke windows.
2982
2983         * API/APIShims.h:
2984         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
2985         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
2986         (JSC::APICallbackShim::APICallbackShim):
2987         (JSC::APICallbackShim::~APICallbackShim):
2988         * API/JSContextRef.cpp:
2989         * Android.mk:
2990         * Android.v8.wtf.mk:
2991         * GNUmakefile.am:
2992         * JavaScriptCore.exp:
2993         * JavaScriptCore.gypi:
2994         * JavaScriptCore.pro:
2995         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2996         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2997         * JavaScriptCore.xcodeproj/project.pbxproj:
2998         * runtime/Completion.cpp:
2999         (JSC::checkSyntax):
3000         (JSC::evaluate):
3001         * runtime/Identifier.cpp:
3002         (JSC::Identifier::remove):
3003         (JSC::Identifier::checkCurrentIdentifierTable):
3004         (JSC::createIdentifierTableSpecificCallback):
3005         (JSC::createIdentifierTableSpecific):
3006         * runtime/Identifier.h:
3007         (JSC::ThreadIdentifierTableData::ThreadIdentifierTableData):
3008         (JSC::defaultIdentifierTable):
3009         (JSC::setDefaultIdentifierTable):
3010         (JSC::currentIdentifierTable):
3011         (JSC::setCurrentIdentifierTable):
3012         (JSC::resetCurrentIdentifierTable):
3013         * runtime/InitializeThreading.cpp:
3014         (JSC::initializeThreadingOnce):
3015         * runtime/JSGlobalData.cpp:
3016         (JSC::JSGlobalData::create):
3017         * wtf/WTFThreadData.cpp: Removed.
3018         * wtf/WTFThreadData.h: Removed.
3019
3020 2010-04-19  Douglas Gregor  <dgregor@apple.com>
3021
3022         Reviewed and landed by Anders Carlsson.
3023
3024         * runtime/UStringImpl.h:
3025         Fix class/struct declaration mismatches.
3026
3027 2010-04-19  Geoffrey Garen  <ggaren@apple.com>
3028
3029         Reviewed by Beth Dakin.
3030
3031         Checked in these tests I wrote becuase Balazs Kelemen wanted to use them.
3032
3033         * tests/perf: Added.
3034         * tests/perf/bench-allocate-nonretained.js: Added.
3035         * tests/perf/bench-allocate-retained.js: Added.
3036
3037 2010-04-19  Gavin Barraclough  <barraclough@apple.com>
3038
3039         Reviewed by NOBODY (windows build fix).
3040
3041         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3042
3043 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
3044
3045         Reviewed by Sam Weinig.
3046
3047         https://bugs.webkit.org/show_bug.cgi?id=37745
3048         Move string uniquing tables to (new) WTFThreadData class.
3049
3050         Remove AtomicString's dependency on ThreadGlobalData so that we can move
3051         WebCore's string classes up to WTF.
3052
3053         WTFThreadData.cpp/.h are based on ThreadGlobalData from WebCore.
3054         Moved JSC & WebCore's string uniquing tables to this class.
3055
3056         This patch introduces a temporary layering violation in providing forward
3057         declarations of classes from JSC and WTF; this will be resolved as we move
3058         more string code up to WTF.
3059
3060         * API/APIShims.h:
3061         (JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock):
3062         (JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
3063         (JSC::APICallbackShim::APICallbackShim):
3064         (JSC::APICallbackShim::~APICallbackShim):
3065         * API/JSContextRef.cpp:
3066         * JavaScriptCore.exp:
3067         * JavaScriptCore.xcodeproj/project.pbxproj:
3068         * runtime/Completion.cpp:
3069         (JSC::checkSyntax):
3070         (JSC::evaluate):
3071         * runtime/Identifier.cpp:
3072         (JSC::Identifier::remove):
3073         (JSC::Identifier::checkCurrentIdentifierTable):
3074         * runtime/Identifier.h:
3075         * runtime/InitializeThreading.cpp:
3076         (JSC::initializeThreadingOnce):
3077         * runtime/JSGlobalData.cpp:
3078         (JSC::JSGlobalData::create):
3079         * wtf/WTFThreadData.cpp: Copied from WebCore/platform/ThreadGlobalData.cpp.
3080         (WTF::WTFThreadData::WTFThreadData):
3081         (WTF::WTFThreadData::~WTFThreadData):
3082         * wtf/WTFThreadData.h: Copied from WebCore/platform/ThreadGlobalData.h.
3083         (WTF::WTFThreadData::atomicStringTable):
3084         (WTF::WTFThreadData::initializeIdentifierTable):
3085         (WTF::WTFThreadData::currentIdentifierTable):
3086         (WTF::WTFThreadData::setCurrentIdentifierTable):
3087         (WTF::WTFThreadData::resetCurrentIdentifierTable):
3088         (WTF::wtfThreadData):
3089
3090 2010-04-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3091
3092         Reviewed by Simon Hausmann.
3093
3094         [Qt] Build fix for WinCE.
3095
3096         Moved the include of the non-existing errno.h header file inside
3097         platform guard macros.
3098
3099         * jit/ExecutableAllocatorFixedVMPool.cpp:
3100
3101 2010-04-18  Kwang Yul Seo  <skyul@company100.net>
3102
3103         Reviewed by Laszlo Gombos.
3104
3105         [WINCE] Don't define WTF_CPU_MIDDLE_ENDIAN=1
3106         https://bugs.webkit.org/show_bug.cgi?id=37434
3107
3108         Windows CE supports little-endian format only, so don't define
3109         WTF_CPU_MIDDLE_ENDIAN=1.
3110
3111         * wtf/Platform.h:
3112
3113 2010-04-18  Simon Hausmann  <simon.hausmann@nokia.com>
3114
3115         Reviewed by Laszlo Gombos.
3116
3117         [Qt] Fix JavaScriptCore's include path for WinCE builds
3118
3119         https://bugs.webkit.org/show_bug.cgi?id=36751
3120
3121         * JavaScriptCore.pri:
3122
3123 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
3124
3125         Reviewed by nobody, build fix.
3126
3127 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
3128
3129         Reviewed by nobody, build fix.
3130
3131 2010-04-16  Gavin Barraclough  <barraclough@apple.com>
3132
3133         Reviewed by Oliver Hunt.
3134
3135         Bug 37730 - Remove JSC::UString dependencies from WebCore::StringImpl
3136         (Following on from bug #37675).
3137
3138         Make the argument ordering for UStringImpl's constructor & create
3139         methods match, when passed a shared buffer.
3140
3141         * JavaScriptCore.exp:
3142         * runtime/UStringImpl.cpp:
3143         (JSC::UStringImpl::create):
3144         * runtime/UStringImpl.h:
3145
3146 2010-04-15  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3147
3148         Reviewed by Kenneth Rohde Christiansen.
3149
3150         Fix memory leak in QScriptEngine::evaluate().
3151
3152         QScriptEnginePrivate::evaluate should release temporary variables.
3153
3154         [Qt] QScriptEngine::evaluate has memory leak.
3155         https://bugs.webkit.org/show_bug.cgi?id=37596
3156
3157         * qt/api/qscriptengine_p.cpp:
3158         (QScriptEnginePrivate::evaluate):
3159         * qt/api/qscriptengine_p.h:
3160
3161 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3162
3163         Reviewed by Kenneth Rohde Christiansen.
3164
3165         Fix a memory leak in QScriptValue::inherits.
3166
3167         [Qt] QScriptValue::inherits has a memory leak.
3168         https://bugs.webkit.org/show_bug.cgi?id=37617
3169
3170         * qt/api/qscriptvalue_p.h:
3171         (QScriptValuePrivate::inherits):
3172
3173 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3174
3175         Reviewed by Kenneth Rohde Christiansen.
3176
3177         Fix a few memory leaks in QScriptEngine.
3178
3179         Syntax checking caused memory leak, not all temporary variables were released.
3180
3181         [Qt] Syntax checking  in the QtScript cause a memory leak.
3182         https://bugs.webkit.org/show_bug.cgi?id=37610
3183
3184         * qt/api/qscriptengine_p.cpp:
3185         (QScriptEnginePrivate::checkSyntax):
3186         * qt/api/qscriptsyntaxcheckresult.cpp:
3187         (QScriptSyntaxCheckResultPrivate::errorMessage):
3188         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
3189
3190 2010-04-14  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3191
3192         Reviewed by Kenneth Rohde Christiansen.
3193
3194         Fix memory leak inside QScriptEnginePrivate::makeJSValue.
3195
3196         QScriptEnginePrivate::makeJSValue should release temporary JSStringRef variable.
3197
3198         [Qt] tst_QScriptValue::toString has a memory leak.
3199         https://bugs.webkit.org/show_bug.cgi?id=37598
3200
3201         * qt/api/qscriptengine_p.h:
3202         (QScriptEnginePrivate::makeJSValue):
3203
3204 2010-04-14  Peter Varga  <pvarga@inf.u-szeged.hu>
3205
3206         Reviewed by Geoffrey Garen.
3207
3208         Move the YARR JIT fallback detection from RegexJIT.cpp to
3209         RegexCompiler.cpp.
3210
3211         https://bugs.webkit.org/show_bug.cgi?id=37571
3212
3213         * yarr/RegexCompiler.cpp:
3214         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
3215         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
3216         * yarr/RegexJIT.cpp:
3217         (JSC::Yarr::RegexGenerator::generateTerm):
3218         (JSC::Yarr::RegexGenerator::RegexGenerator):
3219         (JSC::Yarr::jitCompileRegex):
3220         * yarr/RegexJIT.h:
3221         (JSC::Yarr::RegexCodeBlock::operator!):
3222         * yarr/RegexPattern.h:
3223         (JSC::Yarr::RegexPattern::RegexPattern):
3224         (JSC::Yarr::RegexPattern::reset):
3225
3226 2010-04-14  Kent Hansen  <kent.hansen@nokia.com>
3227
3228         Reviewed by Maciej Stachowiak.
3229
3230         Mac OS X: Use deployment target to determine whether memory tagging should be enabled
3231         https://bugs.webkit.org/show_bug.cgi?id=34888
3232
3233         When building on (Snow) Leopard but targeting Tiger
3234         (TARGETING_TIGER defined, BUILDING_ON_TIGER not defined),
3235         WebKit would crash on Tiger because the tags passed to mmap
3236         caused those function calls to fail.
3237
3238         Conversely, when building on Tiger but targeting Leopard
3239         (BUILDING_ON_TIGER defined, TARGETING_LEOPARD defined), WebKit
3240         would crash on Leopard because the tags passed to vm_map and
3241         vm_allocate caused those function calls to fail.
3242
3243         Solution: Use TARGETING_TIGER rather than BUILDING_ON_TIGER to
3244         govern the tag definitions. Use the same tags for vm_map and
3245         vm_allocate regardless of target, since they work on
3246         both. Fall back to the mmap tags that work on Tiger (that is,
3247         "no tags") if targeting Tiger, since those tags also work on
3248         Leopard.
3249
3250         * wtf/VMTags.h:
3251
3252 2010-04-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3253
3254         Reviewed by nobody, build fix.
3255
3256         [Qt] Build fix for Mac when building with build-webkit --qt
3257
3258         Specifying no configuration on Mac builds WebCore both in debug
3259         and release. JavaScriptCore has to follow this rule as well.
3260
3261         * JavaScriptCore.pro:
3262
3263 2010-04-11  Mark Rowe  <mrowe@apple.com>
3264
3265         Reviewed by Sam Weinig.
3266
3267         <rdar://problem/7851332> Fix the build.
3268
3269         * wtf/FastMalloc.cpp:
3270         (WTF::TCMallocStats::): Initialize extra members of malloc_introspection_t to zero.
3271
3272 2010-04-09  Mikhail Naganov  <mnaganov@chromium.org>
3273
3274         Reviewed by Pavel Feldman.
3275
3276         Make CallIdentifier constructor to handle null urls.
3277
3278         https://bugs.webkit.org/show_bug.cgi?id=37341
3279
3280         * profiler/CallIdentifier.h:
3281         (JSC::CallIdentifier::CallIdentifier):
3282
3283 2010-04-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3284
3285         Reviewed by Simon Hausmann.
3286
3287         [Qt] Fix crashes with package builds in release
3288
3289         Add NDEBUG to the defines for package build in JavaScriptCore.pri,
3290         so that it's consistently used for JavaScriptCore, WebCore, jsc and all
3291         other tools using wtf, etc. data structures directly. Mixing NDEBUG with
3292         non-NDEBUG builds causes crashes due to differences in data structures when
3293         assertions/checks are enabled.
3294
3295         * JavaScriptCore.pri:
3296
3297 2010-04-09  Patrick Gansterer  <paroga@paroga.com>
3298
3299         Reviewed by Darin Adler.
3300
3301         Implement NO_RETURN for COMPILER(MSVC).
3302         https://bugs.webkit.org/show_bug.cgi?id=33056 
3303
3304         Added NO_RETURN_WITH_VALUE for functions with non-void return type.
3305
3306         * jsc.cpp:
3307         * wtf/AlwaysInline.h:
3308         * wtf/FastMalloc.cpp:
3309
3310 2010-04-08  Kwang Yul Seo  <skyul@company100.net>
3311
3312         Reviewed by Simon Hausmann.
3313
3314         [WINCE] Check if ARM or _ARM_ is defined
3315         https://bugs.webkit.org/show_bug.cgi?id=37200
3316
3317         MSVC defines ARM and _ARM_ for Windows CE ARM. Define WTF_CPU_ARM=1
3318         when either ARM or _ARM_ is defined.
3319
3320         * wtf/Platform.h:
3321
3322 2010-04-08  Csaba Osztrogonác  <ossy@webkit.org>
3323
3324         Reviewed Oliver Hunt.
3325
3326         [Qt]r57240 broke Qt build (might be a gcc bug)
3327         https://bugs.webkit.org/show_bug.cgi?id=37253
3328
3329         Workaround until fix. On PLATFORM(QT) use inline instead of ALWAYS_INLINE.
3330
3331         * wtf/PassRefPtr.h: Qt guards added.
3332
3333 2010-04-07  Oliver Hunt  <oliver@apple.com>
3334
3335         Reviewed by Anders Carlsson.
3336
3337         Vector<UString> makes many needless calls to UString::UString and UString::~UString
3338
3339         Add a VectorTrait<UString> specialisation to allow vector to simply memset/memcpy
3340         data around.  Only difference from the VectorTrait<RefPtr<T> > traits is the inability
3341         to use memset to initialize data.
3342
3343         * runtime/UString.h:
3344         (WTF::):
3345
3346 2010-04-07  Oliver Hunt  <oliver@apple.com>
3347
3348         Reviewed by Geoff Garen.
3349
3350         Beat gcc with a clue bat -- force inlining of refIfNotNull and derefIfNotNull
3351
3352         * wtf/PassRefPtr.h:
3353
3354 2010-04-07  Kwang Yul Seo  <skyul@company100.net>
3355
3356         Reviewed by Darin Adler.
3357
3358         Replace isprint with isASCIIPrintable
3359         https://bugs.webkit.org/show_bug.cgi?id=37223
3360
3361         WebKit does not use functions in <ctype.h> as they are dependent on the current
3362         locale. Use the equivalent functions in <wtf/ASCIICType.h>. isASCIIPrintable
3363         replaces isprint.
3364
3365         * pcre/pcre_exec.cpp:
3366         (pchars):
3367
3368 2010-04-07  Enrica Casucci  <enrica@apple.com>
3369
3370         Reviewed by Darin Adler.
3371
3372         https://bugs.webkit.org/show_bug.cgi?id=37219
3373         
3374         This change disables text caret for the iPhone platflorm.
3375         
3376         * wtf/Platform.h: Disabled text caret for iPhone.
3377
3378 2010-04-06  Adam Barth  <abarth@webkit.org>
3379
3380         Reviewed by Eric Seidel.
3381
3382         REGRESSION: Worker termination via JS timeout may cause worker tests like fast/workers/worker-terminate.html fail.
3383         https://bugs.webkit.org/show_bug.cgi?id=36646
3384
3385         Add a new exception type for forcibly terminating a JavaScript stack.
3386         The new exception functions similarly to the
3387         InterruptedExecutionException but is conceptually different because
3388         execution is terminated instead of just interrupted.
3389
3390         * GNUmakefile.am:
3391             - Added new Terminator.h file.
3392         * JavaScriptCore.gypi:
3393             - Added new Terminator.h file.
3394         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3395             - Added new Terminator.h file.
3396         * JavaScriptCore.xcodeproj/project.pbxproj:
3397             - Added new Terminator.h file.
3398         * interpreter/Interpreter.cpp:
3399         (JSC::Interpreter::throwException):
3400             - Fully unwind the stack for TerminatedExecutionException.
3401         (JSC::Interpreter::privateExecute):
3402             - Check if we've been terminated at the same time we check if we've
3403               timed out.
3404         * jit/JITStubs.cpp:
3405         (JSC::DEFINE_STUB_FUNCTION):
3406             - Check if we've been terminated at the same time we check if we've
3407               timed out.
3408         * runtime/Completion.cpp:
3409             - Some exceptions define special completion types so that calls can
3410               see why we terminated evaluation.
3411         (JSC::evaluate):
3412         * runtime/Completion.h:
3413             - Define a new completion type for termination.
3414         (JSC::):
3415         * runtime/ExceptionHelpers.cpp:
3416             - Define TerminatedExecutionException and refactor pseudo-RTTI
3417               virtual function to be more semantic.
3418         (JSC::InterruptedExecutionError::exceptionType):
3419         (JSC::TerminatedExecutionError::TerminatedExecutionError):
3420         (JSC::TerminatedExecutionError::exceptionType):
3421         (JSC::TerminatedExecutionError::toString):
3422         (JSC::createTerminatedExecutionException):
3423         * runtime/ExceptionHelpers.h:
3424             - Entry point for generating a TerminatedExecutionException.
3425         * runtime/JSGlobalData.cpp:
3426         (JSC::JSGlobalData::JSGlobalData):
3427             - Add a Terminator object that can be used to asynchronously
3428               terminate a JavaScript execution stack.
3429         * runtime/JSGlobalData.h:
3430         * runtime/JSObject.h:
3431         (JSC::JSObject::exceptionType):
3432             - Define that, by default, thrown objects have a normal exception
3433               type.
3434         * runtime/Terminator.h: Added.
3435             - Added a new controller object that can be used to terminate
3436               execution asynchronously.  This object is more or less a
3437               glorified bool.
3438         (JSC::Terminator::Terminator):
3439         (JSC::Terminator::termianteSoon):
3440         (JSC::Terminator::shouldTerminate):
3441
3442 2010-04-05  Oliver Hunt  <oliver@apple.com>
3443
3444         And another one.
3445
3446         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
3447
3448 2010-04-05  Oliver Hunt  <oliver@apple.com>
3449
3450         And another build fix.
3451
3452         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3453
3454 2010-04-05  Oliver Hunt  <oliver@apple.com>
3455
3456         Build fix
3457
3458         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3459
3460 2010-04-05  Oliver Hunt  <oliver@apple.com>
3461
3462         Reviewed by Gavin Barraclough.
3463
3464         Support weak maps in JSC
3465         https://bugs.webkit.org/show_bug.cgi?id=37132
3466
3467         Expose an API to allow creation of a map for storing
3468         weak JS references.
3469
3470         * API/JSWeakObjectMapRefInternal.h: Added.
3471         (OpaqueJSWeakObjectMap::create):
3472         (OpaqueJSWeakObjectMap::map):
3473         (OpaqueJSWeakObjectMap::~OpaqueJSWeakObjectMap):
3474         (OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
3475         * API/JSWeakObjectMapRefPrivate.cpp: Added.
3476         * API/JSWeakObjectMapRefPrivate.h: Added.
3477         * JavaScriptCore.exp:
3478         * JavaScriptCore.xcodeproj/project.pbxproj:
3479         * runtime/JSGlobalObject.h:
3480         (JSC::JSGlobalObject::registerWeakMap):
3481         (JSC::JSGlobalObject::deregisterWeakMap):
3482
3483 2010-04-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3484
3485         Reviewed by Kenneth Rohde Christiansen.
3486
3487         [Symbian] Consolidate Symbian WINSCW environment configuration
3488         https://bugs.webkit.org/show_bug.cgi?id=37100
3489
3490         Move the "undefinition" of WIN32 and _WIN32 from WebCore/config.h
3491         to JavaScriptCore/wtf/Platform.h as it is not specific to WebCore.
3492
3493         PLATFORM(WIN) and OS(WIN) no longer needs to be undefined as
3494         undefining WIN32 takes care of it.
3495
3496         * wtf/Platform.h:
3497
3498 2010-04-03  Gavin Barraclough  <barraclough@apple.com>
3499
3500         Reviewed by Oliver Hunt.
3501
3502         https://bugs.webkit.org/show_bug.cgi?id=37068
3503         Change UString to use a 0 rep for null strings instead of a null object.
3504
3505         No performance impact.
3506
3507         * JavaScriptCore.exp:
3508         * runtime/InternalFunction.cpp:
3509         (JSC::InternalFunction::InternalFunction):
3510         * runtime/JSString.h:
3511         (JSC::RopeBuilder::JSString):
3512         * runtime/UString.cpp:
3513         (JSC::initializeUString):
3514         * runtime/UString.h:
3515         (JSC::UString::UString):
3516         (JSC::UString::data):
3517         (JSC::UString::size):
3518         (JSC::UString::isNull):
3519         (JSC::UString::isEmpty):
3520         (JSC::UString::cost):
3521
3522 2010-04-03  Balazs Kelemen  <kb@inf.u-szeged.hu>
3523
3524         Reviewed by Oliver Hunt.
3525
3526         Fix uninitalised members in CallLinkInfo and BytecodeGenerator.
3527
3528         https://bugs.webkit.org/show_bug.cgi?id=36816
3529
3530         * bytecode/CodeBlock.cpp:
3531         (JSC::CodeBlock::CodeBlock):
3532         * bytecode/CodeBlock.h:
3533         (JSC::CallLinkInfo::CallLinkInfo):
3534
3535 2010-04-03  yael aharon  <yael.aharon@nokia.com>
3536
3537         Reviewed by Darin Adler.
3538
3539         Enable HTMLProgressElement for Safari on OSX
3540         https://bugs.webkit.org/show_bug.cgi?id=36961
3541
3542         * Configurations/FeatureDefines.xcconfig:
3543
3544 2010-04-02  Ruben Van Boxem  <vanboxem.ruben@gmail.com>
3545
3546         Reviewed by Eric Seidel.
3547
3548         Mingw-w64 fixes for JavaScriptCore
3549         https://bugs.webkit.org/show_bug.cgi?id=35607
3550
3551         * runtime/Collector.cpp: use the msvc code for mingw-w64 (but not mingw-w32)
3552         (JSC::Heap::allocateBlock):
3553         (JSC::Heap::freeBlockPtr):
3554         (JSC::currentThreadStackBase):
3555         (JSC::currentThreadStackBase):
3556         * wtf/Platform.h: added COMPILER(MINGW64) check to differentiate between mingw.org and mingw-w64 functions
3557
3558 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
3559
3560         Build fix: updated the .def file.
3561
3562         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3563
3564 2010-04-02  Geoffrey Garen  <ggaren@apple.com>
3565
3566         Reviewed by Oliver Hunt.
3567
3568         Inlined toThisString and toThisJSString to avoid virtual function call overhead
3569         https://bugs.webkit.org/show_bug.cgi?id=37039
3570         
3571         Maybe a 1% speedup on iBench JS.
3572
3573         * JavaScriptCore.exp: New exports.
3574
3575         * runtime/JSCell.cpp:
3576         * runtime/JSCell.h:
3577         * runtime/JSNumberCell.cpp:
3578         * runtime/JSNumberCell.h:
3579         * runtime/JSString.cpp:
3580         * runtime/JSString.h:
3581         * runtime/JSValue.h:
3582         * runtime/JSZombie.h:
3583         (JSC::JSZombie::toThisObject): Nixed the old virtual-type implementation.
3584
3585         * runtime/JSObject.h:
3586         (JSC::JSValue::toThisString):
3587         (JSC::JSValue::toThisJSString): Added the inlined implementation.
3588
3589 2010-04-02  Jeremy Moskovich  <jeremy@chromium.org>
3590
3591         Reviewed by Geoffrey Garen.
3592
3593         Beef up documentation for ASSERT* and CRASH macros a bit.
3594
3595         https://bugs.webkit.org/show_bug.cgi?id=36527
3596
3597         * wtf/Assertions.h:
3598
3599 2010-04-02  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3600
3601         Unreviewed, minor build fix.
3602
3603         Change the order of the member initialisation list
3604         in constructor to match declaration order
3605
3606         * runtime/Collector.cpp:
3607         (JSC::Heap::Heap):
3608
3609 2010-04-01  Kinuko Yasuda  <kinuko@chromium.org>
3610
3611         Reviewed by Dmitry Titov.
3612
3613         Add FileThread for async file operation support in FileReader and FileWriter
3614         https://bugs.webkit.org/show_bug.cgi?id=36896
3615
3616         Add ENABLE_FILE_READER and ENABLE_FILE_WRITER flags.
3617
3618         * Configurations/FeatureDefines.xcconfig:
3619
3620 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3621
3622         Reviewed by NOBODY (windows build fix pt II).
3623
3624         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3625
3626 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3627
3628         Reviewed by NOBODY (windows build fix).
3629
3630         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3631
3632 2010-03-31  Gavin Barraclough  <barraclough@apple.com>
3633
3634         Reviewed by Geoff Garen.
3635
3636         Bug 36871 - Remove JSC::CString
3637         Use WTF::CString instead (which until recently was WebCore::CString).
3638
3639         * JavaScriptCore.exp:
3640         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3641         * runtime/UString.cpp:
3642         * runtime/UString.h:
3643
3644 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3645
3646         Unreviewed, fix after r56842.
3647
3648         Add UNUSED_PARAM a to silence warning.
3649
3650         * jit/JITStubs.cpp:
3651         (JSC::DEFINE_STUB_FUNCTION):
3652
3653 2010-03-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3654
3655         Unreviewed, Symbian build fix.
3656
3657         Refactor JITStubs.cpp so that the list of STUB_FUNCTIONs
3658         are not dependent on the JSVALUE32_64 guard.
3659
3660         * jit/JITStubs.cpp: Place the JSVALUE32_64 guard inside 
3661         the body of cti_op_eq_strings.
3662         * jit/JITStubs.h: Remove JSVALUE32_64 guard from 
3663         cti_op_eq_strings stub.
3664
3665 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
3666
3667         Reviewed by NOBODY (windows build fix).
3668
3669         Fixing b0rked version of JavaScriptCore.vcproj - added lines were truncated.
3670
3671         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3672
3673 2010-03-30  Gavin Barraclough  <barraclough@apple.com>
3674
3675         Rubber stamped by Sam Weinig.
3676
3677         https://bugs.webkit.org/show_bug.cgi?id=36866
3678         Move CString to WTF
3679
3680         * Android.mk:
3681         * GNUmakefile.am:
3682         * JavaScriptCore.exp:
3683         * JavaScriptCore.gypi:
3684         * JavaScriptCore.pro:
3685         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3686         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3687         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3688         * JavaScriptCore.xcodeproj/project.pbxproj:
3689         * wtf/text: Added.
3690         * wtf/text/CString.cpp: Copied from WebCore/platform/text/CString.cpp.
3691         * wtf/text/CString.h: Copied from WebCore/platform/text/CString.h.
3692         (WTF::CStringBuffer::data):
3693         (WTF::CStringBuffer::length):
3694         (WTF::CStringBuffer::create):
3695         (WTF::CStringBuffer::CStringBuffer):
3696         (WTF::CStringBuffer::mutableData):
3697         (WTF::CString::CString):
3698         (WTF::CString::isNull):
3699         (WTF::CString::buffer):
3700         (WTF::operator!=):
3701
3702 2010-03-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3703
3704         Reviewed by nobody, build break.
3705
3706         [Qt] Fix build break on Qt Mac.
3707
3708         DESTDIR path on Mac do not include the configuration path by default
3709         like on Windows. Have to force it.
3710
3711         * JavaScriptCore.pro:
3712
3713 2010-03-29  Alice Liu  <alice.liu@apple.com>
3714
3715         Reviewed by NOBODY (build fix).
3716
3717         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
3718         add JSObjectRefPrivate.h
3719
3720 2010-03-29  Chao-ying Fu  <fu@mips.com>
3721
3722         Reviewed by Oliver Hunt.
3723
3724         MIPS JIT Supports
3725         https://bugs.webkit.org/show_bug.cgi?id=30144
3726
3727         The following changes enable MIPS JIT.
3728
3729         * assembler/MIPSAssembler.h:
3730         (JSC::MIPSAssembler::lbu):
3731         (JSC::MIPSAssembler::linkWithOffset):
3732         * assembler/MacroAssemblerMIPS.h:
3733         (JSC::MacroAssemblerMIPS::load8):
3734         (JSC::MacroAssemblerMIPS::branch8):
3735         (JSC::MacroAssemblerMIPS::branchTest8):
3736         (JSC::MacroAssemblerMIPS::setTest8):
3737         (JSC::MacroAssemblerMIPS::setTest32):
3738         * jit/JIT.h:
3739         * jit/JITInlineMethods.h:
3740         (JSC::JIT::preserveReturnAddressAfterCall):
3741         (JSC::JIT::restoreReturnAddressBeforeReturn):
3742         * jit/JITOpcodes.cpp:
3743         * jit/JITStubs.cpp:
3744         (JSC::JITThunks::JITThunks):
3745         * jit/JITStubs.h:
3746         (JSC::JITStackFrame::returnAddressSlot):
3747         * wtf/Platform.h:
3748
3749 2010-02-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3750
3751         Reviewed by Simon Fraser.
3752
3753         Add support for Widgets 1.0: View Mode Media Feature
3754         https://bugs.webkit.org/show_bug.cgi?id=35446
3755
3756         Add an enable flag for the Widgets (http://www.w3.org/TR/widgets-reqs/)
3757         and turn it on for Qt only.
3758
3759         * wtf/Platform.h:
3760
3761 2010-03-29  Patrick Gansterer  <paroga@paroga.com>
3762
3763         Reviewed by Darin Adler.
3764
3765         Corrected name of (u)int64_t compile time assert.
3766         https://bugs.webkit.org/show_bug.cgi?id=36739
3767
3768         int64_t_is_four_bytes -> int64_t_is_eight_bytes
3769
3770         * os-win32/stdint.h:
3771
3772 2010-03-29  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3773
3774         Reviewed by Simon Hausmann.
3775
3776         [Qt] Use the -l syntax for linking against JavaScriptCore on Windows.
3777         This allow qmake to extract dependencies correctly when generating VS
3778         solutions.
3779
3780         * JavaScriptCore.pri:
3781
3782 2010-03-29  Thomas Zander  <t.zander@nokia.com>
3783
3784         Reviewed by Simon Hausmann.
3785
3786         https://bugs.webkit.org/show_bug.cgi?id=36742
3787
3788         gcc for Symbian doesn't support gcc extensions like atomicity.h - disable
3789
3790         * wtf/Threading.h: also detect os symbian
3791
3792 2010-03-28  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3793
3794         Reviewed by Simon Hausmann.
3795
3796         [Qt] Remove the definition of WTF_CHANGES guards from the build system
3797         https://bugs.webkit.org/show_bug.cgi?id=31670
3798   
3799         * JavaScriptCore.pro: Remove the definition of WTF_CHANGES
3800         as it is already defined in config.h
3801
3802 2010-03-28  Kent Hansen  <kent.hansen@nokia.com>
3803
3804         Reviewed by Simon Hausmann.
3805
3806         [Qt] Add API for reporting additional memory cost of JavaScript objects
3807         https://bugs.webkit.org/show_bug.cgi?id=36650
3808
3809         * qt/api/qscriptengine.cpp:
3810         (QScriptEngine::reportAdditionalMemoryCost):
3811         * qt/api/qscriptengine.h:
3812         * qt/api/qscriptengine_p.h:
3813         (QScriptEnginePrivate::reportAdditionalMemoryCost):
3814         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3815         (tst_QScriptEngine::reportAdditionalMemoryCost):
3816
3817 2010-03-28  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3818
3819         Reviewed by Simon Hausmann.
3820
3821         QScriptEngine API was enriched by globalObject() method
3822         which give an access to the global object.
3823
3824         [Qt] QScriptEngine doesn't give an access to global object
3825         https://bugs.webkit.org/show_bug.cgi?id=36603
3826
3827         * qt/api/qscriptengine.cpp:
3828         (QScriptEngine::globalObject):
3829         * qt/api/qscriptengine.h:
3830         * qt/api/qscriptengine_p.cpp:
3831         (QScriptEnginePrivate::globalObject):
3832         * qt/api/qscriptengine_p.h:
3833         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
3834         (tst_QScriptEngine::globalObject):
3835
3836 2010-03-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3837
3838         Reviewed by Simon Hausmann.
3839
3840         [Qt] Build JavaScriptCore as a static library.
3841         https://bugs.webkit.org/show_bug.cgi?id=36590
3842
3843         This patch takes what was left of the unused JavaScriptCore.pro
3844         and moved the compilation logic from JavaScriptCore.pri to
3845         JavaScriptCore.pro.
3846
3847         * JavaScriptCore.pri:
3848         * JavaScriptCore.pro:
3849         * jsc.pro:
3850         * qt/api/QtScript.pro:
3851
3852 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
3853
3854         Reviewed by NOBODY (build fix).
3855
3856         * profiler/ProfileGenerator.cpp:
3857         (JSC::ProfileGenerator::willExecute):
3858         (JSC::ProfileGenerator::didExecute):
3859
3860 2010-03-25  Gavin Barraclough  <barraclough@apple.com>
3861
3862         Reviewed by Geoff Garen.
3863
3864         Bug 36611 - Cleanup JSC::CString
3865         Rename CString::c_str() -> CString::data(), CString::size() -> CString::length(),
3866         remove UString::getCString() (all uses are wrong, should use UString::UTF8String()).
3867
3868         * bytecode/CodeBlock.cpp:
3869         (JSC::CodeBlock::printUnaryOp):
3870         (JSC::CodeBlock::printBinaryOp):
3871         (JSC::CodeBlock::printConditionalJump):
3872         (JSC::CodeBlock::printGetByIdOp):
3873         (JSC::CodeBlock::printPutByIdOp):
3874         (JSC::printGlobalResolveInfo):
3875         (JSC::printStructureStubInfo):
3876         (JSC::CodeBlock::printStructure):
3877         (JSC::CodeBlock::printStructures):
3878         (JSC::CodeBlock::dump):
3879         * jsc.cpp:
3880         (functionPrint):
3881         (functionDebug):
3882         (runInteractive):
3883         (fillBufferWithContentsOfFile):
3884         * profiler/CallIdentifier.h:
3885         (JSC::CallIdentifier::c_str):
3886         * profiler/Profile.cpp:
3887         (JSC::Profile::debugPrintDataSampleStyle):
3888         * profiler/ProfileNode.cpp:
3889         (JSC::ProfileNode::debugPrintData):
3890         (JSC::ProfileNode::debugPrintDataSampleStyle):
3891         * runtime/DateConversion.cpp:
3892         (JSC::parseDate):
3893         * runtime/JSGlobalObjectFunctions.cpp:
3894         (JSC::encode):
3895         (JSC::globalFuncJSCPrint):
3896         * runtime/UString.cpp:
3897         (JSC::operator==):
3898         (JSC::UString::toDouble):
3899         * runtime/UString.h:
3900         (JSC::CString::length):
3901         (JSC::CString::data):
3902
3903 2010-03-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3904
3905         Reviewed by nobody, build fix.
3906
3907         [Qt] Build fix on MSVC. Reverts r55633 for stdint.h
3908
3909         This file gets included in generated moc files which don't
3910         include the prefix header.
3911
3912         * os-win32/stdint.h:
3913
3914 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
3915
3916         Reviewed by NOBODY (windows build fix).
3917
3918 2010-03-24  Gavin Barraclough  <barraclough@apple.com>
3919
3920         Reviewed by Sam Weinig.
3921
3922         Switch String::latin1, String::utf8, String::fromUTF8 to
3923         use WTF's Unicode conversion methods rather than TextEncoder.
3924         These methods only perform simple conversion, and don't need
3925         really require TextEncoder's full capability (to look up arbitrary
3926         encodings by name), switching to only be dependent on WTF will
3927         make it easier if we chose to move WebCore::String to WTF.
3928
3929         * JavaScriptCore.exp:
3930
3931 2010-03-24  Alexey Proskuryakov  <ap@apple.com>
3932
3933         Reviewed by Geoff Garen.
3934
3935         * wtf/FastMalloc.h: Added a using directive for fastMallocSize, like we do for all public
3936         WTF symbols. Also sorted the list alphabetically.
3937
3938 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3939
3940         Reviewed by NOBODY (speculative windows build fix part II).
3941
3942 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3943
3944         Reviewed by NOBODY (speculative windows build fix).
3945
3946 2010-03-23  Gavin Barraclough  <barraclough@apple.com>
3947
3948         Reviewed by Oliver Hunt.
3949
3950         Bug 36519 - JSGlobalContextRelease is unnecessarily slow
3951
3952         Since [ http://trac.webkit.org/changeset/35917 ], calling
3953         JSGlobalContextRelease always triggers a GC heap collection
3954         (if not a full destroy). As per 35917's changelog "This is
3955         only really necessary when the (JSGlobalObject's) last
3956         reference is released, but there is no way to determine that,
3957         and no harm in collecting slightly more often."
3958         
3959         Well, we now know of cases of API clients who are harmed by
3960         the performance penalty of collecting too often, so it's time
3961         to add a way to determine whether a call to JSGlobalContextRelease
3962         is removing the last protect from it's global object.  If further
3963         protects are retaining the global object (likely from other
3964         JSGlobalContextRefs), then don't trigger a GC collection.
3965
3966         * API/JSContextRef.cpp:
3967         * runtime/Collector.cpp:
3968         (JSC::Heap::unprotect): return a boolean indicating that the value is now unprotected.
3969         * runtime/Collector.h:
3970         * wtf/HashCountedSet.h:
3971         (WTF::::remove): return a boolean indicating whether the value was removed from the set.
3972
3973 2010-03-23  Mark Rowe  <mrowe@apple.com>
3974
3975         Build fix.
3976
3977         * runtime/ArrayPrototype.cpp:
3978         (JSC::arrayProtoFuncSplice): Some versions of GCC emit a warning about the implicit 64- to 32-bit truncation
3979         that takes place here. An explicit cast is sufficient to silence it.
3980
3981 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
3982
3983         Build fix.
3984
3985         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): Fixed a typo - length doesn't
3986         need to be converted with toInteger().
3987
3988 2010-03-23  Alexey Proskuryakov  <ap@apple.com>
3989
3990         Reviewed by Geoff Garen.
3991
3992         https://bugs.webkit.org/show_bug.cgi?id=36511
3993         <rdar://problem/7753498> Safari freezes when using SPUTNIK JavaScript conformance check
3994
3995         Test: fast/js/sputnik-S15.4.4.12_A3_T3.html
3996
3997         * runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncSplice): We were incorrectly computing
3998         the start offset, and iterated over (almost) all integers. Note that this can be fixed
3999         without using doubles, but the code would be much more complicated, and there is no important
4000         reason to stick to integers here.
4001
4002 2010-03-23  Kent Hansen  <kent.hansen@nokia.com>
4003
4004         Reviewed by Darin Adler.
4005
4006         Fix compilation on Itanium in 32-bit mode
4007         https://bugs.webkit.org/show_bug.cgi?id=36494
4008
4009         * wtf/Platform.h: Introduce CPU(IA64_32). Don't define
4010           WTF_USE_JSVALUE64 if the CPU is in 32-bit mode.
4011
4012 2010-03-23  Geoffrey Garen  <ggaren@apple.com>
4013
4014         Reviewed by Mark Rowe.
4015
4016         Interpreter fix for <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
4017         evaluates to -2147483648 on 32 bit (35842)
4018
4019         * interpreter/Interpreter.cpp:
4020         (JSC::Interpreter::privateExecute): Only take the fast negate path if
4021         a bit other than bit 31 is set. If none of bits 0-30 are set, then the
4022         value we're negating can only be 0 or -2147483648, and neither can be
4023         negated in int space.
4024
4025         * jit/JITArithmetic.cpp:
4026         (JSC::JIT::emit_op_negate):
4027         (JSC::JIT::emitSlow_op_negate): Updated the JIT implementation to match
4028         the interpreter, since it's slightly simpler.
4029
4030 2010-03-22  Siddharth Mathur  <siddharth.mathur@nokia.com>
4031
4032         Reviewed by Laszlo Gombos.
4033
4034         [Symbian] More efficient aligned memory allocation for JSC Collector
4035         https://bugs.webkit.org/show_bug.cgi?id=34350
4036
4037         * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
4038
4039         * runtime/Collector.cpp: Reduced port-specific code and added private data member
4040         (JSC::Heap::Heap):
4041         (JSC::Heap::~Heap):
4042         (JSC::Heap::destroy):
4043         (JSC::Heap::allocateBlock):
4044         (JSC::Heap::freeBlockPtr):
4045
4046         * runtime/Collector.h: Added private data member
4047
4048         * wtf/symbian: Added.
4049         * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
4050         (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
4051         aligned blocks more efficiently as required by Collector
4052         (WTF::AlignedBlockAllocator::alloc):
4053         (WTF::AlignedBlockAllocator::free):
4054         (WTF::AlignedBlockAllocator::destroy):
4055         (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
4056         * wtf/symbian/BlockAllocatorSymbian.h: Added.
4057
4058 2010-03-22  Geoffrey Garen  <ggaren@apple.com>
4059
4060         Reviewed by Sam Weinig.
4061
4062         Fixed <rdar://problem/7728196> REGRESSION (r46701): -(-2147483648)
4063         evaluates to -2147483648 on 32 bit (35842)
4064         
4065         Two ways to fix the same bug:
4066         
4067         1. Check for overflow when negating, since negating the largest negative
4068         int causes overflow.
4069         
4070         2. Constant-fold even when negating a negative, since, like they say in
4071         high school, "math works."
4072
4073         * assembler/MacroAssemblerARM.h:
4074         (JSC::MacroAssemblerARM::branchNeg32):
4075         * assembler/MacroAssemblerX86Common.h:
4076         (JSC::MacroAssemblerX86Common::branchNeg32): Added a branching version
4077         of the negate operator.
4078
4079         * jit/JITArithmetic.cpp:
4080         (JSC::JIT::emit_op_negate): Use the branching version of the negate 
4081         operator to check for overflow.
4082
4083         (JSC::JIT::emitSlow_op_negate): Link the check for overflow to a slow case.
4084         (We could emit inline code for this, since we know what the result would
4085         be, but that's probably just a waste of generated code.)
4086
4087         * parser/Grammar.y: Constant fold even when negating a negative.
4088
4089 2010-03-22  David Kilzer  <ddkilzer@apple.com>
4090
4091         <http://webkit.org/b/36431> Clean up 'int' use in UString.cpp after r54789
4092
4093         Reviewed by Darin Adler.
4094
4095         * runtime/UString.cpp:
4096         (JSC::UString::from): Changed argument type from 'unsigned int'
4097         to 'unsigned' to match WebKit coding style.
4098         (JSC::UString::find): Changed static_cast<int>() to
4099         static_cast<unsigned>() now that this method returns unsigned.
4100         (JSC::UString::rfind): Ditto.
4101         * runtime/UString.h:
4102         (JSC::UString::from): Changed argument type from 'unsigned int'
4103         to 'unsigned' to match WebKit coding style.
4104
4105 2010-03-22  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
4106
4107         Reviewed by Kenneth Rohde Christiansen.
4108
4109         Add support for syntax checking in the QtScript API.
4110
4111         New class was created; the QScriptSyntaxCheckResult which main
4112         responsibility is to provide results of the ECMA Script code
4113         syntax check. The class is not fully functional as the JSC C API
4114         doesn't expose an error column number, but it is a good start point
4115         for a future development.
4116
4117         [Qt] QtScript functionality should be extended by syntax checking.
4118         https://bugs.webkit.org/show_bug.cgi?id=36123
4119
4120         * qt/api/QtScript.pro:
4121         * qt/api/qscriptengine.cpp:
4122         (QScriptEngine::checkSyntax):
4123         * qt/api/qscriptengine.h:
4124         * qt/api/qscriptengine_p.cpp:
4125         (QScriptEnginePrivate::checkSyntax):
4126         * qt/api/qscriptengine_p.h:
4127         * qt/api/qscriptsyntaxcheckresult.cpp: Added.
4128         (QScriptSyntaxCheckResult::QScriptSyntaxCheckResult):
4129         (QScriptSyntaxCheckResult::~QScriptSyntaxCheckResult):
4130         (QScriptSyntaxCheckResult::operator=):
4131         (QScriptSyntaxCheckResult::state):
4132         (QScriptSyntaxCheckResult::errorLineNumber):
4133         (QScriptSyntaxCheckResult::errorColumnNumber):
4134         (QScriptSyntaxCheckResult::errorMessage):
4135         * qt/api/qscriptsyntaxcheckresult.h: Added.
4136         * qt/api/qscriptsyntaxcheckresult_p.cpp: Added.
4137         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
4138         (QScriptSyntaxCheckResultPrivate::errorMessage):
4139         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
4140         * qt/api/qscriptsyntaxcheckresult_p.h: Added.
4141         (QScriptSyntaxCheckResultPrivate::get):
4142         (QScriptSyntaxCheckResultPrivate::QScriptSyntaxCheckResultPrivate):
4143         (QScriptSyntaxCheckResultPrivate::state):
4144         (QScriptSyntaxCheckResultPrivate::errorColumnNumber):
4145         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
4146         (tst_QScriptEngine::checkSyntax_data):
4147         (tst_QScriptEngine::checkSyntax):
4148
4149 2010-03-21  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
4150
4151         Reviewed by Simon Hausmann.
4152
4153         New class; QScriptProgram.
4154
4155         The class should be used to evaluate the same script multiple times
4156         more efficiently.
4157
4158         [Qt] QtScript should have QScriptProgram class
4159         https://bugs.webkit.org/show_bug.cgi?id=36008
4160
4161         * qt/api/QtScript.pro:
4162         * qt/api/qscriptengine.cpp:
4163         (QScriptEngine::evaluate):
4164         * qt/api/qscriptengine.h:
4165         * qt/api/qscriptengine_p.cpp:
4166         (QScriptEnginePrivate::evaluate):
4167         * qt/api/qscriptengine_p.h:
4168         (QScriptEnginePrivate::evaluate):
4169         * qt/api/qscriptprogram.cpp: Added.
4170         (QScriptProgram::QScriptProgram):
4171         (QScriptProgram::~QScriptProgram):
4172         (QScriptProgram::operator=):
4173         (QScriptProgram::isNull):
4174         (QScriptProgram::sourceCode):
4175         (QScriptProgram::fileName):
4176         (QScriptProgram::firstLineNumber):
4177         (QScriptProgram::operator==):
4178         (QScriptProgram::operator!=):
4179         * qt/api/qscriptprogram.h: Added.
4180         * qt/api/qscriptprogram_p.h: Added.
4181         (QScriptProgramPrivate::get):
4182         (QScriptProgramPrivate::QScriptProgramPrivate):
4183         (QScriptProgramPrivate::~QScriptProgramPrivate):
4184         (QScriptProgramPrivate::isNull):
4185         (QScriptProgramPrivate::sourceCode):
4186         (QScriptProgramPrivate::fileName):
4187         (QScriptProgramPrivate::firstLineNumber):
4188         (QScriptProgramPrivate::operator==):
4189         (QScriptProgramPrivate::operator!=):
4190         (QScriptProgramPrivate::program):
4191         (QScriptProgramPrivate::file):
4192         (QScriptProgramPrivate::line):
4193         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
4194         (tst_QScriptEngine::evaluateProgram):
4195
4196 2010-03-21  David Kilzer  <ddkilzer@apple.com>
4197
4198         Blind attempt #2 to fix the Windows build after r56314
4199
4200         * API/tests/testapi.c: Include JSObjectRefPrivate.h for the new
4201         methods instead of declaring them locally (and non-extern).
4202         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4203         Backed out previous change.
4204
4205 2010-03-21  David Kilzer  <ddkilzer@apple.com>
4206
4207         Blind attempt to fix the Windows build after r56314
4208
4209         Try to fix the following errors on the Windows buildbot:
4210
4211             Linking...
4212             testapi.obj : error LNK2001: unresolved external symbol "bool __cdecl JSObjectSetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *,struct OpaqueJSValue const *)" (?JSObjectSetPrivateProperty@@YA_NPBUOpaqueJSContext@@PAUOpaqueJSValue@@PAUOpaqueJSString@@PBU2@@Z)
4213             testapi.obj : error LNK2001: unresolved external symbol "struct OpaqueJSValue const * __cdecl JSObjectGetPrivateProperty(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSString *)" (?JSObjectGetPrivateProperty@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1@PAUOpaqueJSString@@@Z)
4214             C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\bin\testapi.exe : fatal error LNK1120: 2 unresolved externals
4215
4216         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
4217         missing symbols to be exported.
4218
4219 2010-03-21  Oliver Hunt  <oliver@apple.com>
4220
4221         Reviewed by Maciej Stachowiak.
4222
4223         Documentation fix for previous patch.
4224
4225         * API/JSObjectRefPrivate.h:
4226
4227 2010-03-20  Oliver Hunt  <oliver@apple.com>
4228
4229         Reviewed by Maciej Stachowiak.
4230
4231         JSC needs an API to allow custom objects to have aprivate GC-accessible properties
4232         https://bugs.webkit.org/show_bug.cgi?id=36420
4233
4234         Add new API methods to support "private" properties on custom
4235         objects.
4236
4237         * API/JSCallbackObject.h:
4238         (JSC::JSCallbackObjectData::JSCallbackObjectData):
4239         (JSC::JSCallbackObjectData::~JSCallbackObjectData):
4240         (JSC::JSCallbackObjectData::getPrivateProperty):
4241         (JSC::JSCallbackObjectData::setPrivateProperty):
4242         (JSC::JSCallbackObjectData::deletePrivateProperty):
4243         (JSC::JSCallbackObjectData::markChildren):
4244         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::getPrivateProperty):
4245         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::setPrivateProperty):
4246         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::deletePrivateProperty):
4247         (JSC::JSCallbackObjectData::JSPrivatePropertyMap::markChildren):
4248         (JSC::JSCallbackObject::getPrivateProperty):
4249         (JSC::JSCallbackObject::setPrivateProperty):
4250         (JSC::JSCallbackObject::deletePrivateProperty):
4251         (JSC::JSCallbackObject::markChildren):
4252         * API/JSObjectRef.cpp:
4253         (JSObjectGetPrivateProperty):
4254         (JSObjectSetPrivateProperty):
4255         (JSObjectDeletePrivateProperty):
4256         * API/JSObjectRefPrivate.h: Added.
4257         * API/tests/testapi.c:
4258         (main):
4259         * JavaScriptCore.exp:
4260         * JavaScriptCore.xcodeproj/project.pbxproj:
4261
4262 2010-03-20  Kevin Ollivier  <kevino@theolliviers.com>
4263
4264         [wx] Build fixes after introduction of Brew files.
4265
4266         * wscript:
4267
4268 2010-03-18  Tom Callaway  <tcallawa@redhat.com>
4269
4270         Reviewed by Darin Adler.
4271
4272         Bug 35429: Fix compile on SPARC64
4273         https://bugs.webkit.org/show_bug.cgi?id=35429
4274
4275         * wtf/Platform.h: Set WTF_USE_JSVALUE64 for SPARC64
4276
4277 2010-03-18  Oliver Hunt  <oliver@apple.com>
4278
4279         Reviewed by Sam Weinig.
4280
4281         Add API to directly expose JSON parsing
4282         https://bugs.webkit.org/show_bug.cgi?id=34887
4283
4284         Add API to expose JSON parsing directly, and add tests to testapi
4285
4286         * API/JSValueRef.cpp:
4287         (JSValueMakeFromJSONString):
4288         (JSValueCreateJSONString):
4289         * API/tests/testapi.c:
4290         (main):
4291         * JavaScriptCore.exp:
4292         * runtime/JSONObject.cpp:
4293         (JSC::JSONStringify):
4294         * runtime/JSONObject.h:
4295
4296 2010-03-16  Sam Weinig  <sam@webkit.org>
4297
4298         Reviewed by Darin Adler and Mark Rowe.
4299
4300         Update WebKit availability macros for release after 4.0.
4301
4302         * API/WebKitAvailability.h:
4303
4304 2010-03-17  Oliver Hunt  <oliver@apple.com>
4305
4306         Reviewed by Gavin Barraclough.
4307
4308         undefined, NaN, and Infinity should be ReadOnly
4309         https://bugs.webkit.org/show_bug.cgi?id=36263
4310
4311         Simply add the ReadOnly flag to these properties.
4312
4313         * runtime/JSGlobalObject.cpp:
4314         (JSC::JSGlobalObject::reset):
4315
4316 2010-03-17  Dar