0a4909bd483189adb55b482f221e2ee34a08324b
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
2
3         Speculative !debug build fix II.
4
5         * wtf/PageAllocation.h:
6         (WTF::PageAllocation::PageAllocation):
7
8 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
9
10         Speculative !debug build fix.
11
12         * wtf/PageAllocation.h:
13         (WTF::PageAllocation::PageAllocation):
14
15 2010-07-26  Gavin Barraclough  <barraclough@apple.com>
16
17         Reviewed by Oliver Hunt.
18
19         Bug 43009 - Abstract out page allocation from executable allocators
20
21         It would be great to have a single platform abstraction for block allocation, rather than copy/paste code.
22
23         In this initial implementation I've made Symbian fall back to use malloc/free for non-executable memory.
24         I think this will match current behaviour for the next client we will want to port across (RegisterFile &
25         Collector).
26
27         * CMakeListsEfl.txt:
28         * GNUmakefile.am:
29         * JavaScriptCore.gypi:
30         * JavaScriptCore.pro:
31         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
32         * JavaScriptCore.xcodeproj/project.pbxproj:
33         * jit/ExecutableAllocator.cpp:
34         (JSC::ExecutableAllocator::intializePageSize):
35         (JSC::ExecutablePool::systemAlloc):
36         (JSC::ExecutablePool::systemRelease):
37         (JSC::ExecutableAllocator::isValid):
38         * jit/ExecutableAllocator.h:
39         (JSC::ExecutablePool::ExecutablePool):
40         (JSC::ExecutablePool::poolAllocate):
41         * jit/ExecutableAllocatorFixedVMPool.cpp:
42         (JSC::FixedVMPoolAllocator::release):
43         (JSC::FixedVMPoolAllocator::reuse):
44         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
45         (JSC::FixedVMPoolAllocator::alloc):
46         (JSC::FixedVMPoolAllocator::free):
47         (JSC::FixedVMPoolAllocator::isValid):
48         (JSC::FixedVMPoolAllocator::isWithinVMPool):
49         (JSC::ExecutablePool::systemAlloc):
50         (JSC::ExecutablePool::systemRelease):
51         * jit/ExecutableAllocatorPosix.cpp: Removed.
52         * jit/ExecutableAllocatorSymbian.cpp: Removed.
53         * jit/ExecutableAllocatorWin.cpp: Removed.
54         * wscript:
55         * wtf/PageAllocator.cpp: Added.
56         (WTF::protection):
57         (WTF::PageAllocation::commit):
58         (WTF::PageAllocation::decommit):
59         (WTF::PageAllocator::allocate):
60         (WTF::PageAllocator::reserve):
61         (WTF::PageAllocator::deallocate):
62         (WTF::PageAllocator::pagesize):
63         * wtf/PageAllocator.h: Added.
64         (WTF::PageAllocation::PageAllocation):
65         (WTF::PageAllocation::base):
66         (WTF::PageAllocation::size):
67         (WTF::PageAllocation::chunk):
68         (WTF::PageAllocation::operator!):
69         (WTF::PageAllocator::):
70
71 2009-10-30  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
72
73         Reviewed by Kenneth Rohde Christiansen.
74
75         [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
76
77         This ensures that long-running JavaScript (for example due to a modal alert() dialog),
78         will not trigger a deferred load after only 500ms (the default tokenizer delay) while
79         still giving a reasonable timeout (10 seconds) to prevent deadlock.
80
81         https://bugs.webkit.org/show_bug.cgi?id=29381
82
83         * runtime/TimeoutChecker.h: Add getter for the timeout interval
84
85 2010-07-25  Patrick Gansterer  <paroga@paroga.com>
86
87         Reviewed by Kent Tamura.
88
89         [WINCE] Buildfix for JSC in release mode
90         https://bugs.webkit.org/show_bug.cgi?id=42934
91
92         * jsc.cpp: Don't use __try on WinCE.
93
94 2010-07-24  Patrick Gansterer  <paroga@paroga.com>
95
96         Reviewed by Darin Adler.
97
98         [MSVC] Ensure 4 byte alignment on ARM
99         https://bugs.webkit.org/show_bug.cgi?id=42935
100
101         * jit/JITStubs.h: Added #pragma pack(4) around JITStackFrame.
102
103 2010-07-24  Patrick Gansterer  <paroga@paroga.com>
104
105         Reviewed by Darin Adler.
106
107         [WINCE] Cleanup defines in Platform.h
108         https://bugs.webkit.org/show_bug.cgi?id=42933
109
110         * wtf/Platform.h:
111
112 2010-07-23  Rafael Antognolli  <antognolli@profusion.mobi>
113
114         Reviewed by Antonio Gomes.
115
116         [EFL] Cleanup glib support (make it optional)
117         https://bugs.webkit.org/show_bug.cgi?id=42480
118
119         Remove gobject/GRefPtr.cpp if not using soup/glib.
120
121         * wtf/CMakeListsEfl.txt:
122
123 2010-07-23  Patrick Gansterer  <paroga@paroga.com>
124
125         Reviewed by Adam Roben.
126
127         [WINCE] Implement TCSpinLock.
128         https://bugs.webkit.org/show_bug.cgi?id=41792
129
130         Implement the SpinLock with InterlockedExchange from the Windows API.
131
132         * wtf/TCSpinLock.h:
133         (TCMalloc_SpinLock::Lock):
134         (TCMalloc_SpinLock::Unlock):
135         (TCMalloc_SpinLock::IsHeld):
136         (TCMalloc_SpinLock::Init):
137         (TCMalloc_SlowLock):
138
139 2010-07-22  Csaba Osztrogonác  <ossy@webkit.org>
140
141         Unreviewed rolling out r63947 and r63948, because they broke Qt Windows build.
142
143         * jit/JITStubs.cpp:
144         * jit/JITStubs.h:
145
146 2010-07-22  Gavin Barraclough  <barraclough@apple.com>
147
148         Eeeep! r63947 hosed all non-x86 builds!
149
150         * jit/JITStubs.h:
151
152 2010-07-22  Gavin Barraclough  <barraclough@apple.com>
153
154         Reviewed by Oliver Hunt.
155
156         Bug 42818 - [Qt] REGRESSION(63348): jsc is broken
157         Speculative fix, need fastcall conventions on Qt/Win.
158
159         * jit/JITStubs.cpp:
160         * jit/JITStubs.h:
161
162 2010-07-22  Oliver Hunt  <oliver@apple.com>
163
164         Reviewed by Gavin Barraclough.
165
166         Do more constant folding
167         https://bugs.webkit.org/show_bug.cgi?id=42867
168
169         Constant fold a few more operations.  SunSpider says this is
170         a win but I suspect that's just code motion at play.
171
172         * parser/ASTBuilder.h:
173         (JSC::ASTBuilder::makeModNode):
174         (JSC::ASTBuilder::makeURightShiftNode):
175         (JSC::ASTBuilder::makeBitOrNode):
176         (JSC::ASTBuilder::makeBitAndNode):
177         (JSC::ASTBuilder::makeBitXOrNode):
178         (JSC::ASTBuilder::makeBinaryNode):
179
180 2010-07-22  Kent Hansen  <kent.hansen@nokia.com>
181
182         Reviewed by Kent Tamura.
183
184         Error properties of the Global Object are missing the DontEnum attribute
185         https://bugs.webkit.org/show_bug.cgi?id=28771
186
187         Add the attributes to become spec compliant.
188
189         * runtime/JSGlobalObject.cpp:
190         (JSC::JSGlobalObject::reset):
191
192 2010-07-20  Steve Falkenburg  <sfalken@apple.com>
193
194         Reviewed by Adam Roben.
195
196         WebKit on Windows should build optionally with an unversioned ICU DLL
197         https://bugs.webkit.org/show_bug.cgi?id=42722
198         <rdar://problem/8211743> JavaScriptCore needs to link against unversioned ICU
199         
200         Dynamically create a new header, ICUVersion.h, as part of build-generated-files.sh.
201         Header contains a preprocessor define (U_DISABLE_RENAMING) indicating to ICU whether the ICU API
202         should be namespaced with the current ICU version number. Proper value is determined
203         by checking for the presence of libicuuc.lib, the unversioned copy of ICU.
204         
205         To get the proper value for U_DISABLE_RENAMING into all source files, we force
206         the include of ICUVersion.h (our generated header) via the compiler options.
207         
208         Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
209         we copy the ICU lib to an intermediate location under obj with a common name. This
210         allows us to link properly with either without adding a new build configuration.
211
212         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
213         Copy ICU libs into a common location with a common name.
214         Add additional library search path to pick up icu lib.
215         Change ICU library filename specified to linker.
216         Add forced include of ICUVersion.h.
217         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Generate ICUVersion.h
218         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Add forced include of ICUVersion.h.
219         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
220         Copy ICU libs into a common location with a common name.
221         Add additional library search path to pick up icu lib.
222         Change ICU library filename specified to linker.
223         Add forced include of ICUVersion.h.
224         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
225         Copy ICU libs into a common location with a common name.
226         Add additional library search path to pick up icu lib.
227         Change ICU library filename specified to linker.
228         Add forced include of ICUVersion.h.
229
230 2010-07-20  Steve Falkenburg  <sfalken@apple.com>
231
232         Re-save vsprops files after no-op edits in Visual Studio
233         to fix manual edit issues.
234
235 2010-07-20  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
236
237         Reviewed by Steve Block.
238
239         Need to be able to configure Geolocation policy regarding user permissions
240         https://bugs.webkit.org/show_bug.cgi?id=42068
241
242         If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
243         by default 
244
245         * wtf/Platform.h:
246         
247 2010-07-20  Sheriff Bot  <webkit.review.bot@gmail.com>
248
249         Unreviewed, rolling out r63742.
250         http://trac.webkit.org/changeset/63742
251         https://bugs.webkit.org/show_bug.cgi?id=42641
252
253         Broke Leopard Intel build. (Requested by bbandix on #webkit).
254
255         * wtf/Platform.h:
256
257 2010-07-20  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
258
259         Reviewed by Steve Block.
260
261         Need to be able to configure Geolocation policy regarding user permissions
262         https://bugs.webkit.org/show_bug.cgi?id=42068
263
264         If CLIENT_BASED_GEOLOCATION is enabled, enable preemtive permission policy
265         by default 
266
267         * wtf/Platform.h:
268         
269 2010-07-19  Dirk Schulze  <krit@webkit.org>
270
271         Reviewed by Nikolas Zimmermann.
272
273         SVG CleanUp of SVGPathData parsing
274         https://bugs.webkit.org/show_bug.cgi?id=41410
275
276         Added piOverTwo to MathExtras.
277
278         * wtf/MathExtras.h:
279
280 2010-07-19  Mike Moretti  <mike.moretti@nokia.com>
281
282         Reviewed by Laszlo Gombos.
283
284         [Symbian] Build fix after r63404.
285
286         Implement isValid() function for the Symbian executable allocator.
287
288         * jit/ExecutableAllocatorSymbian.cpp:
289         (JSC::ExecutableAllocator::isValid):
290
291 2010-07-19  Chris Marrin  <cmarrin@apple.com>
292
293         Reviewed by Darin Adler.
294
295         https://bugs.webkit.org/show_bug.cgi?id=42118
296         Disable WebGL on Leopard for now. 
297
298         LayoutTests fail on some graphics hardware on Leopard because one of the features we use,
299         GL_ARB_framebuffer_object, is not universally available in Leopard like it is in
300         SnowLeopard. This will allow LayoutTests to pass on Leopard until we add logic to use a
301         software OpenGL driver on machines without this support.
302
303         * Configurations/FeatureDefines.xcconfig:
304
305 2010-07-16  Darin Adler  <darin@apple.com>
306
307         Reviewed by Sam Weinig.
308
309         Use OwnPtr for CodeBlock objects
310         https://bugs.webkit.org/show_bug.cgi?id=42490
311
312         * runtime/Executable.cpp:
313         (JSC::EvalExecutable::EvalExecutable): Moved this here and made it non-inline.
314         Eliminated the code that used to initialize the raw pointer since it's now
315         an OwnPtr.
316         (JSC::EvalExecutable::~EvalExecutable): Removed the explicit delete here.
317         (JSC::ProgramExecutable::ProgramExecutable): Ditto.
318         (JSC::ProgramExecutable::~ProgramExecutable): Ditto.
319         (JSC::FunctionExecutable::FunctionExecutable): Ditto.
320         (JSC::FunctionExecutable::~FunctionExecutable): Ditto.
321         (JSC::EvalExecutable::compileInternal): Added use of adoptPtr and get.
322         (JSC::ProgramExecutable::compileInternal): Ditto.
323         (JSC::FunctionExecutable::compileForCallInternal): Ditto.
324         (JSC::FunctionExecutable::compileForConstructInternal): Ditto.
325         (JSC::FunctionExecutable::recompile): Use clear instead of delete followed
326         by assignment of 0.
327
328         * runtime/Executable.h: Moved constructors to the cpp file and changed
329         raw pointers to OwnPtr.
330
331 2010-07-19  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
332
333         Reviewed by Kenneth Rohde Christiansen.
334
335         [EFL] Fix build on 64-bit systems. According to
336         JavaScriptCore/wtf/Platform.h, x86_64 uses fixed allocator, which
337         needs jit/ExecutableAllocatorFixedVMPool.cpp to be included in build
338         system.
339         https://bugs.webkit.org/show_bug.cgi?id=42559
340
341         * CMakeListsEfl.txt: add missing file for x86_64.
342
343 2010-07-16  Leandro Pereira  <leandro@profusion.mobi>
344
345         [EFL] Unreviewed build system cleanup.
346
347         Move ExecutableAllocator{FixedVMPool,Posix,Symbian,Win}.cpp from
348         root CMakeLists.txt to the platform CMakeLists.txt.
349
350         * CMakeLists.txt:
351         * CMakeListsEfl.txt: Add ExecutableAllocatorPosix.cpp.
352
353 2010-07-16  Oliver Hunt  <oliver@apple.com>
354
355         Reviewed by Geoffrey Garen.
356
357         ES5 allows use of reserved words as IdentifierName
358         https://bugs.webkit.org/show_bug.cgi?id=42471
359
360         Modify the lexer to allow us to avoid identifying reserved
361         words in those contexts where they are valid identifiers, and
362         we know it's safe.  Additionally tag the reserved word tokens
363         so we can easily identify them in those cases where we can't
364         guarantee that we've skipped reserved word identification.
365
366         * parser/JSParser.cpp:
367         (JSC::JSParser::next):
368         (JSC::JSParser::parseProperty):
369         (JSC::JSParser::parseMemberExpression):
370         * parser/JSParser.h:
371         (JSC::):
372         * parser/Lexer.cpp:
373         (JSC::Lexer::lex):
374         * parser/Lexer.h:
375         (JSC::Lexer::):
376
377 2010-07-16  Anders Carlsson  <andersca@apple.com>
378
379         Reviewed by Sam Weinig.
380
381         clang++ build fixes for JavaScriptCore and WebCore
382         https://bugs.webkit.org/show_bug.cgi?id=42478
383
384         * runtime/RegExpKey.h:
385         (JSC::operator==):
386         Move the RegExpKey equals operator into the JSC namespace so it can be found by ADL.
387
388 2010-07-16  Anders Carlsson  <andersca@apple.com>
389
390         Reviewed by David Levin.
391
392         Really add WARN_UNUSED_RESULT to leakRef
393         https://bugs.webkit.org/show_bug.cgi?id=42464
394
395         * wtf/PassRefPtr.h:
396         (WTF::PassRefPtr::):
397         (WTF::NonNullPassRefPtr::):
398         Put the WARN_UNUSED_RESULT attribute at the right place.
399
400         * wtf/RetainPtr.h:
401         (WTF::RetainPtr::releaseRef):
402         Remove WARN_UNUSED_RESULT here for now, it leads to two warnings that need
403         to be fixed first.
404
405 2010-07-15  Victor Wang  <victorw@chromium.org>
406
407         Reviewed by David Levin.
408
409         [Chromium] Disable c4291 for chromium windows multi dll build.
410
411         https://bugs.webkit.org/show_bug.cgi?id=42177
412
413         * JavaScriptCore.gyp/JavaScriptCore.gyp:
414
415 2010-07-15  Geoffrey Garen  <ggaren@apple.com>
416
417         Reviewed by Maciej Stachowiak.
418
419         Crash entering mail.yahoo.com
420         https://bugs.webkit.org/show_bug.cgi?id=42394
421     
422         * bytecompiler/BytecodeGenerator.cpp:
423         (JSC::BytecodeGenerator::argumentNumberFor): Added a NULL check. If the
424         identifier we're resolving is not a local variable, registerFor returns
425         NULL.
426
427         * bytecompiler/NodesCodegen.cpp:
428         (JSC::FunctionBodyNode::emitBytecode): Unrelated to the crash, but I
429         noticed this while working on it: No need to NULL-check returnNode,
430         since an early return has already done so.
431
432 2010-07-15  Martin Robinson  <mrobinson@igalia.com>
433
434         Reviewed by Oliver Hunt.
435
436         [GTK] Simplify the distribution step
437         https://bugs.webkit.org/show_bug.cgi?id=42414
438
439         * GNUmakefile.am: Add extra dist files directly to EXTRA_DIST instead
440         of adding them by proxy via javascriptcore_dist. Sort the EXTRA_DIST list.
441         Refer to create_hash_table and create_regexp_tables directly, as is the
442         behavior with other code generation scripts.
443
444 2010-07-15  Oliver Hunt  <oliver@apple.com>
445
446         Reviewed by Geoff Garen.
447
448         Fix dumping of op_put_by_id.
449
450         * bytecode/CodeBlock.cpp:
451         (JSC::CodeBlock::printPutByIdOp):
452
453 2010-07-15  Zoltan Herczeg  <zherczeg@webkit.org>
454
455         Reviewed by Darin Adler.
456
457         Refactoring some parts of the lexer
458         https://bugs.webkit.org/show_bug.cgi?id=41845
459
460         This patch is a precursor of refactoring the identifier
461         parsing, which currently slows down the lexer, and not
462         ready for landing. This patch contains those sources,
463         which does not slow down the lexer (mainly style changes).
464
465         SunSpider: no change (529.4ms to 528.7ms)
466         --parse-only: no change (31.0ms to 31.2ms)
467
468         * parser/Lexer.cpp:
469         (JSC::isIdentStart): using typesOfASCIICharacters to determine
470              whether the current character is in identifier start
471         (JSC::isIdentPart): using typesOfASCIICharacters to determine
472              whether the current character is in identifier part
473         (JSC::Lexer::parseString): style fix
474         (JSC::Lexer::lex): removing the else after the main which
475              which reduces code duplication
476
477 2010-07-15  Mark Rowe  <mrowe@apple.com>
478
479         Update the sorting in the Xcode project files.
480
481         * JavaScriptCore.xcodeproj/project.pbxproj:
482
483 2010-07-14  Oliver Hunt  <oliver@apple.com>
484
485         Reviewed by Gavin Barraclough.
486
487         Make sure that mixed interpreter/jit builds don't try to use the jit if the allocator fails
488         https://bugs.webkit.org/show_bug.cgi?id=42310
489
490         Add some null checks to deal with the Fixed VM allocator failing
491         to get the requested executable region, delay the creation of the
492         JITStubs in JSGlobalData until after we know whether we're using
493         the JIT.
494
495         * jit/ExecutableAllocator.h:
496         (JSC::ExecutableAllocator::ExecutableAllocator):
497         (JSC::ExecutableAllocator::poolForSize):
498         * jit/ExecutableAllocatorFixedVMPool.cpp:
499         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
500         (JSC::FixedVMPoolAllocator::alloc):
501         (JSC::FixedVMPoolAllocator::free):
502         (JSC::FixedVMPoolAllocator::isValid):
503         (JSC::ExecutableAllocator::isValid):
504         (JSC::ExecutablePool::systemAlloc):
505         (JSC::ExecutablePool::systemRelease):
506         * jit/ExecutableAllocatorPosix.cpp:
507         (JSC::ExecutableAllocator::isValid):
508         * jit/ExecutableAllocatorWin.cpp:
509         (JSC::ExecutableAllocator::isValid):
510         * jit/JIT.cpp:
511         (JSC::JIT::linkCall):
512         (JSC::JIT::linkConstruct):
513         * jit/JIT.h:
514         (JSC::JIT::compileCTIMachineTrampolines):
515         (JSC::JIT::compileCTINativeCall):
516         * jit/JITArithmetic.cpp:
517         (JSC::JIT::emit_op_mod):
518         * jit/JITArithmetic32_64.cpp:
519         (JSC::JIT::emit_op_mod):
520         * jit/JITCall.cpp:
521         (JSC::JIT::compileOpCallVarargs):
522         (JSC::JIT::compileOpCall):
523         (JSC::JIT::compileOpCallSlowCase):
524         * jit/JITCall32_64.cpp:
525         (JSC::JIT::compileOpCallVarargs):
526         (JSC::JIT::compileOpCall):
527         (JSC::JIT::compileOpCallSlowCase):
528         * jit/JITOpcodes.cpp:
529         (JSC::JIT::privateCompileCTINativeCall):
530         * jit/JITStubs.cpp:
531         (JSC::JITThunks::JITThunks):
532         (JSC::JITThunks::tryCacheGetByID):
533         (JSC::JITThunks::hostFunctionStub):
534         * jit/ThunkGenerators.cpp:
535         (JSC::charCodeAtThunkGenerator):
536         (JSC::charAtThunkGenerator):
537         (JSC::fromCharCodeThunkGenerator):
538         (JSC::sqrtThunkGenerator):
539         (JSC::powThunkGenerator):
540         * runtime/Executable.h:
541         (JSC::NativeExecutable::create):
542         * runtime/JSGlobalData.cpp:
543         (JSC::JSGlobalData::JSGlobalData):
544         (JSC::JSGlobalData::getHostFunction):
545         * runtime/JSGlobalData.h:
546         (JSC::JSGlobalData::getCTIStub):
547         * yarr/RegexJIT.cpp:
548         (JSC::Yarr::jitCompileRegex):
549
550 2010-07-14  Gavin Barraclough  <barraclough@apple.com>
551
552         Speculative Qt/Windows build fix.
553
554         * jit/JITStubs.h:
555
556 2010-07-14  Gavin Barraclough  <barraclough@apple.com>
557
558         Reviewed by Oliver Hunt.
559
560         https://bugs.webkit.org/show_bug.cgi?id=42280
561         JIT_STUB_ARGUMENT_VA_LIST is only slowing us down! Remove it!
562
563         * jit/JIT.h:
564         * jit/JITInlineMethods.h:
565         (JSC::JIT::restoreArgumentReferenceForTrampoline):
566         * jit/JITStubs.cpp:
567         * jit/JITStubs.h:
568         * wtf/Platform.h:
569
570 2010-07-14  Oliver Hunt  <oliver@apple.com>
571
572         RS=Geoff Garen.
573
574         Guard the CF path of interpreter vs. jit selection with PLATFORM(CF)
575
576         This allows the code to work on windows as well.  Also unifies the
577         environment variable with the preference name.
578
579         * runtime/JSGlobalData.cpp:
580         (JSC::JSGlobalData::JSGlobalData):
581
582 2010-07-14  Oliver Hunt  <oliver@apple.com>
583
584         Reviewed by Don Melton.
585
586         Crash when trying to enable JIT and Interpreter in a single build.
587
588         CFPreferences code added at the last minute failed to account for
589         the preference not being present and then attempted to CFRelease
590         a null value.
591
592         * runtime/JSGlobalData.cpp:
593         (JSC::JSGlobalData::JSGlobalData):
594
595 2010-07-14  Zoltan Herczeg  <zherczeg@webkit.org>
596
597         Reviewed by Darin Adler.
598
599         Change indentations in the lexer
600         https://bugs.webkit.org/show_bug.cgi?id=41845
601
602         This patch fixes an old, indentation error comes from kjs,
603         as webkit has a different style rule for switches, and change
604         the indentation of the main switch, which is a temporary
605         style error. This change makes easier to see the behavioural
606         changes in the follow-up patch.
607
608         No behavioural changes.
609
610         * parser/Lexer.cpp:
611         (JSC::singleEscape):
612         (JSC::Lexer::lex):
613
614 2010-07-13  Sheriff Bot  <webkit.review.bot@gmail.com>
615
616         Unreviewed, rolling out r63262.
617         http://trac.webkit.org/changeset/63262
618         https://bugs.webkit.org/show_bug.cgi?id=42229
619
620         broke Windows compile (Requested by bweinstein on #webkit).
621
622         * API/tests/testapi.c:
623         (assertEqualsAsCharactersPtr):
624         (main):
625         * testapi.pro: Removed.
626
627 2010-07-13  Oliver Hunt  <oliver@apple.com>
628
629         Reviewed by Gavin Barraclough.
630
631         ES5 requires BOMs to be treated as whitespace
632         https://bugs.webkit.org/show_bug.cgi?id=42218
633
634         Add BOM character to the Lexer's definition of whitespace,
635         and remove the logic that dealt with stripping BOMs and
636         caching the cleaned string.
637
638         * parser/Lexer.h:
639         (JSC::Lexer::isWhiteSpace):
640         * parser/SourceProvider.h:
641         (JSC::UStringSourceProvider::create):
642         (JSC::UStringSourceProvider::UStringSourceProvider):
643         * wtf/text/StringImpl.h:
644
645 2010-07-13  Andreas Kling  <andreas.kling@nokia.com>
646
647         Reviewed by Darin Adler.
648
649         Avoid slow-path for put() in Array.splice()
650         https://bugs.webkit.org/show_bug.cgi?id=41920
651
652         Defer creation of the returned array until its final size is known
653         to avoid growing it while adding elements.
654
655         * runtime/JSArray.cpp:
656         (JSC::JSArray::JSArray): Add two modes of creation, CreateInitialized (old)
657         and CreateCompact (which should only be used when constructing arrays whose
658         size and contents are known at the time of creation.)
659         (JSC::JSArray::setLength): Skip first consistency check if in CreateCompact
660         initialization mode. (Only applies to non-empty arrays.)
661         (JSC::JSArray::checkConsistency): Build fix (JSValue::type() is gone)
662         * runtime/JSArray.h:
663         (JSC::JSArray::uncheckedSetIndex): Added for fast initialization of compact
664         arrays. Does no bounds or other sanity checking.
665         * runtime/ArrayPrototype.cpp:
666         (JSC::arrayProtoFuncSplice): Optimized creation of the returned JSArray.
667         * runtime/ArrayConstructor.cpp:
668         (JSC::constructArrayWithSizeQuirk): Pass CreateInitialized to ctor.
669         * runtime/JSGlobalObject.h:
670         (JSC::constructEmptyArray): Pass CreateInitialized to ctor.
671         * runtime/RegExpConstructor.cpp:
672         (JSC::RegExpMatchesArray::RegExpMatchesArray): Pass CreateInitialized to ctor.
673
674 2010-07-13  Gavin Barraclough  <barraclough@apple.com>
675
676         Reviewed by Oliver Hunt.
677
678         Bug 42207 - Clean up interface to compile executables, always check for exceptions
679
680         Presently interface to compile executable is inconsistent between eval/program and
681         function code, and is error prone in allowing a caller to byte compile without JIT
682         compiling an executable (we rely on all executables with codeblocks having JIT code).
683         Unify on an interface where all compilation is performed by a single compile (with
684         ForCall|ForConstruct variants) method, and make all clients check for errors.
685
686         * interpreter/Interpreter.cpp:
687         (JSC::Interpreter::unwindCallFrame):
688         (JSC::Interpreter::execute):
689         (JSC::Interpreter::executeCall):
690         (JSC::Interpreter::executeConstruct):
691         (JSC::Interpreter::prepareForRepeatCall):
692         (JSC::Interpreter::privateExecute):
693         * jit/JITStubs.cpp:
694         (JSC::DEFINE_STUB_FUNCTION):
695         * parser/Parser.h:
696         (JSC::Parser::isFunctionBodyNode):
697         (JSC::Parser::parse):
698         * runtime/ArrayPrototype.cpp:
699         (JSC::isNumericCompareFunction):
700         * runtime/ExceptionHelpers.cpp:
701         (JSC::createStackOverflowError):
702         * runtime/ExceptionHelpers.h:
703         * runtime/Executable.cpp:
704         (JSC::EvalExecutable::compileInternal):
705         (JSC::ProgramExecutable::checkSyntax):
706         (JSC::ProgramExecutable::compileInternal):
707         (JSC::FunctionExecutable::compileForCallInternal):
708         (JSC::FunctionExecutable::compileForConstructInternal):
709         (JSC::FunctionExecutable::reparseExceptionInfo):
710         (JSC::EvalExecutable::reparseExceptionInfo):
711         (JSC::FunctionExecutable::fromGlobalCode):
712         * runtime/Executable.h:
713         (JSC::EvalExecutable::compile):
714         (JSC::EvalExecutable::generatedBytecode):
715         (JSC::EvalExecutable::generatedJITCode):
716         (JSC::ProgramExecutable::compile):
717         (JSC::ProgramExecutable::generatedBytecode):
718         (JSC::ProgramExecutable::generatedJITCode):
719         (JSC::FunctionExecutable::generatedBytecode):
720         (JSC::FunctionExecutable::compileForCall):
721         (JSC::FunctionExecutable::compileForConstruct):
722         (JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):
723         * runtime/FunctionConstructor.cpp:
724         (JSC::constructFunction):
725         * runtime/JSActivation.cpp:
726         (JSC::JSActivation::argumentsGetter):
727         * runtime/JSGlobalData.h:
728         (JSC::JSGlobalData::canUseJIT):
729
730 2010-07-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
731
732         Reviewed by Oliver Hunt.
733
734         testapi.c depends on the Core Foundation.
735         https://bugs.webkit.org/show_bug.cgi?id=40058
736
737         Separate CoreFoundation specific tests in JSC's testapi.c. Enabling it
738         to compile in Qt environments.
739
740         All tests should work except for the JSStringCreateWithCharacters() function,
741         because its tests depend on Core Foundation specific functions.
742
743         * API/tests/testapi.c:
744         (testJSStringRefCF): moved CoreFoundation specific tests to this function.
745         (main): The moves plus some minor tweaks.
746         * testapi.pro: Added.
747
748 2010-07-13  Gavin Barraclough  <barraclough@apple.com>
749
750         Reviewed by Oliver Hunt.
751
752         Bug 42182 - Change how numeric compare functions are detected
753
754         There are three problems with the current mechanism:
755           * It requires that a function executable be bytecode compiled without
756             being JIT generated (in order to copy the bytecode from the numeric
757             compare function).  This is a problem since we have an invariant when
758             running with the JIT that functions are never bytecode compiled without
759             also being JIT generated (after checking the codeblock we assume the
760             function has JIT code).  To help maintain this invariant 
761           * This implementation will prevent us from experimenting with alternate
762             compilation paths which do not compile via bytecode.
763           * It doesn't work.  Functions passing more than two arguments will match
764             if they are comparing their last two arguments, not the first two.
765             Generally the mapping back from bytecode to semantics may be more
766             complex then initially expected.
767
768         * bytecompiler/BytecodeGenerator.cpp:
769         (JSC::BytecodeGenerator::generate):
770         (JSC::BytecodeGenerator::setIsNumericCompareFunction):
771         (JSC::BytecodeGenerator::argumentNumberFor):
772         * bytecompiler/BytecodeGenerator.h:
773         * bytecompiler/NodesCodegen.cpp:
774         (JSC::BlockNode::singleStatement):
775         (JSC::FunctionBodyNode::emitBytecode):
776         * parser/Nodes.h:
777         (JSC::ExpressionNode::isSubtract):
778         (JSC::BinaryOpNode::lhs):
779         (JSC::BinaryOpNode::rhs):
780         (JSC::SubNode::isSubtract):
781         (JSC::ReturnNode::value):
782         * runtime/JSGlobalData.cpp:
783         (JSC::JSGlobalData::JSGlobalData):
784         * runtime/JSGlobalData.h:
785
786 2010-07-12  Oliver Hunt  <oliver@apple.com>
787
788         Reviewed by Gavin Barraclough.
789
790         REGRESSION: Crash at JSC::JIT::privateCompile(JSC::MacroAssemblerCodePtr*)
791         https://bugs.webkit.org/show_bug.cgi?id=41763
792
793         There are two parts to this patch, the first is to fix the actual
794         problem.  When calling copyStringWithoutBOMs on a string we know
795         to contain BOMs we return a value indicating that there are no
796         BOMs.
797
798         The second part of this fix is simply to harden the path that
799         led to a crash when parsing failed.
800
801         * jit/JITOpcodes.cpp:
802         (JSC::JIT::privateCompileCTIMachineTrampolines):
803         * jit/JITOpcodes32_64.cpp:
804         (JSC::JIT::privateCompileCTIMachineTrampolines):
805         * jit/JITStubs.cpp:
806         (JSC::DEFINE_STUB_FUNCTION):
807            Harden compilation stubs against parser failure.
808         * parser/Lexer.cpp:
809         (JSC::Lexer::sourceCode):
810            Add assertions to ensure that subranges into a source provider
811            are always actually braces.  Hopefully this should catch similar
812            failures in future.  These assertions fire on existing tests
813            without this fix.
814         * runtime/Executable.h:
815         (JSC::FunctionExecutable::tryJitCodeForCall):
816         (JSC::FunctionExecutable::tryJitCodeForConstruct):
817         * wtf/text/StringImpl.h:
818         (WebCore::StringImpl::copyStringWithoutBOMs):
819            Make copyStringWithBOMs do the right thing.
820
821 2010-07-13  Gabor Loki  <loki@webkit.org>
822
823         Reviewed by Gavin Barraclough.
824
825         Fix the constant encoding in data transfer instructions on ARM
826         https://bugs.webkit.org/show_bug.cgi?id=42166
827
828         The getImm function is designed to produce modified immediate constant
829         for data processing instructions. It should not be used to encode
830         any constant for data transfer. In the current situation there is no
831         way to use any immediate constant for data transfer. So, the moveImm
832         function is the desired method to pass the offset value to the data
833         transfer instructions.
834
835         Reported by Jacob Bramley.
836
837         * assembler/ARMAssembler.cpp:
838         (JSC::ARMAssembler::dataTransfer32):
839         * assembler/MacroAssemblerARM.h:
840         (JSC::MacroAssemblerARM::call32):
841
842 2010-07-09  Darin Adler  <darin@apple.com>
843
844         Reviewed by Geoffrey Garen.
845
846         String to number coercion is not spec compliant
847         https://bugs.webkit.org/show_bug.cgi?id=31349
848
849         ToNumber should ignore NBSP (\u00a0)
850         https://bugs.webkit.org/show_bug.cgi?id=25490
851
852         * runtime/JSGlobalObjectFunctions.cpp:
853         (JSC::parseIntOverflow): Added a version that works on UChar.
854         * runtime/JSGlobalObjectFunctions.h: Ditto.
855
856         * runtime/UString.cpp:
857         (JSC::isInfinity): Added helper functions.
858         (JSC::UString::toDouble): Use isStrWhiteSpace instead of
859         isSASCIISpace to define what we should skip. Got rid of the
860         code that used CString and UTF8String, instead processing the
861         UChar of the string directly, except for when we call strtod.
862         For strtod, use our own home-grown conversion function that
863         does not try to do any UTF-16 processing. Tidied up the logic
864         a bit as well.
865
866 2010-07-12  Martin Robinson  <mrobinson@igalia.com>
867
868         Reviewed by Xan Lopez.
869
870         [GTK] make dist is broken because of missing headers and other miscellaneous reasons
871         https://bugs.webkit.org/show_bug.cgi?id=42107
872
873         * GNUmakefile.am: Add missing header to the sources list.
874
875 2010-07-12  Adam Roben  <aroben@apple.com>
876
877         Stop generating stripped symbols for Release builds
878
879         It turns out we can strip the symbols after-the-fact using PDBCopy.
880
881         Fixes <http://webkit.org/b/42085>.
882
883         Reviewed by Steve Falkenburg.
884
885         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
886         Removed the pre-link event, which just created the public\sym
887         directory.
888
889 2010-07-12  Anders Carlsson  <andersca@apple.com>
890
891         Reviewed by Dan Bernstein.
892
893         Add WARN_UNUSED_RETURN to the smart pointer "leak" member functions
894         https://bugs.webkit.org/show_bug.cgi?id=42086
895
896         * wtf/OwnPtr.h:
897         * wtf/PassOwnPtr.h:
898         * wtf/PassRefPtr.h:
899         (WTF::PassRefPtr::releaseRef):
900         (WTF::NonNullPassRefPtr::leakRef):
901         (WTF::NonNullPassRefPtr::releaseRef):
902         * wtf/RetainPtr.h:
903         (WTF::RetainPtr::releaseRef):
904
905 2010-07-10  Oliver Hunt  <oliver@apple.com>
906
907         Reviewed by Maciej Stachowiak.
908
909         HAVE_COMPUTED_GOTO is dependent on the interpreter being enabled
910         https://bugs.webkit.org/show_bug.cgi?id=42039
911
912         Separate the existence of computed goto support in the compiler
913         from whether or not we are using the interpreter.  All the current
914         HAVE(COMPUTED_GOTO) guards are for the interpreter, but I'd like
915         the option of using it elsewhere.  The interpreter now uses
916         ENABLE(COMPUTED_GOTO_INTERPRETER) 
917
918         * bytecode/Instruction.h:
919         (JSC::Instruction::Instruction):
920         * bytecode/Opcode.h:
921         * interpreter/Interpreter.cpp:
922         (JSC::Interpreter::Interpreter):
923         (JSC::Interpreter::isOpcode):
924         (JSC::Interpreter::privateExecute):
925         * interpreter/Interpreter.h:
926         (JSC::Interpreter::getOpcode):
927         (JSC::Interpreter::getOpcodeID):
928         * wtf/Platform.h:
929
930 2010-07-10  Oliver Hunt  <oliver@apple.com>
931
932         Reviewed by Gavin Barraclough.
933
934         Remove switches from inner expression loops in the parser
935         https://bugs.webkit.org/show_bug.cgi?id=42035
936
937         Use bitmasks and flags on the token types to identify unary and
938         binary operators, rather than switching on the token type to
939         identify them.
940
941         * parser/JSParser.cpp:
942         (JSC::isUnaryOp):
943         (JSC::JSParser::isBinaryOperator):
944         * parser/JSParser.h:
945         (JSC::):
946
947 2010-07-09  Leon Clarke  <leonclarke@google.com>
948
949         Reviewed by Adam Barth.
950
951         add support for link prefetching
952         https://bugs.webkit.org/show_bug.cgi?id=3652
953
954         * Configurations/FeatureDefines.xcconfig:
955
956 2010-07-09  Oliver Hunt  <oliver@apple.com>
957
958         Reviewed by Darin Adler.
959
960         Tidy up lexer token ids
961         https://bugs.webkit.org/show_bug.cgi?id=42014
962
963         Stop using character literals to identify single character tokens
964         and instead use symbolic names for all tokens.
965
966         * parser/ASTBuilder.h:
967         (JSC::ASTBuilder::makeBinaryNode):
968         * parser/JSParser.cpp:
969         (JSC::JSParser::consume):
970         (JSC::JSParser::match):
971         (JSC::JSParser::autoSemiColon):
972         (JSC::JSParser::JSParser):
973         (JSC::JSParser::parseProgram):
974         (JSC::JSParser::allowAutomaticSemicolon):
975         (JSC::JSParser::parseDoWhileStatement):
976         (JSC::JSParser::parseWhileStatement):
977         (JSC::JSParser::parseVarDeclarationList):
978         (JSC::JSParser::parseConstDeclarationList):
979         (JSC::JSParser::parseForStatement):
980         (JSC::JSParser::parseReturnStatement):
981         (JSC::JSParser::parseWithStatement):
982         (JSC::JSParser::parseSwitchStatement):
983         (JSC::JSParser::parseSwitchClauses):
984         (JSC::JSParser::parseSwitchDefaultClause):
985         (JSC::JSParser::parseTryStatement):
986         (JSC::JSParser::parseDebuggerStatement):
987         (JSC::JSParser::parseStatement):
988         (JSC::JSParser::parseFormalParameters):
989         (JSC::JSParser::parseFunctionInfo):
990         (JSC::JSParser::parseExpressionOrLabelStatement):
991         (JSC::JSParser::parseIfStatement):
992         (JSC::JSParser::parseExpression):
993         (JSC::JSParser::parseAssignmentExpression):
994         (JSC::JSParser::parseConditionalExpression):
995         (JSC::isUnaryOp):
996         (JSC::JSParser::isBinaryOperator):
997         (JSC::JSParser::parseBinaryExpression):
998         (JSC::JSParser::parseProperty):
999         (JSC::JSParser::parseObjectLiteral):
1000         (JSC::JSParser::parseStrictObjectLiteral):
1001         (JSC::JSParser::parseArrayLiteral):
1002         (JSC::JSParser::parsePrimaryExpression):
1003         (JSC::JSParser::parseArguments):
1004         (JSC::JSParser::parseMemberExpression):
1005         (JSC::JSParser::parseUnaryExpression):
1006         * parser/JSParser.h:
1007         (JSC::):
1008         * parser/Lexer.cpp:
1009         (JSC::):
1010         (JSC::Lexer::lex):
1011         * parser/Lexer.h:
1012
1013 2010-07-09  Gavin Barraclough  <barraclough@apple.com>
1014
1015         Reviewed by Oliver Hunt.
1016
1017         Bug 42015 - Enable JSValue32_64 on ARMv7
1018
1019         * Configurations/JavaScriptCore.xcconfig:
1020         * jit/JIT.h:
1021         * jit/JITStubs.cpp:
1022         * wtf/Platform.h:
1023
1024 2010-07-09  Kenneth Russell  <kbr@google.com>
1025
1026         Reviewed by Dimitri Glazkov.
1027
1028         Assertion failure in String::utf8() for certain invalid UTF16 inputs
1029         https://bugs.webkit.org/show_bug.cgi?id=41983
1030
1031         * wtf/text/WTFString.cpp:
1032         (WebCore::String::utf8):
1033          - Fixed assertion when sourceExhausted is returned from convertUTF16ToUTF8.
1034
1035 2010-07-09  Oliver Hunt  <oliver@apple.com>
1036
1037         Reviewed by Geoffrey Garen.
1038
1039         Remove a couple of excess writes from the lexer
1040         https://bugs.webkit.org/show_bug.cgi?id=41981
1041
1042         Remove a couple of fields from JSTokenInfo, and rename the remaining ones
1043         to something more accurate
1044
1045         * parser/JSParser.cpp:
1046         (JSC::JSParser::next):
1047         (JSC::JSParser::tokenStart):
1048         (JSC::JSParser::tokenLine):
1049         (JSC::JSParser::tokenEnd):
1050         * parser/JSParser.h:
1051         (JSC::JSTokenInfo::JSTokenInfo):
1052         * parser/Lexer.cpp:
1053         (JSC::Lexer::lex):
1054
1055 2010-07-08  Oliver Hunt  <oliver@apple.com>
1056
1057         Reviewed by Sam Weinig.
1058
1059         Property declarations in an object literal should not consider the prototype chain when being added to the new object
1060         https://bugs.webkit.org/show_bug.cgi?id=41929
1061
1062         To fix this all we need to do is ensure that all new properties are
1063         added with putDirect rather than a fully generic call to put.  This
1064         is safe as an object literal is by definition going to produce a
1065         completely normal object.
1066
1067         Rather than duplicating all the put_by_id logic we add an additional
1068         flag to op_put_by_id to indicate it should be using putDirect.  In
1069         the interpreter this adds a runtime branch, but in the jit this is
1070         essentially free as the branch is taken at compile time.  This does
1071         actually improve object literal creation time even in the interpreter
1072         as we no longer need to walk the prototype chain to verify that the
1073         cached put is safe.
1074
1075         We still emit normal put_by_id code when emitting __proto__ as we want
1076         to get the correct handling for changing the prototype.
1077
1078         Sunspider claims this is a 0.7% speedup which is conceivably real due
1079         to the performance improvement in object literals, but I suspect its
1080         really just the result of code motion.
1081
1082         * bytecode/Opcode.h:
1083         * bytecompiler/BytecodeGenerator.cpp:
1084         (JSC::BytecodeGenerator::emitPutById):
1085         (JSC::BytecodeGenerator::emitDirectPutById):
1086         * bytecompiler/BytecodeGenerator.h:
1087         * bytecompiler/NodesCodegen.cpp:
1088         (JSC::PropertyListNode::emitBytecode):
1089         * interpreter/Interpreter.cpp:
1090         (JSC::Interpreter::privateExecute):
1091         * jit/JIT.h:
1092         (JSC::JIT::compilePutByIdTransition):
1093         * jit/JITPropertyAccess.cpp:
1094         (JSC::JIT::emit_op_put_by_id):
1095         (JSC::JIT::emitSlow_op_put_by_id):
1096         (JSC::JIT::privateCompilePutByIdTransition):
1097         (JSC::JIT::patchPutByIdReplace):
1098         * jit/JITPropertyAccess32_64.cpp:
1099         (JSC::JIT::emitSlow_op_put_by_id):
1100         (JSC::JIT::privateCompilePutByIdTransition):
1101         (JSC::JIT::patchPutByIdReplace):
1102         * jit/JITStubs.cpp:
1103         (JSC::JITThunks::tryCachePutByID):
1104         (JSC::DEFINE_STUB_FUNCTION):
1105         * jit/JITStubs.h:
1106         (JSC::):
1107         * runtime/JSGlobalData.cpp:
1108         (JSC::JSGlobalData::JSGlobalData):
1109         * runtime/JSObject.h:
1110         (JSC::JSObject::putDirect):
1111         (JSC::JSValue::putDirect):
1112         * runtime/JSValue.h:
1113
1114 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1115
1116         Reviewed by Sam Weinig.
1117
1118         String.prototype methods should CheckObjectCoercible (test this is not null or undefined).
1119
1120         * runtime/StringPrototype.cpp:
1121         (JSC::stringProtoFuncCharAt):
1122         (JSC::stringProtoFuncCharCodeAt):
1123         (JSC::stringProtoFuncConcat):
1124         (JSC::stringProtoFuncIndexOf):
1125         (JSC::stringProtoFuncLastIndexOf):
1126         (JSC::stringProtoFuncMatch):
1127         (JSC::stringProtoFuncSearch):
1128         (JSC::stringProtoFuncSlice):
1129         (JSC::stringProtoFuncSplit):
1130         (JSC::stringProtoFuncSubstr):
1131         (JSC::stringProtoFuncSubstring):
1132         (JSC::stringProtoFuncToLowerCase):
1133         (JSC::stringProtoFuncToUpperCase):
1134         (JSC::stringProtoFuncLocaleCompare):
1135         (JSC::trimString):
1136
1137 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1138
1139         Reviewed by Sam Weinig.
1140
1141         Date.prototype.toJSON takes one argument, report this correctly.
1142
1143         * runtime/DatePrototype.cpp:
1144
1145 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1146
1147         Reviewed by Sam Weinig.
1148
1149         RegExp's prototype should be an object of type RegExp.
1150
1151         * runtime/RegExpPrototype.cpp:
1152         (JSC::RegExpPrototype::RegExpPrototype):
1153         * runtime/RegExpPrototype.h:
1154
1155 2010-07-08  Oliver Hunt  <oliver@apple.com>
1156
1157         Reviewed by Gavin Barraclough.
1158
1159         JavaScript parser violates ECMA automatic semicolon insertion rule
1160         https://bugs.webkit.org/show_bug.cgi?id=41844
1161
1162         Remove (very) old and bogus logic that automatically inserted a semicolon
1163         at the end of a script's source.
1164
1165         * parser/Lexer.cpp:
1166         (JSC::Lexer::lex):
1167
1168 2010-07-08  Oliver Hunt  <oliver@apple.com>
1169
1170         Reviewed by Anders Carlson.
1171
1172         Tidy up the lexer
1173
1174         Remove some of the old yacc/lex-isms still present in the lexer
1175
1176         * parser/JSParser.h:
1177         (JSC::):
1178         * parser/Lexer.cpp:
1179         (JSC::Lexer::parseString):
1180         (JSC::Lexer::lex):
1181         * parser/Lexer.h:
1182
1183 2010-07-08  Oliver Hunt  <oliver@apple.com>
1184
1185         Reviewed by Gavin Barraclough.
1186
1187         Make object-literal parsing conformant with the spec.
1188         https://bugs.webkit.org/show_bug.cgi?id=41892
1189
1190         Bring our parsing of object literals into conformance with the ES5 spec.
1191         Basically disallow conflicting accessor vs. normal property definitions
1192         The bulk of this patch is just fiddling to maintain performance.
1193
1194         * parser/ASTBuilder.h:
1195         (JSC::ASTBuilder::createGetterOrSetterProperty):
1196         (JSC::ASTBuilder::createProperty):
1197         (JSC::ASTBuilder::getName):
1198         (JSC::ASTBuilder::getType):
1199         * parser/JSParser.cpp:
1200         (JSC::jsParse):
1201         (JSC::JSParser::JSParser):
1202         (JSC::JSParser::parseProperty):
1203         (JSC::JSParser::parseObjectLiteral):
1204         (JSC::JSParser::parseStrictObjectLiteral):
1205         * parser/JSParser.h:
1206         * parser/Lexer.cpp:
1207         (JSC::Lexer::clear):
1208         * parser/Lexer.h:
1209         (JSC::Lexer::currentOffset):
1210         (JSC::Lexer::setOffset):
1211           Add logic to allow us to roll the lexer back in the input stream.
1212         * parser/Nodes.h:
1213         (JSC::PropertyNode::):
1214         (JSC::PropertyNode::type):
1215         * parser/Parser.cpp:
1216         (JSC::Parser::parse):
1217         * parser/SourceProvider.h:
1218         (JSC::SourceProvider::SourceProvider):
1219         (JSC::SourceProvider::isValid):
1220         (JSC::SourceProvider::setValid):
1221           SourceProvider now records whether the input text
1222           has already been validated.
1223         * parser/SyntaxChecker.h:
1224         (JSC::SyntaxChecker::SyntaxChecker):
1225         (JSC::SyntaxChecker::Property::Property):
1226         (JSC::SyntaxChecker::Property::operator!):
1227         (JSC::SyntaxChecker::createProperty):
1228         (JSC::SyntaxChecker::createPropertyList):
1229         (JSC::SyntaxChecker::createGetterOrSetterProperty):
1230           The SyntaxChecker mode now needs to maintain a bit more information
1231           to ensure that we can validate object literals correctly.
1232
1233 2010-07-08  Darin Adler  <darin@apple.com>
1234
1235         * runtime/JSGlobalData.cpp:
1236         (JSC::JSGlobalData::sharedInstance): Fix typo.
1237
1238 2010-07-08  Darin Adler  <darin@apple.com>
1239
1240         Reviewed by Oliver Hunt.
1241
1242         Fix assertion seen on the Leopard buildbot.
1243         The single shared instance of JSGlobalData was not being
1244         adopted after creation.
1245
1246         * runtime/JSGlobalData.cpp:
1247         (JSC::JSGlobalData::sharedInstance): Do adoptRef and then leakRef.
1248
1249 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1250
1251         Reviewed by Sam Weinig.
1252
1253         BOMs are whitespace.
1254
1255         * runtime/JSGlobalObjectFunctions.cpp:
1256         (JSC::isStrWhiteSpace):
1257
1258 2010-07-08  Martin Robinson  <mrobinson@igalia.com>
1259
1260         Unreviewed.
1261
1262         Try fix the GTK+ build by touching this file.
1263
1264         * jit/ExecutableAllocatorFixedVMPool.cpp:
1265
1266 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1267
1268         GTK build fix take two.
1269
1270         * GNUmakefile.am:
1271
1272 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1273
1274         GTK build fix.
1275
1276         * GNUmakefile.am:
1277
1278 2010-07-08  Gavin Barraclough  <barraclough@apple.com>
1279
1280         Reviewed by Sam Weinig.
1281
1282         https://bugs.webkit.org/show_bug.cgi?id=41641
1283
1284         Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
1285         other than x86-64 (this may be useful on 32-bit platforms, too).
1286
1287         Simplify ifdefs by dividing into thwo broad allocation strategies
1288         (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
1289
1290         Rename constant used in the code to have names descriptive of their purpose,
1291         rather than their specific value on a given platform.
1292
1293         * jit/ExecutableAllocator.cpp:
1294         (JSC::ExecutableAllocator::reprotectRegion):
1295         (JSC::ExecutableAllocator::cacheFlush):
1296         * jit/ExecutableAllocatorFixedVMPool.cpp:
1297         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1298         (JSC::FixedVMPoolAllocator::free):
1299         (JSC::ExecutablePool::systemAlloc):
1300         * jit/ExecutableAllocatorPosix.cpp:
1301         * jit/ExecutableAllocatorSymbian.cpp:
1302         * jit/ExecutableAllocatorWin.cpp:
1303         * wtf/Platform.h:
1304
1305 2010-07-08  Xan Lopez  <xlopez@igalia.com>
1306
1307         Reviewed by Gustavo Noronha.
1308
1309         Silence a few noisy build rules.
1310
1311         * GNUmakefile.am:
1312
1313 2010-07-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1314
1315         Unreviewed, rolling out r62765.
1316         http://trac.webkit.org/changeset/62765
1317         https://bugs.webkit.org/show_bug.cgi?id=41840
1318
1319         All jscore and layout tests crash on Qt bot (Requested by Ossy
1320         on #webkit).
1321
1322         * wtf/FastMalloc.cpp:
1323         (WTF::TCMalloc_PageHeap::initializeScavenger):
1324         (WTF::TCMalloc_PageHeap::signalScavenger):
1325         (WTF::TCMalloc_PageHeap::scavengerThread):
1326
1327 2010-07-08  Andreas Kling  <andreas.kling@nokia.com>
1328
1329         Reviewed by Oliver Hunt.
1330
1331         Interpreter: Crash in op_load_varargs on 64-bit
1332         https://bugs.webkit.org/show_bug.cgi?id=41795
1333
1334         Added missing cast of argCount to int32_t in op_load_varargs.
1335
1336         * interpreter/Interpreter.cpp:
1337         (JSC::Interpreter::privateExecute):
1338
1339 2010-07-08  Patrick Gansterer  <paroga@paroga.com>
1340
1341         Reviewed by Geoffrey Garen.
1342
1343         Make FastMalloc more portable.
1344         https://bugs.webkit.org/show_bug.cgi?id=41790
1345
1346         Use WTF::Mutex instead of pthread_mutex_t and
1347         replace pthread_cond_t with WTF::ThreadCondition.
1348
1349         * wtf/FastMalloc.cpp:
1350         (WTF::TCMalloc_PageHeap::initializeScavenger):
1351         (WTF::TCMalloc_PageHeap::signalScavenger):
1352         (WTF::TCMalloc_PageHeap::scavengerThread):
1353
1354 2010-07-08  Patrick Gansterer  <paroga@paroga.com>
1355
1356         Reviewed by Darin Adler.
1357
1358         Remove needless #include <fcntl.h> from TCSystemAlloc.cpp.
1359         https://bugs.webkit.org/show_bug.cgi?id=41777
1360
1361         * wtf/TCSystemAlloc.cpp:
1362
1363 2010-07-07  Darin Adler  <darin@apple.com>
1364
1365         Fixed build in configurations like PowerPC.
1366
1367         * runtime/RegExpConstructor.cpp: Added include of PassOwnPtr.h.
1368         * runtime/RegExpObject.cpp: Ditto.
1369         * wtf/SizeLimits.cpp: Changed compile time assertion to work
1370         even on platforms where two bool members do not end up taking
1371         the same size as one int member!
1372
1373 2010-07-07  Oliver Hunt  <oliver@apple.com>
1374
1375         Reviewed by Geoffrey Garen.
1376
1377         Lazy mode of parser allows invalid syntax in object literals.
1378         https://bugs.webkit.org/show_bug.cgi?id=41809
1379
1380         Make the parser itself validate getter and setter syntax rather
1381         than offloading it to the AST builder.
1382
1383         * parser/ASTBuilder.h:
1384         (JSC::ASTBuilder::createGetterOrSetterProperty):
1385         * parser/JSParser.cpp:
1386         (JSC::JSParser::parseProperty):
1387
1388 2010-07-07  Dumitru Daniliuc  <dumi@chromium.org>
1389
1390         Reviewed by Adam Roben.
1391
1392         Revert r62689.
1393         https://bugs.webkit.org/show_bug.cgi?id=41804
1394
1395         * runtime/Collector.cpp:
1396         (JSC::Heap::freeBlocks):
1397
1398 2010-07-07  Adam Barth  <abarth@webkit.org>
1399
1400         Reviewed by Sam Weinig.
1401
1402         Add reverseFind to Vector and deploy in HTML5 parser
1403         https://bugs.webkit.org/show_bug.cgi?id=41778
1404
1405         This method seems generally useful.  I'm slightly surprised we don't
1406         have it already.
1407
1408         * wtf/Vector.h:
1409         (WTF::::reverseFind):
1410
1411 2010-07-07  Darin Adler  <darin@apple.com>
1412
1413         Reviewed by Adam Barth.
1414
1415         Turn on adoptRef assertion for RefCounted
1416         https://bugs.webkit.org/show_bug.cgi?id=41547
1417
1418         * wtf/CrossThreadRefCounted.h: Fixed include style. Includes of other
1419         WTF headers should use "" includes; consistent in most WTF headers.
1420         Added a call to relaxAdoptionRequirement.
1421
1422         * wtf/RefCounted.h: Fixed include style. Removed LOOSE_REF_COUNTED.
1423         Added relaxAdoptionRequirement.
1424
1425 2010-07-07  Anders Carlsson  <andersca@apple.com>
1426
1427         Try to fix the Windows build.
1428
1429         * runtime/Collector.cpp:
1430         (JSC::Heap::freeBlocks):
1431
1432 2010-07-07  Darin Adler  <darin@apple.com>
1433
1434         Reviewed by Adam Barth.
1435
1436         More OwnPtr work
1437         https://bugs.webkit.org/show_bug.cgi?id=41727
1438
1439         * API/JSCallbackObject.h:
1440         (JSC::JSCallbackObjectData::setPrivateProperty): Use adoptPtr.
1441         * API/JSCallbackObjectFunctions.h:
1442         (JSC::JSCallbackObject::JSCallbackObject): Ditto.
1443         * bytecode/CodeBlock.cpp:
1444         (JSC::CodeBlock::CodeBlock): Ditto.
1445         * bytecode/CodeBlock.h:
1446         (JSC::CodeBlock::createRareDataIfNecessary): Ditto.
1447         * parser/Nodes.cpp:
1448         (JSC::ScopeNode::ScopeNode): Ditto.
1449         * parser/ParserArena.cpp:
1450         (JSC::ParserArena::ParserArena): Ditto.
1451         * runtime/Arguments.h:
1452         (JSC::Arguments::Arguments): Ditto.
1453         * runtime/Executable.cpp:
1454         (JSC::EvalExecutable::compile): Ditto.
1455         (JSC::ProgramExecutable::compile): Ditto.
1456         (JSC::FunctionExecutable::compileForCall): Ditto.
1457         (JSC::FunctionExecutable::compileForConstruct): Ditto.
1458         (JSC::FunctionExecutable::reparseExceptionInfo): Ditto.
1459         (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
1460         * runtime/JSArray.cpp:
1461         (JSC::JSArray::sort): Ditto.
1462         * runtime/RegExpConstructor.cpp:
1463         (JSC::RegExpConstructor::RegExpConstructor): Ditto.
1464         * runtime/RegExpObject.cpp:
1465         (JSC::RegExpObject::RegExpObject): Ditto.
1466         * runtime/SmallStrings.cpp:
1467         (JSC::SmallStrings::createSingleCharacterString): Ditto.
1468         (JSC::SmallStrings::singleCharacterStringRep): Ditto.
1469
1470         * wtf/unicode/icu/CollatorICU.cpp:
1471         (WTF::Collator::userDefault): Use adoptPtr.
1472         * yarr/RegexInterpreter.cpp:
1473         (JSC::Yarr::ByteCompiler::ByteCompiler): Ditto.
1474         (JSC::Yarr::ByteCompiler::compile): Ditto.
1475         (JSC::Yarr::ByteCompiler::regexBegin): Ditto.
1476         (JSC::Yarr::byteCompileRegex): Ditto.
1477         * yarr/RegexInterpreter.h:
1478         (JSC::Yarr::BytecodePattern::BytecodePattern): Ditto.
1479
1480 2010-07-07  Darin Adler  <darin@apple.com>
1481
1482         Reviewed by Adam Barth.
1483
1484         Make clear set the pointer to 0 before deletion
1485         https://bugs.webkit.org/show_bug.cgi?id=41727
1486
1487         * wtf/OwnArrayPtr.h: Changed code so we always set the pointer to its new
1488         value before deleting the old one, including in the set function and the
1489         clear function. This required changing safeDelete.
1490         * wtf/OwnPtr.h: Ditto. Also removed some extra null checks.
1491         * wtf/PassOwnPtr.h: Ditto.
1492
1493         * wtf/PassRefPtr.h: Changed code so we always set the pointer to its new
1494         value before deref'ing the old one in the clear function. Also added a
1495         leakRef function for NonNullPassRefPtr.
1496         * wtf/RefPtr.h: Ditto.
1497
1498         * wtf/gobject/GOwnPtr.h: More of the same.
1499         * wtf/gobject/GRefPtr.h: Ditto.
1500
1501 2010-07-07  Zoltan Herczeg  <zherczeg@webkit.org>
1502
1503         Reviewed by Oliver Hunt.
1504
1505         Refactored string parsing inside the lexer
1506         https://bugs.webkit.org/show_bug.cgi?id=41606
1507
1508         Does not use goto. Although the last sunspider
1509         parse-only tests yields 1.044x speedup, I think the
1510         patch can have a slight improvement at most.
1511
1512         * parser/Lexer.cpp:
1513         (JSC::singleEscape):
1514         (JSC::Lexer::parseString):
1515         (JSC::Lexer::lex):
1516         * parser/Lexer.h:
1517
1518 2010-07-06  Oliver Hunt  <oliver@apple.com>
1519
1520         Reviewed by Maciej Stachowiak.
1521
1522         Make it possible to have both the JIT and Interpreter available in a single build
1523         https://bugs.webkit.org/show_bug.cgi?id=41722
1524
1525         Separate the concept of !ENABLE(JIT) and ENABLE(INTERPRETER) and make it possible
1526         to have both JIT and INTERPRETER enabled at the same time.  This doesn't add
1527         support for mix mode execution, but it does allow a single build to contain all
1528         the code needed to use either the interpreter or the jit.
1529
1530         If both ENABLE(INTERPRETER) and ENABLE(JIT) are true then setting the environment
1531         variable JSC_FORCE_INTERPRETER will force JSC to use the interpreter.
1532
1533         This patch basically consists of replacing !ENABLE(JIT) with ENABLE(INTERPRETER),
1534         or converting #if ENABLE(JIT) ... #else ... into #if ENABLE(JIT) ... #endif
1535         #if ENABLE(INTERPRETER), etc.  There are also a few functions that need to be
1536         renamed to resolve return type ambiguity.
1537
1538         * bytecode/CodeBlock.cpp:
1539         (JSC::CodeBlock::~CodeBlock):
1540         (JSC::CodeBlock::shrinkToFit):
1541         * bytecode/CodeBlock.h:
1542         * interpreter/CallFrame.h:
1543         (JSC::ExecState::returnVPC):
1544         * interpreter/Interpreter.cpp:
1545         (JSC::Interpreter::unwindCallFrame):
1546         (JSC::Interpreter::throwException):
1547         (JSC::Interpreter::execute):
1548         (JSC::Interpreter::executeCall):
1549         (JSC::Interpreter::executeConstruct):
1550         (JSC::Interpreter::prepareForRepeatCall):
1551         (JSC::Interpreter::privateExecute):
1552         (JSC::Interpreter::retrieveLastCaller):
1553         * interpreter/Interpreter.h:
1554         * runtime/ArrayPrototype.cpp:
1555         (JSC::isNumericCompareFunction):
1556         * runtime/Executable.cpp:
1557         (JSC::EvalExecutable::generateJITCode):
1558         (JSC::ProgramExecutable::generateJITCode):
1559         (JSC::FunctionExecutable::generateJITCodeForCall):
1560         (JSC::FunctionExecutable::generateJITCodeForConstruct):
1561         (JSC::FunctionExecutable::reparseExceptionInfo):
1562         (JSC::EvalExecutable::reparseExceptionInfo):
1563         * runtime/JSFunction.cpp:
1564         * runtime/JSGlobalData.cpp:
1565         (JSC::JSGlobalData::JSGlobalData):
1566         * runtime/JSGlobalData.h:
1567         (JSC::JSGlobalData::canUseJIT):
1568         * wtf/Platform.h:
1569
1570 2010-07-06  Darin Adler  <darin@apple.com>
1571
1572         Reviewed by Adam Barth.
1573
1574         Add adoptPtr and leakPtr functions for OwnPtr and PassOwnPtr
1575         https://bugs.webkit.org/show_bug.cgi?id=41320
1576
1577         * bytecode/CodeBlock.cpp:
1578         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary): Use assignment
1579         instead of set since the result of reparseExceptionInfo is now a
1580         PassOwnPtr.
1581
1582         * bytecode/CodeBlock.h: Change extractExceptionInfo to return a
1583         PassOwnPtr instead of a raw pointer.
1584
1585         * runtime/Executable.cpp:
1586         (JSC::FunctionExecutable::reparseExceptionInfo): Return a PassOwnPtr.
1587         (JSC::EvalExecutable::reparseExceptionInfo): Ditto.
1588         (JSC::ProgramExecutable::reparseExceptionInfo): Added. This was
1589         in the header before, but it's better to not have it there to reduce
1590         header dependencies. Return a PassOwnPtr.
1591
1592         * runtime/Executable.h: Made reparseExceptionInfo return a PassOwnPtr,
1593         and put it in the private sections of classes other than the base class.
1594
1595         * wtf/MessageQueue.h:
1596         (WTF::MessageQueue::append): Use leakPtr instead of release.
1597         (WTF::MessageQueue::appendAndCheckEmpty): Ditto.
1598         (WTF::MessageQueue::prepend): Ditto.
1599
1600         * wtf/OwnPtr.h: Tweaked formatting. Changed the release function to return
1601         a PassOwnPtr rather than a raw pointer. Added a leakPtr function that
1602         returns a raw pointer. Put the constructor that takes a raw pointer and
1603         the set function into a section guarded by LOOSE_OWN_PTR. Adapted to the
1604         new adoptPtr function from PassOwnPtr.h.
1605
1606         * wtf/PassOwnPtr.h: Tweaked formatting. Renamed the release function
1607         to leakPtr. Added an adoptPtr function that creates a new PassOwnPtr.
1608         Put the constructor and assignment operators that take a raw pointer
1609         into a section guarded by LOOSE_PASS_OWN_PTR.
1610
1611 2010-07-06  Sam Weinig  <sam@webkit.org>
1612
1613         Reviewed by Darin Adler
1614
1615         Update comment in StringExtras.h to be more accurate.
1616
1617         * wtf/StringExtras.h:
1618
1619 2010-07-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1620
1621         Unreviewed, rolling out r62511.
1622         http://trac.webkit.org/changeset/62511
1623         https://bugs.webkit.org/show_bug.cgi?id=41686
1624
1625         Breaks Linux/64bit compilation (Requested by xan_ on #webkit).
1626
1627         * jit/ExecutableAllocator.cpp:
1628         * jit/ExecutableAllocatorFixedVMPool.cpp:
1629         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1630         (JSC::FixedVMPoolAllocator::free):
1631         (JSC::ExecutablePool::systemAlloc):
1632         * jit/ExecutableAllocatorPosix.cpp:
1633         (JSC::ExecutableAllocator::reprotectRegion):
1634         (JSC::ExecutableAllocator::cacheFlush):
1635         * jit/ExecutableAllocatorSymbian.cpp:
1636         * jit/ExecutableAllocatorWin.cpp:
1637         * wtf/Platform.h:
1638
1639 2010-07-05  Gavin Barraclough  <barraclough@apple.com>
1640
1641         Reviewed by Sam Weinig.
1642
1643         https://bugs.webkit.org/show_bug.cgi?id=41641
1644
1645         Update compile flags to allow use of ExecutableAllocatorFixedVMPool on platforms
1646         other than x86-64 (this may be useful on 32-bit platforms, too).
1647
1648         Simplify ifdefs by dividing into thwo broad allocation strategies
1649         (ENABLE_EXECUTABLE_ALLOCATOR_FIXED & ENABLE_EXECUTABLE_ALLOCATOR_DEMAND).
1650
1651         Rename constant used in the code to have names descriptive of their purpose,
1652         rather than their specific value on a given platform.
1653
1654         * jit/ExecutableAllocator.cpp:
1655         (JSC::ExecutableAllocator::reprotectRegion):
1656         (JSC::ExecutableAllocator::cacheFlush):
1657         * jit/ExecutableAllocatorFixedVMPool.cpp:
1658         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
1659         (JSC::FixedVMPoolAllocator::free):
1660         (JSC::ExecutablePool::systemAlloc):
1661         * jit/ExecutableAllocatorPosix.cpp:
1662         * jit/ExecutableAllocatorSymbian.cpp:
1663         * jit/ExecutableAllocatorWin.cpp:
1664         * wtf/Platform.h:
1665
1666 2010-07-05  Steve Block  <steveblock@google.com>
1667
1668         Reviewed by Darin Adler.
1669
1670         ThreadingPthreads.cpp should use JNIUtility.h on Android, not outdated jni_utility.h
1671         https://bugs.webkit.org/show_bug.cgi?id=41594
1672
1673         * wtf/ThreadingPthreads.cpp:
1674
1675 2010-07-04  Mark Rowe  <mrowe@apple.com>
1676
1677         Build fix after r62456.
1678
1679         * interpreter/Interpreter.cpp:
1680         (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
1681         warnings about comparisons between signed and unsigned types, and attempts to call an overload
1682         of std::min that doesn't exist.
1683
1684 2010-07-02  Sam Weinig  <sam@webkit.org>
1685
1686         Reviewed by Darin Adler.
1687
1688         Patch for https://bugs.webkit.org/show_bug.cgi?id=41553
1689         Make StringExtras.h versions of snprintf and vsnprintf match the unix versions.
1690
1691         - MSVC does not ensure the buffers are null terminated as the unix versions do.
1692
1693         * runtime/JSGlobalObjectFunctions.cpp: Cleanup includes.
1694         * runtime/UString.cpp: Clean up includes.
1695         (JSC::UString::from): Don't pass sizeof(buf) - 1, that is wrong.
1696         * wtf/StringExtras.h:
1697         (snprintf): Ensure null termination of buffer.
1698         (vsnprintf): Ditto.
1699
1700 2010-07-03  Yong Li  <yoli@rim.com>
1701
1702         Reviewed by Darin Adler.
1703
1704         Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
1705         the interpreter as well as the JIT.
1706
1707         https://bugs.webkit.org/show_bug.cgi?id=41351
1708         rdar://problem/8142141
1709
1710         * interpreter/Interpreter.cpp:
1711         (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
1712         in op_load_varargs handling. 0xFFFFFFFF was read as -1.
1713
1714 2010-06-26  Jeremy Orlow  <jorlow@chromium.org>
1715
1716         Reviewed by Dumitru Daniliuc.
1717
1718         Support for keys and in-memory storage for IndexedDB
1719         https://bugs.webkit.org/show_bug.cgi?id=41252
1720
1721         Set the role to Private.
1722
1723         * JavaScriptCore.xcodeproj/project.pbxproj:
1724
1725 2010-07-02  Oliver Hunt  <oliver@apple.com>
1726
1727         Reviewed by Geoffrey Garen.
1728
1729         Move BOM handling out of the lexer and parser
1730         https://bugs.webkit.org/show_bug.cgi?id=41539
1731
1732         Doing the BOM stripping in the lexer meant that we could
1733         end up having to strip the BOMs from a source multiple times.
1734         To deal with this we now require all strings provided by
1735         a SourceProvider to already have had the BOMs stripped.
1736         This also simplifies some of the lexer logic.
1737
1738         * parser/Lexer.cpp:
1739         (JSC::Lexer::setCode):
1740         (JSC::Lexer::sourceCode):
1741         * parser/SourceProvider.h:
1742         (JSC::SourceProvider::SourceProvider):
1743         (JSC::UStringSourceProvider::create):
1744         (JSC::UStringSourceProvider::getRange):
1745         (JSC::UStringSourceProvider::UStringSourceProvider):
1746         * wtf/text/StringImpl.h:
1747         (WebCore::StringImpl::copyStringWithoutBOMs):
1748
1749 2010-07-03  Patrick Gansterer  <paroga@paroga.com>
1750
1751         Reviewed by Kent Tamura.
1752
1753         [WINCE] Implement Unicode::isAlphanumeric and Unicode::isArabicChar.
1754         https://bugs.webkit.org/show_bug.cgi?id=41411
1755
1756         * wtf/unicode/wince/UnicodeWince.cpp:
1757         (WTF::Unicode::isAlphanumeric):
1758         * wtf/unicode/wince/UnicodeWince.h:
1759         (WTF::Unicode::isArabicChar):
1760
1761 2010-07-03  Kwang Yul Seo  <skyul@company100.net>
1762
1763         Reviewed by Kent Tamura.
1764
1765         [BREWMP] Change the CRASH() macro to print "WebKit CRASH" log.
1766         https://bugs.webkit.org/show_bug.cgi?id=41524
1767
1768         Print "WebKit CRASH" before crashing.
1769
1770         * wtf/Assertions.h:
1771
1772 2010-07-02  Gavin Barraclough  <barraclough@apple.com>
1773
1774         Reviewed by Oliver Hunt.
1775
1776         Bug 41565 - Repatching in ARMv7Assembler::repatchLoadPtrToLEA is broken
1777
1778         This method tried to repatch a LDR (T2) into an ADD (T3) - but it only
1779         repatches the first instruction word.  The layout of the fields in the
1780         second word is different, and also needs repatching.
1781
1782         * assembler/ARMv7Assembler.h:
1783         (JSC::ARMv7Assembler::repatchLoadPtrToLEA):
1784
1785 2010-07-02  Oliver Hunt  <oliver@apple.com>
1786
1787         Reviewed by Gavin Barraclough.
1788
1789         Clamp the number of arguments supported by function.apply
1790         https://bugs.webkit.org/show_bug.cgi?id=41351
1791         <rdar://problem/8142141>
1792
1793         Add clamping logic to function.apply similar to that
1794         enforced by firefox.  We have a smaller clamp than
1795         firefox as our calling convention means that stack
1796         usage is proportional to argument count -- the firefox
1797         limit is larger than you could actually call.
1798
1799         * interpreter/Interpreter.cpp:
1800         (JSC::Interpreter::privateExecute):
1801         * jit/JITStubs.cpp:
1802         (JSC::DEFINE_STUB_FUNCTION):
1803         * runtime/Arguments.h:
1804         (JSC::Arguments::):
1805
1806 2010-07-02  Chao-ying Fu  <fu@mips.com>
1807
1808         Reviewed by Oliver Hunt.
1809
1810         Re-enable JIT_OPTIMIZE_NATIVE_CALL on MIPS
1811         https://bugs.webkit.org/show_bug.cgi?id=40179
1812
1813         Add the MIPS part to re-enable JIT_OPTIMIZE_NATIVE_CALL.
1814
1815         * jit/JITOpcodes.cpp:
1816         (JSC::JIT::privateCompileCTINativeCall):
1817         * wtf/Platform.h:
1818
1819 2010-07-02  Gavin Barraclough  <barraclough@apple.com>
1820
1821         Reviewed by Oliver Hunt.
1822
1823         Bug 41552 - Clean up ARMv7 vfp code generation
1824         Emit separate opcode individually, remove magic numbers.
1825
1826         Also remove invalid assert from JSImmediate (number cells are not CELL_MASK aligned).
1827
1828         * assembler/ARMv7Assembler.h:
1829         (JSC::ARMv7Assembler::):
1830         (JSC::ARMv7Assembler::vadd_F64):
1831         (JSC::ARMv7Assembler::vcmp_F64):
1832         (JSC::ARMv7Assembler::vcvt_F64_S32):
1833         (JSC::ARMv7Assembler::vcvtr_S32_F64):
1834         (JSC::ARMv7Assembler::vdiv_F64):
1835         (JSC::ARMv7Assembler::vldr):
1836         (JSC::ARMv7Assembler::vmov_F64_0):
1837         (JSC::ARMv7Assembler::vmov):
1838         (JSC::ARMv7Assembler::vmrs):
1839         (JSC::ARMv7Assembler::vmul_F64):
1840         (JSC::ARMv7Assembler::vstr):
1841         (JSC::ARMv7Assembler::vsub_F64):
1842         (JSC::ARMv7Assembler::VFPOperand::VFPOperand):
1843         (JSC::ARMv7Assembler::VFPOperand::bits1):
1844         (JSC::ARMv7Assembler::VFPOperand::bits4):
1845         (JSC::ARMv7Assembler::vcvtOp):
1846         (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpOp):
1847         (JSC::ARMv7Assembler::ARMInstructionFormatter::vfpMemOp):
1848         * assembler/MacroAssemblerARMv7.h:
1849         (JSC::MacroAssemblerARMv7::branchDouble):
1850         * runtime/JSImmediate.h:
1851         (JSC::JSValue::isCell):
1852
1853 2010-07-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1854
1855         Unreviewed, rolling out r62410.
1856         http://trac.webkit.org/changeset/62410
1857         https://bugs.webkit.org/show_bug.cgi?id=41549
1858
1859         accursed last minute changes (Requested by olliej on #webkit).
1860
1861         * parser/Lexer.cpp:
1862         (JSC::Lexer::setCode):
1863         (JSC::Lexer::copyCodeWithoutBOMs):
1864         (JSC::Lexer::sourceCode):
1865         * parser/SourceProvider.h:
1866         (JSC::):
1867         (JSC::SourceProvider::SourceProvider):
1868         (JSC::SourceProvider::hasBOMs):
1869         (JSC::UStringSourceProvider::create):
1870         (JSC::UStringSourceProvider::getRange):
1871         (JSC::UStringSourceProvider::UStringSourceProvider):
1872         * wtf/text/StringImpl.h:
1873
1874 2010-07-02  Sam Weinig  <sam@webkit.org>
1875
1876         Reviewed by Geoffrey Garen.
1877
1878         Patch for https://bugs.webkit.org/show_bug.cgi?id=41548
1879         Use snprintf instead of sprintf everywhere in JavaScriptCore
1880
1881         * runtime/JSGlobalObjectFunctions.cpp:
1882         (JSC::encode):
1883         (JSC::globalFuncEscape):
1884         * runtime/UString.cpp:
1885         (JSC::UString::from):
1886
1887 2010-07-02  Oliver Hunt  <oliver@apple.com>
1888
1889         Reviewed by Geoffrey Garen.
1890
1891         Move BOM handling out of the lexer and parser
1892         https://bugs.webkit.org/show_bug.cgi?id=41539
1893
1894         Doing the BOM stripping in the lexer meant that we could
1895         end up having to strip the BOMs from a source multiple times.
1896         To deal with this we now require all strings provided by
1897         a SourceProvider to already have had the BOMs stripped.
1898         This also simplifies some of the lexer logic.
1899
1900         * parser/Lexer.cpp:
1901         (JSC::Lexer::setCode):
1902         (JSC::Lexer::sourceCode):
1903         * parser/SourceProvider.h:
1904         (JSC::SourceProvider::SourceProvider):
1905         (JSC::UStringSourceProvider::create):
1906         (JSC::UStringSourceProvider::getRange):
1907         (JSC::UStringSourceProvider::UStringSourceProvider):
1908         * wtf/text/StringImpl.h:
1909         (WebCore::StringImpl::copyStringWithoutBOMs):
1910
1911 2010-07-02  Renata Hodovan  <reni@inf.u-szeged.hu>
1912
1913         Reviewed by Oliver Hunt.
1914         
1915         [ Updated after rollout. ]
1916
1917         Merged RegExp constructor and RegExp::create methods.
1918         Both functions are called with three parameters and check whether 
1919         flags (the third param) is given or not.
1920         Avoid extra hash lookups in RegExpCache::create by passing a pre-computed
1921         iterator parameter.
1922         https://bugs.webkit.org/show_bug.cgi?id=41055
1923
1924         * runtime/RegExp.cpp:
1925         (JSC::RegExp::RegExp):
1926         * runtime/RegExp.h:
1927         * runtime/RegExpCache.cpp:
1928         (JSC::RegExpCache::lookupOrCreate):
1929         (JSC::RegExpCache::create):
1930         * runtime/RegExpCache.h:
1931
1932 2010-07-02  Martin Robinson  <mrobinson@igalia.com>
1933
1934         Unreviewed. Build fix for GTK+.
1935
1936         Build Lexer.lut.h with the rest of the .lut.h files. Later these should
1937         all probably be moved to DerivedSources.
1938
1939         * GNUmakefile.am:
1940
1941 2010-06-23  Martin Robinson  <mrobinson@igalia.com>
1942
1943         Reviewed by Gustavo Noronha Silva.
1944
1945         [GTK] Separate DerivedSources per-project
1946         https://bugs.webkit.org/show_bug.cgi?id=41109
1947
1948         Generate JavaScriptCore derived sources in <builddir>/DerivedSources/JavaScriptCore.
1949
1950         * GNUmakefile.am:
1951
1952 2010-07-02  Peter Varga  <pvarga@inf.u-szeged.hu>
1953
1954         Reviewed by Oliver Hunt.
1955
1956         The alternativeFrameLocation value is wrong in the emitDisjunction function in
1957         case of PatternTerm::TypeParentheticalAssertion. This value needs to be
1958         computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
1959         memory corruption in some cases.
1960         Layout test added for checking of TypeParentheticalAssertion case.
1961         https://bugs.webkit.org/show_bug.cgi?id=41458
1962
1963         * yarr/RegexInterpreter.cpp:
1964         (JSC::Yarr::ByteCompiler::emitDisjunction):
1965
1966 2010-07-01  Oliver Hunt  <oliver@apple.com>
1967
1968         Reviewed by Maciej Stachowiak.
1969
1970         Add a FixedArray template to encapsulate fixed length arrays
1971         https://bugs.webkit.org/show_bug.cgi?id=41506
1972
1973         This new type is used in place of fixed length C arrays so
1974         that debug builds can guard against attempts to go beyond
1975         the end of the array.
1976
1977         * JavaScriptCore.xcodeproj/project.pbxproj:
1978         * bytecode/Opcode.cpp:
1979         (JSC::OpcodeStats::~OpcodeStats):
1980         * pcre/pcre_compile.cpp:
1981         (calculateCompiledPatternLength):
1982         * runtime/Collector.cpp:
1983         (JSC::Heap::allocateBlock):
1984         (JSC::Heap::allocate):
1985         * runtime/Collector.h:
1986         (JSC::CollectorBitmap::clearAll):
1987         * runtime/CollectorHeapIterator.h:
1988         (JSC::CollectorHeapIterator::operator*):
1989         * runtime/DateInstanceCache.h:
1990         * runtime/JSString.cpp:
1991         (JSC::JSString::replaceCharacter):
1992         * runtime/JSString.h:
1993         (JSC::RopeBuilder::JSStringFinalizerStruct::):
1994         * runtime/NumericStrings.h:
1995         * runtime/RegExpCache.h:
1996         * runtime/SmallStrings.h:
1997         (JSC::SmallStrings::singleCharacterStrings):
1998         * wtf/AVLTree.h:
1999         * wtf/FixedArray.h: Added.
2000         (WTF::FixedArray::operator[]):
2001         (WTF::FixedArray::data):
2002
2003 2010-07-01  Zoltan Herczeg  <zherczeg@webkit.org>
2004
2005         Reviewed by Oliver Hunt.
2006
2007         Improve the main lexer switch by mapping input characters to their type
2008         https://bugs.webkit.org/show_bug.cgi?id=41459
2009
2010         Sunsipder: no change (from 532.9ms to 531.5ms)
2011         SunSpider --parse-only: 1.025x as fast (from 33.1ms to 32.3ms)
2012
2013         * parser/Lexer.cpp:
2014         (JSC::):
2015         (JSC::Lexer::lex):
2016
2017 2010-07-01  Sam Weinig  <sam@webkit.org>
2018
2019         Rubber-stamped by Ander Carlsson.
2020
2021         Define HAVE_HOSTED_CORE_ANIMATION on Snow Leopard.
2022
2023         * wtf/Platform.h:
2024
2025 2010-07-01  Gavin Barraclough  <barraclough@apple.com>
2026
2027         Reviewed by Oliver Hunt.
2028
2029         Bug 41490 - Add missing operations to MacroAssemblerARMv7
2030         Also, make single, double, quad register numbers in ARMv7Assembler distinct & strongly typed.
2031
2032         * assembler/ARMv7Assembler.h:
2033         (JSC::ARMRegisters::):
2034         (JSC::ARMRegisters::asSingle):
2035         (JSC::ARMRegisters::asDouble):
2036         (JSC::VFPImmediate::VFPImmediate):
2037         (JSC::VFPImmediate::isValid):
2038         (JSC::VFPImmediate::value):
2039         (JSC::ARMv7Assembler::singleRegisterMask):
2040         (JSC::ARMv7Assembler::doubleRegisterMask):
2041         (JSC::ARMv7Assembler::):
2042         (JSC::ARMv7Assembler::add_S):
2043         (JSC::ARMv7Assembler::neg):
2044         (JSC::ARMv7Assembler::orr_S):
2045         (JSC::ARMv7Assembler::sub):
2046         (JSC::ARMv7Assembler::sub_S):
2047         (JSC::ARMv7Assembler::vadd_F64):
2048         (JSC::ARMv7Assembler::vcmp_F64):
2049         (JSC::ARMv7Assembler::vcvt_F64_S32):
2050         (JSC::ARMv7Assembler::vcvtr_S32_F64):
2051         (JSC::ARMv7Assembler::vdiv_F64):
2052         (JSC::ARMv7Assembler::vldr):
2053         (JSC::ARMv7Assembler::vmov_F64_0):
2054         (JSC::ARMv7Assembler::vmov):
2055         (JSC::ARMv7Assembler::vmul_F64):
2056         (JSC::ARMv7Assembler::vstr):
2057         (JSC::ARMv7Assembler::vsub_F64):
2058         (JSC::ARMv7Assembler::vcvt):
2059         (JSC::ARMv7Assembler::vmem):
2060         * assembler/AbstractMacroAssembler.h:
2061         * assembler/MacroAssemblerARM.h:
2062         * assembler/MacroAssemblerARMv7.h:
2063         (JSC::MacroAssemblerARMv7::fpTempRegisterAsSingle):
2064         (JSC::MacroAssemblerARMv7::neg32):
2065         (JSC::MacroAssemblerARMv7::loadDouble):
2066         (JSC::MacroAssemblerARMv7::divDouble):
2067         (JSC::MacroAssemblerARMv7::convertInt32ToDouble):
2068         (JSC::MacroAssemblerARMv7::branchConvertDoubleToInt32):
2069         (JSC::MacroAssemblerARMv7::zeroDouble):
2070         (JSC::MacroAssemblerARMv7::branchOr32):
2071         (JSC::MacroAssemblerARMv7::set32):
2072         (JSC::MacroAssemblerARMv7::set8):
2073         * assembler/MacroAssemblerMIPS.h:
2074         * assembler/MacroAssemblerX86Common.h:
2075
2076 2010-07-01  Oliver Hunt  <oliver@apple.com>
2077
2078         Reviewed by Geoff Garen.
2079
2080         Improve reentrancy logic in polymorphic cache stubs
2081         <https://bugs.webkit.org/show_bug.cgi?id=41482>
2082         <rdar://problem/8094380>
2083
2084         Make the polymorphic cache stubs handle reentrancy
2085         better.
2086
2087         * jit/JITStubs.cpp:
2088         (JSC::DEFINE_STUB_FUNCTION):
2089         (JSC::getPolymorphicAccessStructureListSlot):
2090
2091 2010-07-01  Antti Koivisto  <koivisto@iki.fi>
2092
2093         Revert accidental commit.
2094
2095         * runtime/Collector.cpp:
2096         (JSC::Heap::allocateBlock):
2097
2098 2010-06-30  Darin Adler  <darin@apple.com>
2099
2100         Reviewed by Adam Barth.
2101
2102         Add assertion, off by default, for when you forget to do adoptRef
2103         https://bugs.webkit.org/show_bug.cgi?id=41422
2104
2105         * wtf/PassRefPtr.h: Tweaked formatting. Added a new adopted
2106         function, called on the pointer by adoptRef, with an empty inline
2107         default version, meant to be overloaded. Unified the inlining
2108         with a macro named REF_DEREF_INLINE to make it clearer what's
2109         going on in the refIfNotNull/derefIfNotNull functions. Renamed
2110         releaseRef to leakRef, but left the old name in for compatibility
2111         for now.
2112
2113         * wtf/RefCounted.h: Added code to require adoption and assert if
2114         you don't call adoptRef. For now, it is turned off because of the
2115         LOOSE_REF_COUNTED define in this header. Later we can turn it on
2116         once we get everything working without asserting.
2117
2118 2010-06-29  Michael Saboff  <msaboff@apple.com>
2119
2120         Reviewed by Darin Adler.
2121
2122         Bug 41238 - RegExp performance slow on Dromaeo benchmark
2123
2124         Other javascript engines appear to cache prior results of regular 
2125         expression operations.
2126
2127         Suggest adding some sort of caching mechanism to regular expression 
2128         processing.
2129
2130         Added a single entry cache of match() results to RegExp class.
2131
2132         Also added performance improvements to UString == operator.
2133         First check the impls for equality.  Then get the length of
2134         each of the non-null impls.  Next check the sizes for equality.
2135         Then check the data for the case of different impls that point 
2136         to the same data (most likely due to substrings from the beginning of
2137         another string).  Lastly we check the underlying data for equality.
2138
2139         * runtime/RegExp.cpp:
2140         (JSC::RegExp::RegExp):
2141         (JSC::RegExp::match):
2142         * runtime/RegExp.h:
2143         * runtime/UString.h:
2144         (JSC::operator==):
2145
2146 2010-06-29  Nathan Lawrence  <nlawrence@apple.com>
2147
2148         Reviewed by Geoffrey Garen.
2149
2150         WTF::HashSet iterators are quasi-mutable.  Changing the value through
2151         dereferencing an iterator will not change the behavior of methods like
2152         contains or find, but will change the behavior of iterating.
2153
2154         * wtf/HashSet.h:
2155         (WTF::::begin):
2156         (WTF::::end):
2157         (WTF::::find):
2158         (WTF::::remove):
2159         * wtf/HashTable.h:
2160
2161 2010-06-29  Martin Robinson  <mrobinson@igalia.com>
2162
2163         Reviewed by Xan Lopez.
2164
2165         [GTK] Clean up the source lists in the GNUMakefile.am files
2166         https://bugs.webkit.org/show_bug.cgi?id=41229
2167
2168         Clean up the GNUMakefile.am a little bit. Alphabetize and conglomerate
2169         the source lists.
2170
2171         * GNUmakefile.am:
2172
2173 2010-06-29  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2174
2175         Reviewed by Kenneth Rohde Christiansen.
2176
2177         [Qt] Fix QtScript build after QScriptValuePrivate ctor changes
2178         https://bugs.webkit.org/show_bug.cgi?id=41307
2179
2180         * qt/api/qscriptvalue_p.h:
2181         (QScriptValuePrivate::prototype):
2182         * qt/benchmarks/qscriptengine/qscriptengine.pro:
2183
2184 2010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2185
2186         Reviewed by Kenneth Rohde Christiansen.
2187
2188         [Qt] QScriptEngine API should contain a newArray function
2189         https://bugs.webkit.org/show_bug.cgi?id=39115
2190
2191         * qt/api/qscriptengine.cpp:
2192         (QScriptEngine::newArray):
2193         * qt/api/qscriptengine.h:
2194         * qt/api/qscriptengine_p.cpp:
2195         (QScriptEnginePrivate::newArray):
2196         * qt/api/qscriptengine_p.h:
2197         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
2198         (tst_QScriptEngine::newArray):
2199
2200 2010-06-28  Xan Lopez  <xlopez@igalia.com>
2201
2202         Reviewed by Gustavo Noronha.
2203
2204         Install jsc as jsc-X where X is the major API version to allow
2205         parallel installation of both GTK+ 2.x and 3.x versions.
2206
2207         * GNUmakefile.am:
2208
2209 2010-06-28  John Gregg  <johnnyg@google.com>
2210
2211         Reviewed by Kent Tamura.
2212
2213         add ENABLE_DIRECTORY_UPLOAD build support
2214         https://bugs.webkit.org/show_bug.cgi?id=41100
2215
2216         * Configurations/FeatureDefines.xcconfig:
2217
2218 2010-06-28  Xan Lopez  <xlopez@igalia.com>
2219
2220         Revert to build jsc, since the tests expect this.
2221
2222         * GNUmakefile.am:
2223
2224 2010-06-28  Zoltan Herczeg  <zherczeg@webkit.org>
2225
2226         Reviewed by Oliver Hunt.
2227
2228         Only one character lookahead should be enough for the lexer
2229         https://bugs.webkit.org/show_bug.cgi?id=41213
2230
2231         The lexer had 4 character lookahead before, which required
2232         a complex shifting mechanism. This can be improved by using
2233         only one character lookahead for most decisions, and a
2234         peek() function as a fallback when it is absolutely necessary.
2235
2236         * parser/Lexer.cpp:
2237         (JSC::Lexer::currentCharacter):
2238         (JSC::Lexer::currentOffset):
2239         (JSC::Lexer::setCode):
2240         (JSC::Lexer::shift):
2241         (JSC::Lexer::peek):
2242         (JSC::Lexer::getUnicodeCharacter):
2243         (JSC::Lexer::shiftLineTerminator):
2244         (JSC::Lexer::lastTokenWasRestrKeyword):
2245         (JSC::Lexer::lex):
2246         (JSC::Lexer::scanRegExp):
2247         (JSC::Lexer::skipRegExp):
2248         * parser/Lexer.h:
2249
2250 2010-06-28  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2251
2252         Unreviewed build fix.
2253
2254         [EFL] Build fix for latest version of Ecore library.
2255         Ecore recently changed return type of callbacks from int to Eina_Bool.
2256
2257         * wtf/efl/MainThreadEfl.cpp:
2258         (WTF::timeoutFired): Return Eina_Bool instead of int.
2259
2260 2010-06-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2261
2262         Reviewed by Kenneth Rohde Christiansen.
2263
2264         [Qt] QScriptValue should have API for accessing object properties
2265         https://bugs.webkit.org/show_bug.cgi?id=40903
2266
2267         Make possible to access properties inside QScriptValues. While this
2268         still doesn't support the ResolveLocal parameter, it is already useful
2269         for testing the API.
2270
2271         The tests from upstream QtScript weren't imported since most of them
2272         depend on the setProperty() function as well. A simple test was created.
2273
2274         * qt/api/qscriptvalue.cpp:
2275         (QScriptValue::property):
2276         * qt/api/qscriptvalue.h:
2277         (QScriptValue::):
2278         * qt/api/qscriptvalue_p.h:
2279         (QScriptValuePrivate::property):
2280         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
2281         (tst_QScriptValue::propertySimple):
2282         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
2283
2284 2010-06-28  Xan Lopez  <xlopez@igalia.com>
2285
2286         Reviewed by Gustavo Noronha.
2287
2288         [GTK] Add support for GTK+3
2289         https://bugs.webkit.org/show_bug.cgi?id=41253
2290
2291         Suffix jsc with the API version of the library, so that
2292         libwebkitgtk 1.x and 3.x can install jsc.
2293
2294         * GNUmakefile.am:
2295
2296 2010-06-27  Kwang Yul Seo  <skyul@company100.net>
2297
2298         Reviewed by Kent Tamura.
2299
2300         [BREWMP] Turn ENABLE(SINGLE_THREADED) on.
2301         https://bugs.webkit.org/show_bug.cgi?id=41135
2302
2303         Brew MP does not support preemptive multi-threading.
2304         Disable threading for Brew MP.
2305
2306         * wtf/Platform.h:
2307
2308 2010-06-26  Tony Gentilcore  <tonyg@chromium.org>
2309
2310         Reviewed by Dimitri Glazkov.
2311
2312         Add an ENABLE_WEB_TIMING option for enabling Web Timing support.
2313         https://bugs.webkit.org/show_bug.cgi?id=38924
2314
2315         * Configurations/FeatureDefines.xcconfig:
2316
2317 2010-06-25  Nathan Lawrence  <nlawrence@apple.com>
2318
2319         Reviewed by Geoffrey Garen.
2320
2321         We assume in testapi.c that the value aHeapRef refers to will not be
2322         moved.  When we have movable objects, this will not be the case.
2323
2324         * API/tests/testapi.c:
2325         (main):
2326
2327 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2328
2329         Unreviewed, rolling out r61924.
2330         http://trac.webkit.org/changeset/61924
2331         https://bugs.webkit.org/show_bug.cgi?id=41240
2332
2333         It was rolled out, but cq+ wasn't removed (Requested by Ossy_
2334         on #webkit).
2335
2336         * runtime/RegExp.cpp:
2337         (JSC::RegExp::RegExp):
2338         (JSC::RegExp::create):
2339         * runtime/RegExp.h:
2340         * runtime/RegExpCache.cpp:
2341         (JSC::RegExpCache::lookupOrCreate):
2342         (JSC::RegExpCache::create):
2343         * runtime/RegExpCache.h:
2344
2345 2010-06-25  Renata Hodovan  <reni@inf.u-szeged.hu>
2346
2347         Reviewed by Geoffrey Garen.
2348
2349         Merge RegExp constructor and RegExp::create methods into one.
2350         Both of function are called with tree parameters and check whether 
2351         flags (the third param) is given or not.
2352         Simplify hash lookups in RegExpCache::create with giving them an extra 
2353         iterator parameter.
2354         https://bugs.webkit.org/show_bug.cgi?id=41055
2355
2356         * runtime/RegExp.cpp:
2357         (JSC::RegExp::RegExp):
2358         * runtime/RegExp.h:
2359         * runtime/RegExpCache.cpp:
2360         (JSC::RegExpCache::lookupOrCreate):
2361         (JSC::RegExpCache::create):
2362         * runtime/RegExpCache.h:
2363
2364 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2365
2366         Reviewed by Simon Hausmann.
2367
2368         Introduce QtScript benchmarks.
2369
2370         The QtScript performance should be tested regularly. The patch introduces
2371         micro benchmarks for existing API.
2372
2373         [Qt] Performance of the QtScript API is not tested.
2374         https://bugs.webkit.org/show_bug.cgi?id=40911
2375
2376         * qt/benchmarks/benchmarks.pri: Copied from JavaScriptCore/qt/tests/tests.pri.
2377         * qt/benchmarks/benchmarks.pro: Added.
2378         * qt/benchmarks/qscriptengine/qscriptengine.pro: Added.
2379         * qt/benchmarks/qscriptengine/tst_qscriptengine.cpp: Added.
2380         (tst_QScriptEngine::checkSyntax_data):
2381         (tst_QScriptEngine::checkSyntax):
2382         (tst_QScriptEngine::constructor):
2383         (tst_QScriptEngine::evaluateString_data):
2384         (tst_QScriptEngine::evaluateString):
2385         (tst_QScriptEngine::evaluateProgram_data):
2386         (tst_QScriptEngine::evaluateProgram):
2387         (tst_QScriptEngine::newObject):
2388         (tst_QScriptEngine::nullValue):
2389         (tst_QScriptEngine::undefinedValue):
2390         (tst_QScriptEngine::globalObject):
2391         (tst_QScriptEngine::toStringHandle):
2392         * qt/benchmarks/qscriptvalue/qscriptvalue.pro: Added.
2393         * qt/benchmarks/qscriptvalue/tst_qscriptvalue.cpp: Added.
2394         (tst_QScriptValue::tst_QScriptValue):
2395         (tst_QScriptValue::~tst_QScriptValue):
2396         (tst_QScriptValue::values_data):
2397         (tst_QScriptValue::ctorBool):
2398         (tst_QScriptValue::ctorReal):
2399         (tst_QScriptValue::ctorNumber):
2400         (tst_QScriptValue::ctorQString):
2401         (tst_QScriptValue::ctorCString):
2402         (tst_QScriptValue::ctorSpecial):
2403         (tst_QScriptValue::ctorQScriptValue):
2404         (tst_QScriptValue::isValid_data):
2405         (tst_QScriptValue::isValid):
2406         (tst_QScriptValue::isBool_data):
2407         (tst_QScriptValue::isBool):
2408         (tst_QScriptValue::isNumber_data):
2409         (tst_QScriptValue::isNumber):
2410         (tst_QScriptValue::isFunction_data):
2411         (tst_QScriptValue::isFunction):
2412         (tst_QScriptValue::isNull_data):
2413         (tst_QScriptValue::isNull):
2414         (tst_QScriptValue::isString_data):
2415         (tst_QScriptValue::isString):
2416         (tst_QScriptValue::isUndefined_data):
2417         (tst_QScriptValue::isUndefined):
2418         (tst_QScriptValue::isObject_data):
2419         (tst_QScriptValue::isObject):
2420         (tst_QScriptValue::isError_data):
2421         (tst_QScriptValue::isError):
2422         (tst_QScriptValue::toString_data):
2423         (tst_QScriptValue::toString):
2424         (tst_QScriptValue::toNumber_data):
2425         (tst_QScriptValue::toNumber):
2426         (tst_QScriptValue::toBool_data):
2427         (tst_QScriptValue::toBool):
2428         (tst_QScriptValue::toInteger_data):
2429         (tst_QScriptValue::toInteger):
2430         (tst_QScriptValue::toInt32_data):
2431         (tst_QScriptValue::toInt32):
2432         (tst_QScriptValue::toUInt32_data):
2433         (tst_QScriptValue::toUInt32):
2434         (tst_QScriptValue::toUInt16_data):
2435         (tst_QScriptValue::toUInt16):
2436         (tst_QScriptValue::toObject_data):
2437         (tst_QScriptValue::toObject):
2438         (tst_QScriptValue::equals_data):
2439         (tst_QScriptValue::equals):
2440         (tst_QScriptValue::strictlyEquals_data):
2441         (tst_QScriptValue::strictlyEquals):
2442         (tst_QScriptValue::instanceOf_data):
2443         (tst_QScriptValue::instanceOf):
2444
2445 2010-06-25  Oliver Hunt  <oliver@apple.com>
2446
2447         Reviewed by Geoffrey Garen.
2448
2449         Remove old js parser
2450         https://bugs.webkit.org/show_bug.cgi?id=41222
2451
2452         Remove the old yacc parser, this also solves the tiger problem.  Which
2453         was a conflict between yacc generated token values and those in the
2454         custom parser
2455
2456         * Android.mk:
2457         * CMakeLists.txt:
2458         * DerivedSources.make:
2459         * DerivedSources.pro:
2460         * GNUmakefile.am:
2461         * JavaScriptCore.pro:
2462         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2463         * JavaScriptCore.xcodeproj/project.pbxproj:
2464         * parser/Grammar.y: Removed.
2465         * parser/JSParser.cpp:
2466         * parser/JSParser.h:
2467         * parser/Lexer.cpp:
2468         * parser/NodeConstructors.h:
2469         (JSC::Node::Node):
2470         * parser/Parser.cpp:
2471         (JSC::Parser::parse):
2472         * wtf/Platform.h:
2473
2474 2010-06-25  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2475
2476         Reviewed by Simon Hausmann.
2477
2478         New QtScript API; setPrototype() and prototype().
2479
2480         This patch implements QScriptValue's prototype accessors.
2481
2482         [Qt] QScriptValue should have accessors to a prototype.
2483         https://bugs.webkit.org/show_bug.cgi?id=39356
2484
2485         * qt/api/qscriptvalue.cpp:
2486         (QScriptValue::prototype):
2487         (QScriptValue::setPrototype):
2488         * qt/api/qscriptvalue.h:
2489         * qt/api/qscriptvalue_p.h:
2490         (QScriptValuePrivate::prototype):
2491         (QScriptValuePrivate::setPrototype):
2492         * qt/tests/qscriptvalue/tst_qscriptvalue.cpp:
2493         (tst_QScriptValue::getSetPrototype):
2494         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
2495
2496 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2497
2498         Reviewed by Kenneth Rohde Christiansen.
2499
2500         [CMake] Add option to enable JIT.
2501         JIT is disabled by default, but now it's possible to enable it through
2502         an option to CMake: -DENABLE_JIT will enable it.
2503         https://bugs.webkit.org/show_bug.cgi?id=40936
2504
2505         * CMakeLists.txt: Add missing files and re-sort.
2506
2507 2010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2508
2509         Reviewed by Gustavo Noronha Silva.
2510
2511         [CMake] Remove unused variable in EFL build system. It was previously
2512         being used to set the flags of each port but it was superseded by
2513         other flags.
2514         https://bugs.webkit.org/show_bug.cgi?id=40931
2515
2516         * jsc/CMakeLists.txt:
2517
2518 2010-06-25  Nathan Lawrence  <nlawrence@apple.com>
2519
2520         Reviewed by Geoffrey Garen.
2521
2522         Aligning AssemblerBuffer to 128 bytes gives a 0.4% speedup on
2523         sunspider.
2524
2525         * assembler/AssemblerBuffer.h:
2526         (JSC::AssemblerBuffer::AssemblerBuffer):
2527
2528 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2529
2530         Unreviewed, rolling out r61842.
2531         http://trac.webkit.org/changeset/61842
2532         https://bugs.webkit.org/show_bug.cgi?id=41208
2533
2534         It broke Windows build (Requested by Ossy_ on #webkit).
2535
2536         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2537         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2538         * wtf/OwnPtrCommon.h:
2539         * wtf/brew/OwnPtrBrew.h: Removed.
2540         * wtf/win/OwnPtrWin.h: Removed.
2541
2542 2010-06-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2543
2544         Unreviewed, rolling out r61833.
2545         http://trac.webkit.org/changeset/61833
2546         https://bugs.webkit.org/show_bug.cgi?id=41205
2547
2548         It broke Leopard and GTK (Requested by Ossy_ on #webkit).
2549
2550         * runtime/RegExp.cpp:
2551         (JSC::RegExp::RegExp):
2552         (JSC::RegExp::create):
2553         * runtime/RegExp.h:
2554         * runtime/RegExpCache.cpp:
2555         (JSC::RegExpCache::lookupOrCreate):
2556         (JSC::RegExpCache::create):
2557         * runtime/RegExpCache.h:
2558
2559 2010-06-25  Kwang Yul Seo  <skyul@company100.net>
2560
2561         Reviewed by Adam Barth.
2562
2563         Change OwnPtrCommon to include platform-specific headers
2564         https://bugs.webkit.org/show_bug.cgi?id=40279
2565
2566         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
2567         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
2568
2569         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
2570         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
2571         * wtf/OwnPtrCommon.h:
2572         * wtf/brew/OwnPtrBrew.h: Added.
2573         * wtf/win/OwnPtrWin.h: Added.
2574
2575 2010-06-25  Patrick Gansterer  <paroga@paroga.com>
2576
2577         Reviewed by Darin Adler.
2578
2579         Add the possibility for a head and footer section to create_jit_stubs.
2580         https://bugs.webkit.org/show_bug.cgi?id=36050
2581
2582         * create_jit_stubs:
2583
2584 2010-06-24  Renata Hodovan  <reni@inf.u-szeged.hu>
2585
2586         Reviewed by Geoffrey Garen.
2587
2588         Merge RegExp constructor and RegExp::create methods into one.
2589         Both of function are called with tree parameters and check whether 
2590         flags (the third param) is given or not.
2591         Simplify hash lookups in RegExpCache::create with giving them an extra 
2592         iterator parameter.
2593         https://bugs.webkit.org/show_bug.cgi?id=41055
2594
2595         * runtime/RegExp.cpp:
2596         (JSC::RegExp::RegExp):
2597         * runtime/RegExp.h:
2598         * runtime/RegExpCache.cpp:
2599         (JSC::RegExpCache::lookupOrCreate):
2600         (JSC::RegExpCache::create):
2601         * runtime/RegExpCache.h:
2602
2603 2010-06-24  Oliver Hunt  <oliver@apple.com>
2604
2605         Reviewed by Maciej Stachowiak.
2606
2607         Incorrect use of '+ 4' and 0 instead of tag and payload offsets in JSValue32_64
2608         https://bugs.webkit.org/show_bug.cgi?id=41193
2609
2610         I noticed a use of '+ 4' in some of the 32_64 code paths and realised there
2611         were a few places where endianness was being hardcoded.  This patch fixes
2612         the errors i could find through code inspection.
2613
2614         * jit/JITOpcodes32_64.cpp:
2615         (JSC::JIT::emit_op_resolve_global):
2616         * jit/JITPropertyAccess32_64.cpp:
2617         (JSC::JIT::emit_op_get_by_val):
2618         (JSC::JIT::emit_op_put_by_val):
2619         (JSC::JIT::compileGetDirectOffset):
2620         (JSC::JIT::privateCompilePutByIdTransition):
2621         (JSC::JIT::patchGetByIdSelf):
2622         (JSC::JIT::patchPutByIdReplace):
2623
2624 2010-06-24  Oliver Hunt  <oliver@apple.com>
2625
2626         Build fix
2627
2628         Temporarily get the tiger bot working again by disabling the
2629         new JS parser.  GCC on tiger is miscompiling the parser and
2630         I don't have access to a tiger machine right now.
2631
2632         * wtf/Platform.h:
2633
2634  2010-06-21  Nathan Lawrence  <nlawrence@apple.com>
2635
2636          Reviewed by Geoff Garen.
2637
2638          https://bugs.webkit.org/show_bug.cgi?id=40128
2639          Fixed broken debug functionality.
2640
2641          * interpreter/Interpreter.cpp:
2642          (JSC::Interpreter::dumpRegisters):
2643              Fixed to work with updated call frame.
2644          * runtime/JSImmediate.h:
2645          (JSC::JSValue::isCell):
2646              Added assert for aligned cell.
2647          * runtime/JSValue.cpp:
2648          (JSC::JSValue::description):
2649              Fixed to work with current JSValue implementation.
2650          * runtime/JSZombie.cpp:
2651          (JSC::JSZombie::leakedZombieStructure):
2652              JSombies compile again.
2653
2654 2010-06-24  Leandro Pereira  <leandro@profusion.mobi>
2655
2656         Unreviewed build fix.
2657
2658         * CMakeLists.txt: Add JSParser.cpp.
2659
2660 2010-06-24  Oliver Hunt  <oliver@apple.com>
2661
2662         Reviewed by Maciej Stachowiak.
2663
2664         Single character string replacement may replace too many characters
2665         https://bugs.webkit.org/show_bug.cgi?id=41138
2666         <rdar://problem/8097496>
2667
2668         Simple fix to stop the rope path of single character replacement
2669         once the first replacement occurs.
2670
2671         * runtime/JSString.cpp:
2672         (JSC::JSString::replaceCharacter):
2673
2674 2010-06-24  Gabor Loki  <loki@webkit.org>
2675
2676         Reviewed by Gavin Barraclough.
2677
2678         Fix the length of instruction stream controlled by constant pool
2679         https://bugs.webkit.org/show_bug.cgi?id=40293
2680
2681         The initial/maximum length of instruction stream (m_maxDistance) should
2682         be set when the first constant arrives to the constant pool. Otherwise
2683         the constant pool could be placed into an uninterrupted sequence.
2684
2685         * assembler/AssemblerBufferWithConstantPool.h:
2686         (JSC::):
2687
2688 2010-06-24  Oliver Hunt  <oliver@apple.com>
2689
2690         Reviewed by Gavin Barraclough.
2691
2692         We assume bytecodeOffset will always return a value > 1,
2693         so we adjust the failure case to return 1 instead of 0.
2694
2695         * bytecode/CodeBlock.h:
2696         (JSC::CodeBlock::bytecodeOffset):
2697
2698 2010-06-23  Oliver Hunt  <oliver@apple.com>
2699
2700         Reviewed by Gavin Barraclough.
2701
2702         Custom-written JavaScript parser
2703         https://bugs.webkit.org/show_bug.cgi?id=34019
2704
2705         Implement a recursive descent parser similar to that used by V8 and
2706         SpiderMonkey.  Greater than 2x improvement in SunSpider parsing tests.
2707
2708         The parser consists of a JSParser class that uses a TreeBuilder to actually
2709         build the AST.  There are currently two builders -- the ASTBuilder and
2710         SyntaxChecker which separate the job of building an AST for code generation
2711         and simply checking syntactic correctness.
2712
2713         There's still some less than ideal code remaining in the parser to allow
2714         us to retain the existing lexing code with minimal changes.  We'll tidy
2715         this up at a later date.
2716
2717         * GNUmakefile.am:
2718         * JavaScriptCore.gypi:
2719         * JavaScriptCore.pro:
2720         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2721         * JavaScriptCore.xcodeproj/project.pbxproj:
2722         * parser/ASTBuilder.h: Added.
2723         (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
2724         (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
2725         (JSC::ASTBuilder::ASTBuilder):
2726         (JSC::ASTBuilder::createSourceElements):
2727         (JSC::ASTBuilder::varDeclarations):
2728         (JSC::ASTBuilder::funcDeclarations):
2729         (JSC::ASTBuilder::features):
2730         (JSC::ASTBuilder::numConstants):
2731         (JSC::ASTBuilder::appendToComma):
2732         (JSC::ASTBuilder::createCommaExpr):
2733         (JSC::ASTBuilder::createLogicalNot):
2734         (JSC::ASTBuilder::createUnaryPlus):
2735         (JSC::ASTBuilder::createVoid):
2736         (JSC::ASTBuilder::thisExpr):
2737         (JSC::ASTBuilder::createResolve):
2738         (JSC::ASTBuilder::createObjectLiteral):
2739         (JSC::ASTBuilder::createArray):
2740         (JSC::ASTBuilder::createNumberExpr):
2741         (JSC::ASTBuilder::createString):
2742         (JSC::ASTBuilder::createBoolean):
2743         (JSC::ASTBuilder::createNull):
2744         (JSC::ASTBuilder::createBracketAccess):
2745         (JSC::ASTBuilder::createDotAccess):
2746         (JSC::ASTBuilder::createRegex):
2747         (JSC::ASTBuilder::createNewExpr):
2748         (JSC::ASTBuilder::createConditionalExpr):
2749         (JSC::ASTBuilder::createAssignResolve):
2750         (JSC::ASTBuilder::createFunctionExpr):
2751         (JSC::ASTBuilder::createFunctionBody):
2752         (JSC::ASTBuilder::createGetterOrSetterProperty):
2753         (JSC::ASTBuilder::createArguments):
2754         (JSC::ASTBuilder::createArgumentsList):
2755         (JSC::ASTBuilder::createProperty):
2756         (JSC::ASTBuilder::createPropertyList):
2757         (JSC::ASTBuilder::createElementList):
2758         (JSC::ASTBuilder::createFormalParameterList):
2759         (JSC::ASTBuilder::createClause):
2760         (JSC::ASTBuilder::createClauseList):
2761         (JSC::ASTBuilder::setUsesArguments):
2762         (JSC::ASTBuilder::createFuncDeclStatement):
2763         (JSC::ASTBuilder::createBlockStatement):
2764         (JSC::ASTBuilder::createExprStatement):
2765         (JSC::ASTBuilder::createIfStatement):
2766         (JSC::ASTBuilder::createForLoop):
2767         (JSC::ASTBuilder::createForInLoop):
2768         (JSC::ASTBuilder::createEmptyStatement):
2769         (JSC::ASTBuilder::createVarStatement):
2770         (JSC::ASTBuilder::createReturnStatement):
2771         (JSC::ASTBuilder::createBreakStatement):
2772         (JSC::ASTBuilder::createContinueStatement):
2773         (JSC::ASTBuilder::createTryStatement):
2774         (JSC::ASTBuilder::createSwitchStatement):
2775         (JSC::ASTBuilder::createWhileStatement):
2776         (JSC::ASTBuilder::createDoWhileStatement):
2777         (JSC::ASTBuilder::createLabelStatement):
2778         (JSC::ASTBuilder::createWithStatement):
2779         (JSC::ASTBuilder::createThrowStatement):
2780         (JSC::ASTBuilder::createDebugger):
2781         (JSC::ASTBuilder::createConstStatement):
2782         (JSC::ASTBuilder::appendConstDecl):
2783         (JSC::ASTBuilder::appendStatement):
2784         (JSC::ASTBuilder::addVar):
2785         (JSC::ASTBuilder::combineCommaNodes):
2786         (JSC::ASTBuilder::evalCount):
2787         (JSC::ASTBuilder::appendBinaryExpressionInfo):
2788         (JSC::ASTBuilder::operatorStackPop):
2789         (JSC::ASTBuilder::operatorStackHasHigherPrecedence):
2790         (JSC::ASTBuilder::getFromOperandStack):
2791         (JSC::ASTBuilder::shrinkOperandStackBy):
2792         (JSC::ASTBuilder::appendBinaryOperation):
2793         (JSC::ASTBuilder::operatorStackAppend):
2794         (JSC::ASTBuilder::popOperandStack):
2795         (JSC::ASTBuilder::appendUnaryToken):
2796         (JSC::ASTBuilder::unaryTokenStackLastType):
2797         (JSC::ASTBuilder::unaryTokenStackLastStart):
2798         (JSC::ASTBuilder::unaryTokenStackRemoveLast):
2799         (JSC::ASTBuilder::assignmentStackAppend):
2800         (JSC::ASTBuilder::createAssignment):
2801         (JSC::ASTBuilder::Scope::Scope):
2802         (JSC::ASTBuilder::setExceptionLocation):
2803         (JSC::ASTBuilder::incConstants):
2804         (JSC::ASTBuilder::usesThis):
2805         (JSC::ASTBuilder::usesCatch):
2806         (JSC::ASTBuilder::usesClosures):
2807         (JSC::ASTBuilder::usesArguments):
2808         (JSC::ASTBuilder::usesAssignment):
2809         (JSC::ASTBuilder::usesWith):
2810         (JSC::ASTBuilder::usesEval):
2811         (JSC::ASTBuilder::createNumber):
2812         (JSC::ASTBuilder::makeTypeOfNode):
2813         (JSC::ASTBuilder::makeDeleteNode):
2814         (JSC::ASTBuilder::makeNegateNode):
2815         (JSC::ASTBuilder::makeBitwiseNotNode):
2816         (JSC::ASTBuilder::makeMultNode):
2817         (JSC::ASTBuilder::makeDivNode):
2818         (JSC::ASTBuilder::makeAddNode):
2819         (JSC::ASTBuilder::makeSubNode):
2820         (JSC::ASTBuilder::makeLeftShiftNode):
2821         (JSC::ASTBuilder::makeRightShiftNode):
2822         (JSC::ASTBuilder::makeFunctionCallNode):
2823         (JSC::ASTBuilder::makeBinaryNode):
2824         (JSC::ASTBuilder::makeAssignNode):
2825         (JSC::ASTBuilder::makePrefixNode):
2826         (JSC::ASTBuilder::makePostfixNode):
2827         * parser/JSParser.cpp: Added.
2828         (JSC::JSParser::AllowInOverride::AllowInOverride):
2829         (JSC::JSParser::AllowInOverride::~AllowInOverride):
2830         (JSC::JSParser::token):
2831         (JSC::JSParser::next):
2832         (JSC::JSParser::consume):
2833         (JSC::JSParser::match):
2834         (JSC::JSParser::tokenStart):
2835         (JSC::JSParser::tokenLine):
2836         (JSC::JSParser::tokenEnd):
2837         (JSC::JSParser::):
2838         (JSC::JSParser::autoSemiColon):
2839         (JSC::JSParser::canRecurse):
2840         (JSC::JSParser::lastTokenEnd):
2841         (JSC::jsParse):
2842         (JSC::JSParser::JSParser):
2843         (JSC::JSParser::parseProgram):
2844         (JSC::JSParser::allowAutomaticSemicolon):
2845         (JSC::JSParser::parseSourceElements):
2846         (JSC::JSParser::parseVarDeclaration):
2847         (JSC::JSParser::parseConstDeclaration):
2848         (JSC::JSParser::parseDoWhileStatement):
2849         (JSC::JSParser::parseWhileStatement):
2850         (JSC::JSParser::parseVarDeclarationList):
2851         (JSC::JSParser::parseConstDeclarationList):
2852         (JSC::JSParser::parseForStatement):
2853         (JSC::JSParser::parseBreakStatement):
2854         (JSC::JSParser::parseContinueStatement):
2855         (JSC::JSParser::parseReturnStatement):
2856         (JSC::JSParser::parseThrowStatement):
2857         (JSC::JSParser::parseWithStatement):
2858         (JSC::JSParser::parseSwitchStatement):
2859         (JSC::JSParser::parseSwitchClauses):
2860         (JSC::JSParser::parseSwitchDefaultClause):
2861         (JSC::JSParser::parseTryStatement):
2862         (JSC::JSParser::parseDebuggerStatement):
2863         (JSC::JSParser::parseBlockStatement):
2864         (JSC::JSParser::parseStatement):
2865         (JSC::JSParser::parseFormalParameters):
2866         (JSC::JSParser::parseFunctionBody):
2867         (JSC::JSParser::parseFunctionInfo):
2868         (JSC::JSParser::parseFunctionDeclaration):
2869         (JSC::JSParser::parseExpressionOrLabelStatement):
2870         (JSC::JSParser::parseExpressionStatement):
2871         (JSC::JSParser::parseIfStatement):
2872         (JSC::JSParser::parseExpression):
2873         (JSC::JSParser::parseAssignmentExpression):
2874         (JSC::JSParser::parseConditionalExpression):
2875         (JSC::isUnaryOp):
2876         (JSC::JSParser::isBinaryOperator):
2877         (JSC::JSParser::parseBinaryExpression):
2878         (JSC::JSParser::parseProperty):
2879         (JSC::JSParser::parseObjectLiteral):
2880         (JSC::JSParser::parseArrayLiteral):
2881         (JSC::JSParser::parsePrimaryExpression):
2882         (JSC::JSParser::parseArguments):
2883         (JSC::JSParser::parseMemberExpression):
2884         (JSC::JSParser::parseUnaryExpression):
2885         * parser/JSParser.h: Added.
2886         (JSC::):
2887         (JSC::JSTokenInfo::JSTokenInfo):
2888         * parser/Lexer.cpp:
2889         (JSC::Lexer::lex):
2890         * parser/Lexer.h:
2891         (JSC::Lexer::setLastLineNumber):
2892         (JSC::Lexer::lastLineNumber):
2893         * parser/NodeConstructors.h:
2894         (JSC::Node::Node):
2895         * parser/Parser.cpp:
2896         (JSC::Parser::parse):
2897         * parser/SyntaxChecker.h: Added.
2898         (JSC::SyntaxChecker::SyntaxChecker):
2899         (JSC::SyntaxChecker::createSourceElements):
2900         (JSC::SyntaxChecker::makeFunctionCallNode):
2901         (JSC::SyntaxChecker::appendToComma):
2902         (JSC::SyntaxChecker::createCommaExpr):
2903         (JSC::SyntaxChecker::makeAssignNode):
2904         (JSC::SyntaxChecker::makePrefixNode):
2905         (JSC::SyntaxChecker::makePostfixNode):
2906         (JSC::SyntaxChecker::makeTypeOfNode):
2907         (JSC::SyntaxChecker::makeDeleteNode):
2908         (JSC::SyntaxChecker::makeNegateNode):
2909         (JSC::SyntaxChecker::makeBitwiseNotNode):
2910         (JSC::SyntaxChecker::createLogicalNot):
2911         (JSC::SyntaxChecker::createUnaryPlus):
2912         (JSC::SyntaxChecker::createVoid):
2913         (JSC::SyntaxChecker::thisExpr):
2914         (JSC::SyntaxChecker::createResolve):
2915         (JSC::SyntaxChecker::createObjectLiteral):
2916         (JSC::SyntaxChecker::createArray):
2917         (JSC::SyntaxChecker::createNumberExpr):
2918         (JSC::SyntaxChecker::createString):
2919         (JSC::SyntaxChecker::createBoolean):
2920         (JSC::SyntaxChecker::createNull):
2921         (JSC::SyntaxChecker::createBracketAccess):
2922         (JSC::SyntaxChecker::createDotAccess):
2923         (JSC::SyntaxChecker::createRegex):
2924         (JSC::SyntaxChecker::createNewExpr):
2925         (JSC::SyntaxChecker::createConditionalExpr):
2926         (JSC::SyntaxChecker::createAssignResolve):
2927         (JSC::SyntaxChecker::createFunctionExpr):
2928         (JSC::SyntaxChecker::createFunctionBody):
2929         (JSC::SyntaxChecker::createArguments):
2930         (JSC::SyntaxChecker::createArgumentsList):
2931         (JSC::SyntaxChecker::createProperty):
2932         (JSC::SyntaxChecker::createPropertyList):
2933         (JSC::SyntaxChecker::createElementList):
2934         (JSC::SyntaxChecker::createFormalParameterList):
2935         (JSC::SyntaxChecker::createClause):
2936         (JSC::SyntaxChecker::createClauseList):
2937         (JSC::SyntaxChecker::setUsesArguments):
2938         (JSC::SyntaxChecker::createFuncDeclStatement):
2939         (JSC::SyntaxChecker::createBlockStatement):
2940         (JSC::SyntaxChecker::createExprStatement):
2941         (JSC::SyntaxChecker::createIfStatement):
2942         (JSC::SyntaxChecker::createForLoop):
2943         (JSC::SyntaxChecker::createForInLoop):
2944         (JSC::SyntaxChecker::createEmptyStatement):
2945         (JSC::SyntaxChecker::createVarStatement):
2946         (JSC::SyntaxChecker::createReturnStatement):
2947         (JSC::SyntaxChecker::createBreakStatement):
2948         (JSC::SyntaxChecker::createContinueStatement):
2949         (JSC::SyntaxChecker::createTryStatement):
2950         (JSC::SyntaxChecker::createSwitchStatement):
2951         (JSC::SyntaxChecker::createWhileStatement):
2952         (JSC::SyntaxChecker::createWithStatement):
2953         (JSC::SyntaxChecker::createDoWhileStatement):
2954         (JSC::SyntaxChecker::createLabelStatement):
2955         (JSC::SyntaxChecker::createThrowStatement):
2956         (JSC::SyntaxChecker::createDebugger):
2957         (JSC::SyntaxChecker::createConstStatement):
2958         (JSC::SyntaxChecker::appendConstDecl):
2959         (JSC::SyntaxChecker::createGetterOrSetterProperty):
2960         (JSC::SyntaxChecker::appendStatement):
2961         (JSC::SyntaxChecker::addVar):
2962         (JSC::SyntaxChecker::combineCommaNodes):
2963         (JSC::SyntaxChecker::evalCount):
2964         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
2965         (JSC::SyntaxChecker::operatorStackPop):
2966         * runtime/JSGlobalData.h:
2967         * wtf/Platform.h:
2968         * wtf/ThreadSpecific.h:
2969         (WTF::T):
2970
2971 2010-06-23  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
2972
2973         Reviewed by Simon Hausmann.
2974
2975         Optimization of the QScriptValuePrivate.
2976
2977         Patch change only internals of the QScriptValuePrivate.
2978         Most of the QScriptValuePrivate's attributes were moved
2979         into an union.
2980
2981         [Qt] Optimization of the QScriptVAluePrivate.
2982         https://bugs.webkit.org/show_bug.cgi?id=40415
2983
2984         * qt/api/qscriptengine_p.cpp:
2985         (QScriptEnginePrivate::globalObject):
2986         * qt/api/qscriptvalue_p.h:
2987         (QScriptValuePrivate::):
2988         (QScriptValuePrivate::~QScriptValuePrivate):
2989         (QScriptValuePrivate::QScriptValuePrivate):
2990         (QScriptValuePrivate::toString):
2991         (QScriptValuePrivate::toNumber):
2992         (QScriptValuePrivate::toBool):
2993         (QScriptValuePrivate::toObject):
2994         (QScriptValuePrivate::equals):
2995         (QScriptValuePrivate::strictlyEquals):
2996         (QScriptValuePrivate::assignEngine):
2997         (QScriptValuePrivate::operator JSValueRef):
2998         (QScriptValuePrivate::operator JSObjectRef):
2999         (QScriptValuePrivate::refinedJSValue):
3000
3001 2010-06-23  Kwang Yul Seo  <skyul@company100.net>
3002
3003         Reviewed by Oliver Hunt.
3004
3005         [GTK] Implement ThreadSpecific with glib
3006         https://bugs.webkit.org/show_bug.cgi?id=39829
3007
3008         Implement ThreadSpecific with glib's GStaticPrivate.
3009         This patch makes it possible to build GTK port without pthread.
3010
3011         * wtf/ThreadSpecific.h:
3012         (WTF::::ThreadSpecific):
3013         (WTF::::~ThreadSpecific):
3014         (WTF::::get):
3015         (WTF::::set):
3016         (WTF::::destroy):
3017
3018 2010-06-23  Leandro Pereira  <leandro@profusion.mobi>
3019
3020         Unreviewed build fix.
3021
3022         * CMakeLists.txt: Add runtime/RegExpCache.cpp.
3023
3024 2010-06-22  Renata Hodovan  <hodovan@inf.u-szeged.hu>
3025
3026         Reviewed by Geoffrey Garen.
3027
3028         Adding regular expression caching to JavaScriptCore
3029         https://bugs.webkit.org/show_bug.cgi?id=38142
3030
3031         The cache is based on Round Robin eviction policy, and
3032         can cache at most 256 character long regular expressions,
3033         and at most 256 of them. These values can be changed at compile time.
3034
3035         * GNUmakefile.am:
3036         * JavaScriptCore.gypi:
3037         * JavaScriptCore.pro:
3038         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3039         * JavaScriptCore.xcodeproj/project.pbxproj:
3040         * bytecompiler/NodesCodegen.cpp:
3041         (JSC::RegExpNode::emitBytecode):
3042         * runtime/JSGlobalData.cpp:
3043         (JSC::JSGlobalData::JSGlobalData):
3044         (JSC::JSGlobalData::~JSGlobalData):
3045         * runtime/JSGlobalData.h:
3046         (JSC::JSGlobalData::regExpCache):
3047         * runtime/RegExpCache.cpp: Added.
3048         (JSC::RegExpCache::lookupOrCreate):
3049         (JSC::RegExpCache::create):
3050         (JSC::RegExpCache::RegExpCache):
3051         * runtime/RegExpCache.h: Added.
3052         * runtime/RegExpConstructor.cpp:
3053         (JSC::constructRegExp):
3054         * runtime/RegExpKey.h: Added.
3055         (JSC::RegExpKey::RegExpKey):
3056         (JSC::RegExpKey::getFlagsValue):
3057         (WTF::operator==):
3058         (WTF::):
3059         * runtime/RegExpPrototype.cpp:
3060         (JSC::regExpProtoFuncCompile):
3061         * runtime/StringPrototype.cpp:
3062         (JSC::stringProtoFuncMatch):
3063         (JSC::stringProtoFuncSearch):
3064
3065 2010-06-22  Gabor Loki  <loki@webkit.org>
3066
3067         Reviewed by Geoffrey Garen.
3068
3069         Add native call support for ARM and Thumb-2 JIT.
3070         https://bugs.webkit.org/show_bug.cgi?id=40231
3071
3072         * jit/JITOpcodes.cpp:
3073         (JSC::JIT::privateCompileCTINativeCall):
3074         * jit/JITOpcodes32_64.cpp:
3075         (JSC::JIT::privateCompileCTINativeCall):
3076         * wtf/Platform.h:
3077
3078 2010-06-21  Oliver Hunt  <oliver@apple.com>
3079
3080         Reviewed by Geoffrey Garen.
3081
3082         Make JSC more resilient in the face of parse failures
3083         https://bugs.webkit.org/show_bug.cgi?id=40951
3084
3085         A number of recent bugs have occurred due to issues like miscounting
3086         BOMs, etc which lead to interesting crashes later on.  Adding this
3087         logic hardens JSC in the face of these errors, and has no impact on
3088         performance (32bit jit actually gets 0.7% faster but I put that down
3089         to cache effects).
3090
3091         * bytecode/CodeBlock.cpp:
3092         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
3093         (JSC::CodeBlock::lineNumberForBytecodeOffset):
3094         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
3095         (JSC::CodeBlock::getByIdExceptionInfoForBytecodeOffset):
3096         * bytecode/CodeBlock.h:
3097         (JSC::CodeBlock::bytecodeOffset):
3098         * interpreter/Interpreter.cpp:
3099         (JSC::Interpreter::execute):
3100         (JSC::Interpreter::executeCall):
3101         (JSC::Interpreter::executeConstruct):
3102         (JSC::Interpreter::prepareForRepeatCall):
3103         (JSC::Interpreter::privateExecute):
3104         * jit/JITOpcodes.cpp:
3105         (JSC::JIT::privateCompileCTIMachineTrampolines):
3106         * jit/JITOpcodes32_64.cpp:
3107         (JSC::JIT::privateCompileCTIMachineTrampolines):
3108         * jit/JITStubs.cpp:
3109         (JSC::DEFINE_STUB_FUNCTION):
3110         * runtime/ArrayPrototype.cpp:
3111         (JSC::isNumericCompareFunction):
3112         * runtime/Executable.cpp:
3113         (JSC::FunctionExecutable::compileForCall):
3114         (JSC::FunctionExecutable::compileForConstruct):
3115         (JSC::FunctionExecutable::generateJITCodeForCall):
3116         (JSC::FunctionExecutable::generateJITCodeForConstruct):
3117         (JSC::FunctionExecutable::reparseExceptionInfo):
3118         (JSC::EvalExecutable::reparseExceptionInfo):
3119         * runtime/Executable.h:
3120         (JSC::FunctionExecutable::bytecodeForCall):
3121         (JSC::FunctionExecutable::bytecodeForConstruct):
3122         * runtime/JSGlobalData.cpp:
3123         (JSC::JSGlobalData::numericCompareFunction):
3124
3125 2010-06-21  John Sullivan  <sullivan@apple.com>
3126
3127         Reviewed by Adam Roben.
3128
3129         RetainPtr can't be used in HashMaps or HashSets
3130         <https://bugs.webkit.org/show_bug.cgi?id=40938>
3131         
3132         Added hashing knowledge similar to that in COMPtr.h.
3133
3134         * wtf/RetainPtr.h:
3135         (WTF::RetainPtr::RetainPtr):
3136         New function, copied from COMPtr.h but for the type change.
3137         (WTF::RetainPtr::isHashTableDeletedValue):
3138         Ditto.
3139         (WTF::RetainPtr::hashTableDeletedValue):
3140         Ditto.
3141         Added template code for HashTraits and PtrHash copied from COMPtr.h but for the type change.
3142         The only difference is that constructDeletedValue() matches the RefPtr implementation (in HashTraits.h)
3143         rather than the COMPtr implementation.
3144
3145 2010-06-19  Oliver Hunt  <oliver@apple.com>
3146
3147         Reviewed by Geoffrey Garen.
3148
3149         Need to ensure that we grow the RegisterFile when creating a callframe for host code
3150         https://bugs.webkit.org/show_bug.cgi?id=40858
3151         <rdar://problem/8108986>
3152
3153         In the past the use of the callframe in hostcode was much more
3154         limited.  Now that we expect the callframe to always be valid
3155         we need to grow the RegisterFile so that this is actually the
3156         case.  In this particular case the problem was failing to grow
3157         the registerfile could lead to a callframe that extended beyond
3158         RegisterFiler::end(), so vm re-entry would clobber the callframe
3159         other scenarios could also lead to badness.
3160
3161         I was unable to construct a simple testcase to trigger badness,
3162         and any such testcase would be so dependent on exact vm stack
3163         layout that it would be unlikely to work as a testcase following
3164         any callframe or register allocation changes anyway.
3165
3166         Thankfully the new assertion I added should help to catch these
3167         failures in future, and triggers on a couple of tests currently.
3168
3169         * interpreter/CallFrame.cpp:
3170         (JSC::CallFrame::registerFile):
3171         * interpreter/CallFrame.h:
3172         (JSC::ExecState::init):
3173         * interpreter/Interpreter.cpp:
3174         (JSC::Interpreter::privateExecute):
3175         * jit/JITStubs.cpp:
3176         (JSC::DEFINE_STUB_FUNCTION):
3177
3178 2010-06-21  Satish Sampath  <satish@chromium.org>
3179
3180         Reviewed by Steve Block.
3181
3182         Speech Input Patch 0: Added compilation argument to conditionally compile pending patches.
3183         https://bugs.webkit.org/show_bug.cgi?id=40878
3184
3185         * Configurations/FeatureDefines.xcconfig:
3186
3187 2010-06-21  Kwang Yul Seo  <skyul@company100.net>
3188
3189         Reviewed by Kent Tamura.
3190
3191         [BREWMP] Use global new/delete operator overloading with USE_SYSTEM_MALLOC=1
3192         https://bugs.webkit.org/show_bug.cgi?id=40653
3193
3194         Currently, other ports do not use global new/delete operator overloading
3195         when USE_SYSTEM_MALLOC=1. Brew MP uses system malloc, but it needs to enable
3196         "global fastMalloc new" because the default new/delete causes crash on device.
3197         We need to replace them with Brew MP's MALLOC/FREE.
3198
3199         * wtf/FastMalloc.h:
3200
3201 2010-06-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3202
3203         Reviewed by Simon Hausmann.
3204
3205         [Qt] Work around a build problem with libjscore on Symbian.
3206         https://bugs.webkit.org/show_bug.cgi?id=40840
3207
3208         Sbsv2 sometimes have problems with debug/release configuration
3209         determination causing QtWebKit in release to try linking with the debug
3210         JavaScriptCore static library. This patch limit the jscore/jscored
3211         r58306 fix necessary for mac builds only to the mac platform to prevent the
3212         different name problem.
3213
3214         The real fix would be to fix qmake or the toolchain, this patch might
3215         help meanwhile.
3216
3217         * JavaScriptCore.pri:
3218
3219 2010-06-21  Patrick Gansterer  <paroga@paroga.com>
3220
3221         Reviewed by Kent Tamura.
3222
3223         Buildfix after r61338.
3224         https://bugs.webkit.org/show_bug.cgi?id=40888
3225
3226         roundUpAllocationSize is needed in RegisterFile.h.
3227
3228         * jit/ExecutableAllocator.h:
3229
3230 2010-06-19  Kwang Yul Seo  <skyul@company100.net>
3231
3232         Reviewed by Darin Adler.
3233
3234         Include <string.h> in StringExtras.h
3235         https://bugs.webkit.org/show_bug.cgi?id=40808
3236
3237         Without string.h, RVCT 2.2 can't compile StringExtras.h.
3238         It can't find strlen and strncmp.
3239
3240         * wtf/StringExtras.h:
3241
3242 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
3243
3244         Reviewed by Kenneth Rohde Christiansen.
3245
3246         Don't use __attribute__((may_alias)) with the Intel compiler,
3247         as it doesn't understand it.
3248
3249         * wtf/Vector.h:
3250
3251 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
3252
3253         Reviewed by Kenneth Rohde Christiansen.
3254
3255         Fix compilation with the Intel C++ compiler (11.1.072).
3256
3257         Like RVCT, label pointers must be void*, not const void*.
3258
3259         * bytecode/Opcode.h:
3260
3261 2010-06-19  Thiago Macieira <thiago.macieira@nokia.com>
3262
3263         Reviewed by Kenneth Rohde Christiansen.
3264
3265         Add the WTF_COMPILER_INTEL for when the Intel compiler is used
3266         for building. Usually, the Intel compiler masquerades as
3267         another compiler in the system and gets away with it, but some
3268         times specific fixes are required (such as when using language
3269         extensions).
3270
3271         * wtf/Platform.h:
3272
3273 2010-06-18  Oliver Hunt  <oliver@apple.com>
3274
3275         Reviewed by Geoffrey Garen.
3276
3277         Incorrect handling of multiple BOMs scattered through a file.
3278         https://bugs.webkit.org/show_bug.cgi?id=40865
3279
3280         When determining the offset of open and close braces in a source
3281         with BOMs we were finishing our count early as we failed to account
3282         for BOMs prior to the open/close brace positions effecting those
3283         positions.
3284
3285         * parser/Lexer.cpp:
3286         (JSC::Lexer::sourceCode):
3287
3288 2010-06-17  Oliver Hunt  <oliver@apple.com>
3289
3290         Reviewed by Sam Weinig.
3291
3292         Don't throw away exception information for functions that use exceptions
3293         https://bugs.webkit.org/show_bug.cgi?id=40786
3294
3295         Simple patch to stop JSC from throwing away the exception information
3296         of a function that uses "exceptiony" features like try and throw.  This
3297         is a speed up for catching expressions but it's difficult to quantify as
3298         the old cost of reparsing is amortised over all exceptions caught in the
3299         effected function.
3300
3301         * bytecode/CodeBlock.cpp:
3302         (JSC::CodeBlock::reparseForExceptionInfoIfNecessary):
3303         * bytecompiler/BytecodeGenerator.cpp:
3304         (JSC::BytecodeGenerator::generate):
3305         (JSC::BytecodeGenerator::emitCatch):
3306         * bytecompiler/BytecodeGenerator.h:
3307         (JSC::BytecodeGenerator::emitThrow):
3308
3309 2010-06-18  Anders Carlsson  <andersca@apple.com>
3310
3311         Reviewed by Sam Weinig.
3312
3313         Add PlatformStrategies and PluginStrategy classes.
3314         https://bugs.webkit.org/show_bug.cgi?id=40850
3315
3316         * wtf/Platform.h:
3317
3318 2010-06-18  Leandro Pereira  <leandro@profusion.mobi>
3319
3320         [EFL] Unreviewed build fix.
3321
3322         * wtf/CMakeLists.txt: Add MD5.cpp.
3323
3324 2010-06-17  Shu Chang  <chang.shu@nokia.com>
3325
3326         Reviewed by Kenneth Rohde Christiansen.
3327
3328         [Qt] Fix the link error on symbian with ENABLE_JIT=0.
3329         1. Add "#if ENABLE(JIT)" in the header file;
3330         2. Put feature enable/disable logic to a common.pri so
3331         that both JavaScriptCore.pri and WebCore.pri can share.
3332
3333         https://bugs.webkit.org/show_bug.cgi?id=40780
3334
3335         * JavaScriptCore.pri:
3336         * jit/ExecutableAllocator.h:
3337
3338 2010-06-17  Darin Adler  <darin@apple.com>
3339
3340         Reviewed by Sam Weinig.
3341
3342         Use adoptRef and create functions in more code paths
3343         https://bugs.webkit.org/show_bug.cgi?id=40760
3344
3345         * API/JSClassRef.h: Removed unneeded include of RefCounted.h.
3346         * API/JSWeakObjectMapRefPrivate.cpp: Ditto.
3347
3348         * bytecode/CodeBlock.h:
3349         (JSC::FunctionCodeBlock::FunctionCodeBlock): Use the
3350         SharedSymbolTable::create function instead of calling new directly.
3351
3352         * runtime/SymbolTable.h: Added a create function to the SharedSymbolTable
3353         class and made the constructor private.
3354
3355 2010-06-17  Mark Brand  <mabrand@mabrand.nl>
3356
3357         Reviewed by Simon Hausmann.
3358
3359         [Qt] use "win32-g++*" scope to match all MinGW makespecs
3360
3361         The scope "win32-g++" comes from the name of the makespec. However, it
3362         is frequently used to check for MinGW. This works fine as long as
3363         win32-g++ is the only makespec for MinGW. Now we need the wildcard
3364         to cover "win32-g++-cross" as well.
3365
3366         * JavaScriptCore.pro:
3367
3368 2010-06-16  Darin Adler  <darin@apple.com>
3369
3370         Reviewed by David Levin.
3371
3372         Deploy adoptRef in more places, including all HTML and MathML elements
3373         https://bugs.webkit.org/show_bug.cgi?id=39941
3374
3375         * wtf/ThreadSafeShared.h: Made the constructor protected and removed the
3376         unneeded support for initial reference counts other than 1.
3377
3378 2010-06-16  Peter Varga  <pvarga@inf.u-szeged.hu>
3379
3380         Reviewed by Geoffrey Garen.
3381
3382         Store matchBegin directly in the array of output instead of the stack.
3383         https://bugs.webkit.org/show_bug.cgi?id=38988
3384
3385         * yarr/RegexJIT.cpp:
3386         (JSC::Yarr::RegexGenerator::generateDisjunction):
3387         (JSC::Yarr::RegexGenerator::generate):
3388
3389 2010-06-15  Anders Carlsson  <andersca@apple.com>
3390
3391         Reviewed by Sam Weinig.
3392
3393         Make JavaScriptCore build with clang++.
3394
3395         * jit/JITInlineMethods.h:
3396         (JSC::JIT::emitPutVirtualRegister):
3397         Explicitly cast to an int.
3398
3399         * yarr/RegexCompiler.cpp:
3400         (JSC::Yarr::compileRegex):
3401         Return 0 instead of false.
3402
3403 2010-06-15  Adam Roben  <aroben@apple.com>
3404
3405         Make WebCore's and JavaScriptCore's DerivedSources available for debugging in production builds
3406
3407         Fixes <http://webkit.org/b/40626> <rdar://problem/8094205>.
3408
3409         Reviewed by Sam Weinig.
3410
3411         * JavaScriptCore.vcproj/JavaScriptCore.make: Copy the contents of
3412         JavaScriptCore's DerivedSources directory to
3413         AppleInternal/Sources/JavaScriptCore.
3414
3415 2010-06-15  Gabor Loki  <loki@webkit.org>
3416
3417         Rubber-stamped by Eric Seidel.
3418
3419         Fix invalid access to non-static data member warning in JITPropertyAccess32_64 on ARM
3420         https://bugs.webkit.org/show_bug.cgi?id=40423
3421
3422         Using OBJECT_OFFSETOF macro instead of objectof to bypass access to
3423         non-static data member warning.
3424
3425         * jit/JITPropertyAccess32_64.cpp:
3426         (JSC::JIT::privateCompilePutByIdTransition):
3427
3428 2010-06-11  Eric Seidel  <eric@webkit.org>
3429
3430         Reviewed by Adam Barth.
3431
3432         Rename the rest of the *Tokenizer classes to *DocumentParser
3433         https://bugs.webkit.org/show_bug.cgi?id=40507
3434
3435         * wtf/Platform.h:
3436          - fixed a comment to match new names.
3437
3438 2010-06-11  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3439
3440         Reviewed by Simon Hausmann.
3441
3442         [Qt] Explicit conversions from QtScript types to JSC opaque types were removed.
3443         https://bugs.webkit.org/show_bug.cgi?id=40412
3444
3445         Conversion between a JSC C types and a QtScript private types, takes
3446         main part of the source code. In most cases a mapping between the types
3447         is one to one. New cast operators were added to simplify the code.
3448
3449         The QScriptValuePrivate could be casted to the JSValueRef and the JSObjectRef.
3450         The QScriptEnginePrivate could be casted to the JSGlobalContext.
3451         The QScriptProgramPrivate could be casted to the JSStringRef.
3452
3453         * qt/api/qscriptengine_p.cpp:
3454         (QScriptEnginePrivate::evaluate):
3455         (QScriptEnginePrivate::newObject):
3456         (QScriptEnginePrivate::globalObject):
3457         * qt/api/qscriptengine_p.h:
3458         (QScriptEnginePrivate::operator JSGlobalContextRef):
3459         * qt/api/qscriptprogram_p.h:
3460         (QScriptProgramPrivate::operator JSStringRef):
3461         * qt/api/qscriptsyntaxcheckresult.cpp:
3462         (QScriptSyntaxCheckResultPrivate::~QScriptSyntaxCheckResultPrivate):
3463         (QScriptSyntaxCheckResultPrivate::errorMessage):
3464         (QScriptSyntaxCheckResultPrivate::errorLineNumber):
3465         * qt/api/qscriptvalue_p.h:
3466         (QScriptValuePrivate::~QScriptValuePrivate):
3467         (QScriptValuePrivate::QScriptValuePrivate):
3468         (QScriptValuePrivate::isBool):
3469         (QScriptValuePrivate::isNumber):
3470         (QScriptValuePrivate::isNull):
3471         (QScriptValuePrivate::isString):
3472         (QScriptValuePrivate::isUndefined):
3473         (QScriptValuePrivate::isFunction):
3474         (QScriptValuePrivate::toString):
3475         (QScriptValuePrivate::toNumber):
3476         (QScriptValuePrivate::toBool):
3477         (QScriptValuePrivate::toObject):
3478         (QScriptValuePrivate::equals):
3479         (QScriptValuePrivate::strictlyEquals):
3480         (QScriptValuePrivate::instanceOf):
3481         (QScriptValuePrivate::call):
3482         (QScriptValuePrivate::operator JSValueRef):
3483         (QScriptValuePrivate::operator JSObjectRef):
3484         (QScriptValuePrivate::setValue):
3485         (QScriptValuePrivate::inherits):
3486         (QScriptValuePrivate::refinedJSValue):
3487
3488 2010-05-31  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3489
3490         Reviewed by Simon Hausmann.
3491
3492         [Qt] Implement the simple text code path.
3493         https://bugs.webkit.org/show_bug.cgi?id=40077
3494
3495         Remove the FONT_FAST_PATH macro and use the Qt's
3496         fast text implementation instead of the one of WebKit.
3497
3498         The Qt::TextBypassShaping flag is used to tell Qt to
3499         only use the glyph advances.
3500
3501         Qt 4.7 is needed to get this flag thus the complex path is always
3502         used if QtWebKit is compiled against an earlier version.
3503
3504         Contrary to the WebKit's implementation, the complex code path
3505         is taken if the text is RightToLeft, justified or is formatted
3506         with non-zero letter or word spacing.
3507
3508         * wtf/Platform.h:
3509
3510 2010-06-11  Luiz Agostini  <luiz.agostini@openbossa.org>
3511
3512         Reviewed by Kenneth Rohde Christiansen.
3513
3514         add codePointCompare to JavaScriptCore.exp
3515         https://bugs.webkit.org/show_bug.cgi?id=40426
3516
3517         * JavaScriptCore.exp:
3518
3519 2010-06-10  Oliver Hunt  <oliver@apple.com>
3520
3521         Reviewed by Maciej Stachowiak.
3522
3523         Math Javascript Bug on Safari 5 (webkit 533.16) under "32bit" mode
3524         https://bugs.webkit.org/show_bug.cgi?id=40367
3525
3526         If we're in the slow case of right shift we must write the type tag as
3527         the only reason we hit this code path is because we know we're working
3528         with a double.  eg. we are guaranteed that the tag cannot be reused.
3529
3530         * jit/JITArithmetic32_64.cpp:
3531         (JSC::JIT::emitRightShiftSlowCase):
3532
3533 2010-06-10  Kwang Yul Seo  <skyul@company100.net>
3534
3535         Reviewed by Eric Seidel.
3536
3537         Remove weakRandomNumber
3538         https://bugs.webkit.org/show_bug.cgi?id=40291
3539
3540         weakRandomNumber is used nowhere. Currently, WeakRandom is used instead.
3541
3542         * wtf/RandomNumber.cpp:
3543         * wtf/RandomNumber.h:
3544
3545 2010-06-09  Alexey Proskuryakov  <ap@apple.com>
3546
3547         Reviewed by Brady Eidson.
3548
3549         Export StringImpl::ascii(). It might be not very useful, but it's a public function.
3550
3551         * JavaScriptCore.exp:
3552
3553 2010-06-09  Leandro Pereira  <leandro@profusion.mobi>
3554
3555         Reviewed by Adam Treat.
3556
3557         [EFL] Allow building core libraries as shared objects to speed up
3558         linking time on machines with small amounts of memory.
3559         http://webkit.org/b/39899
3560
3561         * CMakeLists.txt: If building with shared core, install the lib.
3562         * jsc/CMakeListsEfl.txt: Needs Glib and Ecore to link dynamically.
3563         * wtf/CMakeLists.txt: If building with shared core, install the lib.
3564
3565 2010-06-09  Gabor Loki  <loki@webkit.org>
3566
3567         Reviewed by David Levin.
3568
3569         Remove some unused variable warnings from JITOpcodes
3570         https://bugs.webkit.org/show_bug.cgi?id=40298
3571
3572         * jit/JITOpcodes.cpp:
3573         (JSC::JIT::privateCompileCTINativeCall):
3574         * jit/JITOpcodes32_64.cpp:
3575         (JSC::JIT::privateCompileCTINativeCall):
3576
3577 2010-05-18  Yuzo Fujishima  <yuzo@google.com>
3578
3579         Reviewed by Shinichiro Hamaji.
3580
3581         Fix for Bug 34529 -  [CSSOM] issues with cssText and selectorText
3582         Add U16_LENGTH that is needed to implement CSS character serialization.
3583         https://bugs.webkit.org/show_bug.cgi?id=34529
3584
3585         * wtf/unicode/qt4/UnicodeQt4.h:
3586         * wtf/unicode/wince/UnicodeWince.h:
3587
3588 2010-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3589
3590         Unreviewed, rolling out r60830.
3591         http://trac.webkit.org/changeset/60830
3592         https://bugs.webkit.org/show_bug.cgi?id=40305
3593
3594         Broke the Windows build (Requested by abarth on #webkit).
3595
3596         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3597         * wtf/OwnPtrCommon.h:
3598         * wtf/brew/OwnPtrBrew.h: Removed.
3599         * wtf/win/OwnPtrWin.h: Removed.
3600
3601 2010-06-08  MORITA Hajime  <morrita@google.com>
3602
3603         Unreviewed. An attempt to fix test break.
3604
3605         * Configurations/FeatureDefines.xcconfig:
3606
3607 2010-06-08  Kwang Yul Seo  <skyul@company100.net>
3608
3609         Reviewed by Adam Barth.
3610
3611         Change OwnPtrCommon to include platform-specific headers
3612         https://bugs.webkit.org/show_bug.cgi?id=40279
3613
3614         Adding new type to OwnPtrCommon needlessly causes all ports to do full rebuilds.
3615         Change OwnPtrCommon to include platform-specific headers to avoid all ports rebuilds.
3616
3617         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3618         * wtf/OwnPtrCommon.h:
3619         * wtf/brew/OwnPtrBrew.h: Added.
3620         * wtf/win/OwnPtrWin.h: Added.
3621
3622 2010-06-07  MORITA Hajime  <morrita@google.com>
3623         
3624         Reviewed by Kent Tamura.
3625
3626         https://bugs.webkit.org/show_bug.cgi?id=40219
3627         [Mac] ENABLE_METER_TAG should be enabled
3628         
3629         Added ENABLE_METER_TAG.
3630
3631         * Configurations/FeatureDefines.xcconfig:
3632
3633 2010-06-07  Kwang Yul Seo  <skyul@company100.net>
3634
3635         Reviewed by Eric Seidel.
3636
3637         [BREWMP] Add more types to OwnPtr
3638         https://bugs.webkit.org/show_bug.cgi?id=39667
3639
3640         Add ISSL and ISocket to the list of OwnPtr-ed type.
3641
3642         * wtf/OwnPtrCommon.h:
3643         * wtf/brew/OwnPtrBrew.cpp:
3644         (WTF::deleteOwnedPtr):
3645
3646 2010-06-07  Benjamin Poulain  <benjamin.poulain@nokia.com>
3647
3648         Reviewed by Simon Hausmann.
3649
3650         [Qt] Crash when compiling on Snow Leopard and running on Leopard
3651         https://bugs.webkit.org/show_bug.cgi?id=31403
3652
3653         Disable the use of pthread_setname_np and other symbols
3654         when targetting Leopard.
3655
3656         Use the defines TARGETING_XX instead of BUILDING_ON_XX 
3657         for features that cannot be used before Snow Leopard.
3658
3659         * wtf/Platform.h:
3660
3661 2010-06-07  Gabor Loki  <loki@webkit.org>
3662
3663         Reviewed by NOBODY (JSVALUE32_64 build fix).
3664
3665         * jit/JITOpcodes32_64.cpp:
3666         (JSC::JIT::privateCompileCTINativeCall):
3667
3668 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
3669
3670         Reviewed by NOBODY (windows build fix pt 2).
3671
3672         * JavaScriptCore.exp:
3673         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3674
3675 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
3676
3677         Reviewed by NOBODY (windows build fix pt 1).
3678
3679         * JavaScriptCore.exp:
3680         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3681
3682 2010-06-06  Gavin Barraclough  <barraclough@apple.com>
3683
3684         Reviewed by Sam Weinig.
3685
3686         Bug 40214 - Clean up error construction / throwing in JSC.
3687         
3688         The one egregious insanity here is that creating an error requires
3689         a VM-entry-esqe-host call (the string argument is wrapped as a JS
3690         object & pushed on the RegisterFile, then unwrapped back to a
3691         UString).  Changing this also means you only require a global
3692         object, not an ExecState, to create an error.
3693
3694         The methods to create error objects are also parameterized
3695         requiring a switch on the type, which can be made cleaner and
3696         faster by moving to a separate method per error type.  Code to add
3697         divot information to error had been duplicated, and is coalesced
3698         back into a single function.
3699
3700         Convenience methods added to create & throw type & syntax error
3701         with a default error message, since this is a common case.
3702
3703         Also, errors are currently thrown either using
3704         "throwError(exec, error)" or "exec->setException(error)" - unify
3705         on the former, since this is more commonly used.  Add
3706         "throwVMError(exec, error)" equivalents, as a convenience for
3707         cases where the result was being wrapped in "JSValue::encode(...)".
3708
3709         * API/JSCallbackConstructor.cpp:
3710         (JSC::constructJSCallback):
3711         * API/JSCallbackFunction.cpp:
3712         (JSC::JSCallbackFunction::call):
3713         * API/JSCallbackObjectFunctions.h:
3714         (JSC::::getOwnPropertySlot):
3715         (JSC::::put):
3716         (JSC::::deleteProperty):
3717         (JSC::::construct):
3718         (JSC::::hasInstance):
3719         (JSC::::call):
3720         (JSC::::toNumber):
3721         (JSC::::toString):
3722         (JSC::::staticValueGetter):
3723         (JSC::::staticFunctionGetter):
3724         (JSC::::callbackGetter):
3725         * API/JSObjectRef.cpp:
3726         (JSObjectMakeError):
3727         * JavaScriptCore.exp:
3728         * bytecompiler/BytecodeGenerator.cpp:
3729         (JSC::BytecodeGenerator::emitNewError):
3730         (JSC::BytecodeGenerator::emitThrowExpressionTooDeepException):
3731         * bytecompiler/BytecodeGenerator.h:
3732         * bytecompiler/NodesCodegen.cpp:
3733         (JSC::ThrowableExpressionData::emitThrowError):
3734         (JSC::RegExpNode::emitBytecode):
3735         (JSC::PostfixErrorNode::emitBytecode):
3736         (JSC::PrefixErrorNode::emitBytecode):
3737         (JSC::AssignErrorNode::emitBytecode):
3738         (JSC::ForInNode::emitBytecode):
3739         (JSC::ContinueNode::emitBytecode):
3740         (JSC::BreakNode::emitBytecode):
3741         (JSC::ReturnNode::emitBytecode):
3742         (JSC::LabelNode::emitBytecode):
3743         * interpreter/CallFrame.h:
3744         * interpreter/Interpreter.cpp:
3745         (JSC::Interpreter::throwException):
3746         (JSC::Interpreter::privateExecute):
3747         * jit/JITStubs.cpp:
3748         (JSC::DEFINE_STUB_FUNCTION):
3749         * jsc.cpp:
3750         (functionRun):
3751         (functionLoad):
3752         (functionCheckSyntax):
3753         * parser/Nodes.h:
3754         * runtime/ArrayConstructor.cpp:
3755         (JSC::constructArrayWithSizeQuirk):
3756         * runtime/ArrayPrototype.cpp:
3757         (JSC::arrayProtoFuncToString):
3758         (JSC::arrayProtoFuncToLocaleString):
3759         (JSC::arrayProtoFuncJoin):
3760         (JSC::arrayProtoFuncFilter):
3761         (JSC::arrayProtoFuncMap):
3762         (JSC::arrayProtoFuncEvery):
3763         (JSC::arrayProtoFuncForEach):
3764         (JSC::arrayProtoFuncSome):
3765         (JSC::arrayProtoFuncReduce):
3766         (JSC::arrayProtoFuncReduceRight):
3767         * runtime/BooleanPrototype.cpp:
3768         (JSC::booleanProtoFuncToString):
3769         (JSC::booleanProtoFuncValueOf):
3770         * runtime/DatePrototype.cpp:
3771         (JSC::dateProtoFuncToString):
3772         (JSC::dateProtoFuncToUTCString):
3773         (JSC::dateProtoFuncToISOString):
3774         (JSC::dateProtoFuncToDateString):
3775         (JSC::dateProtoFuncToTimeString):
3776         (JSC::dateProtoFuncToLocaleString):
3777         (JSC::dateProtoFuncToLocaleDateString):
3778         (JSC::dateProtoFuncToLocaleTimeString):
3779         (JSC::dateProtoFuncGetTime):
3780         (JSC::dateProtoFuncGetFullYear):
3781         (JSC::dateProtoFuncGetUTCFullYear):
3782         (JSC::dateProtoFuncToGMTString):
3783         (JSC::dateProtoFuncGetMonth):
3784         (JSC::dateProtoFuncGetUTCMonth):
3785         (JSC::dateProtoFuncGetDate):
3786         (JSC::dateProtoFuncGetUTCDate):
3787         (JSC::dateProtoFuncGetDay):
3788         (JSC::dateProtoFuncGetUTCDay):
3789         (JSC::dateProtoFuncGetHours):
3790         (JSC::dateProtoFuncGetUTCHours):
3791         (JSC::dateProtoFuncGetMinutes):
3792         (JSC::dateProtoFuncGetUTCMinutes):
3793         (JSC::dateProtoFuncGetSeconds):
3794         (JSC::dateProtoFuncGetUTCSeconds):
3795         (JSC::dateProtoFuncGetMilliSeconds):
3796         (JSC::dateProtoFuncGetUTCMilliseconds):
3797         (JSC::dateProtoFuncGetTimezoneOffset):
3798         (JSC::dateProtoFuncSetTime):
3799         (JSC::setNewValueFromTimeArgs):
3800         (JSC::setNewValueFromDateArgs):
3801         (JSC::dateProtoFuncSetMilliSeconds):
3802         (JSC::dateProtoFuncSetUTCMilliseconds):
3803         (JSC::dateProtoFuncSetSeconds):
3804         (JSC::dateProtoFuncSetUTCSeconds):
3805         (JSC::dateProtoFuncSetMinutes):
3806         (JSC::dateProtoFuncSetUTCMinutes):
3807         (JSC::dateProtoFuncSetHours):
3808         (JSC::dateProtoFuncSetUTCHours):
3809         (JSC::dateProtoFuncSetDate):
3810         (JSC::dateProtoFuncSetUTCDate):
3811         (JSC::dateProtoFuncSetMonth):
3812         (JSC::dateProtoFuncSetUTCMonth):
3813         (JSC::dateProtoFuncSetFullYear):
3814         (JSC::dateProtoFuncSetUTCFullYear):
3815         (JSC::dateProtoFuncSetYear):
3816         (JSC::dateProtoFuncGetYear):
3817         (JSC::dateProtoFuncToJSON):
3818         * runtime/Error.cpp:
3819         (JSC::createError):
3820         (JSC::createEvalError):
3821         (JSC::createRangeError):
3822         (JSC::createReferenceError):
3823         (JSC::createSyntaxError):
3824         (JSC::createTypeError):
3825         (JSC::createURIError):
3826         (JSC::addErrorSourceInfo):
3827         (JSC::addErrorDivotInfo):
3828         (JSC::addErrorInfo):
3829         (JSC::hasErrorInfo):
3830         (JSC::throwError):
3831         (JSC::throwTypeError):
3832         (JSC::throwSyntaxError):
3833         * runtime/Error.h:
3834         (JSC::throwVMError):
3835         (JSC::throwVMTypeError):
3836         * runtime/ErrorConstructor.cpp:
3837         (JSC::constructWithErrorConstructor):
3838         (JSC::callErrorConstructor):
3839         * runtime/ErrorConstructor.h:
3840         * runtime/ErrorInstance.cpp:
3841         (JSC::ErrorInstance::ErrorInstance):
3842         (JSC::ErrorInstance::create):
3843         * runtime/ErrorInstance.h:
3844         * runtime/ErrorPrototype.cpp:
3845         (JSC::ErrorPrototype::ErrorPrototype):
3846         * runtime/ExceptionHelpers.cpp:
3847         (JSC::createStackOverflowError):
3848         (JSC::createUndefinedVariableError):
3849         (JSC::createInvalidParamError):
3850         (JSC::createNotAConstructorError):
3851         (JSC::createNotAFunctionError):
3852         (JSC::createNotAnObjectError):
3853         (JSC::throwOutOfMemoryError):
3854         * runtime/ExceptionHelpers.h:
3855         * runtime/Executable.cpp:
3856         (JSC::EvalExecutable::compile):
3857         (JSC::ProgramExecutable::checkSyntax):
3858         (JSC::ProgramExecutable::compile):
3859         * runtime/FunctionConstructor.cpp:
3860         (JSC::constructFunction):
3861         * runtime/FunctionPrototype.cpp:
3862         (JSC::functionProtoFuncToString):
3863         (JSC::functionProtoFuncApply):
3864         (JSC::functionProtoFuncCall):
3865         * runtime/Identifier.cpp:
3866         (JSC::Identifier::from):
3867         * runtime/Identifier.h:
3868         * runtime/JSArray.cpp:
3869         (JSC::JSArray::put):
3870         * runtime/JSFunction.cpp:
3871         (JSC::callHostFunctionAsConstructor):
3872         * runtime/JSGlobalObjectFunctions.cpp:
3873         (JSC::encode):
3874         (JSC::decode):
3875         (JSC::globalFuncEval):
3876         * runtime/JSONObject.cpp:
3877         (JSC::Stringifier::appendStringifiedValue):
3878         (JSC::Walker::walk):
3879         (JSC::JSONProtoFuncParse):
3880         (JSC::JSONProtoFuncStringify):
3881         * runtime/JSObject.cpp:
3882         (JSC::throwSetterError):
3883         (JSC::JSObject::put):
3884         (JSC::JSObject::putWithAttributes):
3885         (JSC::JSObject::defaultValue):
3886         (JSC::JSObject::hasInstance):
3887         (JSC::JSObject::defineOwnProperty):
3888         * runtime/JSObject.h:
3889         * runtime/JSValue.cpp:
3890         (JSC::JSValue::toObjectSlowCase):
3891         (JSC::JSValue::synthesizeObject):
3892         (JSC::JSValue::synthesizePrototype):
3893         * runtime/NativeErrorConstructor.cpp:
3894         (JSC::constructWithNativeErrorConstructor):
3895         (JSC::callNativeErrorConstructor):
3896         * runtime/NativeErrorConstructor.h:
3897         * runtime/NumberPrototype.cpp:
3898         (JSC::numberProtoFuncToString):
3899         (JSC::numberProtoFuncToLocaleString):
3900         (JSC::numberProtoFuncValueOf):
3901         (JSC::numberProtoFuncToFixed):
3902         (JSC::numberProtoFuncToExponential):
3903         (JSC::numberProtoFuncToPrecision):
3904         * runtime/ObjectConstructor.cpp:
3905         (JSC::objectConstructorGetPrototypeOf):
3906         (JSC::objectConstructorGetOwnPropertyDescriptor):
3907         (JSC::objectConstructorGetOwnPropertyNames):
3908         (JSC::objectConstructorKeys):
3909         (JSC::toPropertyDescriptor):
3910         (JSC::objectConstructorDefineProperty):
3911         (JSC::objectConstructorDefineProperties):
3912         (JSC::objectConstructorCreate):
3913         * runtime/ObjectPrototype.cpp:
3914         (JSC::objectProtoFuncDefineGetter):
3915         (JSC::objectProtoFuncDefineSetter):
3916         * runtime/RegExpConstructor.cpp:
3917         (JSC::constructRegExp):
3918         * runtime/RegExpObject.cpp:
3919         (JSC::RegExpObject::match):
3920         * runtime/RegExpPrototype.cpp:
3921         (JSC::regExpProtoFuncTest):
3922         (JSC::regExpProtoFuncExec):
3923         (JSC::regExpProtoFuncCompile):
3924         (JSC::regExpProtoFuncToString):
3925         * runtime/StringPrototype.cpp:
3926         (JSC::stringProtoFuncToString):
3927
3928 2010-06-05  Kwang Yul Seo  <skyul@company100.net>
3929
3930         Reviewed by Eric Seidel.
3931
3932         [BREWMP] Add PLATFORM(BREWMP) guard for using std::xxx
3933         https://bugs.webkit.org/show_bug.cgi?id=39710
3934
3935         Build fix for BREW MP.
3936
3937         * wtf/MathExtras.h:
3938
3939 2010-06-04  Adam Barth  <abarth@webkit.org>
3940
3941         Reviewed by Darin Adler.
3942
3943         HTML5 parser should be within 1% of old parser performance
3944         https://bugs.webkit.org/show_bug.cgi?id=40172
3945
3946         Fix cast in this operator= to allow for assignment between vectors with
3947         different inline capacities (as clearly intended by its author).
3948
3949         * wtf/Vector.h:
3950         (WTF::::operator):
3951
3952 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
3953
3954         Reviewed by Kenneth Rohde Christiansen.
3955
3956         New QtScript API; QScriptValue::instanceOf.
3957
3958         New function create an easy way to check value's prototype hierarchy.
3959
3960         [Qt] QScriptValue should have an instanceOf method
3961         https://bugs.webkit.org/show_bug.cgi?id=40120
3962
3963         * qt/api/qscriptvalue.cpp:
3964         (QScriptValue::instanceOf):
3965         * qt/api/qscriptvalue.h:
3966         * qt/api/qscriptvalue_p.h:
3967         (QScriptValuePrivate::instanceOf):
3968         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
3969         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
3970         (tst_QScriptValue::instanceOf_initData):
3971         (tst_QScriptValue::instanceOf_makeData):
3972         (tst_QScriptValue::instanceOf_test):
3973
3974 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
3975
3976         Reviewed by NOBODY (interpreter build fix).
3977
3978         * interpreter/Interpreter.cpp:
3979         (JSC::Interpreter::privateExecute):
3980
3981 2010-06-04  Mark Rowe  <mrowe@apple.com>
3982
3983         Silence some warnings seen on the build bot.
3984
3985         * JavaScriptCore.JSVALUE32_64only.exp: Add a trailing newline.
3986         * JavaScriptCore.JSVALUE32only.exp: Ditto.
3987         * JavaScriptCore.JSVALUE64only.exp: Ditto.
3988         * JavaScriptCore.xcodeproj/project.pbxproj: Remove the .exp files from all targets so that Xcode doesn't
3989         complain about not knowing how to compile them.
3990
3991 2010-06-04  Gavin Barraclough  <barraclough@apple.com>
3992
3993         Reviewed by Oliver Hunt.
3994
3995         Bug 40187 - Change function signature of NativeConstructor to match NativeFunction
3996
3997         Mostly for consistency, but constructor & args arguments are redundant,
3998         and this will help if we wish to be able to JIT calls to more constructors.
3999
4000         * API/JSCallbackConstructor.cpp:
4001         (JSC::constructJSCallback):
4002         * API/JSCallbackObject.h:
4003         * API/JSCallbackObjectFunctions.h:
4004         (JSC::::construct):
4005         * interpreter/Interpreter.cpp:
4006         (JSC::Interpreter::executeConstruct):
4007         * interpreter/Interpreter.h:
4008         * jit/JITStubs.cpp:
4009         (JSC::DEFINE_STUB_FUNCTION):
4010         * runtime/ArrayConstructor.cpp:
4011         (JSC::constructWithArrayConstructor):
4012         * runtime/BooleanConstructor.cpp:
4013         (JSC::constructWithBooleanConstructor):
4014         * runtime/ConstructData.cpp:
4015         (JSC::construct):
4016         * runtime/ConstructData.h:
4017         * runtime/DateConstructor.cpp:
4018         (JSC::constructWithDateConstructor):
4019         * runtime/Error.cpp:
4020         (JSC::constructNativeError):
4021         (JSC::Error::create):
4022         * runtime/ErrorConstructor.cpp:
4023         (JSC::constructWithErrorConstructor):
4024         * runtime/FunctionConstructor.cpp:
4025         (JSC::constructWithFunctionConstructor):
4026         * runtime/NativeErrorConstructor.cpp:
4027         (JSC::constructWithNativeErrorConstructor):
4028         * runtime/NativeErrorConstructor.h:
4029         (JSC::NativeErrorConstructor::errorStructure):
4030         * runtime/NumberConstructor.cpp:
4031         (JSC::constructWithNumberConstructor):
4032         * runtime/ObjectConstructor.cpp:
4033         (JSC::constructWithObjectConstructor):
4034         * runtime/RegExpConstructor.cpp:
4035         (JSC::constructWithRegExpConstructor):
4036         * runtime/StringConstructor.cpp:
4037         (JSC::constructWithStringConstructor):
4038
4039 2010-06-04  Tony Gentilcore  <tonyg@chromium.org>
4040
4041         Reviewed by Adam Barth.
4042
4043         Add a takeFirst() method to Deque and use it where appropriate.
4044         https://bugs.webkit.org/show_bug.cgi?id=40089
4045
4046         * wtf/Deque.h:
4047         (WTF::::takeFirst):
4048         * wtf/MainThread.cpp:
4049         (WTF::dispatchFunctionsFromMainThread):
4050         * wtf/MessageQueue.h:
4051         (WTF::::tryGetMessage):
4052
4053 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
4054
4055         Reviewed by Kenneth Rohde Christiansen.
4056
4057         Remove a QEXPECT_FAIL flag from an autotest.
4058
4059         Test tst_QScriptEngine::globalObject pass after 36600 bug
4060         fix have been applied.
4061
4062         [Qt] Expected fail in the tst_QScriptEngine::globalObject should be removed.
4063         https://bugs.webkit.org/show_bug.cgi?id=40114
4064
4065         * qt/tests/qscriptengine/tst_qscriptengine.cpp:
4066         (tst_QScriptEngine::globalObject):
4067
4068 2010-06-04  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
4069
4070         Reviewed by Kenneth Rohde Christiansen.
4071
4072         Fix QScriptValue::equals.
4073
4074         Handling for a few edge cases were added. Now comparison between
4075         NaN, an invalid objects should works as supposed.
4076
4077         [Qt] QScriptValue::equals problems
4078         https://bugs.webkit.org/show_bug.cgi?id=40110
4079
4080         * qt/api/qscriptvalue.cpp:
4081         (QScriptValue::equals):
4082         * qt/api/qscriptvalue_p.h:
4083         (QScriptValuePrivate::equals):
4084         * qt/tests/qscriptvalue/tst_qscriptvalue.h:
4085         * qt/tests/qscriptvalue/tst_qscriptvalue_generated_comparison.cpp:
4086         (tst_QScriptValue::equals_initData):
4087         (tst_QScriptValue::equals_makeData):
4088         (tst_QScriptValue::equals_test):
4089
4090 2010-06-03  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
4091
4092         Reviewed by Kenneth Rohde Christiansen.
4093
4094         New states in QScriptValuePrivate.
4095
4096         The CSpecial state was divided into CNull and CUndefined. It simplify
4097         the QScriptValue code by avoiding a few "cast" and "if".
4098         Moreover the MSVS compiler didn't like casting between a double and an
4099         enum which is avoided now.
4100
4101         [Qt] The QScriptValuePrivate::CSpecial is too generic.
4102         https://bugs.webkit.org/show_bug.cgi?id=40067
4103
4104         * qt/api/qscriptvalue_p.h:
4105         (QScriptValuePrivate::):
4106         (QScriptValuePrivate::QScriptValuePrivate):
4107         (QScriptValuePrivate::isNull):
4108         (QScriptValuePrivate::isUndefined):
4109         (QScriptValuePrivate::toString):
4110         (QScriptValuePrivate::toNumber):
4111         (QScriptValuePrivate::toBool):
4112         (QScriptValuePrivate::toObject):
4113         (QScriptValuePrivate::assignEngine):
4114         (QScriptValuePrivate::isNumberBased):
4115
4116 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
4117
4118         Reviewed by NOBODY (Qt build fix).
4119
4120         * wtf/Platform.h:
4121
4122 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
4123
4124         Reviewed by Mark Rowe.
4125
4126         Bug 40150 - ENABLE_JIT_OPTIMIZE_NATIVE_CALL on all x86/x86_64 platforms
4127         This was fixed in bug #40094.
4128
4129         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4130         * wtf/Platform.h:
4131
4132 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
4133
4134         Reviewed by NOBODY (Interpreter build fix).
4135
4136         * JavaScriptCore.JSVALUE32_64only.exp:
4137         * JavaScriptCore.JSVALUE32only.exp:
4138         * JavaScriptCore.JSVALUE64only.exp:
4139         * interpreter/Interpreter.cpp:
4140         (JSC::Interpreter::privateExecute):
4141
4142 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
4143
4144         Reviewed by NOBODY (windows build fix II).
4145
4146         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4147
4148 2010-06-03  Gavin Barraclough  <barraclough@apple.com>
4149
4150         Reviewed by NOBODY (windows build fix).
4151
4152         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
4153
4154 2010-06-02  Gavin Barraclough  <barraclough@apple.com>
4155
4156         Reviewed by Oliver Hunt.
4157
4158         Bug 40094 - The return type of NativeFunction should be EncodedJSValue
4159         On Windows & Linux, using JSVALUE32_64, EncodedJSValue is returned in registers, but JSValue is not.
4160
4161         * API/JSCallbackFunction.cpp:
4162         (JSC::JSCallbackFunction::call):
4163         * API/JSCallbackFunction.h:
4164         * API/JSCallbackObject.h:
4165         * API/JSCallbackObjectFunctions.h:
4166         (JSC::::call):
4167         * JavaScriptCore.exp:
4168         * interpreter/Interpreter.cpp:
4169         (JSC::Interpreter::executeCall):
4170         * jit/JITStubs.cpp:
4171         (JSC::DEFINE_STUB_FUNCTION):
4172         * jit/JITStubs.h:
4173         * jsc.cpp:
4174         (functionPrint):
4175         (functionDebug):
4176         (functionGC):
4177         (functionVersion):
4178         (functionRun):
4179         (functionLoad):
4180         (functionCheckSyntax):
4181         (functionSetSamplingFlags):
4182         (functionClearSamplingFlags):
4183         (functionReadline):
4184         (functionQuit):
4185         * runtime/ArrayConstructor.cpp:
4186         (JSC::callArrayConstructor):
4187         (JSC::arrayConstructorIsArray):
4188         * runtime/ArrayPrototype.cpp:
4189         (JSC::arrayProtoFuncToString):
4190         (JSC::arrayProtoFuncToLocaleString):
4191         (JSC::arrayProtoFuncJoin):
4192         (JSC::arrayProtoFuncConcat):
4193         (JSC::arrayProtoFuncPop):
4194         (JSC::arrayProtoFuncPush):
4195         (JSC::arrayProtoFuncReverse):
4196         (JSC::arrayProtoFuncShift):
4197         (JSC::arrayProtoFuncSlice):
4198         (JSC::arrayProtoFuncSort):
4199         (JSC::arrayProtoFuncSplice):
4200         (JSC::arrayProtoFuncUnShift):
4201         (JSC::arrayProtoFuncFilter):
4202         (JSC::arrayProtoFuncMap):
4203         (JSC::arrayProtoFuncEvery):
4204         (JSC::arrayProtoFuncForEach):
4205         (JSC::arrayProtoFuncSome):
4206         (JSC::arrayProtoFuncReduce):
4207         (JSC::arrayProtoFuncReduceRight):
4208         (JSC::arrayProtoFuncIndexOf):
4209         (JSC::arrayProtoFuncLastIndexOf):
4210         * runtime/BooleanConstructor.cpp:
4211         (JSC::callBooleanConstructor):
4212         * runtime/BooleanPrototype.cpp:
4213         (JSC::booleanProtoFuncToString):
4214         (JSC::booleanProtoFuncValueOf):
4215         * runtime/CallData.h:
4216         * runtime/DateConstructor.cpp:
4217         (JSC::callDate):
4218         (JSC::dateParse):
4219         (JSC::dateNow):
4220         (JSC::dateUTC):
4221         * runtime/DatePrototype.cpp:
4222         (JSC::dateProtoFuncToString):
4223         (JSC::dateProtoFuncToUTCString):
4224         (JSC::dateProtoFuncToISOString):
4225         (JSC::dateProtoFuncToDateString):
4226         (JSC::dateProtoFuncToTimeString):
4227         (JSC::dateProtoFuncToLocaleString):
4228         (JSC::dateProtoFuncToLocaleDateString):
4229         (JSC::dateProtoFuncToLocaleTimeString):