2011-06-23 Timur Iskhodzhanov <timurrrr@google.com>
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-06-23  Timur Iskhodzhanov  <timurrrr@google.com>
2
3         Reviewed by David Levin.
4
5         Make dynamic annotations weak symbols and prevent identical code folding by the linker
6         https://bugs.webkit.org/show_bug.cgi?id=62443
7
8         * wtf/DynamicAnnotations.cpp:
9         (WTFAnnotateBenignRaceSized):
10         (WTFAnnotateHappensBefore):
11         (WTFAnnotateHappensAfter):
12         * wtf/DynamicAnnotations.h:
13
14 2011-06-22  Yael Aharon  <yael.aharon@nokia.com>
15
16         Reviewed by Andreas Kling.
17
18         [Qt] Add a build flag for building with libxml2 and libxslt.
19         https://bugs.webkit.org/show_bug.cgi?id=63113
20
21         * wtf/Platform.h:
22
23 2011-06-22  Sheriff Bot  <webkit.review.bot@gmail.com>
24
25         Unreviewed, rolling out r89489.
26         http://trac.webkit.org/changeset/89489
27         https://bugs.webkit.org/show_bug.cgi?id=63203
28
29         Broke chromium mac build on build.webkit.org (Requested by
30         abarth on #webkit).
31
32         * wtf/Platform.h:
33
34 2011-06-22  Cary Clark  <caryclark@google.com>
35
36         Reviewed by Darin Fisher.
37
38         Use Skia if Skia on Mac Chrome is enabled
39         https://bugs.webkit.org/show_bug.cgi?id=62999
40
41         * wtf/Platform.h:
42         Add switch to use Skia if, externally,
43         Skia has been enabled by a gyp define.
44
45 2011-06-22  Geoffrey Garen  <ggaren@apple.com>
46
47         Reviewed by Oliver Hunt.
48
49         * interpreter/RegisterFile.h: Removed unnecessary #include <stdio.h>.
50
51 2011-06-22  Geoffrey Garen  <ggaren@apple.com>
52
53         Reviewed by Oliver Hunt.
54
55         Removed the conceit that global variables are local variables when running global code
56         https://bugs.webkit.org/show_bug.cgi?id=63106
57         
58         This is required for write barrier correctness.
59         
60         SunSpider reports about a 0.5% regression, mostly from bitops-bitwise-and.js.
61         I was able to reduce the regression with a tiny peephole optimization in
62         the bytecompiler, but not eliminate it. I'm committing this assuming
63         that turning on generational GC will win back at least 0.5%.
64
65         (FWIW, the DFG JIT can easily eliminate any regression by sharing loads of
66         the global object's var storage. I considered doing the same kind of
67         optimization in the existing JIT, but it seemed like moving in the wrong
68         direction.)
69
70         * bytecompiler/BytecodeGenerator.cpp:
71         (JSC::BytecodeGenerator::addGlobalVar):
72         (JSC::BytecodeGenerator::BytecodeGenerator): Don't give global variables
73         negative indices, since they're no longer negatively offset from the
74         current stack frame.
75         
76         Do give global variables monotonically increasing positive indices, since
77         that's much easier to work with.
78         
79         Don't limit the number of optimizable global variables, since it's no
80         longer limited by the register file, since they're no longer stored in
81         the register file.
82
83         (JSC::BytecodeGenerator::registerFor): Global code never has any local
84         registers because a var in global code is actually a property of the
85         global object.
86
87         (JSC::BytecodeGenerator::constRegisterFor): Ditto.
88
89         (JSC::BytecodeGenerator::emitResolve): Did a tiny bit of constant
90         propagation and dead code elimination to speed up our compiles and
91         reduce WTFs / minute.
92
93         * bytecompiler/BytecodeGenerator.h:
94         (JSC::BytecodeGenerator::registerFor): Removed special handling of globals.
95
96         (JSC::BytecodeGenerator::shouldOptimizeLocals): Don't optimize locals in
97         global code, since there are none.
98
99         (JSC::BytecodeGenerator::canOptimizeNonLocals): Do optimize non-locals
100         in global code (i.e., global vars), since there are some.
101
102         * interpreter/Interpreter.cpp:
103         (JSC::Interpreter::callEval):
104         (JSC::Interpreter::Interpreter):
105         (JSC::Interpreter::dumpRegisters):
106         (JSC::Interpreter::execute):
107         * interpreter/Interpreter.h: Updated for deleted / renamed code.
108
109         * interpreter/RegisterFile.cpp:
110         (JSC::RegisterFile::gatherConservativeRoots):
111         (JSC::RegisterFile::releaseExcessCapacity): Updated for deleted / renamed
112         data members.
113
114         * interpreter/RegisterFile.h:
115         (JSC::RegisterFile::begin):
116         (JSC::RegisterFile::size):
117         (JSC::RegisterFile::RegisterFile):
118         (JSC::RegisterFile::shrink): Removed all code and comments dealing with
119         global variables stored in the register file.
120
121         (JSC::RegisterFile::grow): Updated for same.
122         
123         Also, a slight correctness fix: Test the VM commit end, and not just the
124         in-use end, when checking for stack overflow. In theory, it's invalid to
125         commit past the end of your allocation, even if you never touch that
126         memory. This makes the usable size of the stack slightly smaller. No test
127         because we don't know of any case in practice where this crashes.
128
129         * runtime/JSGlobalData.cpp:
130         (JSC::JSGlobalData::JSGlobalData): Updated for changes above.
131
132         * runtime/JSGlobalObject.cpp:
133         (JSC::JSGlobalObject::resizeRegisters):
134         (JSC::JSGlobalObject::addStaticGlobals):
135         * runtime/JSGlobalObject.h: Simplified globals to have monotonically 
136         increasing indexes, always located in our external storage.
137
138 2011-06-21  MORITA Hajime  <morrita@google.com>
139
140         Unreviewed, rolling out r89401 and r89403.
141         http://trac.webkit.org/changeset/89401
142         http://trac.webkit.org/changeset/89403
143         https://bugs.webkit.org/show_bug.cgi?id=62970
144
145         Breaks mac build and mistakenly enables the spellcheck API
146
147         * Configurations/FeatureDefines.xcconfig:
148         * JavaScriptCore.xcodeproj/project.pbxproj:
149
150 2011-06-21  Kent Tamura  <tkent@chromium.org>
151
152         [Mac] Sort Xcode project files.
153
154         * JavaScriptCore.xcodeproj/project.pbxproj:
155
156 2011-06-20  MORITA Hajime  <morrita@google.com>
157
158         Reviewed by Kent Tamura.
159
160         Spellcheck API should be build-able.
161         https://bugs.webkit.org/show_bug.cgi?id=62970
162
163         No new tests, changing only build related files
164         
165         * Configurations/FeatureDefines.xcconfig:
166
167 2011-06-21  Geoffrey Garen  <ggaren@apple.com>
168
169         Reviewed by Oliver Hunt.
170
171         Moved 'const' off the global-variable-as-local-variable crack pipe
172         https://bugs.webkit.org/show_bug.cgi?id=63105
173         
174         This is necessary for moving the rest of the code off of same.
175         
176         Many problems remain in our handling of const. I have fixed none of them.
177
178         * bytecompiler/BytecodeGenerator.h:
179         (JSC::BytecodeGenerator::scopeChain): New accessor, needed to enable
180         const to directly implement its unique scoping rules.
181
182         * bytecompiler/NodesCodegen.cpp:
183         (JSC::PrefixResolveNode::emitBytecode): Do specify that our resolve is
184         for writing, so we don't overwrite const variables.
185
186         (JSC::ConstDeclNode::emitCodeSingle): Don't assume that all declared const
187         variables are available as local variables, since this won't be the case
188         once global variables are not available as local variables. Instead, use
189         put_scoped_var in the case where there is no local variable. Like a local
190         variable, put_scoped_var succeeds even though const properties are
191         read-only, since put_scoped_var skips read-only checks. (Yay?)
192
193 2011-06-21  Oliver Hunt  <oliver@apple.com>
194
195         Reviewed by Alexey Proskuryakov.
196
197         REGRESSION(r89257): It broke 2 jscore tests (Requested by Ossy_away on #webkit).
198         https://bugs.webkit.org/show_bug.cgi?id=63052
199
200         Release mode only failure, the stack overflow guards were getting there error
201         handling inlined, so that they were essentially causing their own demise.
202
203         * parser/JSParser.cpp:
204         (JSC::JSParser::updateErrorMessage):
205         (JSC::JSParser::updateErrorWithNameAndMessage):
206
207 2011-06-20  Kenneth Russell  <kbr@google.com>
208
209         Unreviewed.
210
211         Rolled out r89233 and r89235 because of crashes in http/tests/misc/acid3.html on Snow Leopard and other platforms
212         https://bugs.webkit.org/show_bug.cgi?id=63022
213
214         * wtf/Platform.h:
215
216 2011-06-18  Anders Carlsson  <andersca@apple.com>
217
218         Reviewed by Darin Adler.
219
220         Disallow assigning into PassOwnArrayPtr, PassOwnPtr and PassRefPtr
221         https://bugs.webkit.org/show_bug.cgi?id=62940
222
223         Remove clear() and all assignment operators except one which now has a COMPILE_ASSERT.
224
225         * wtf/PassOwnArrayPtr.h:
226         (WTF::PassOwnArrayPtr::operator=):
227         * wtf/PassOwnPtr.h:
228         (WTF::PassOwnPtr::operator=):
229         * wtf/PassRefPtr.h:
230         (WTF::PassRefPtr::operator=):
231         (WTF::NonNullPassRefPtr::operator=):
232
233 2011-06-20  Oliver Hunt  <oliver@apple.com>
234
235         Reviewed by Darin Adler.
236
237         REGRESSION (r79060): Searching for a flight at united.com fails
238         https://bugs.webkit.org/show_bug.cgi?id=63003
239
240         This original change also broke Twitter, and we attempted to refine the fix to 
241         address that problem (http://trac.webkit.org/changeset/80542), but since it still breaks United,
242         we need to revert the change until we understand the problem better.
243
244         * wtf/DateMath.cpp:
245         (WTF::parseDateFromNullTerminatedCharacters):
246
247 2011-06-20  Juan C. Montemayor  <jmont@apple.com>
248
249         Reviewed by Oliver Hunt.
250
251         No context for javascript parse errors.
252         https://bugs.webkit.org/show_bug.cgi?id=62613
253         
254         Parse errors now show more details like:
255         "Unexpected token: ]"
256         or
257         "Expected token: while"
258         
259         For reserved names, numbers, indentifiers, strings, lexer errors, 
260         and EOFs, the following error messages are printed:
261         
262         "Use of reserved word: super"
263         "Unexpected number: 42"
264         "Unexpected identifier: "
265         "Unexpected string: "foobar""
266         "Invalid token character sequence: \u4023"
267         "Unexpected EOF"
268
269         * parser/JSParser.cpp:
270         (JSC::JSParser::consume):
271         (JSC::JSParser::getToken):
272         (JSC::JSParser::getTokenName):
273         (JSC::JSParser::updateErrorMessageSpecialCase):
274         (JSC::JSParser::updateErrorMessage):
275         (JSC::JSParser::updateErrorWithNameAndMessage):
276         (JSC::jsParse):
277         (JSC::JSParser::JSParser):
278         (JSC::JSParser::parseProgram):
279         (JSC::JSParser::parseVarDeclarationList):
280         (JSC::JSParser::parseForStatement):
281         (JSC::JSParser::parseBreakStatement):
282         (JSC::JSParser::parseContinueStatement):
283         (JSC::JSParser::parseWithStatement):
284         (JSC::JSParser::parseTryStatement):
285         (JSC::JSParser::parseStatement):
286         (JSC::JSParser::parseFormalParameters):
287         (JSC::JSParser::parseFunctionInfo):
288         (JSC::JSParser::parseAssignmentExpression):
289         (JSC::JSParser::parsePrimaryExpression):
290         (JSC::JSParser::parseMemberExpression):
291         (JSC::JSParser::parseUnaryExpression):
292         * parser/JSParser.h:
293         * parser/Lexer.cpp:
294         (JSC::Lexer::lex):
295         * parser/Parser.cpp:
296         (JSC::Parser::parse):
297
298 2011-06-20  Nikolas Zimmermann  <nzimmermann@rim.com>
299
300         Reviewed by Rob Buis.
301
302         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
303         https://bugs.webkit.org/show_bug.cgi?id=59085
304
305         * wtf/Platform.h: Force Qt-EWS into a full rebuild, otherwhise this patch breaks the EWS.
306
307 2011-06-19  Oliver Hunt  <oliver@apple.com>
308
309         Reviewed by Sam Weinig.
310
311         Correct logic for putting errors on the correct line when handling JSONP
312         https://bugs.webkit.org/show_bug.cgi?id=62962
313
314         Minor fix for the minor fix.  *sigh*
315
316         * interpreter/Interpreter.cpp:
317         (JSC::Interpreter::execute):
318
319 2011-06-19  Oliver Hunt  <oliver@apple.com>
320
321         Minor fix to correct layout test results.
322
323         * interpreter/Interpreter.cpp:
324         (JSC::Interpreter::execute):
325
326 2011-06-17  Oliver Hunt  <oliver@apple.com>
327
328         Reviewed by Gavin Barraclough.
329
330         JSONP is unnecessarily slow
331         https://bugs.webkit.org/show_bug.cgi?id=62920
332
333         JSONP has unfortunately become a fairly common idiom online, yet
334         it triggers very poor performance in JSC as we end up doing codegen
335         for a large number of property accesses that will
336            * only be run once, so the vast amount of logic we dump to handle
337              caching of accesses is unnecessary.
338            * We are doing codegen that is directly proportional to just
339              creating the object in the first place.
340
341         This patch extends the use of the literal parser to JSONP-like structures
342         in global code, handling a number of different forms I have seen online.
343         In an extreme case this improves performance of JSONP by more than 2x
344         due to removal of code generation and execution time, and a few optimisations
345         that I made to the parser itself.
346
347         * API/JSValueRef.cpp:
348         (JSValueMakeFromJSONString):
349         * interpreter/Interpreter.cpp:
350         (JSC::Interpreter::callEval):
351         (JSC::Interpreter::execute):
352         * parser/Lexer.cpp:
353         (JSC::Lexer::isKeyword):
354         * parser/Lexer.h:
355         * runtime/JSGlobalObjectFunctions.cpp:
356         (JSC::globalFuncEval):
357         * runtime/JSONObject.cpp:
358         (JSC::JSONProtoFuncParse):
359         * runtime/LiteralParser.cpp:
360         (JSC::LiteralParser::tryJSONPParse):
361         (JSC::LiteralParser::makeIdentifier):
362         (JSC::LiteralParser::Lexer::lex):
363         (JSC::LiteralParser::Lexer::next):
364         (JSC::isSafeStringCharacter):
365         (JSC::LiteralParser::Lexer::lexString):
366         (JSC::LiteralParser::Lexer::lexNumber):
367         (JSC::LiteralParser::parse):
368         * runtime/LiteralParser.h:
369         (JSC::LiteralParser::LiteralParser):
370         (JSC::LiteralParser::tryLiteralParse):
371         (JSC::LiteralParser::Lexer::Lexer):
372
373 2011-06-18  Sheriff Bot  <webkit.review.bot@gmail.com>
374
375         Unreviewed, rolling out r89184.
376         http://trac.webkit.org/changeset/89184
377         https://bugs.webkit.org/show_bug.cgi?id=62927
378
379         It broke 22 tests on all bot (Requested by Ossy_weekend on
380         #webkit).
381
382         * API/JSValueRef.cpp:
383         (JSValueMakeFromJSONString):
384         * interpreter/Interpreter.cpp:
385         (JSC::Interpreter::callEval):
386         (JSC::Interpreter::execute):
387         * parser/Lexer.cpp:
388         * parser/Lexer.h:
389         * runtime/JSGlobalObjectFunctions.cpp:
390         (JSC::globalFuncEval):
391         * runtime/JSONObject.cpp:
392         (JSC::JSONProtoFuncParse):
393         * runtime/LiteralParser.cpp:
394         (JSC::LiteralParser::Lexer::lex):
395         (JSC::isSafeStringCharacter):
396         (JSC::LiteralParser::Lexer::lexString):
397         (JSC::LiteralParser::Lexer::lexNumber):
398         (JSC::LiteralParser::parse):
399         * runtime/LiteralParser.h:
400         (JSC::LiteralParser::LiteralParser):
401         (JSC::LiteralParser::tryLiteralParse):
402         (JSC::LiteralParser::Lexer::Lexer):
403         (JSC::LiteralParser::Lexer::next):
404
405 2011-06-17  Oliver Hunt  <oliver@apple.com>
406
407         Reviewed by Gavin Barraclough.
408
409         JSONP is unnecessarily slow
410         https://bugs.webkit.org/show_bug.cgi?id=62920
411
412         JSONP has unfortunately become a fairly common idiom online, yet
413         it triggers very poor performance in JSC as we end up doing codegen
414         for a large number of property accesses that will
415            * only be run once, so the vast amount of logic we dump to handle
416              caching of accesses is unnecessary.
417            * We are doing codegen that is directly proportional to just
418              creating the object in the first place.
419
420         This patch extends the use of the literal parser to JSONP-like structures
421         in global code, handling a number of different forms I have seen online.
422         In an extreme case this improves performance of JSONP by more than 2x
423         due to removal of code generation and execution time, and a few optimisations
424         that I made to the parser itself.
425
426         * API/JSValueRef.cpp:
427         (JSValueMakeFromJSONString):
428         * interpreter/Interpreter.cpp:
429         (JSC::Interpreter::callEval):
430         (JSC::Interpreter::execute):
431         * parser/Lexer.cpp:
432         (JSC::Lexer::isKeyword):
433         * parser/Lexer.h:
434         * runtime/JSGlobalObjectFunctions.cpp:
435         (JSC::globalFuncEval):
436         * runtime/JSONObject.cpp:
437         (JSC::JSONProtoFuncParse):
438         * runtime/LiteralParser.cpp:
439         (JSC::LiteralParser::tryJSONPParse):
440         (JSC::LiteralParser::makeIdentifier):
441         (JSC::LiteralParser::Lexer::lex):
442         (JSC::LiteralParser::Lexer::next):
443         (JSC::isSafeStringCharacter):
444         (JSC::LiteralParser::Lexer::lexString):
445         (JSC::LiteralParser::Lexer::lexNumber):
446         (JSC::LiteralParser::parse):
447         * runtime/LiteralParser.h:
448         (JSC::LiteralParser::LiteralParser):
449         (JSC::LiteralParser::tryLiteralParse):
450         (JSC::LiteralParser::Lexer::Lexer):
451
452 2011-06-17  Geoffrey Garen  <ggaren@apple.com>
453
454         Reviewed by Oliver Hunt.
455
456         Moved some property access JIT code into property access JIT files
457         https://bugs.webkit.org/show_bug.cgi?id=62906
458
459         * jit/JITOpcodes.cpp:
460         * jit/JITOpcodes32_64.cpp:
461         * jit/JITPropertyAccess.cpp:
462         (JSC::JIT::emitSlow_op_put_by_val):
463         (JSC::JIT::emit_op_get_scoped_var):
464         (JSC::JIT::emit_op_put_scoped_var):
465         (JSC::JIT::emit_op_get_global_var):
466         (JSC::JIT::emit_op_put_global_var):
467         * jit/JITPropertyAccess32_64.cpp:
468         (JSC::JIT::emit_op_get_scoped_var):
469         (JSC::JIT::emit_op_put_scoped_var):
470         (JSC::JIT::emit_op_get_global_var):
471         (JSC::JIT::emit_op_put_global_var):
472
473 2011-06-17  Anders Carlsson  <andersca@apple.com>
474
475         Build fix.
476
477         * JavaScriptCore.xcodeproj/project.pbxproj:
478
479 2011-06-17  Geoffrey Garen  <ggaren@apple.com>
480
481         Try to fix the Leopard build?
482
483         * JavaScriptCore.xcodeproj/project.pbxproj:
484
485 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
486
487         Reviewed by Oliver Hunt.
488
489         Added some write barrier action, compiled out by default
490         https://bugs.webkit.org/show_bug.cgi?id=62844
491
492         * JavaScriptCore.exp: Build!
493
494         * JavaScriptCore.xcodeproj/project.pbxproj: Fixed an incremental build
495         issue with Heap.cpp.
496
497         * heap/Heap.cpp:
498         (JSC::Heap::writeBarrierSlowCase):
499         * heap/Heap.h:
500         (JSC::Heap::writeBarrier):
501         * heap/MarkedBlock.h:
502         (JSC::MarkedBlock::isAtomAligned):
503         (JSC::MarkedBlock::blockFor):
504         (JSC::MarkedBlock::atomNumber):
505         (JSC::MarkedBlock::ownerSetNumber):
506         (JSC::MarkedBlock::addOldSpaceOwner):
507         (JSC::MarkedBlock::OwnerSet::OwnerSet):
508         (JSC::MarkedBlock::OwnerSet::add):
509         (JSC::MarkedBlock::OwnerSet::clear):
510         (JSC::MarkedBlock::OwnerSet::size):
511         (JSC::MarkedBlock::OwnerSet::didOverflow):
512         (JSC::MarkedBlock::OwnerSet::owners): Added a basic write barrier that
513         tracks owners for regions within blocks. Currently unused.
514
515 2011-06-17  Raphael Kubo da Costa  <kubo@profusion.mobi>
516
517         Reviewed by Eric Seidel.
518
519         [EFL] Add some OwnPtr specializations for EFL types.
520         For now there are specializations for Ecore_Evas and Evas_Object.
521         https://bugs.webkit.org/show_bug.cgi?id=62877
522
523         * wtf/CMakeListsEfl.txt:
524         * wtf/OwnPtrCommon.h:
525         * wtf/efl/OwnPtrEfl.cpp: Added.
526         (WTF::deleteOwnedPtr):
527
528 2011-06-17  Joone Hur  <joone.hur@collabora.co.uk>
529
530         Reviewed by Martin Robinson.
531
532         [GTK] Replace GdkRectangle by cairo_rectangle_int_t
533         https://bugs.webkit.org/show_bug.cgi?id=60687
534
535         Replace GdkRectangle by cairo_rectangle_int_t.
536
537         * wtf/gobject/GTypedefs.h: Replace GdkRectangle by cairo_rectangle_int_t.
538
539 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
540
541         Reviewed by Oliver Hunt.
542
543         https://bugs.webkit.org/show_bug.cgi?id=53014
544         ES5 strict mode keyword restrictions aren't implemented
545
546         The following are future restricted words is strict mode code:
547             implements, interface, let, package, private, protected, public, static, yield
548
549         * parser/JSParser.h:
550             - Add RESERVED_IF_STRICT token.
551         * parser/Keywords.table:
552             - Add new future restricted words.
553         * parser/Lexer.cpp:
554         (JSC::Lexer::parseIdentifier):
555             - Check for RESERVED_IF_STRICT; in nonstrict code this is converted to IDENT.
556         (JSC::Lexer::lex):
557             - Pass strictMode flag to parseIdentifier.
558         * parser/Lexer.h:
559             - parseIdentifier needs a strictMode flag.
560         * runtime/CommonIdentifiers.h:
561             - Add identifiers for new reserved words.
562
563 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
564
565         Reviewed by Oliver Hunt.
566
567         https://bugs.webkit.org/show_bug.cgi?id=23611
568         Multiline Javascript comments cause incorrect parsing of following script.
569
570         From the spec:
571         "A MultiLineComment [is] simply discarded if it contains no line terminator,
572         but if a MultiLineComment contains one or more line terminators, then it is
573         replaced with a single line terminator, which becomes part of the stream of
574         inputs for the syntactic grammar." 
575
576         This may result in behavioural changes, due to automatic semicolon insertion.
577
578         * parser/Lexer.cpp:
579         (JSC::Lexer::parseMultilineComment):
580             - Set m_terminator is we see a line terminator in a multiline comment.
581
582 2011-06-16  Gavin Barraclough  <barraclough@apple.com>
583
584         Reviewed by Sam Weinig.
585
586         https://bugs.webkit.org/show_bug.cgi?id=62824
587         DFG JIT - add support for branch-fusion of compareEq, JSValue comparisons in SpeculativeJIT
588
589         CompareEq of non-integer values is the most common cause of speculation failure.
590
591         * dfg/DFGSpeculativeJIT.cpp:
592         (JSC::DFG::SpeculativeJIT::compilePeepHoleIntegerBranch):
593             - Support Equals.
594         (JSC::DFG::SpeculativeJIT::compilePeepHoleEq):
595             - new! - peephole optimized Eq of JSValues.
596         (JSC::DFG::SpeculativeJIT::compile):
597             - Add peephole optimization for CompareEq.
598         * dfg/DFGSpeculativeJIT.h:
599         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
600             - Add support for dead nodes between compare & branch.
601         (JSC::DFG::SpeculativeJIT::isInteger):
602             - Added to determine which form of peephole to do in CompareEq.
603
604 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
605
606         Try to fix the Windows build.
607
608         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Export another
609         symbol.
610
611         * bytecode/EvalCodeCache.h:
612         * heap/HandleHeap.h:
613         * heap/HeapRootVisitor.h:
614         * heap/NewSpace.h:
615         * runtime/ArgList.h:
616         * runtime/ScopeChain.h:
617         * runtime/SmallStrings.h:
618         * runtime/Structure.h: Stop forward-declaring things that don't really
619         exist anymore.
620
621 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
622
623         Try to fix the Mac build: Removed and re-added SlotVisitor.h to the Xcode
624         project while crossing my fingers and facing west.
625
626         * JavaScriptCore.xcodeproj/project.pbxproj:
627
628 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
629
630         Build fix: Removed an incorrect symbol on Windows.
631
632         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
633
634 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
635
636         Build fix: Removed an accidental commit from the future.
637
638         * CMakeLists.txt:
639
640 2011-06-16  Geoffrey Garen  <ggaren@apple.com>
641
642         Reviewed by Oliver Hunt.
643
644         Introduced SlotVisitor into the project
645         https://bugs.webkit.org/show_bug.cgi?id=62820
646         
647         This resolves a class vs typedef forward declaration issue, and gives all
648         exported symbols the correct names.
649
650         * CMakeLists.txt:
651         * GNUmakefile.list.am:
652         * JavaScriptCore.exp:
653         * JavaScriptCore.gypi:
654         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
655         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
656
657         * bytecode/EvalCodeCache.h:
658         * heap/HandleHeap.h:
659         * heap/Heap.cpp:
660         (JSC::Heap::Heap):
661         (JSC::Heap::markRoots):
662         * heap/Heap.h:
663         * heap/HeapRootVisitor.h: Replaced MarkStack with SlotVisitor. Now no
664         clients operate on a MarkStack.
665
666         * heap/MarkStack.cpp:
667         (JSC::SlotVisitor::visitChildren):
668         (JSC::SlotVisitor::drain):
669         * heap/SlotVisitor.h: Added.
670         (JSC::SlotVisitor::SlotVisitor): Used 'protected' and a little cheesy
671         inheritance to give SlotVisitor all the attributes of MarkStack without
672         making this change giant. Over time, we will move more behavior into
673         SlotVisitor and its subclasses.
674
675         * heap/MarkStack.h:
676         * heap/NewSpace.h: Replaced MarkStack with SlotVisitor. Now no
677         clients operate on a MarkStack.
678
679         * runtime/ArgList.h:
680         * runtime/JSCell.h:
681         * runtime/JSObject.h:
682         * runtime/ScopeChain.h:
683         * runtime/SmallStrings.h:
684         * runtime/Structure.h: Replaced MarkStack with SlotVisitor. Now no
685         clients operate on a MarkStack.
686
687 2011-06-15  Oliver Hunt  <oliver@apple.com>
688
689         Reviewed by Geoffrey Garen.
690
691         Reduce memory usage of resolve_global
692         https://bugs.webkit.org/show_bug.cgi?id=62765
693
694         If we have a large number of resolve_globals in a single
695         block start planting plain resolve instructions instead 
696         whenever we aren't in a loop.  This allows us to reduce
697         the code size for extremely large functions without
698         losing the performance benefits of op_resolve_global.
699
700         * bytecode/CodeBlock.h:
701         (JSC::CodeBlock::globalResolveInfoCount):
702         * bytecompiler/BytecodeGenerator.cpp:
703         (JSC::BytecodeGenerator::shouldAvoidResolveGlobal):
704         (JSC::BytecodeGenerator::emitResolve):
705         (JSC::BytecodeGenerator::emitResolveWithBase):
706         * bytecompiler/BytecodeGenerator.h:
707
708 2011-06-16  Qi Zhang  <qi.2.zhang@nokia.com>
709
710         Reviewed by Laszlo Gombos.
711
712         [Qt] Fix building with CONFIG(use_system_icu)
713         https://bugs.webkit.org/show_bug.cgi?id=62744
714
715         Do not define WTF_USE_QT4_UNICODE if WTF_USE_ICU_UNICODE is set.
716
717         * wtf/Platform.h:
718
719 2011-06-15  Darin Adler  <darin@apple.com>
720
721         Reviewed by Adam Barth.
722
723         Remove obsolete LOOSE_OWN_PTR code
724         https://bugs.webkit.org/show_bug.cgi?id=59909
725
726         The internal Apple dependency on this is gone now.
727
728         * wtf/OwnArrayPtr.h: Removed constructor that takes a raw pointer,
729         set function that takes a raw pointer.
730
731         * wtf/OwnPtr.h: Removed constructor that takes a raw pointer,
732         set functino that takes a raw pointer.
733
734         * wtf/PassOwnArrayPtr.h: Made constructor that takes a nullptr
735         and assignment operator that takes a nullptr unconditional.
736         Made constructor that takes a raw pointer private and explicit,
737         and removed assignment operator that takes a raw pointer.
738
739         * wtf/PassOwnPtr.h: Made assignment operator that takes a nullptr
740         unconditional. Made constructor that takes a raw pointer private
741         and explicit, and removed assignment operator that takes a raw pointer.
742
743 2011-06-15  Sam Weinig  <sam@webkit.org>
744
745         Reviewed by Geoffrey Garen and Gavin Barraclough.
746
747         Make access-nseive ~9x faster on the non-speculative path by
748         adding special casing for doubles that can lossless-ly be converted
749         to a uint32_t in getByVal and putByVal. This avoids calls to stringification
750         and the hash lookup.  Long term, we should try and get property of a getByVal
751         and putByVal to be an integer immediate even in the non-speculative path.
752
753         * dfg/DFGOperations.cpp:
754         (JSC::DFG::putByVal):
755         (JSC::DFG::operationPutByValInternal):
756
757 2011-06-15  Oliver Hunt  <oliver@apple.com>
758
759         Reviewed by Darin Adler.
760
761         REGRESSION (r88719): 5by5.tv schedule is not visible
762         https://bugs.webkit.org/show_bug.cgi?id=62720
763
764         Problem here is that the lexer wasn't considering '$' to be
765         a valid character in an identifier.
766
767         * parser/Lexer.h:
768         (JSC::Lexer::lexExpectIdentifier):
769
770 2011-06-15  Oliver Hunt  <oliver@apple.com>
771
772         Reviewed by Sam Weinig.
773
774         Reduce the size of global_resolve
775         https://bugs.webkit.org/show_bug.cgi?id=62738
776
777         Reduce the code size of global_resolve in the JIT by replacing
778         multiple pointer loads with a single pointer move + two offset
779         loads.
780
781         * jit/JITOpcodes.cpp:
782         (JSC::JIT::emit_op_resolve_global):
783         * jit/JITOpcodes32_64.cpp:
784         (JSC::JIT::emit_op_resolve_global):
785
786 2011-06-14  Geoffrey Garen  <ggaren@apple.com>
787
788         Reviewed by Dan Bernstein.
789
790         Fixed an inavlid ASSERT I found while investigating
791         <rdar://problem/9580254> Crash in JSC::HandleHeap::finalizeWeakHandles + 92
792         https://bugs.webkit.org/show_bug.cgi?id=62699        
793
794         No test since we don't know of a way to get WebCore to deallocate the
795         next-to-finalize handle, which is also the last handle in the list,
796         while finalizing the second-to-last handle in the list.
797
798         * heap/HandleHeap.h:
799         (JSC::HandleHeap::deallocate): Don't ASSERT that m_nextToFinalize has a
800         non-0 next() after updating it, since it is valid to update m_nextToFinalize
801         to point to the tail sentinel.
802         
803         Do ASSERT that m_nextToFinalize has a non-0 next() before updating it,
804         since it is not valid to update m_nextToFinalize to point past the tail
805         sentinel.
806         
807         Also, use m_nextToFinalize consistently for clarity.
808
809 2011-06-14  Gavin Barraclough  <barraclough@apple.com>
810
811         Reviewed by Sam Weinig.
812
813         https://bugs.webkit.org/show_bug.cgi?id=43841
814         SegmentedVector::operator== typo
815
816         * wtf/SegmentedVector.h:
817         (WTF::SegmentedVectorIterator::operator==):
818         (WTF::SegmentedVectorIterator::operator!=):
819
820 2011-06-14  Oliver Hunt  <oliver@apple.com>
821
822         Reviewed by Gavin Barraclough.
823
824         Constant array literals result in unnecessarily large amounts of code
825         https://bugs.webkit.org/show_bug.cgi?id=62658
826
827         Add a new version of op_new_array that simply copies values from a buffer
828         we hang off of the CodeBlock, rather than generating code to place each
829         entry into the registerfile, and then copying it from the registerfile into
830         the array.  This is a slight improvement on some sunspider tests, but no
831         measurable overall change.  That's okay though as our goal was to reduce
832         code size without hurting performance.
833
834         * bytecode/CodeBlock.cpp:
835         (JSC::CodeBlock::dump):
836         * bytecode/CodeBlock.h:
837         (JSC::CodeBlock::addImmediateBuffer):
838         (JSC::CodeBlock::immediateBuffer):
839         * bytecode/Opcode.h:
840         * bytecompiler/BytecodeGenerator.cpp:
841         (JSC::BytecodeGenerator::addImmediateBuffer):
842         (JSC::BytecodeGenerator::emitNewArray):
843         * bytecompiler/BytecodeGenerator.h:
844         * bytecompiler/NodesCodegen.cpp:
845         (JSC::ArrayNode::emitBytecode):
846         * interpreter/Interpreter.cpp:
847         (JSC::Interpreter::privateExecute):
848         * jit/JIT.cpp:
849         (JSC::JIT::privateCompileMainPass):
850         * jit/JIT.h:
851         * jit/JITOpcodes.cpp:
852         (JSC::JIT::emit_op_new_array):
853         (JSC::JIT::emit_op_new_array_buffer):
854         * jit/JITOpcodes32_64.cpp:
855         * jit/JITStubs.cpp:
856         (JSC::DEFINE_STUB_FUNCTION):
857         * jit/JITStubs.h:
858
859 2011-06-14  Sheriff Bot  <webkit.review.bot@gmail.com>
860
861         Unreviewed, rolling out r88841.
862         http://trac.webkit.org/changeset/88841
863         https://bugs.webkit.org/show_bug.cgi?id=62672
864
865         Caused many tests to crash (Requested by rniwa on #webkit).
866
867         * bytecode/CodeBlock.cpp:
868         (JSC::CodeBlock::dump):
869         * bytecode/CodeBlock.h:
870         * bytecode/Opcode.h:
871         * bytecompiler/BytecodeGenerator.cpp:
872         (JSC::BytecodeGenerator::emitNewArray):
873         * bytecompiler/BytecodeGenerator.h:
874         * bytecompiler/NodesCodegen.cpp:
875         (JSC::ArrayNode::emitBytecode):
876         * interpreter/Interpreter.cpp:
877         (JSC::Interpreter::privateExecute):
878         * jit/JIT.cpp:
879         (JSC::JIT::privateCompileMainPass):
880         * jit/JIT.h:
881         * jit/JITOpcodes.cpp:
882         (JSC::JIT::emit_op_new_array):
883         * jit/JITOpcodes32_64.cpp:
884         (JSC::JIT::emit_op_new_array):
885         * jit/JITStubs.cpp:
886         * jit/JITStubs.h:
887
888 2011-06-14  Oliver Hunt  <oliver@apple.com>
889
890         Reviewed by Gavin Barraclough.
891
892         Constant array literals result in unnecessarily large amounts of code
893         https://bugs.webkit.org/show_bug.cgi?id=62658
894
895         Add a new version of op_new_array that simply copies values from a buffer
896         we hang off of the CodeBlock, rather than generating code to place each
897         entry into the registerfile, and then copying it from the registerfile into
898         the array.  This is a slight improvement on some sunspider tests, but no
899         measurable overall change.  That's okay though as our goal was to reduce
900         code size without hurting performance.
901
902         * bytecode/CodeBlock.cpp:
903         (JSC::CodeBlock::dump):
904         * bytecode/CodeBlock.h:
905         (JSC::CodeBlock::addImmediateBuffer):
906         (JSC::CodeBlock::immediateBuffer):
907         * bytecode/Opcode.h:
908         * bytecompiler/BytecodeGenerator.cpp:
909         (JSC::BytecodeGenerator::addImmediateBuffer):
910         (JSC::BytecodeGenerator::emitNewArray):
911         * bytecompiler/BytecodeGenerator.h:
912         * bytecompiler/NodesCodegen.cpp:
913         (JSC::ArrayNode::emitBytecode):
914         * interpreter/Interpreter.cpp:
915         (JSC::Interpreter::privateExecute):
916         * jit/JIT.cpp:
917         (JSC::JIT::privateCompileMainPass):
918         * jit/JIT.h:
919         * jit/JITOpcodes.cpp:
920         (JSC::JIT::emit_op_new_array):
921         (JSC::JIT::emit_op_new_array_buffer):
922         * jit/JITOpcodes32_64.cpp:
923         * jit/JITStubs.cpp:
924         (JSC::DEFINE_STUB_FUNCTION):
925         * jit/JITStubs.h:
926
927 2011-06-14  Stephanie Lewis  <slewis@apple.com>
928
929         Rubber stamped by Oliver Hunt.
930
931         <rdar://problem/9511169>
932         Update order files.
933
934         * JavaScriptCore.order:
935
936 2011-06-14  Sam Weinig  <sam@webkit.org>
937
938         Reviewed by Geoffrey Garen.
939
940         Fix dumping of constants to have the correct constant number.
941
942         * bytecode/CodeBlock.cpp:
943         (JSC::CodeBlock::dump):
944
945 2011-06-14  Benjamin Poulain  <benjamin@webkit.org>
946
947         Reviewed by Eric Seidel.
948
949         KeywordLookupGenerator's Trie does not work with Python 3
950         https://bugs.webkit.org/show_bug.cgi?id=62635
951
952         With Python 3, dict.items() return an iterator. Since the iterator
953         protocol changed between Python 2 and 3, the easiest way to get the
954         values is to have something that use the iterator implicitely, like a
955         for() loop.
956
957         * KeywordLookupGenerator.py:
958
959 2011-06-13  Oliver Hunt  <oliver@apple.com>
960
961         Reviewed by Gavin Barraclough.
962
963         Fix llocp and lvalp names in the lexer to something more meaningful
964         https://bugs.webkit.org/show_bug.cgi?id=62605
965
966         A simple rename
967
968         * parser/Lexer.cpp:
969         (JSC::Lexer::parseIdentifier):
970         (JSC::Lexer::parseString):
971         (JSC::Lexer::lex):
972         * parser/Lexer.h:
973         (JSC::Lexer::lexExpectIdentifier):
974
975 2011-06-13  Oliver Hunt  <oliver@apple.com>
976
977         Reviewed by Gavin Barraclough.
978
979         Make it possible to inline the common case of identifier lexing
980         https://bugs.webkit.org/show_bug.cgi?id=62600
981
982         Add a lexing function that expects to lex an "normal" alpha numeric
983         identifier (that ignores keywords) so it's possible to inline the
984         common parsing cases.  This comes out as a reasonable parsing speed
985         boost.
986
987         * parser/JSParser.cpp:
988         (JSC::JSParser::nextExpectIdentifier):
989         (JSC::JSParser::parseProperty):
990         (JSC::JSParser::parseMemberExpression):
991         * parser/Lexer.cpp:
992         * parser/Lexer.h:
993         (JSC::Lexer::makeIdentifier):
994         (JSC::Lexer::lexExpectIdentifier):
995
996 2011-06-13  Xan Lopez  <xlopez@igalia.com>
997
998         Reviewed by Martin Robinson.
999
1000         Distcheck fixes.
1001
1002         * GNUmakefile.am:
1003         * GNUmakefile.list.am:
1004
1005 2011-06-13  Oliver Hunt  <oliver@apple.com>
1006
1007         Reviewed by Simon Fraser.
1008
1009         Make it possible to inline Identifier::equal
1010         https://bugs.webkit.org/show_bug.cgi?id=62584
1011
1012         Move Identifier::equal to the Identifier header file.
1013
1014         * runtime/Identifier.cpp:
1015         * runtime/Identifier.h:
1016         (JSC::Identifier::equal):
1017
1018 2011-06-13  Tony Chang  <tony@chromium.org>
1019
1020         Reviewed by Dimitri Glazkov.
1021
1022         rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX
1023         https://bugs.webkit.org/show_bug.cgi?id=62578
1024
1025         * Configurations/FeatureDefines.xcconfig:
1026
1027 2011-06-13  Tony Chang  <tony@chromium.org>
1028
1029         Reviewed by Adam Barth.
1030
1031         rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX
1032         https://bugs.webkit.org/show_bug.cgi?id=62545
1033
1034         * Configurations/FeatureDefines.xcconfig:
1035
1036 2011-06-12  Patrick Gansterer  <paroga@webkit.org>
1037
1038         Unreviewed. Build fix for !ENABLE(JIT) after r88604.
1039
1040         * bytecode/CodeBlock.cpp:
1041         (JSC::CodeBlock::visitAggregate):
1042
1043 2011-06-11  Gavin Barraclough  <barraclough@apple.com>
1044
1045         Reviewed by Darin Adler.
1046
1047         https://bugs.webkit.org/show_bug.cgi?id=16777
1048
1049         Remove #define NaN per Darin's comments.
1050
1051         * runtime/JSGlobalObjectFunctions.cpp:
1052         (JSC::parseIntOverflow):
1053         (JSC::parseInt):
1054         (JSC::jsStrDecimalLiteral):
1055         (JSC::jsToNumber):
1056         (JSC::parseFloat):
1057         * wtf/DateMath.cpp:
1058         (WTF::equivalentYearForDST):
1059         (WTF::parseES5DateFromNullTerminatedCharacters):
1060         (WTF::parseDateFromNullTerminatedCharacters):
1061         (WTF::timeClip):
1062         (JSC::parseDateFromNullTerminatedCharacters):
1063
1064 2011-06-11  Gavin Barraclough  <barraclough@apple.com>
1065
1066         Rubber stamped by Geoff Garen.
1067
1068         https://bugs.webkit.org/show_bug.cgi?id=62503
1069         Remove JIT_OPTIMIZE_* switches
1070
1071         The alternative code paths are untested, and not well maintained.
1072         These were useful when there was more churn in the JIT, but now
1073         are a maintenance overhead. Time to move on, removing.
1074
1075         * bytecode/CodeBlock.cpp:
1076         (JSC::CodeBlock::visitAggregate):
1077         * jit/JIT.cpp:
1078         (JSC::JIT::privateCompileSlowCases):
1079         (JSC::JIT::privateCompile):
1080         (JSC::JIT::linkConstruct):
1081         * jit/JIT.h:
1082         * jit/JITCall.cpp:
1083         * jit/JITCall32_64.cpp:
1084         * jit/JITOpcodes.cpp:
1085         (JSC::JIT::privateCompileCTIMachineTrampolines):
1086         (JSC::JIT::privateCompileCTINativeCall):
1087         * jit/JITOpcodes32_64.cpp:
1088         (JSC::JIT::privateCompileCTIMachineTrampolines):
1089         (JSC::JIT::privateCompileCTINativeCall):
1090         (JSC::JIT::softModulo):
1091         * jit/JITPropertyAccess.cpp:
1092         * jit/JITPropertyAccess32_64.cpp:
1093         * jit/JITStubs.cpp:
1094         (JSC::DEFINE_STUB_FUNCTION):
1095         * runtime/Lookup.cpp:
1096         (JSC::setUpStaticFunctionSlot):
1097         * runtime/Lookup.h:
1098         * wtf/Platform.h:
1099
1100 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
1101
1102         Reviewed by Sam Weinig.
1103
1104         https://bugs.webkit.org/show_bug.cgi?id=16777
1105         Eliminate JSC::NaN and JSC::Inf
1106
1107         There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants.
1108         The ones in std::numeric_limits are perfectly good.
1109         Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite.
1110
1111         * API/JSCallbackObjectFunctions.h:
1112         (JSC::::toNumber):
1113         * API/JSValueRef.cpp:
1114         (JSValueMakeNumber):
1115         (JSValueToNumber):
1116         * JavaScriptCore.exp:
1117         * runtime/CachedTranscendentalFunction.h:
1118         (JSC::CachedTranscendentalFunction::initialize):
1119         * runtime/DateConstructor.cpp:
1120         (JSC::constructDate):
1121         * runtime/DateInstanceCache.h:
1122         (JSC::DateInstanceData::DateInstanceData):
1123         (JSC::DateInstanceCache::reset):
1124         * runtime/JSCell.cpp:
1125         * runtime/JSCell.h:
1126         (JSC::JSCell::JSValue::getPrimitiveNumber):
1127         (JSC::JSCell::JSValue::toNumber):
1128         * runtime/JSGlobalData.cpp:
1129         (JSC::JSGlobalData::JSGlobalData):
1130         (JSC::JSGlobalData::resetDateCache):
1131         * runtime/JSGlobalObject.cpp:
1132         (JSC::JSGlobalObject::reset):
1133         * runtime/JSGlobalObjectFunctions.cpp:
1134         (JSC::globalFuncParseInt):
1135         (JSC::globalFuncIsFinite):
1136         * runtime/JSNotAnObject.cpp:
1137         (JSC::JSNotAnObject::toNumber):
1138         * runtime/JSValue.cpp:
1139         * runtime/JSValue.h:
1140         * runtime/JSValueInlineMethods.h:
1141         (JSC::jsNaN):
1142         * runtime/MathObject.cpp:
1143         (JSC::mathProtoFuncMax):
1144         (JSC::mathProtoFuncMin):
1145         * runtime/NumberConstructor.cpp:
1146         (JSC::numberConstructorNegInfinity):
1147         (JSC::numberConstructorPosInfinity):
1148         * runtime/NumberPrototype.cpp:
1149         (JSC::numberProtoFuncToExponential):
1150         (JSC::numberProtoFuncToFixed):
1151         (JSC::numberProtoFuncToPrecision):
1152         (JSC::numberProtoFuncToString):
1153         * runtime/UString.cpp:
1154         * wtf/DecimalNumber.h:
1155         (WTF::DecimalNumber::DecimalNumber):
1156         * wtf/dtoa.cpp:
1157         (WTF::dtoa):
1158
1159 2011-06-10  Tony Chang  <tony@chromium.org>
1160
1161         Reviewed by Ojan Vafai.
1162
1163         add a compile guard ENABLE(FLEXBOX)
1164         https://bugs.webkit.org/show_bug.cgi?id=62049
1165
1166         * Configurations/FeatureDefines.xcconfig:
1167
1168 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
1169
1170         Reviewed by Sam Weinig.
1171
1172         https://bugs.webkit.org/show_bug.cgi?id=55347
1173         "name" and "message" enumerable on *Error.prototype
1174
1175         This arises from chapter 15 of the spec:
1176             "Every other property described in this clause has the attributes
1177             { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
1178             unless otherwise specified."
1179         Standardized properties are not enumerable.
1180
1181         * runtime/ErrorInstance.cpp:
1182         (JSC::ErrorInstance::ErrorInstance):
1183         * runtime/NativeErrorPrototype.cpp:
1184         (JSC::NativeErrorPrototype::NativeErrorPrototype):
1185
1186 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1187
1188         Build fix: Corrected header spelling.
1189
1190         * heap/OldSpace.h:
1191
1192 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1193
1194         Reviewed by Oliver Hunt.
1195
1196         Added OldSpace to the project
1197         https://bugs.webkit.org/show_bug.cgi?id=62417
1198         
1199         Currently unused.
1200         
1201         Added OldSpace, the ability to iterate NewSpace vs OldSpace, and a
1202         per-block flag for testing whether you're in NewSpace vs OldSpace.
1203
1204         * CMakeLists.txt:
1205         * GNUmakefile.list.am:
1206         * JavaScriptCore.gypi:
1207         * JavaScriptCore.pro:
1208         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1209         * JavaScriptCore.xcodeproj/project.pbxproj: Build!
1210
1211         * heap/MarkedBlock.cpp:
1212         (JSC::MarkedBlock::MarkedBlock):
1213         * heap/MarkedBlock.h:
1214         (JSC::MarkedBlock::inNewSpace):
1215         (JSC::MarkedBlock::setInNewSpace): Added inNewSpace flag, for use in
1216         write barrier.
1217
1218         * heap/NewSpace.cpp:
1219         (JSC::NewSpace::addBlock):
1220         (JSC::NewSpace::removeBlock):
1221         * heap/NewSpace.h:
1222         (JSC::NewSpace::forEachBlock): Added forEachBlock, to use for
1223         NewSpace-specific operations.
1224
1225         * heap/OldSpace.cpp: Added.
1226         (JSC::OldSpace::OldSpace):
1227         (JSC::OldSpace::addBlock):
1228         (JSC::OldSpace::removeBlock):
1229         * heap/OldSpace.h: Added.
1230         (JSC::OldSpace::forEachBlock): New class for holding promoted blocks.
1231         Not in use yet.
1232
1233 2011-06-09  Hyowon Kim  <hw1008.kim@samsung.com>
1234
1235         Reviewed by Antonio Gomes.
1236
1237         [EFL] Make accelerated compositing build in Webkit-EFL
1238         https://bugs.webkit.org/show_bug.cgi?id=62361
1239
1240         Add PLATFORM(EFL) to enable ACCELERATED_COMPOSITING on EFL port.
1241
1242         * wtf/Platform.h:
1243
1244 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
1245
1246         Reviewed by Geoff Garen.
1247
1248         Bug 62405 - Fix integer overflow in Array.prototype.push
1249
1250         Fix geoff's review comments re static_cast.
1251
1252         * runtime/ArrayPrototype.cpp:
1253         (JSC::arrayProtoFuncPush):
1254
1255 2011-06-09  Geoffrey Garen  <ggaren@apple.com>
1256
1257         Reviewed by Oliver Hunt.
1258
1259         Factored MarkedBlock set management into a helper class with a fast case Bloom filter
1260         https://bugs.webkit.org/show_bug.cgi?id=62413
1261         
1262         SunSpider reports a small speedup.
1263         
1264         This is in preparation for having ConservativeSet operate on arbitrary
1265         sets of MarkedBlocks, and in preparation for conservative scanning
1266         becoming proportionally more important than other GC activities.
1267
1268         * GNUmakefile.list.am:
1269         * JavaScriptCore.gypi:
1270         * JavaScriptCore.xcodeproj/project.pbxproj: Build-o.
1271
1272         * heap/ConservativeRoots.cpp:
1273         (JSC::ConservativeRoots::add):
1274         * heap/ConservativeRoots.h:
1275         (JSC::ConservativeRoots::ConservativeRoots): Operate on a MarkedBlockSet
1276         directly, instead of a Heap, so we can operate on subsets of the Heap
1277         instead.
1278         
1279         Use a TinyBloomFilter for single-cycle exclusion of most pointers. This
1280         is particularly important since we expect not to find our subject pointer
1281         in the MarkedBlock hash, and hash misses are more expensive than typical
1282         hash lookups because they have high collision rates.
1283         
1284         No need for single-pointer add() to be public anymore, since nobody uses it.
1285
1286         * heap/Heap.cpp:
1287         (JSC::Heap::markRoots):
1288         * heap/Heap.h:
1289         (JSC::Heap::forEachCell):
1290         (JSC::Heap::forEachBlock): Use MarkedBlockSet since that's what
1291         ConservativeRoots relies on.
1292         
1293         Nixed contains(), since nobody uses it anymore.
1294
1295         * heap/MarkedBlock.h:
1296         (WTF::MarkedBlockHash::hash): Added a faster hash taking advantage of
1297         the VM layout properties of MarkedBlocks.
1298
1299         * heap/MarkedBlockSet.h: Added.
1300         (JSC::MarkedBlockSet::add):
1301         (JSC::MarkedBlockSet::remove):
1302         (JSC::MarkedBlockSet::recomputeFilter):
1303         (JSC::MarkedBlockSet::filter):
1304         (JSC::MarkedBlockSet::set):
1305         * heap/TinyBloomFilter.h: Added.
1306         (JSC::TinyBloomFilter::TinyBloomFilter):
1307         (JSC::TinyBloomFilter::add):
1308         (JSC::TinyBloomFilter::ruleOut): New helper class, used above.
1309
1310         * interpreter/RegisterFile.cpp:
1311         (JSC::RegisterFile::gatherConservativeRoots): No need to specifically
1312         exclude values by tag -- the tiny bloom filter is already a register-register
1313         compare, so adding another "rule out" factor just slows things down.
1314
1315 2011-06-09  Gavin Barraclough  <barraclough@apple.com>
1316
1317         Reviewed by Oliver Hunt.
1318
1319         Bug 62405 - Fix integer overflow in Array.prototype.push
1320
1321         There are three integer overflows here, leading to safe (not a security risk)
1322         but incorrect (non-spec-compliant) behaviour.
1323
1324         Two overflows occur when calculating the new length after pushing (one in the
1325         fast version of push in JSArray, one in the generic version in ArrayPrototype).
1326         The other occurs calculating indices to write to when multiple items are pushed.
1327
1328         These errors result in three test-262 failures.
1329
1330         * runtime/ArrayPrototype.cpp:
1331         (JSC::arrayProtoFuncPush):
1332         * runtime/JSArray.cpp:
1333         (JSC::JSArray::put):
1334         (JSC::JSArray::push):
1335
1336 2011-06-09  Dan Bernstein  <mitz@apple.com>
1337
1338         Reviewed by Anders Carlsson.
1339
1340         Add Vector::reverse()
1341         https://bugs.webkit.org/show_bug.cgi?id=62393
1342
1343         * wtf/Vector.h:
1344         (WTF::Vector::reverse): Added
1345
1346 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1347
1348         Reviewed by Oliver Hunt.
1349
1350         Factored a bunch of Heap functionality into stand-alone functors
1351         https://bugs.webkit.org/show_bug.cgi?id=62337
1352         
1353         This is in preparation for making these functors operate on arbitrary
1354         sets of MarkedBlocks.
1355
1356         * JavaScriptCore.exp: This file is a small tragedy.
1357
1358         * debugger/Debugger.cpp:
1359         (JSC::Debugger::recompileAllJSFunctions): Updated for type change and rename.
1360
1361         * heap/HandleHeap.h:
1362         (JSC::HandleHeap::forEachStrongHandle): New function for iterating all
1363         strong handles, so we can play along in the functor game.
1364
1365         * heap/Heap.cpp:
1366         (JSC::CountFunctor::CountFunctor::CountFunctor):
1367         (JSC::CountFunctor::CountFunctor::count):
1368         (JSC::CountFunctor::CountFunctor::returnValue):
1369         (JSC::CountFunctor::ClearMarks::operator()):
1370         (JSC::CountFunctor::ResetAllocator::operator()):
1371         (JSC::CountFunctor::Sweep::operator()):
1372         (JSC::CountFunctor::MarkCount::operator()):
1373         (JSC::CountFunctor::Size::operator()):
1374         (JSC::CountFunctor::Capacity::operator()):
1375         (JSC::CountFunctor::Count::operator()):
1376         (JSC::CountFunctor::CountIfGlobalObject::operator()):
1377         (JSC::CountFunctor::TakeIfEmpty::TakeIfEmpty):
1378         (JSC::CountFunctor::TakeIfEmpty::operator()):
1379         (JSC::CountFunctor::TakeIfEmpty::returnValue):
1380         (JSC::CountFunctor::RecordType::RecordType):
1381         (JSC::CountFunctor::RecordType::typeName):
1382         (JSC::CountFunctor::RecordType::operator()):
1383         (JSC::CountFunctor::RecordType::returnValue): These functors factor out
1384         behavior that used to be in the functions below.
1385
1386         (JSC::Heap::clearMarks):
1387         (JSC::Heap::sweep):
1388         (JSC::Heap::objectCount):
1389         (JSC::Heap::size):
1390         (JSC::Heap::capacity):
1391         (JSC::Heap::protectedGlobalObjectCount):
1392         (JSC::Heap::protectedObjectCount):
1393         (JSC::Heap::protectedObjectTypeCounts):
1394         (JSC::Heap::objectTypeCounts):
1395         (JSC::Heap::resetAllocator):
1396         (JSC::Heap::freeBlocks):
1397         (JSC::Heap::shrink): Factored out behavior into the functors above.
1398
1399         * heap/Heap.h:
1400         (JSC::Heap::forEachProtectedCell):
1401         (JSC::Heap::forEachCell):
1402         (JSC::Heap::forEachBlock): Added forEach* iteration templates. I chose
1403         functor-based templates instead of plain iterators because they're simpler
1404         to implement in this case and they require a lot less code at the call site.
1405
1406         * heap/MarkedBlock.h:
1407         (JSC::MarkedBlock::VoidFunctor::returnValue): Default parent class for
1408         trivial functors.
1409
1410         (JSC::MarkedBlock::forEachCell): Renamed forEach to forEachCell because
1411         we have a few different kind of "for each" now.
1412
1413         * runtime/JSGlobalData.cpp:
1414         (WTF::Recompile::operator()):
1415         (JSC::JSGlobalData::JSGlobalData):
1416         (JSC::JSGlobalData::recompileAllJSFunctions): Updated for type change and rename.
1417
1418         * runtime/JSGlobalData.h: Removed globalObjectCount because it was unused.
1419
1420 2011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
1421
1422         Reviewed by Pavel Feldman.
1423
1424         Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
1425         https://bugs.webkit.org/show_bug.cgi?id=52791
1426
1427         No new tests. The problem can be reproduced by trying to create InspectorValue
1428         from 1.0e-100 and call ->toJSONString() on this.
1429
1430         * JavaScriptCore.exp:
1431         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1432         export 2 functions DecimalNumber::bufferLengthForStringExponential and
1433         DecimalNumber::toStringExponential.
1434
1435 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1436
1437         Unreviewed, rolling out r88404.
1438         http://trac.webkit.org/changeset/88404
1439         https://bugs.webkit.org/show_bug.cgi?id=62342
1440
1441         broke win and mac build (Requested by tony^work on #webkit).
1442
1443         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1444
1445 2011-06-08  Evan Martin  <evan@chromium.org>
1446
1447         Reviewed by Adam Barth.
1448
1449         [chromium] use gyp 'settings' type for settings target
1450         https://bugs.webkit.org/show_bug.cgi?id=62323
1451
1452         The 'settings' gyp target type is for targets that exist solely
1453         for their settings (no build rules).  The comment above this target
1454         says it's for this, but it incorrectly uses 'none'.
1455
1456         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1457
1458 2011-06-08  Sailesh Agrawal  <sail@chromium.org>
1459
1460         Reviewed by Mihai Parparita.
1461
1462         Chromium Mac: Enable overlay scrollbars
1463         https://bugs.webkit.org/show_bug.cgi?id=59756
1464
1465         Enable WTF_USE_WK_SCROLLBAR_PAINTER for Chromium Mac. This allows us to use overlay scrollbars on future versions of Mac OS X.
1466
1467         * wtf/Platform.h:
1468
1469 2011-06-08  Oliver Hunt  <oliver@apple.com>
1470
1471         Reviewed by Geoffrey Garen.
1472
1473         Add faster lookup cache for multi character identifiers
1474         https://bugs.webkit.org/show_bug.cgi?id=62327
1475
1476         Add a non-hash lookup for mutiple character identifiers.  This saves us from
1477         adding repeated identifiers to the ParserArena's identifier list as people
1478         tend to not start all their variables and properties with the same character
1479         and happily identifier locality works in our favour.
1480
1481         * parser/ParserArena.h:
1482         (JSC::IdentifierArena::isEmpty):
1483         (JSC::IdentifierArena::clear):
1484         (JSC::IdentifierArena::makeIdentifier):
1485
1486 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1487
1488         Reviewed by Oliver Hunt.
1489
1490         Took some responsibilities away from NewSpace
1491         https://bugs.webkit.org/show_bug.cgi?id=62325
1492         
1493         NewSpace is basically just an allocator now.
1494         
1495         Heap acts as a controller, responsible for managing the set of all
1496         MarkedBlocks.
1497         
1498         This is in preparation for moving parts of the controller logic into
1499         separate helper classes that can act on arbitrary sets of MarkedBlocks
1500         that may or may not be in NewSpace.
1501
1502         * heap/Heap.cpp:
1503         (JSC::Heap::Heap):
1504         (JSC::Heap::destroy):
1505         (JSC::Heap::allocate):
1506         (JSC::Heap::markRoots):
1507         (JSC::Heap::clearMarks):
1508         (JSC::Heap::sweep):
1509         (JSC::Heap::objectCount):
1510         (JSC::Heap::size):
1511         (JSC::Heap::capacity):
1512         (JSC::Heap::collect):
1513         (JSC::Heap::resetAllocator):
1514         (JSC::Heap::allocateBlock):
1515         (JSC::Heap::freeBlocks):
1516         (JSC::Heap::shrink): Moved the set of MarkedBlocks from NewSpace to Heap,
1517         along with all functions that operate on the set of MarkedBlocks. Also
1518         moved responsibility for deciding whether to allocate a new MarkedBlock,
1519         and for allocating it.
1520
1521         * heap/Heap.h:
1522         (JSC::Heap::contains):
1523         (JSC::Heap::forEach): Ditto.
1524
1525         * heap/NewSpace.cpp:
1526         (JSC::NewSpace::addBlock):
1527         (JSC::NewSpace::removeBlock):
1528         (JSC::NewSpace::resetAllocator):
1529         * heap/NewSpace.h:
1530         (JSC::NewSpace::waterMark):
1531         (JSC::NewSpace::allocate): Ditto.
1532
1533 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1534
1535         Reviewed by Oliver Hunt.
1536
1537         Some more MarkedSpace => NewSpace renaming
1538         https://bugs.webkit.org/show_bug.cgi?id=62305
1539
1540         * JavaScriptCore.exp:
1541         * JavaScriptCore.order:
1542         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1543         * heap/Heap.cpp:
1544         (JSC::Heap::Heap):
1545         (JSC::Heap::destroy):
1546         (JSC::Heap::reportExtraMemoryCostSlowCase):
1547         (JSC::Heap::allocate):
1548         (JSC::Heap::markRoots):
1549         (JSC::Heap::objectCount):
1550         (JSC::Heap::size):
1551         (JSC::Heap::capacity):
1552         (JSC::Heap::collect):
1553         (JSC::Heap::isValidAllocation):
1554         * heap/Heap.h:
1555         (JSC::Heap::markedSpace):
1556         (JSC::Heap::contains):
1557         (JSC::Heap::forEach):
1558         (JSC::Heap::allocate):
1559         * runtime/JSCell.h:
1560
1561 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
1562
1563         Reviewed by Eric Seidel.
1564
1565         Add export macros to profiler headers.
1566         https://bugs.webkit.org/show_bug.cgi?id=27551
1567
1568         * profiler/Profiler.h:
1569
1570 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
1571
1572         Reviewed by Eric Seidel.
1573
1574         Add export symbols to parser headers.
1575         https://bugs.webkit.org/show_bug.cgi?id=27551
1576
1577         * parser/SourceProviderCache.h:
1578
1579 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
1580
1581         Reviewed by Eric Seidel.
1582
1583         Add export symbols to interpreter headers.
1584         https://bugs.webkit.org/show_bug.cgi?id=27551
1585
1586         * interpreter/Interpreter.h:
1587
1588 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
1589
1590         Reviewed by Eric Seidel.
1591
1592         Add export symbols to debugger headers.
1593         https://bugs.webkit.org/show_bug.cgi?id=27551
1594
1595         * debugger/Debugger.h:
1596         * debugger/DebuggerCallFrame.h:
1597
1598 2011-06-08  Geoffrey Garen  <ggaren@apple.com>
1599
1600         Reviewed by Darin Adler.
1601
1602         Moved MarkedSpace.* to NewSpace.* in preparation for more renaming
1603         https://bugs.webkit.org/show_bug.cgi?id=62268
1604
1605         * CMakeLists.txt:
1606         * GNUmakefile.list.am:
1607         * JavaScriptCore.gypi:
1608         * JavaScriptCore.pro:
1609         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1610         * JavaScriptCore.xcodeproj/project.pbxproj:
1611         * heap/Heap.h:
1612         * heap/MarkedBlock.h:
1613         * heap/MarkedSpace.cpp: Removed.
1614         * heap/MarkedSpace.h: Removed.
1615         * heap/NewSpace.cpp: Copied from Source/JavaScriptCore/heap/MarkedSpace.cpp.
1616         * heap/NewSpace.h: Copied from Source/JavaScriptCore/heap/MarkedSpace.h.
1617
1618 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1619
1620         Unreviewed, rolling out r88365.
1621         http://trac.webkit.org/changeset/88365
1622         https://bugs.webkit.org/show_bug.cgi?id=62301
1623
1624         windows bots broken (Requested by loislo_ on #webkit).
1625
1626         * JavaScriptCore.exp:
1627
1628 2011-06-08  Ryan Sleevi  <rsleevi@chromium.org>
1629
1630         Reviewed by Tony Chang.
1631
1632         Suppress C++0x compat warnings when compiling Chromium port with GCC 4.6
1633
1634         Compiling Chromium port under GCC 4.6 produces warnings about nullptr
1635         https://bugs.webkit.org/show_bug.cgi?id=62242
1636
1637         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1638
1639 2011-06-08  Ademar de Souza Reis Jr.  <ademar.reis@openbossa.org>
1640
1641         Reviewed by Andreas Kling.
1642
1643         Webkit on SPARC Solaris has wrong endian
1644         https://bugs.webkit.org/show_bug.cgi?id=29407
1645
1646         Bug 57256 fixed one crash on misaligned reads on sparc/solaris, but
1647         there are more ocurrences of the same code pattern in webkit.
1648
1649         This patch includes the check on these other parts of the code.
1650
1651         This is a speculative fix, I don't have a sparc machine to test and
1652         don't know which kind of test would trigger a crash (but it's quite
1653         obvious that it's the same code duplicated in different files).
1654
1655         * runtime/UString.h:
1656         (JSC::UStringHash::equal):
1657         * wtf/text/StringHash.h:
1658         (WTF::StringHash::equal):
1659
1660 2011-06-08  Yael Aharon  <yael.aharon@nokia.com>
1661
1662         Reviewed by Andreas Kling.
1663
1664         [Qt] Build fix for building QtWebKit inside of Qt.
1665         https://bugs.webkit.org/show_bug.cgi?id=62280
1666
1667         Remove CONFIG=staticlib, because it causes the configure script to add -ljavascriptcore
1668         into QtWebKit.prl.
1669
1670         No new tests, as this is just a build fix.
1671
1672         * JavaScriptCore.pri:
1673
1674 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
1675
1676         Reviewed by Oliver Hunt.
1677
1678         Split 'reset' into 'collect' and 'resetAllocator'
1679         https://bugs.webkit.org/show_bug.cgi?id=62267
1680
1681         * heap/Heap.cpp:
1682         (JSC::Heap::allocate):
1683         (JSC::Heap::collectAllGarbage):
1684         (JSC::Heap::collect):
1685         * heap/Heap.h:
1686         * heap/MarkedBlock.h:
1687         (JSC::MarkedBlock::resetAllocator):
1688         * heap/MarkedSpace.cpp:
1689         (JSC::MarkedSpace::resetAllocator):
1690         * heap/MarkedSpace.h:
1691         (JSC::MarkedSpace::SizeClass::resetAllocator):
1692
1693 2011-06-07  Geoffrey Garen  <ggaren@apple.com>
1694
1695         Reviewed by Sam Weinig.
1696
1697         Renamed some more marks to visits
1698         https://bugs.webkit.org/show_bug.cgi?id=62254
1699
1700         * heap/HandleHeap.cpp:
1701         (JSC::HandleHeap::visitStrongHandles):
1702         (JSC::HandleHeap::visitWeakHandles):
1703         * heap/HandleHeap.h:
1704         * heap/HandleStack.cpp:
1705         (JSC::HandleStack::visit):
1706         * heap/HandleStack.h:
1707         * heap/Heap.cpp:
1708         (JSC::Heap::markProtectedObjects):
1709         (JSC::Heap::markTempSortVectors):
1710         (JSC::Heap::markRoots):
1711         * heap/HeapRootVisitor.h:
1712         (JSC::HeapRootVisitor::visit):
1713         * runtime/ArgList.cpp:
1714         (JSC::MarkedArgumentBuffer::markLists):
1715
1716 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
1717
1718         Reviewed by Sam Weinig
1719
1720         https://bugs.webkit.org/show_bug.cgi?id=55537
1721         Functions claim to have 'callee' which they actually don't (and shouldn't)
1722
1723         * JavaScriptCore.xcodeproj/project.pbxproj:
1724         * runtime/JSFunction.cpp:
1725         (JSC::JSFunction::getOwnPropertyNames):
1726
1727 2011-06-07  Juan C. Montemayor  <jmont@apple.com>
1728
1729         Reviewed by Darin Adler.
1730
1731         Make JSStaticFunction and JSStaticValue less "const"
1732         https://bugs.webkit.org/show_bug.cgi?id=62222
1733
1734         * API/JSObjectRef.h:
1735         * API/tests/testapi.c:
1736         (checkConstnessInJSObjectNames):
1737         (main):
1738         * JavaScriptCore.xcodeproj/project.pbxproj:
1739
1740 2011-06-07  Gavin Barraclough  <barraclough@apple.com>
1741
1742         Reviewed by Sam Weinig.
1743
1744         https://bugs.webkit.org/show_bug.cgi?id=62240
1745         DFG JIT - add support for for-loop array initialization.
1746
1747         Support put by val beyond vector length.
1748         Add a operationPutByValBeyondArrayBounds operation, make
1749         PutValVal call this if the vector length check fails.
1750
1751         * dfg/DFGJITCodeGenerator.h:
1752         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
1753         (JSC::DFG::JITCodeGenerator::silentFillGPR):
1754         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
1755         (JSC::DFG::JITCodeGenerator::isDoubleConstantWithInt32Value):
1756         (JSC::DFG::JITCodeGenerator::isJSConstantWithInt32Value):
1757         (JSC::DFG::JITCodeGenerator::isIntegerConstant):
1758         (JSC::DFG::JITCodeGenerator::valueOfIntegerConstant):
1759         * dfg/DFGOperations.cpp:
1760         (JSC::DFG::operationPutByValInternal):
1761         * dfg/DFGOperations.h:
1762         * dfg/DFGSpeculativeJIT.cpp:
1763         (JSC::DFG::SpeculativeJIT::compile):
1764         * dfg/DFGSpeculativeJIT.h:
1765
1766 2011-06-06  James Simonsen  <simonjam@chromium.org>
1767
1768         Reviewed by James Robinson.
1769
1770         Add monotonicallyIncreasingTime() to get monotonically increasing time
1771         https://bugs.webkit.org/show_bug.cgi?id=37743
1772
1773         * wtf/CurrentTime.cpp: Add monotonicallyIncreasingTime() for mac and a fallback implementation that just wraps currentTime().
1774         (WTF::monotonicallyIncreasingTime):
1775         * wtf/CurrentTime.h: Add monotonicallyIncreasingTime().
1776
1777 2011-06-06  Alexandru Chiculita  <achicu@adobe.com>
1778
1779         Reviewed by Kent Tamura.
1780
1781         Add ENABLE_CSS_EXCLUSIONS support for build-webkit script
1782         https://bugs.webkit.org/show_bug.cgi?id=61628
1783
1784         * Configurations/FeatureDefines.xcconfig:
1785
1786 2011-06-06  Mihnea Ovidenie  <mihnea@adobe.com>
1787
1788         Reviewed by Kent Tamura.
1789
1790         Add ENABLE(CSS_REGIONS) guard for CSS Regions support
1791         https://bugs.webkit.org/show_bug.cgi?id=61631
1792
1793         * Configurations/FeatureDefines.xcconfig:
1794
1795 2011-06-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1796
1797         Unreviewed. Fix the GTK+ build.
1798
1799         * GNUmakefile.am: Add javascriptcore_cflags variable.
1800
1801 2011-06-04  Kevin Ollivier  <kevino@theolliviers.com>
1802
1803         [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures
1804         to build on Mac.
1805
1806         * wtf/Platform.h:
1807
1808 2011-06-04  Gustavo Noronha Silva  <gns@gnome.org>
1809
1810         Unreviewed, MIPS build fix.
1811
1812         WebKitGTK+ tarball fails to build on MIPS.
1813         https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
1814
1815         * GNUmakefile.list.am: Add missing MIPS-related file to the list
1816         of files that are added to the tarball on make dist, and fix
1817         sorting.
1818
1819 2011-06-04  Sam Weinig  <sam@webkit.org>
1820
1821         Reviewed by Darin Adler.
1822
1823         Fix formatting of the output generated by KeywordLookupGenerator.py
1824         https://bugs.webkit.org/show_bug.cgi?id=62083
1825
1826         - Uses correct year for copyright.
1827         - Puts ending brace on same line as "else if"
1828         - Puts starting brace of function on its own line.
1829         - Adds some tasteful whitespace.
1830         - Adds comments to make clear that scopes are ending
1831         - Make macros actually split on two lines.
1832
1833         * KeywordLookupGenerator.py:
1834
1835 2011-06-04  Adam Barth  <abarth@webkit.org>
1836
1837         Reviewed by Eric Seidel.
1838
1839         KeywordLookupGenerator.py spams stdout in Chromium Linux build
1840         https://bugs.webkit.org/show_bug.cgi?id=62087
1841
1842         This action does not appear to be needed.
1843
1844         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1845
1846 2011-06-03  Oliver Hunt  <oliver@apple.com>
1847
1848         Reviewed by Maciej Stachowiak.
1849
1850         Lexer needs to provide Identifier for reserved words
1851         https://bugs.webkit.org/show_bug.cgi?id=62086
1852
1853         Alas it is necessary to provide an Identifier reference for keywords
1854         so that we can do the right thing when they're used in object literals.
1855         We now keep Identifiers for all reserved words in the CommonIdentifiers
1856         structure so that we can access them without a hash lookup.
1857
1858         * KeywordLookupGenerator.py:
1859         * parser/Lexer.cpp:
1860         (JSC::Lexer::parseIdentifier):
1861         * parser/Lexer.h:
1862         * runtime/CommonIdentifiers.cpp:
1863         (JSC::CommonIdentifiers::CommonIdentifiers):
1864         * runtime/CommonIdentifiers.h:
1865
1866 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
1867
1868         Reviewed by Sam Weinig.
1869
1870         Add debug code to break on speculation failures.
1871
1872         * dfg/DFGJITCompiler.cpp:
1873         (JSC::DFG::JITCompiler::jumpFromSpeculativeToNonSpeculative):
1874         (JSC::DFG::JITCompiler::compileFunction):
1875         * dfg/DFGNode.h:
1876
1877 2011-06-03  Gavin Barraclough  <barraclough@apple.com>
1878
1879         Reviewed by Sam Weinig.
1880
1881         https://bugs.webkit.org/show_bug.cgi?id=62082
1882         DFG JIT - bug passing arguments that need swap
1883
1884         This is really just a typo.
1885         When setting up the arguments for a call out to a C operation, we'll
1886         fail to swap arguments where this is necessary. For example, in the
1887         case of 2 arg calls, where the first argument is in %rdx & the second
1888         is in %rsi we should swap (exec will be passed in %rdi), but we don't.
1889
1890         This can also affect function calls passing three arguments.
1891
1892         * dfg/DFGJITCodeGenerator.h:
1893         (JSC::DFG::JITCodeGenerator::setupTwoStubArgs):
1894             - Call swap with the correct arguments.
1895
1896 2011-06-03  Oliver Hunt  <oliver@apple.com>
1897
1898         Reviewed by Gavin Barraclough.
1899
1900         Force inlining of some hot lexer functions
1901         https://bugs.webkit.org/show_bug.cgi?id=62079
1902
1903         Fix more GCC stupidity
1904
1905         * parser/Lexer.h:
1906         (JSC::Lexer::isWhiteSpace):
1907         (JSC::Lexer::isLineTerminator):
1908
1909 2011-06-03  Oliver Hunt  <oliver@apple.com>
1910
1911         Reviewed by Gavin Barraclough.
1912
1913         GCC not inlining some functions that it really should be
1914         https://bugs.webkit.org/show_bug.cgi?id=62075
1915
1916         Add ALWAYS_INLINE to a number of parsing and lexing functions
1917         that should always be inlined.  This gets us ~1.4% on my ad hoc
1918         parser test.
1919
1920         * KeywordLookupGenerator.py:
1921         * parser/JSParser.cpp:
1922         (JSC::JSParser::next):
1923         (JSC::JSParser::nextTokenIsColon):
1924         (JSC::JSParser::consume):
1925         (JSC::JSParser::match):
1926         (JSC::JSParser::tokenStart):
1927         (JSC::JSParser::tokenLine):
1928         (JSC::JSParser::tokenEnd):
1929         * parser/Lexer.cpp:
1930         (JSC::isIdentPart):
1931
1932 2011-06-03  Oliver Hunt  <oliver@apple.com>
1933
1934         Whoops, fix last minute bug.
1935
1936         * parser/Lexer.cpp:
1937         (JSC::Lexer::parseIdentifier):
1938
1939 2011-06-03  Martin Robinson  <mrobinson@igalia.com>
1940
1941         Try to fix the GTK+ build.
1942
1943         * GNUmakefile.am: Clean up some spaces that should be tabs.
1944         * GNUmakefile.list.am: Add KeywordLookup.h to the source list
1945         and clean up some spaces that should be tabs.
1946
1947 2011-06-03  Oliver Hunt  <oliver@apple.com>
1948
1949         Reviewed by Geoffrey Garen.
1950
1951         Improve keyword lookup
1952         https://bugs.webkit.org/show_bug.cgi?id=61913
1953
1954         Rather than doing multiple hash lookups as we currently
1955         do when trying to identify keywords we now use an 
1956         automatically generated decision tree (essentially it's
1957         a hard coded patricia trie).  We still use the regular
1958         lookup table for the last few characters of an input as
1959         this allows us to completely skip all bounds checks.
1960
1961         * CMakeLists.txt:
1962         * DerivedSources.make:
1963         * DerivedSources.pro:
1964         * GNUmakefile.am:
1965         * JavaScriptCore.gyp/JavaScriptCore.gyp:
1966         * JavaScriptCore.xcodeproj/project.pbxproj:
1967         * KeywordLookupGenerator.py: Added.
1968         * make-generated-sources.sh:
1969         * parser/Lexer.cpp:
1970         (JSC::Lexer::internalShift):
1971         (JSC::Lexer::shift):
1972         (JSC::Lexer::parseIdentifier):
1973         * parser/Lexer.h:
1974
1975 2011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
1976
1977         Reviewed by Benjamin Poulain.
1978
1979         [Qt] Build flag for experimental ICU library support
1980         https://bugs.webkit.org/show_bug.cgi?id=60786
1981
1982         Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental 
1983         ICU powered Unicode support. 
1984
1985         * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
1986         * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE). 
1987
1988 2011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
1989
1990         Reviewed by Benjamin Poulain.
1991
1992         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
1993         https://bugs.webkit.org/show_bug.cgi?id=61957
1994
1995         When building inside the Qt source tree, qmake always append the mkspecs
1996         defines after ours. We have to workaround and make sure that we append 
1997         our flags after the qmake variable used inside Qt. This workaround was provided 
1998         by our qmake folks. We need to append in both case because qmake behave differently
1999         when called with -spec or via SUBDIR+=. This patch unbreak r87950 on Mac for Qt port.
2000
2001         * JavaScriptCore.pro:
2002
2003 2011-06-02  Jay Civelli  <jcivelli@chromium.org>
2004
2005         Reviewed by Adam Barth.
2006
2007         Added a method to generate RFC 2822 compliant date strings.
2008         https://bugs.webkit.org/show_bug.cgi?id=7169
2009
2010         * wtf/DateMath.cpp:
2011         (WTF::twoDigitStringFromNumber):
2012         (WTF::makeRFC2822DateString):
2013         * wtf/DateMath.h:
2014
2015 2011-06-02  Alexis Menard  <alexis.menard@openbossa.org>
2016
2017         Reviewed by Andreas Kling.
2018
2019         [Qt] Build fix of QtWebKit 2.2 when inside Qt tree with GCC 4.6.
2020         https://bugs.webkit.org/show_bug.cgi?id=61957
2021
2022         When building inside the Qt source tree, qmake always append the mkspecs
2023         defines after ours. We have to workaround and make sure that we append  
2024         our flags after the qmake variable used inside Qt. This workaround was provided
2025         by our qmake folks.
2026
2027         * JavaScriptCore.pro:
2028
2029 2011-06-01  Oliver Hunt  <oliver@apple.com>
2030
2031         Reviewed by Geoffrey Garen.
2032
2033         Add single character lookup cache to IdentifierArena
2034         https://bugs.webkit.org/show_bug.cgi?id=61879
2035
2036         Add a simple lookup cache for single ascii character
2037         identifiers.  Produces around a 2% improvement in parse
2038         time for my adhoc parser test.
2039
2040         * parser/ParserArena.h:
2041         (JSC::IdentifierArena::IdentifierArena):
2042         (JSC::IdentifierArena::clear):
2043         (JSC::IdentifierArena::makeIdentifier):
2044
2045 2011-05-31  Oliver Hunt  <oliver@apple.com>
2046
2047         Reviewed by Geoffrey Garen.
2048
2049         Freezing a function and its prototype causes browser to crash.
2050         https://bugs.webkit.org/show_bug.cgi?id=61758
2051
2052         Make JSObject::preventExtensions virtual so that we can override it
2053         and instantiate all lazy
2054
2055         * JavaScriptCore.exp:
2056         * runtime/JSFunction.cpp:
2057         (JSC::createPrototypeProperty):
2058         (JSC::JSFunction::preventExtensions):
2059         (JSC::JSFunction::getOwnPropertySlot):
2060         * runtime/JSFunction.h:
2061         * runtime/JSObject.h:
2062         * runtime/JSObject.cpp:
2063         (JSC::JSObject::seal):
2064         (JSC::JSObject::seal):
2065
2066 2011-06-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2067
2068         Unreviewed, rolling out r87788.
2069         http://trac.webkit.org/changeset/87788
2070         https://bugs.webkit.org/show_bug.cgi?id=61856
2071
2072         breaks windows chromium canary (Requested by jknotten on
2073         #webkit).
2074
2075         * wtf/DateMath.cpp:
2076         (WTF::timeClip):
2077         * wtf/DateMath.h:
2078
2079 2011-06-01  Jay Civelli  <jcivelli@chromium.org>
2080
2081         Reviewed by Adam Barth.
2082
2083         Added a method to generate RFC 2822 compliant date strings.
2084         https://bugs.webkit.org/show_bug.cgi?id=7169
2085
2086         * wtf/DateMath.cpp:
2087         (WTF::twoDigitStringFromNumber):
2088         (WTF::makeRFC2822DateString):
2089         * wtf/DateMath.h:
2090
2091 2011-05-31  Yong Li  <yoli@rim.com>
2092
2093         Reviewed by Eric Seidel.
2094
2095         https://bugs.webkit.org/show_bug.cgi?id=54807
2096         We have been assuming plain bitfields (like "int a : 31") are always signed integers.
2097         However some compilers can treat them as unsigned. For example, RVCT 4.0 states plain
2098         bitfields (declared without either signed or unsigned qualifiers) are treats as unsigned.
2099         http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0348c/Babjddhe.html
2100         Although we can use "--signed-bitfields" flag to make RVCT 4.0 behave as most other compilers,
2101         always using "signed"/"unsigned" qualifier to declare integral type bitfields is still a good
2102         rule we should have in order to make our code independent from compilers and compiler flags.
2103
2104         No new test added because this change is not known to fix any issue.
2105
2106         * bytecode/StructureStubInfo.h:
2107
2108 2011-05-30  Hojong Han  <hojong.han@samsung.com>
2109
2110         Reviewed by Geoffrey Garen.
2111
2112         [JSC] malfunction during arithmetic condition check with negative number (-2147483648)
2113         https://bugs.webkit.org/show_bug.cgi?id=61416
2114
2115         * assembler/MacroAssemblerARM.h:
2116         (JSC::MacroAssemblerARM::branch32):
2117         * tests/mozilla/ecma/Expressions/11.12-1.js:
2118         (getTestCases):
2119
2120 2011-05-29  Geoffrey Garen  <ggaren@apple.com>
2121
2122         Reviewed by Sam Weinig.
2123
2124         Some heap refactoring
2125         https://bugs.webkit.org/show_bug.cgi?id=61704
2126         
2127         SunSpider says no change.
2128
2129         * JavaScriptCore.exp: Export!
2130
2131         * heap/Heap.cpp: COLLECT_ON_EVERY_ALLOCATION can actually do so now.
2132
2133         (JSC::Heap::Heap): Changed Heap sub-objects to point to the heap.
2134
2135         (JSC::Heap::allocate): Changed inline allocation code to only select the
2136         size class, since this can be optimized out at compile time -- everything
2137         else is now inlined into this out-of-line function.
2138         
2139         No need to duplicate ASSERTs made in our caller.
2140
2141         * heap/Heap.h:
2142         (JSC::Heap::heap):
2143         (JSC::Heap::isMarked):
2144         (JSC::Heap::testAndSetMarked):
2145         (JSC::Heap::testAndClearMarked):
2146         (JSC::Heap::setMarked): Call directly into MarkedBlock instead of adding
2147         a layer of indirection through MarkedSpace.
2148
2149         (JSC::Heap::allocate): See above.
2150
2151         * heap/MarkedBlock.cpp:
2152         (JSC::MarkedBlock::create):
2153         (JSC::MarkedBlock::MarkedBlock):
2154         * heap/MarkedBlock.h: Changed Heap sub-objects to point to the heap.
2155
2156         * heap/MarkedSpace.cpp:
2157         (JSC::MarkedSpace::MarkedSpace):
2158         (JSC::MarkedSpace::allocateBlock):
2159         * heap/MarkedSpace.h:
2160         (JSC::MarkedSpace::allocate): Updated to match changes above.
2161
2162 2011-05-28  David Kilzer  <ddkilzer@apple.com>
2163
2164         BUILD FIX when building only the interpreter
2165
2166         Fixes the following compiler warning:
2167
2168             JavaScriptCore/runtime/JSGlobalData.cpp:462:6: error: no previous prototype for function 'releaseExecutableMemory' [-Werror,-Wmissing-prototypes,3]
2169              void releaseExecutableMemory(JSGlobalData& globalData)
2170                   ^
2171
2172         * jit/ExecutableAllocator.h: Moved declaration of
2173         JSC::releaseExecutableMemory().
2174
2175 2011-05-28  David Kilzer  <ddkilzer@apple.com>
2176
2177         BUILD FIX after r87527 with ENABLE(BRANCH_COMPACTION)
2178
2179         * assembler/LinkBuffer.h:
2180         (JSC::LinkBuffer::linkCode): Added missing argument.
2181
2182 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
2183
2184         Reviewed by Oliver Hunt.
2185
2186         JS API is too aggressive about throwing exceptions for NULL get or set operations
2187         https://bugs.webkit.org/show_bug.cgi?id=61678
2188
2189         * API/JSCallbackObject.h: Changed our staticValueGetter to a regular
2190         function that returns a JSValue, so it can fail and still forward to
2191         normal property lookup.
2192
2193         * API/JSCallbackObjectFunctions.h:
2194         (JSC::::getOwnPropertySlot): Don't throw an exception when failing to
2195         access a static property -- just forward the access. This allows objects
2196         to observe get/set operations but still let the JS object manage lifetime.
2197
2198         (JSC::::put): Ditto.
2199
2200         (JSC::::getStaticValue): Same as JSCallbackObject.h.
2201
2202         * API/tests/testapi.c:
2203         (MyObject_set_nullGetForwardSet):
2204         * API/tests/testapi.js: Updated tests to reflect slightly less strict
2205         behavior, which matches headerdoc claims.
2206
2207 2011-05-27  Geoffrey Garen  <ggaren@apple.com>
2208
2209         Reviewed by Oliver Hunt.
2210
2211         Property caching is too aggressive for API objects
2212         https://bugs.webkit.org/show_bug.cgi?id=61677
2213
2214         * API/JSCallbackObject.h: Opt in to ProhibitsPropertyCaching, since our
2215         callback APIs allow the client to change its mind about our propertis at
2216         any time.
2217
2218         * API/tests/testapi.c:
2219         (PropertyCatchalls_getProperty):
2220         (PropertyCatchalls_setProperty):
2221         (PropertyCatchalls_getPropertyNames):
2222         (PropertyCatchalls_class):
2223         (main):
2224         * API/tests/testapi.js: Some tests for dynamic API objects.
2225
2226         * interpreter/Interpreter.cpp:
2227         (JSC::Interpreter::tryCachePutByID):
2228         (JSC::Interpreter::tryCacheGetByID):
2229         * jit/JITStubs.cpp:
2230         (JSC::JITThunks::tryCachePutByID):
2231         (JSC::JITThunks::tryCacheGetByID):
2232         (JSC::DEFINE_STUB_FUNCTION): Opt out of property caching if the client
2233         requires it.
2234
2235         * runtime/JSTypeInfo.h:
2236         (JSC::TypeInfo::TypeInfo):
2237         (JSC::TypeInfo::isFinal):
2238         (JSC::TypeInfo::prohibitsPropertyCaching):
2239         (JSC::TypeInfo::flags): Added a flag to track opting out of property
2240         caching. Fixed an "&&" vs "&" typo that was previously harmless, but
2241         is now harmful since m_flags2 can have more than one bit set.
2242
2243 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2244
2245         Unreviewed.
2246
2247         Fix a typo in the order_file flag.
2248
2249         * Configurations/Base.xcconfig:
2250
2251 2011-05-27  Patrick Gansterer  <paroga@webkit.org>
2252
2253         Unreviewed. Build fix for !ENABLE(ASSEMBLER) after r87527.
2254
2255         * runtime/JSGlobalData.cpp:
2256         (JSGlobalData::JSGlobalData):
2257
2258 2011-05-27  Oliver Hunt  <oliver@apple.com>
2259
2260         Reviewed by Geoffrey Garen.
2261
2262         Add a few validity assertions to JSCallbackObject
2263         https://bugs.webkit.org/show_bug.cgi?id=61659
2264
2265         * API/JSCallbackObject.h:
2266         (JSC::JSCallbackObject::visitChildren):
2267
2268 2011-05-27  Oliver Hunt  <oliver@apple.com>
2269
2270         Build fix
2271
2272         * runtime/RegExpCache.cpp:
2273         (JSC::RegExpCache::invalidateCode):
2274
2275 2011-05-27  Oliver Hunt  <oliver@apple.com>
2276
2277         Reviewed by Geoffrey Garen.
2278
2279         Try to release unused executable memory when the FixedVMPool allocator is under pressure
2280         https://bugs.webkit.org/show_bug.cgi?id=61651
2281
2282         Rather than crashing when full the FixedVMPool allocator now returns a null
2283         allocation.  We replace the code that used to CRASH() on null allocations
2284         with logic that asks the provided globalData to release any executable memory
2285         that it can.  Currently this just means throwing away all regexp code, but
2286         in future we'll try to be more aggressive.
2287
2288         * assembler/ARMAssembler.cpp:
2289         (JSC::ARMAssembler::executableCopy):
2290         * assembler/ARMAssembler.h:
2291         * assembler/AssemblerBuffer.h:
2292         (JSC::AssemblerBuffer::executableCopy):
2293         * assembler/AssemblerBufferWithConstantPool.h:
2294         * assembler/LinkBuffer.h:
2295         (JSC::LinkBuffer::LinkBuffer):
2296         (JSC::LinkBuffer::linkCode):
2297         * assembler/MIPSAssembler.h:
2298         (JSC::MIPSAssembler::executableCopy):
2299         * assembler/SH4Assembler.h:
2300         (JSC::SH4Assembler::executableCopy):
2301         * assembler/X86Assembler.h:
2302         (JSC::X86Assembler::executableCopy):
2303         (JSC::X86Assembler::X86InstructionFormatter::executableCopy):
2304         * dfg/DFGJITCompiler.cpp:
2305         (JSC::DFG::JITCompiler::compileFunction):
2306         * jit/ExecutableAllocator.h:
2307         (JSC::ExecutablePool::create):
2308         (JSC::ExecutablePool::alloc):
2309         (JSC::ExecutableAllocator::ExecutableAllocator):
2310         (JSC::ExecutableAllocator::poolForSize):
2311         (JSC::ExecutablePool::ExecutablePool):
2312         (JSC::ExecutablePool::poolAllocate):
2313         * jit/ExecutableAllocatorFixedVMPool.cpp:
2314         (JSC::FixedVMPoolAllocator::alloc):
2315         * jit/JIT.cpp:
2316         (JSC::JIT::privateCompile):
2317         * jit/JITOpcodes.cpp:
2318         (JSC::JIT::privateCompileCTIMachineTrampolines):
2319         * jit/JITOpcodes32_64.cpp:
2320         (JSC::JIT::privateCompileCTIMachineTrampolines):
2321         (JSC::JIT::privateCompileCTINativeCall):
2322         * jit/JITPropertyAccess.cpp:
2323         (JSC::JIT::stringGetByValStubGenerator):
2324         (JSC::JIT::privateCompilePutByIdTransition):
2325         (JSC::JIT::privateCompilePatchGetArrayLength):
2326         (JSC::JIT::privateCompileGetByIdProto):
2327         (JSC::JIT::privateCompileGetByIdSelfList):
2328         (JSC::JIT::privateCompileGetByIdProtoList):
2329         (JSC::JIT::privateCompileGetByIdChainList):
2330         (JSC::JIT::privateCompileGetByIdChain):
2331         * jit/JITPropertyAccess32_64.cpp:
2332         (JSC::JIT::stringGetByValStubGenerator):
2333         (JSC::JIT::privateCompilePutByIdTransition):
2334         (JSC::JIT::privateCompilePatchGetArrayLength):
2335         (JSC::JIT::privateCompileGetByIdProto):
2336         (JSC::JIT::privateCompileGetByIdSelfList):
2337         (JSC::JIT::privateCompileGetByIdProtoList):
2338         (JSC::JIT::privateCompileGetByIdChainList):
2339         (JSC::JIT::privateCompileGetByIdChain):
2340         * jit/SpecializedThunkJIT.h:
2341         (JSC::SpecializedThunkJIT::finalize):
2342         * jit/ThunkGenerators.cpp:
2343         (JSC::charCodeAtThunkGenerator):
2344         (JSC::charAtThunkGenerator):
2345         (JSC::fromCharCodeThunkGenerator):
2346         (JSC::sqrtThunkGenerator):
2347         (JSC::powThunkGenerator):
2348         * runtime/JSGlobalData.cpp:
2349         (JSC::JSGlobalData::JSGlobalData):
2350         (JSC::JSGlobalData::releaseExecutableMemory):
2351         (JSC::releaseExecutableMemory):
2352         * runtime/JSGlobalData.h:
2353         * runtime/RegExpCache.cpp:
2354         (JSC::RegExpCache::invalidateCode):
2355         * runtime/RegExpCache.h:
2356         * yarr/YarrJIT.cpp:
2357         (JSC::Yarr::YarrGenerator::compile):
2358
2359 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2360
2361         Reviewed by Oliver Hunt.
2362
2363         Optimized ConservativeSet to avoid double-visiting objects
2364         https://bugs.webkit.org/show_bug.cgi?id=61592
2365         
2366         SunSpider thinks this might be a 1% speedup
2367
2368         * heap/ConservativeRoots.h:
2369         (JSC::ConservativeRoots::add): Use testAndClearMarked to avoid double-visiting
2370         an object.
2371
2372         * heap/Heap.h:
2373         (JSC::Heap::isMarked):
2374         (JSC::Heap::testAndSetMarked):
2375         (JSC::Heap::testAndClearMarked):
2376         (JSC::Heap::setMarked): Added testAndClearMarked. Changed argument type
2377         to void*, since clients want to ask questions about arbitrary pointers
2378         into the heap, even when they aren't known to be JSCells.
2379
2380         * heap/MarkedBlock.h:
2381         (JSC::MarkedBlock::testAndClearMarked):
2382         * heap/MarkedSpace.h:
2383         (JSC::MarkedSpace::isMarked):
2384         (JSC::MarkedSpace::testAndSetMarked):
2385         (JSC::MarkedSpace::testAndClearMarked):
2386         (JSC::MarkedSpace::setMarked):
2387         (JSC::MarkedSpace::contains): Ditto.
2388
2389         * wtf/Bitmap.h:
2390         (WTF::::testAndClear): New function for ConservativeRoots's inverted
2391         marking pass.
2392
2393 2011-05-27  Stephanie Lewis  <slewis@apple.com>
2394
2395         Rubber Stamped by Adam Roben.
2396
2397         Update Order Files.  Use -order_file flag since it can order more of the binary.
2398
2399         * Configurations/Base.xcconfig:
2400         * JavaScriptCore.order:
2401
2402 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2403
2404         Reviewed by Oliver Hunt.
2405
2406         Renamed heapRootMarker to heapRootVisitor to match its class name
2407         https://bugs.webkit.org/show_bug.cgi?id=61584
2408
2409         * heap/Heap.cpp:
2410         (JSC::Heap::markProtectedObjects):
2411         (JSC::Heap::markTempSortVectors):
2412         (JSC::Heap::markRoots):
2413
2414 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2415
2416         Reviewed by Oliver Hunt.
2417
2418         Removed some interdependency between Heap and SmallStrings by simplifying
2419         the SmallStrings lifetime model
2420         https://bugs.webkit.org/show_bug.cgi?id=61579
2421         
2422         SunSpider reports no change.
2423         
2424         Using Weak<T> could accomplish this too, but we're not sure it will give
2425         us the performance we need. This is a first step, and it accomplishes
2426         most of the value of using Weak<T>.
2427
2428         * heap/Heap.cpp:
2429         (JSC::Heap::destroy):
2430         (JSC::Heap::markRoots):
2431         (JSC::Heap::reset): Finalize small strings just like other weak handles.
2432
2433         * runtime/SmallStrings.cpp:
2434         (JSC::finalize):
2435         (JSC::SmallStrings::finalizeSmallStrings):
2436         * runtime/SmallStrings.h: Make all small strings trivially weak, instead
2437         of having an "all for one, one for all" memory model.
2438
2439 2011-05-26  Oliver Hunt  <oliver@apple.com>
2440
2441         Reviewed by Geoffrey Garen.
2442
2443         Make RegExpCache a weak map
2444         https://bugs.webkit.org/show_bug.cgi?id=61554
2445
2446         Switch to a weak map for the regexp cache, and hide that
2447         behaviour behind RegExp::create.
2448
2449         When a RegExp is compiled it attempts to add itself to
2450         the "strong" cache.  This cache is a simple round-robin
2451         buffer as was the old strong cache.  Happily this can
2452         be smaller than the old strong cache as RegExps are only
2453         added when they're compiled so it is under less pressure
2454         to evict.
2455
2456         * bytecompiler/NodesCodegen.cpp:
2457         (JSC::RegExpNode::emitBytecode):
2458         * runtime/RegExp.cpp:
2459         (JSC::RegExp::RegExp):
2460         (JSC::RegExp::create):
2461         (JSC::RegExp::match):
2462         * runtime/RegExp.h:
2463         (JSC::RegExp::gcShouldInvalidateCode):
2464         (JSC::RegExp::hasCode):
2465         (JSC::RegExp::key):
2466         * runtime/RegExpCache.cpp:
2467         (JSC::RegExpCache::lookupOrCreate):
2468         (JSC::RegExpCache::RegExpCache):
2469         (JSC::RegExpCache::isReachableFromOpaqueRoots):
2470         (JSC::RegExpCache::finalize):
2471         * runtime/RegExpCache.h:
2472         * runtime/RegExpConstructor.cpp:
2473         (JSC::constructRegExp):
2474         * runtime/RegExpPrototype.cpp:
2475         (JSC::regExpProtoFuncCompile):
2476         * runtime/StringPrototype.cpp:
2477         (JSC::stringProtoFuncMatch):
2478         (JSC::stringProtoFuncSearch):
2479
2480 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2481
2482         Reviewed by Oliver Hunt.
2483
2484         Moved Heap-related functions out of JSCell.h and into respective header files
2485         https://bugs.webkit.org/show_bug.cgi?id=61567
2486
2487         * heap/Heap.h:
2488         (JSC::Heap::allocate):
2489         (JSC::Heap::heap):
2490         * heap/MarkedBlock.h:
2491         (JSC::MarkedBlock::allocate):
2492         * heap/MarkedSpace.h:
2493         (JSC::MarkedSpace::sizeClassFor):
2494         (JSC::MarkedSpace::allocate):
2495         * runtime/JSCell.h:
2496         (JSC::JSCell::destructor):
2497
2498 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2499
2500         Try to fix Windows build.
2501
2502         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2503
2504 2011-05-26  Ryosuke Niwa  <rniwa@webkit.org>
2505
2506         Reviewed by Eric Seidel.
2507
2508         [debug feature] WTFString should have show() method
2509         https://bugs.webkit.org/show_bug.cgi?id=61149
2510
2511         Added String::show and AtomicString::show in NDEBUG.
2512
2513         * wtf/text/AtomicString.cpp:
2514         (WTF::AtomicString::show):
2515         * wtf/text/AtomicString.h:
2516         * wtf/text/WTFString.cpp:
2517         (String::show):
2518         * wtf/text/WTFString.h:
2519
2520 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2521
2522         Reviewed by Geoffrey Garen.
2523
2524         Factored out some Heap ASSERTs
2525         https://bugs.webkit.org/show_bug.cgi?id=61565
2526
2527         * JavaScriptCore.exp:
2528         * heap/Heap.cpp:
2529         (JSC::isValidSharedInstanceThreadState):
2530         (JSC::isValidThreadState):
2531         (JSC::Heap::markRoots):
2532         (JSC::Heap::isValidAllocation):
2533         * heap/Heap.h:
2534         * runtime/JSCell.h:
2535         (JSC::JSCell::Heap::allocate):
2536
2537 2011-05-26  Gavin Barraclough  <barraclough@apple.com>
2538
2539         Reviewed by Geoff Garen.
2540
2541         https://bugs.webkit.org/show_bug.cgi?id=61508
2542         DFG JIT - Add support for get by id self caching.
2543
2544         Change the call out to be an unexpected call (using silent spill/fill functions),
2545         add a structure check & compact load to the JIT code, and add repatching mechanisms.
2546         Since DFGOperations may want to be be implemented in asm, make these symbols be extern
2547         "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
2548         so that it can look up its StructureStubInfo.
2549
2550         * JavaScriptCore.xcodeproj/project.pbxproj:
2551             - Added new files.
2552         * bytecode/StructureStubInfo.h:
2553             - Added 'unset' entries to union.
2554         * dfg/DFGJITCodeGenerator.h:
2555         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
2556             - Return the call, we need this to populate the StructureStubInfo.
2557         * dfg/DFGJITCompiler.cpp:
2558         (JSC::DFG::JITCompiler::compileFunction):
2559             - Populate the CodebBlock's StructureStubInfo Vector.
2560         * dfg/DFGJITCompiler.h:
2561         (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
2562             - Return the call, we need this to populate the StructureStubInfo.
2563         (JSC::DFG::JITCompiler::addPropertyAccess):
2564         (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
2565             - Add structures to record property access info during compilation.
2566         * dfg/DFGOperations.cpp:
2567             - Made all external methods extern "C".
2568         (JSC::DFG::operationPutByValInternal):
2569             - Moved outside of the extern "C" block.
2570         * dfg/DFGOperations.h:
2571             - Made all external methods extern "C".
2572         * dfg/DFGRepatch.cpp: Added.
2573         (JSC::DFG::dfgRepatchCall):
2574             - repatch a call to link to a new callee function.
2575         (JSC::DFG::dfgRepatchGetByIdSelf):
2576             - Modify the JIT code to optimize self accesses.
2577         (JSC::DFG::tryCacheGetByID):
2578             - Internal implementation of dfgRepatchGetByID (factor out failing cases).
2579         (JSC::DFG::dfgRepatchGetByID):
2580             - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
2581         * dfg/DFGRepatch.h: Added.
2582             - Expose dfgRepatchGetByID.
2583         * dfg/DFGSpeculativeJIT.cpp:
2584         (JSC::DFG::SpeculativeJIT::compile):
2585             - Changed implementation of GetById ops.
2586
2587 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2588
2589         Rolled back in http://trac.webkit.org/changeset/87408 with Windows build fixed.
2590
2591         * heap/MarkedBlock.cpp:
2592         (JSC::MarkedBlock::MarkedBlock):
2593         * heap/MarkedBlock.h:
2594         * wtf/DoublyLinkedList.h:
2595         (WTF::::DoublyLinkedListNode):
2596         (WTF::::setPrev):
2597         (WTF::::setNext):
2598         (WTF::::prev):
2599         (WTF::::next):
2600         (WTF::::DoublyLinkedList):
2601         (WTF::::isEmpty):
2602         (WTF::::size):
2603         (WTF::::clear):
2604         (WTF::::head):
2605         (WTF::::append):
2606         (WTF::::remove):
2607         (WTF::::removeHead):
2608
2609 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2610
2611         Rolled out http://trac.webkit.org/changeset/87408 because it broke the
2612         Windows build.
2613
2614         * heap/MarkedBlock.cpp:
2615         (JSC::MarkedBlock::MarkedBlock):
2616         * heap/MarkedBlock.h:
2617         (JSC::MarkedBlock::setPrev):
2618         (JSC::MarkedBlock::setNext):
2619         (JSC::MarkedBlock::prev):
2620         (JSC::MarkedBlock::next):
2621         * wtf/DoublyLinkedList.h:
2622         (WTF::::DoublyLinkedList):
2623         (WTF::::isEmpty):
2624         (WTF::::head):
2625         (WTF::::append):
2626         (WTF::::remove):
2627
2628 2011-05-26  Geoffrey Garen  <ggaren@apple.com>
2629
2630         Reviewed by Oliver Hunt.
2631
2632         Provide a real owner when copying a property table, for the sake of
2633         write barriers.
2634         https://bugs.webkit.org/show_bug.cgi?id=61547
2635         
2636         No test because we can't enable the writeBarrier() ASSERT just yet.
2637
2638         * runtime/Structure.cpp:
2639         (JSC::Structure::addPropertyTransition):
2640
2641 2011-05-26  Adam Roben  <aroben@apple.com>
2642
2643         Windows build fix after r87346
2644
2645         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Fixed up exports to match
2646         reality.
2647
2648 2011-05-26  Patrick Gansterer  <paroga@webkit.org>
2649
2650         Reviewed by Adam Barth.
2651
2652         ASSERT(isMainThread()) when using single threaded jsc executable
2653         https://bugs.webkit.org/show_bug.cgi?id=60846
2654
2655         Remove the ASSERT since we do not have the concept of MainThread in JSC.
2656
2657         * wtf/CryptographicallyRandomNumber.cpp:
2658         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
2659         (WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2660
2661 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
2662
2663         Reviewed by Sam Weinig.
2664
2665         https://bugs.webkit.org/show_bug.cgi?id=61506
2666
2667         Move the silent spill/fill methods in the DFG JIT to the JITCodeGenerator
2668         so that they are available to the SpeculativeJIT.
2669
2670         * dfg/DFGJITCodeGenerator.h:
2671         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
2672         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
2673         (JSC::DFG::JITCodeGenerator::silentFillGPR):
2674         (JSC::DFG::JITCodeGenerator::silentFillFPR):
2675         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
2676         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
2677         * dfg/DFGNonSpeculativeJIT.h:
2678
2679 2011-05-25  Ryosuke Niwa  <rniwa@webkit.org>
2680
2681         An attempt to revive Windows bots.
2682
2683         * runtime/RegExp.cpp:
2684         * runtime/RegExp.h:
2685
2686 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
2687
2688         Reviewed by Sam Weinig.
2689
2690         Bug 61503 - Move population of CodeBlock::m_structureStubInfos into JIT
2691
2692         This data structure, used at runtime by the JIT, is currently unnecessarily populated
2693         with default entries during byte compilation.
2694
2695         Aside from meaning that there is JIT specific code in the bytecompiler, this also ties
2696         us to one entry per corresponding bytecode op, which may be undesirable. Instead,
2697         populate this array from the JIT.
2698
2699         The type StructureStubInfo has two unused states, one for gets & one for puts. Unify
2700         these, so that the class can have a default constructor (and to simply switch statements
2701         in code walking over the table).
2702
2703         This change has ramification for the DFG JIT, in that the DFG JIT used this datastructure
2704         to check for functions containing property access. Instead do so in the DFGByteCodeParser.
2705
2706         * bytecode/CodeBlock.cpp:
2707         (JSC::printStructureStubInfo):
2708         * bytecode/CodeBlock.h:
2709         (JSC::CodeBlock::setNumberOfStructureStubInfos):
2710         (JSC::CodeBlock::numberOfStructureStubInfos):
2711         * bytecode/StructureStubInfo.cpp:
2712         (JSC::StructureStubInfo::deref):
2713         (JSC::StructureStubInfo::visitAggregate):
2714         * bytecode/StructureStubInfo.h:
2715         (JSC::StructureStubInfo::StructureStubInfo):
2716         * bytecompiler/BytecodeGenerator.cpp:
2717         (JSC::BytecodeGenerator::emitGetById):
2718         (JSC::BytecodeGenerator::emitPutById):
2719         (JSC::BytecodeGenerator::emitDirectPutById):
2720         * dfg/DFGByteCodeParser.cpp:
2721         (JSC::DFG::ByteCodeParser::parseBlock):
2722         * jit/JIT.cpp:
2723         (JSC::JIT::JIT):
2724         (JSC::JIT::privateCompileMainPass):
2725         (JSC::JIT::privateCompileSlowCases):
2726         (JSC::JIT::privateCompile):
2727         * jit/JIT.h:
2728         * jit/JITPropertyAccess.cpp:
2729         (JSC::JIT::emit_op_get_by_id):
2730         (JSC::JIT::emit_op_put_by_id):
2731         (JSC::JIT::emit_op_method_check):
2732         (JSC::JIT::compileGetByIdHotPath):
2733         (JSC::JIT::compileGetByIdSlowCase):
2734         (JSC::JIT::emitSlow_op_put_by_id):
2735         * jit/JITPropertyAccess32_64.cpp:
2736         (JSC::JIT::emit_op_get_by_id):
2737         (JSC::JIT::emitSlow_op_get_by_id):
2738         (JSC::JIT::emit_op_put_by_id):
2739         (JSC::JIT::emitSlow_op_put_by_id):
2740         (JSC::JIT::emit_op_method_check):
2741         (JSC::JIT::compileGetByIdHotPath):
2742         (JSC::JIT::compileGetByIdSlowCase):
2743         * runtime/Executable.cpp:
2744         (JSC::tryDFGCompile):
2745
2746 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
2747
2748         Reviewed by Sam Weinig.
2749
2750         Bug 61501 - Unify AbstractMacroAssembler::differenceBetween methods.
2751
2752         * assembler/AbstractMacroAssembler.h:
2753         (JSC::AbstractMacroAssembler::Call::Call):
2754         (JSC::AbstractMacroAssembler::Call::fromTailJump):
2755         (JSC::AbstractMacroAssembler::Jump::Jump):
2756         (JSC::AbstractMacroAssembler::Jump::link):
2757         (JSC::AbstractMacroAssembler::Jump::linkTo):
2758         (JSC::AbstractMacroAssembler::Jump::isSet):
2759         (JSC::AbstractMacroAssembler::differenceBetween):
2760         (JSC::AbstractMacroAssembler::linkJump):
2761         (JSC::AbstractMacroAssembler::getLinkerCallReturnOffset):
2762         * assembler/LinkBuffer.h:
2763         (JSC::LinkBuffer::link):
2764         (JSC::LinkBuffer::locationOf):
2765         (JSC::LinkBuffer::locationOfNearCall):
2766         (JSC::LinkBuffer::returnAddressOffset):
2767         * assembler/MacroAssemblerARM.h:
2768         (JSC::MacroAssemblerARM::linkCall):
2769         * assembler/MacroAssemblerARMv7.h:
2770         (JSC::MacroAssemblerARMv7::linkCall):
2771         * assembler/MacroAssemblerMIPS.h:
2772         (JSC::MacroAssemblerMIPS::linkCall):
2773         * assembler/MacroAssemblerSH4.cpp:
2774         (JSC::MacroAssemblerSH4::linkCall):
2775         * assembler/MacroAssemblerX86.h:
2776         (JSC::MacroAssemblerX86::linkCall):
2777         * assembler/MacroAssemblerX86_64.h:
2778         (JSC::MacroAssemblerX86_64::linkCall):
2779
2780 2011-05-25  Gavin Barraclough  <barraclough@apple.com>
2781
2782         Reviewed by Sam Weinig.
2783
2784         https://bugs.webkit.org/show_bug.cgi?id=61500
2785         Add JSObject::offsetOfPropertyStorage
2786
2787         * jit/JITPropertyAccess.cpp:
2788         (JSC::JIT::compileGetDirectOffset):
2789         (JSC::JIT::compileGetByIdHotPath):
2790         (JSC::JIT::emit_op_put_by_id):
2791         (JSC::JIT::compilePutDirectOffset):
2792         * jit/JITPropertyAccess32_64.cpp:
2793         (JSC::JIT::compileGetByIdHotPath):
2794         (JSC::JIT::emit_op_put_by_id):
2795         (JSC::JIT::compilePutDirectOffset):
2796         (JSC::JIT::compileGetDirectOffset):
2797         * runtime/JSObject.h:
2798         (JSC::JSObject::offsetOfPropertyStorage):
2799
2800 2011-05-25  Oliver Hunt  <oliver@apple.com>
2801
2802         Reviewed by Geoffrey Garen.
2803
2804         Make RegExp GC allocated
2805         https://bugs.webkit.org/show_bug.cgi?id=61490
2806
2807         Make RegExp GC allocated.  Basically mechanical change to replace
2808         most use of [Pass]RefPtr<RegExp> with RegExp* or WriteBarrier<RegExp>
2809         where actual ownership happens.
2810
2811         Made the RegExpCache use Strong<> references currently to avoid any
2812         changes in behaviour.
2813
2814         * JavaScriptCore.exp:
2815         * bytecode/CodeBlock.cpp:
2816         (JSC::CodeBlock::visitAggregate):
2817         * bytecode/CodeBlock.h:
2818         (JSC::CodeBlock::addRegExp):
2819         * bytecompiler/BytecodeGenerator.cpp:
2820         (JSC::BytecodeGenerator::addRegExp):
2821         (JSC::BytecodeGenerator::emitNewRegExp):
2822         * bytecompiler/BytecodeGenerator.h:
2823         * runtime/JSCell.h:
2824         * runtime/JSGlobalData.cpp:
2825         (JSC::JSGlobalData::JSGlobalData):
2826         (JSC::JSGlobalData::clearBuiltinStructures):
2827         (JSC::JSGlobalData::addRegExpToTrace):
2828         * runtime/JSGlobalData.h:
2829         * runtime/JSGlobalObject.cpp:
2830         (JSC::JSGlobalObject::reset):
2831         * runtime/RegExp.cpp:
2832         (JSC::RegExp::RegExp):
2833         (JSC::RegExp::create):
2834         (JSC::RegExp::invalidateCode):
2835         * runtime/RegExp.h:
2836         (JSC::RegExp::createStructure):
2837         * runtime/RegExpCache.cpp:
2838         (JSC::RegExpCache::lookupOrCreate):
2839         (JSC::RegExpCache::create):
2840         * runtime/RegExpCache.h:
2841         * runtime/RegExpConstructor.cpp:
2842         (JSC::constructRegExp):
2843         * runtime/RegExpObject.cpp:
2844         (JSC::RegExpObject::RegExpObject):
2845         (JSC::RegExpObject::visitChildren):
2846         * runtime/RegExpObject.h:
2847         (JSC::RegExpObject::setRegExp):
2848         (JSC::RegExpObject::RegExpObjectData::RegExpObjectData):
2849         * runtime/RegExpPrototype.cpp:
2850         (JSC::RegExpPrototype::RegExpPrototype):
2851         (JSC::regExpProtoFuncCompile):
2852         * runtime/RegExpPrototype.h:
2853         * runtime/StringPrototype.cpp:
2854         (JSC::stringProtoFuncMatch):
2855         (JSC::stringProtoFuncSearch):
2856
2857 2011-05-25  Oliver Hunt  <oliver@apple.com>
2858
2859         Reviewed by Geoffrey Garen.
2860
2861         Generate regexp code lazily
2862         https://bugs.webkit.org/show_bug.cgi?id=61476
2863
2864         RegExp construction now simply validates the RegExp, it does
2865         not perform actual codegen.
2866
2867         * runtime/RegExp.cpp:
2868         (JSC::RegExp::RegExp):
2869         (JSC::RegExp::recompile):
2870         (JSC::RegExp::compile):
2871         (JSC::RegExp::match):
2872         * runtime/RegExp.h:
2873         (JSC::RegExp::recompileIfNecessary):
2874         * runtime/RegExpConstructor.h:
2875         (JSC::RegExpConstructor::performMatch):
2876         * runtime/RegExpObject.cpp:
2877         (JSC::RegExpObject::match):
2878         * runtime/StringPrototype.cpp:
2879         (JSC::stringProtoFuncReplace):
2880         (JSC::stringProtoFuncMatch):
2881         (JSC::stringProtoFuncSearch):
2882         (JSC::stringProtoFuncSplit):
2883
2884 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2885
2886         Reviewed by Geoffrey Garen.
2887
2888         Removed MarkSetProperties because it was unused
2889         https://bugs.webkit.org/show_bug.cgi?id=61418
2890
2891         * heap/MarkStack.h:
2892         (JSC::MarkSet::MarkSet):
2893         (JSC::MarkStack::append):
2894         * runtime/JSActivation.cpp:
2895         (JSC::JSActivation::visitChildren):
2896         * runtime/JSArray.h:
2897         (JSC::JSArray::visitChildrenDirect):
2898         * runtime/JSPropertyNameIterator.cpp:
2899         (JSC::JSPropertyNameIterator::visitChildren):
2900         * runtime/WriteBarrier.h:
2901         (JSC::MarkStack::appendValues):
2902
2903 2011-05-25  Oliver Hunt  <oliver@apple.com>
2904
2905         Reviewed by Geoffrey Garen.
2906
2907         Make allocations with guard pages ensure that the allocation succeeded
2908         https://bugs.webkit.org/show_bug.cgi?id=61453
2909
2910         Add null checks, and make PageBlock's operator bool() use
2911         the realbase, rather than the start of usable memory.
2912
2913         * wtf/OSAllocatorPosix.cpp:
2914         (WTF::OSAllocator::reserveAndCommit):
2915         * wtf/PageBlock.h:
2916         (WTF::PageBlock::operator bool):
2917         (WTF::PageBlock::PageBlock):
2918
2919 2011-04-10  Kevin Ollivier  <kevino@theolliviers.com>
2920
2921         Reviewed by Eric Seidel.
2922
2923         Add JS_EXPORT_PRIVATE macro for exported methods in bytecompiler headers.
2924         
2925         https://bugs.webkit.org/show_bug.cgi?id=27551
2926
2927         * bytecompiler/BytecodeGenerator.h:
2928
2929 2011-05-24  Keishi Hattori  <keishi@webkit.org>
2930
2931         Reviewed by Kent Tamura.
2932
2933         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
2934         https://bugs.webkit.org/show_bug.cgi?id=61273
2935
2936         * Configurations/FeatureDefines.xcconfig: Added COLOR_INPUT feature flag.
2937
2938 2011-05-24  Kevin Ollivier  <kevino@theolliviers.com>
2939
2940         Reviewed by Eric Seidel.
2941
2942         Add export macros to WTFString.h.
2943         
2944         https://bugs.webkit.org/show_bug.cgi?id=27551
2945
2946         * wtf/text/WTFString.h:
2947         (WTF::String::String):
2948         (WTF::String::findIgnoringCase):
2949         (WTF::String::isHashTableDeletedValue):
2950
2951 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2952
2953         Maybe fix the Mac build now?
2954
2955         * JavaScriptCore.xcodeproj/project.pbxproj:
2956
2957 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2958
2959         Maybe fix the Mac build?
2960         
2961         * JavaScriptCore.xcodeproj/project.pbxproj:
2962
2963 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2964
2965         Reviewed by Oliver Hunt.
2966
2967         Split HeapRootVisitor into its own class
2968         https://bugs.webkit.org/show_bug.cgi?id=61399
2969
2970         * GNUmakefile.list.am:
2971         * JavaScriptCore.gypi:
2972         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2973         * JavaScriptCore.xcodeproj/project.pbxproj:
2974         * heap/HandleHeap.cpp:
2975         * heap/HandleStack.cpp:
2976         * heap/Heap.cpp:
2977         * heap/HeapRootVisitor.h: Copied from Source/JavaScriptCore/heap/MarkStack.h.
2978         * heap/MarkStack.h:
2979         * runtime/ArgList.cpp:
2980         * runtime/SmallStrings.cpp:
2981
2982 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
2983
2984         Rubberstamped by David Kilzer.
2985
2986         Updated some files that I forgot in my previous MHTML CL.
2987
2988         * Configurations/FeatureDefines.xcconfig:
2989
2990 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2991
2992         Fix the Mac build: Yes, please do remove these files, svn.
2993
2994         * JavaScriptCore.xcodeproj/project.pbxproj:
2995
2996 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
2997
2998         Reviewed by Oliver Hunt.
2999
3000         Let's just have one way to get the system page size, bokay?
3001         https://bugs.webkit.org/show_bug.cgi?id=61384
3002
3003         * CMakeListsEfl.txt:
3004         * CMakeListsWinCE.txt:
3005         * GNUmakefile.list.am:
3006         * JavaScriptCore.exp:
3007         * JavaScriptCore.gypi:
3008         * JavaScriptCore.pro:
3009         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: MarkStack[Platform].cpp
3010         is gone completely now, since it only existed to provide a duplicate way
3011         to access the system page size.
3012
3013         * heap/MarkStack.cpp:
3014         (JSC::MarkStack::reset):
3015         * heap/MarkStack.h:
3016         (JSC::::MarkStackArray):
3017         (JSC::::shrinkAllocation): Use WTF::pageSize.
3018
3019         * heap/MarkStackPosix.cpp:
3020         * heap/MarkStackSymbian.cpp:
3021         * heap/MarkStackWin.cpp: Removed now-empty files.
3022
3023         * jit/ExecutableAllocator.cpp:
3024         (JSC::ExecutableAllocator::reprotectRegion):
3025         * jit/ExecutableAllocator.h:
3026         (JSC::ExecutableAllocator::ExecutableAllocator):
3027         (JSC::ExecutablePool::ExecutablePool):
3028         (JSC::ExecutablePool::poolAllocate):
3029         * jit/ExecutableAllocatorFixedVMPool.cpp: Use WTF::pageSize.
3030
3031         * wscript: Removed now-empty files.
3032
3033         * wtf/PageBlock.cpp:
3034         (WTF::systemPageSize): Integrated questionable Symbian page size rule
3035         from ExecutableAllocator, because that seems like what the original
3036         author should have done.
3037
3038 2011-05-24  Oliver Hunt  <oliver@apple.com>
3039
3040         Reviewed by Gavin Barraclough.
3041
3042         Interpreter crashes with gc validation enabled due to failure to mark initial cache structure
3043         https://bugs.webkit.org/show_bug.cgi?id=61385
3044
3045         The interpreter uses the structure slot of get_by_id and put_by_id to hold
3046         the initial structure it encountered so that it can identify whether a
3047         given access is stable.
3048
3049         When marking though we only visit the slot when we've decided to cache, and
3050         so this value could die.  This was "safe" as the value was only used for a
3051         pointer compare, but it was incorrect.  We now just mark the slot like we
3052         should have been doing already.
3053
3054         * bytecode/CodeBlock.cpp:
3055         (JSC::CodeBlock::visitStructures):
3056
3057 2011-05-24  Adam Roben  <aroben@apple.com>
3058
3059         Windows build fix
3060
3061         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed now-inline functions.
3062
3063 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3064
3065         Windows build fix: update the #if OS(WINDOWS) section to match my last patch.
3066
3067         * heap/MarkStack.h:
3068         (JSC::::shrinkAllocation):
3069
3070 2011-05-24  Geoffrey Garen  <ggaren@apple.com>
3071
3072         Rubber-stamped by Oliver Hunt.
3073
3074         Split out function definitions and class definitions from class
3075         declarations in MarkStack.h, for readability.
3076
3077         * heap/MarkStack.h:
3078         (JSC::MarkStack::MarkStack):
3079         (JSC::MarkStack::~MarkStack):
3080         (JSC::MarkStack::addOpaqueRoot):
3081         (JSC::MarkStack::containsOpaqueRoot):
3082         (JSC::MarkStack::opaqueRootCount):
3083         (JSC::MarkSet::MarkSet):
3084         (JSC::MarkStack::allocateStack):
3085         (JSC::MarkStack::releaseStack):
3086         (JSC::MarkStack::pageSize):
3087         (JSC::::MarkStackArray):
3088         (JSC::::~MarkStackArray):
3089         (JSC::::expand):
3090         (JSC::::append):
3091         (JSC::::removeLast):
3092         (JSC::::last):
3093         (JSC::::isEmpty):
3094         (JSC::::size):
3095         (JSC::::shrinkAllocation):
3096
3097 2011-05-24  Oliver Hunt  <oliver@apple.com>
3098
3099         Reviewed by Geoffrey Garen.
3100
3101         Avoid creating unnecessary identifiers and strings in the syntax checker
3102         https://bugs.webkit.org/show_bug.cgi?id=61378
3103
3104         Selectively tell the lexer that there are some places it does not need to
3105         do the real work of creating Identifiers for IDENT and STRING tokens.
3106
3107         Make parseString and parseIdentifier templatized on whether they should
3108         do real work, or merely validate the tokens.
3109
3110         SunSpider --parse-only reports ~5-8% win depending on hardware.
3111
3112         * parser/ASTBuilder.h:
3113         (JSC::ASTBuilder::createDotAccess):
3114         * parser/JSParser.cpp:
3115         (JSC::JSParser::next):
3116         (JSC::JSParser::consume):
3117         (JSC::JSParser::parseVarDeclarationList):
3118         (JSC::JSParser::parseConstDeclarationList):
3119         (JSC::JSParser::parseExpression):
3120         (JSC::JSParser::parseAssignmentExpression):
3121         (JSC::JSParser::parseConditionalExpression):
3122         (JSC::JSParser::parseBinaryExpression):
3123         (JSC::JSParser::parseProperty):
3124         (JSC::JSParser::parseObjectLiteral):
3125         (JSC::JSParser::parseArrayLiteral):
3126         (JSC::JSParser::parseArguments):
3127         (JSC::JSParser::parseMemberExpression):
3128         * parser/Lexer.cpp:
3129         (JSC::Lexer::parseIdentifier):
3130         (JSC::Lexer::parseString):
3131         (JSC::Lexer::lex):
3132         * parser/Lexer.h:
3133         * parser/SyntaxChecker.h:
3134         (JSC::SyntaxChecker::createDotAccess):
3135         (JSC::SyntaxChecker::createProperty):
3136
3137 2011-05-23  Michael Saboff  <msaboff@apple.com>
3138
3139         Reviewed by Mark Rowe.
3140
3141         Safari often freezes when clicking "Return free memory" in Caches dialog
3142         https://bugs.webkit.org/show_bug.cgi?id=61325
3143
3144         There are two fixes and improvement in instrumentation code used to find 
3145         one of the problems.
3146         Changed ReleaseFreeList() to set the "decommitted" bit when releasing
3147         pages to the system and moving Spans from the normal list to the returned 
3148         list.
3149         Added a "not making forward progress" check to TCMalloc_PageHeap::scavenge
3150         to eliminate an infinite loop if we can't meet the pagesToRelease target.
3151         Added a check for the decommitted bit being set properly in 
3152         TCMalloc_PageHeap::CheckList.
3153
3154         * wtf/FastMalloc.cpp:
3155         (WTF::TCMalloc_PageHeap::scavenge):
3156         (WTF::TCMalloc_PageHeap::Check):
3157         (WTF::TCMalloc_PageHeap::CheckList):
3158         (WTF::ReleaseFreeList):
3159
3160 2011-05-23  Gavin Barraclough  <barraclough@apple.com>
3161
3162         Reviewed by Geoff Garen.
3163
3164         https://bugs.webkit.org/show_bug.cgi?id=61306
3165
3166         The begin characters optimization currently has issues (#61129),
3167         and does not appear to still be a performance win. The prudent
3168         next step seems to be to disable while we ascertain whether this
3169         is still a useful performance optimization.
3170
3171         * yarr/YarrInterpreter.cpp:
3172         (JSC::Yarr::Interpreter::matchDisjunction):
3173         (JSC::Yarr::Interpreter::interpret):
3174         * yarr/YarrInterpreter.h:
3175         (JSC::Yarr::BytecodePattern::BytecodePattern):
3176         * yarr/YarrPattern.cpp:
3177         (JSC::Yarr::YarrPatternConstructor::YarrPatternConstructor):
3178         (JSC::Yarr::YarrPattern::compile):
3179         (JSC::Yarr::YarrPattern::YarrPattern):
3180         * yarr/YarrPattern.h:
3181         (JSC::Yarr::YarrPattern::reset):
3182
3183 2011-05-23  Matthew Delaney  <mdelaney@apple.com>
3184
3185         Reviewed by Simon Fraser.
3186
3187         Remove safeFloatToInt() in FloatRect.cpp and replace with working version of clampToInteger()
3188         https://bugs.webkit.org/show_bug.cgi?id=58216
3189
3190         * wtf/MathExtras.h:
3191         (clampToInteger):
3192         (clampToPositiveInteger):
3193
3194 2011-05-23  Ruben  <chromium@hybridsource.org>
3195
3196         Reviewed by Tony Chang.
3197
3198         Chromium gyp patch to use new POSIX defines toolkit_uses_gtk and os_posix
3199         https://bugs.webkit.org/show_bug.cgi?id=61219
3200
3201         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3202
3203 2011-05-23  Thouraya ANDOLSI  <thouraya.andolsi@st.com>
3204
3205         Reviewed by Gavin Barraclough.
3206
3207         [SH4] AssemblerLabel does not name a type
3208         https://bugs.webkit.org/show_bug.cgi?id=59927
3209
3210         SH4Assembler.h file shoold be included before AbstractMacroAssembler.h.
3211
3212         * assembler/MacroAssemblerSH4.h:
3213
3214 2011-05-23  Ryuan Choi  <ryuan.choi@samsung.com>
3215
3216         Rubber stamped by Eric Seidel.
3217
3218         [CMAKE] Refactoring wtf related code.
3219         https://bugs.webkit.org/show_bug.cgi?id=60146
3220
3221         Move wtf-files to Source/JavaScriptCore/wtf/CMakeLists.txt.
3222
3223         * CMakeLists.txt:
3224         * CMakeListsEfl.txt:
3225         * wtf/CMakeLists.txt:
3226         * wtf/CMakeListsEfl.txt:
3227
3228 2011-05-22  Adam Barth  <abarth@webkit.org>
3229
3230         Enable strict PassOwnPtr for everyone.  I expect this patch will need
3231         some followups to make the GTK and EFL bots green again.
3232
3233         * wtf/PassOwnPtr.h:
3234
3235 2011-05-20  Oliver Hunt  <oliver@apple.com>
3236
3237         Reviewed by Gavin Barraclough.
3238
3239         Reduce size of inline cache path of get_by_id on ARMv7
3240         https://bugs.webkit.org/show_bug.cgi?id=61221
3241
3242         This reduces the code size of get_by_id by 20 bytes
3243
3244         * assembler/ARMv7Assembler.h:
3245         (JSC::ARMv7Assembler::ldrCompact):
3246         (JSC::ARMv7Assembler::repatchCompact):
3247         (JSC::ARMv7Assembler::setUInt7ForLoad):
3248         * assembler/MacroAssemblerARMv7.h:
3249         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
3250         * jit/JIT.h:
3251
3252 2011-05-20  Zoltan Herczeg  <zherczeg@inf.u-szeged.hu>
3253
3254         Reviewed by Oliver Hunt.
3255
3256         Zombies should "live" forever
3257         https://bugs.webkit.org/show_bug.cgi?id=61170
3258
3259         Reusing zombie cells could still hide garbage
3260         collected cell related bugs.
3261
3262         * JavaScriptCore.pro:
3263         * heap/MarkedBlock.cpp:
3264         (JSC::MarkedBlock::clearMarks):
3265         * heap/MarkedBlock.h:
3266         * heap/MarkedSpace.cpp:
3267         (JSC::MarkedSpace::destroy):
3268         * runtime/JSCell.h:
3269         (JSC::JSCell::JSValue::isZombie):
3270         * runtime/JSZombie.h:
3271         (JSC::JSZombie::~JSZombie):
3272         * runtime/WriteBarrier.h:
3273         (JSC::WriteBarrierBase::setWithoutWriteBarrier):
3274
3275 2011-05-20  Brady Eidson  <beidson@apple.com>
3276
3277         Reviewed by Sam Weinig.
3278
3279         <rdar://problem/9472883> and https://bugs.webkit.org/show_bug.cgi?id=61203
3280         Horrendous bug in callOnMainThreadAndWait
3281
3282         * wtf/MainThread.cpp:
3283         (WTF::dispatchFunctionsFromMainThread): Before signaling the background thread with the
3284           syncFlag condition, reacquire the mutex first.
3285
3286 2011-05-20  Oliver Hunt  <oliver@apple.com>
3287
3288         Reviewed by Sam Weinig.
3289
3290         Remove unnecessary double->int conversion at the end of op_div
3291         https://bugs.webkit.org/show_bug.cgi?id=61198
3292
3293         We don't attempt this conversion on 64bit, removing it actually speeds
3294         up sunspider and v8 slightly, and it reduces code size.
3295
3296         * jit/JITArithmetic32_64.cpp:
3297         (JSC::JIT::emit_op_div):
3298
3299 2011-05-19  Evan Martin  <evan@chromium.org>
3300
3301         Reviewed by Tony Chang.
3302
3303         [chromium] remove <(library) variable
3304         https://bugs.webkit.org/show_bug.cgi?id=61158
3305
3306         This was for a build experiment; we can just use the correct value now.
3307
3308         * JavaScriptCore.gyp/JavaScriptCore.gyp:
3309
3310 2011-05-20  Oliver Hunt  <oliver@apple.com>
3311
3312         Reviewed by Sam Weinig.
3313
3314         Interpreter uses wrong bytecode offset for determining exception handler
3315         https://bugs.webkit.org/show_bug.cgi?id=61191
3316
3317         The bytecode offset given for the returnPC from the JIT is
3318         actually the offset for the start of the instruction triggering
3319         the call, whereas in the interpreter it is the actual return
3320         VPC.  This means if the next instruction following a call was
3321         in an exception region we would incorrectly redirect to its
3322         handler.  Long term we want to completely redo how exceptions
3323         are handled anyway so the simplest and lowest risk fix here is
3324         to simply subtract one from the return vPC so that we have an
3325         offset in the triggering instruction.
3326
3327         It turns out this is caught by a couple of tests already.
3328
3329         * interpreter/Interpreter.cpp:
3330         (JSC::Interpreter::unwindCallFrame):
3331
3332 2011-05-20  Xan Lopez  <xlopez@igalia.com>
3333
3334         Reviewed by Oliver Hunt.
3335
3336         JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
3337         https://bugs.webkit.org/show_bug.cgi?id=42756
3338
3339         Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
3340         check of the available memory. This should give us an
3341         overcommit-like behavior in most systems, which is what we want.
3342
3343         * wtf/OSAllocatorPosix.cpp:
3344         (WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
3345
3346 2011-05-19  Gabor Loki  <loki@webkit.org>
3347
3348         Fix ARM build after r86919
3349
3350         * assembler/ARMAssembler.h:
3351         (JSC::ARMAssembler::nop):
3352
3353 2011-05-19  Oliver Hunt  <oliver@apple.com>
3354
3355         Reviewed by Gavin Barraclough.
3356
3357         Randomise code starting location a little
3358         https://bugs.webkit.org/show_bug.cgi?id=61161
3359
3360         Add a nop() function to the Assemblers so that we
3361         can randomise code offsets slightly at no real cost.
3362
3363         * assembler/ARMAssembler.h:
3364         (JSC::ARMAssembler::nop):
3365         * assembler/ARMv7Assembler.h:
3366         (JSC::ARMv7Assembler::nop):
3367         * assembler/MacroAssemblerARM.h:
3368         (JSC::MacroAssemblerARM::nop):
3369         * assembler/MacroAssemblerARMv7.h:
3370         (JSC::MacroAssemblerARMv7::nop):
3371         * assembler/MacroAssemblerMIPS.h:
3372         (JSC::MacroAssemblerMIPS::nop):
3373         * assembler/MacroAssemblerSH4.h:
3374         (JSC::MacroAssemblerSH4::nop):
3375         * assembler/MacroAssemblerX86Common.h:
3376         (JSC::MacroAssemblerX86Common::nop):
3377         * assembler/X86Assembler.h:
3378         (JSC::X86Assembler::nop):
3379         * jit/JIT.cpp:
3380         (JSC::JIT::JIT):
3381         (JSC::JIT::privateCompile):
3382         * jit/JIT.h:
3383         * runtime/WeakRandom.h:
3384         (JSC::WeakRandom::getUint32):
3385
3386 2011-05-19  Oliver Hunt  <oliver@apple.com>
3387
3388         Fix windows build.
3389
3390         * wtf/OSAllocatorWin.cpp:
3391         (WTF::OSAllocator::reserveUncommitted):
3392         (WTF::OSAllocator::reserveAndCommit):
3393
3394 2011-05-19  Oliver Hunt  <oliver@apple.com>
3395
3396         Reviewed by Gavin Barraclough.
3397
3398         Add guard pages to each end of the memory region used by the fixedvm allocator
3399         https://bugs.webkit.org/show_bug.cgi?id=61150
3400
3401         Add mechanism to notify the OSAllocator that pages at either end of an
3402         allocation should be considered guard pages.  Update PageReservation,
3403         PageAllocation, etc to handle this.
3404
3405         * JavaScriptCore.exp:
3406         * jit/ExecutableAllocatorFixedVMPool.cpp:
3407         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3408         * wtf/OSAllocator.h:
3409         * wtf/OSAllocatorPosix.cpp:
3410         (WTF::OSAllocator::reserveUncommitted):
3411         (WTF::OSAllocator::reserveAndCommit):
3412         * wtf/PageAllocation.h:
3413         (WTF::PageAllocation::PageAllocation):
3414         * wtf/PageAllocationAligned.h:
3415         (WTF::PageAllocationAligned::PageAllocationAligned):
3416         * wtf/PageBlock.h:
3417         (WTF::PageBlock::PageBlock):
3418         * wtf/PageReservation.h:
3419         (WTF::PageReservation::reserve):
3420         (WTF::PageReservation::reserveWithGuardPages):
3421             Add a new function to make a reservation that will add guard
3422             pages to the ends of an allocation.
3423         (WTF::PageReservation::PageReservation):
3424
3425 2011-05-19  Oliver Hunt  <oliver@apple.com>
3426
3427         Reviewed by Geoffrey Garen.
3428
3429         Make Executables release their JIT code as soon as they become dead
3430         https://bugs.webkit.org/show_bug.cgi?id=61134
3431
3432         Add an ability to clear an Executable's jit code without requiring
3433         it to be destroyed, and then call that from a finalizer.
3434
3435         * heap/Weak.h:
3436         (JSC::Weak::Weak):
3437         (JSC::Weak::leak):
3438         * jit/JITCode.h:
3439         (JSC::JITCode::clear):
3440         * runtime/Executable.cpp:
3441         (JSC::ExecutableFinalizer::finalize):
3442         (JSC::ExecutableBase::executableFinalizer):
3443         * runtime/Executable.h:
3444         (JSC::ExecutableBase::ExecutableBase):
3445         (JSC::ExecutableBase::clearExecutableCode):
3446
3447 2011-05-19  Adam Roben  <aroben@apple.com>
3448
3449         Remove a redundant and broken data export
3450
3451         Data can't be exported from JavaScriptCore.dll by listing it in the .def file. The
3452         JS_EXPORTDATA macro must be used instead. (In this case it was already being used, leading
3453         to a linker warning about multiple definitions.)
3454
3455         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Removed JSGlobalData::s_info.
3456
3457 2011-05-18  Oliver Hunt  <oliver@apple.com>
3458
3459         Reviewed by Gavin Barraclough.
3460
3461         Some tests crashing in JSC::MarkStack::validateValue beneath ScriptController::clearWindowShell on SnowLeopard Intel Release (WebKit2 Tests)
3462         https://bugs.webkit.org/show_bug.cgi?id=61064
3463
3464         Switch NonFinalObject to using WriteBarrier<> rather than WriteBarrierBase<>
3465         for its inline storage.  This resolves the problem of GC occurring before
3466         a subclass has initialised its anonymous storage.
3467
3468         * runtime/JSObject.h:
3469
3470 2011-05-18  Adam Barth  <abarth@webkit.org>
3471
3472         Reviewed by Sam Weinig.
3473
3474         Delete WTFURL
3475         https://bugs.webkit.org/show_bug.cgi?id=61084
3476
3477         It's been a year and we've failed to complete this project.  It's time
3478         to throw in the towel.
3479
3480         * JavaScriptCore.xcodeproj/project.pbxproj:
3481         * wtf/url: Removed.
3482         * wtf/url/api: Removed.
3483         * wtf/url/api/ParsedURL.cpp: Removed.
3484         * wtf/url/api/ParsedURL.h: Removed.
3485         * wtf/url/api/URLString.h: Removed.
3486         * wtf/url/src: Removed.
3487         * wtf/url/src/RawURLBuffer.h: Removed.
3488         * wtf/url/src/URLBuffer.h: Removed.
3489         * wtf/url/src/URLCharacterTypes.cpp: Removed.
3490         * wtf/url/src/URLCharacterTypes.h: Removed.
3491         * wtf/url/src/URLComponent.h: Removed.
3492         * wtf/url/src/URLEscape.cpp: Removed.
3493         * wtf/url/src/URLEscape.h: Removed.
3494         * wtf/url/src/URLParser.h: Removed.
3495         * wtf/url/src/URLQueryCanonicalizer.h: Removed.
3496         * wtf/url/src/URLSegments.cpp: Removed.
3497         * wtf/url/src/URLSegments.h: Removed.
3498         * wtf/url/wtfurl.gyp: Removed.
3499
3500 2011-05-18  Oliver Hunt  <oliver@apple.com>
3501
3502         Reviewed by Sam Weinig.
3503
3504         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
3505         https://bugs.webkit.org/show_bug.cgi?id=61090
3506
3507         Remove the Structure-free JSGlobalObject constructor and instead always
3508         pass the structure into the JSGlobalObject constructor.
3509         Stop DebuggerActivation creating a new structure every time, and simply
3510         use a single shared structure held by the GlobalData.
3511
3512         * API/JSContextRef.cpp:
3513         * debugger/DebuggerActivation.cpp:
3514         (JSC::DebuggerActivation::DebuggerActivation):
3515         * jsc.cpp:
3516         (GlobalObject::GlobalObject):
3517         (functionRun):
3518         (jscmain):
3519         * runtime/JSGlobalData.cpp:
3520         (JSC::JSGlobalData::JSGlobalData):
3521         (JSC::JSGlobalData::clearBuiltinStructures):
3522         * runtime/JSGlobalData.h:
3523         * runtime/JSGlobalObject.h:
3524
3525 2011-05-18  Oliver Hunt  <oliver@apple.com>
3526
3527         Reviewed by Adam Roben.
3528
3529         Disable gc validation in release builds
3530         https://bugs.webkit.org/show_bug.cgi?id=60680
3531
3532         Add back the NDEBUG check
3533
3534         * wtf/Platform.h:
3535
3536 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
3537
3538         Rolled out attempts to fix EFL build because they're not enough -- the
3539         build script needs to be fixed.
3540
3541         * runtime/BooleanPrototype.cpp:
3542         * runtime/DateConstructor.cpp:
3543         * runtime/ErrorPrototype.cpp:
3544
3545 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
3546
3547         More attempts to work around the EFL build system being borken.
3548
3549         * runtime/DateConstructor.cpp:
3550         * runtime/ErrorPrototype.cpp:
3551
3552 2011-05-17  Geoffrey Garen  <ggaren@apple.com>
3553
3554         Try to fix the EFL build.
3555
3556         * runtime/BooleanPrototype.cpp:
3557
3558 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
3559
3560         Rolling back in r86653 with build fixed.
3561
3562         Reviewed by Gavin Barraclough and Oliver Hunt.
3563
3564         Global object initialization is expensive
3565         https://bugs.webkit.org/show_bug.cgi?id=60933
3566         
3567         Changed a bunch of globals to allocate their properties lazily, and changed
3568         the global object to allocate a bunch of its globals lazily.
3569         
3570         This reduces the footprint of a global object from 287 objects with 58
3571         functions for 24K to 173 objects with 20 functions for 15K.
3572
3573         Large patch, but it's all mechanical.
3574
3575         * DerivedSources.make:
3576         * JavaScriptCore.exp: Build!
3577
3578         * create_hash_table: Added a special case for fromCharCode, since it uses
3579         a custom "thunk generator".
3580
3581         * heap/Heap.cpp:
3582         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
3583         overcount objects that were owned through more than one mechanism because
3584         it was getting in the way of counting the results for this patch.
3585
3586         * interpreter/CallFrame.h:
3587         (JSC::ExecState::arrayConstructorTable):
3588         (JSC::ExecState::arrayPrototypeTable):
3589         (JSC::ExecState::booleanPrototypeTable):
3590         (JSC::ExecState::dateConstructorTable):
3591         (JSC::ExecState::errorPrototypeTable):
3592         (JSC::ExecState::globalObjectTable):
3593         (JSC::ExecState::numberConstructorTable):
3594         (JSC::ExecState::numberPrototypeTable):
3595         (JSC::ExecState::objectPrototypeTable):
3596         (JSC::ExecState::regExpPrototypeTable):
3597         (JSC::ExecState::stringConstructorTable): Added new tables.
3598
3599         * runtime/ArrayConstructor.cpp:
3600         (JSC::ArrayConstructor::ArrayConstructor):
3601         (JSC::ArrayConstructor::getOwnPropertySlot):
3602         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
3603         * runtime/ArrayConstructor.h:
3604         (JSC::ArrayConstructor::createStructure):
3605         * runtime/ArrayPrototype.cpp:
3606         (JSC::ArrayPrototype::getOwnPropertySlot):
3607         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
3608         * runtime/ArrayPrototype.h:
3609         * runtime/BooleanPrototype.cpp:
3610         (JSC::BooleanPrototype::BooleanPrototype):
3611         (JSC::BooleanPrototype::getOwnPropertySlot):
3612         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
3613         * runtime/BooleanPrototype.h:
3614         (JSC::BooleanPrototype::createStructure):
3615         * runtime/DateConstructor.cpp:
3616         (JSC::DateConstructor::DateConstructor):
3617         (JSC::DateConstructor::getOwnPropertySlot):
3618         (JSC::DateConstructor::getOwnPropertyDescriptor):
3619         * runtime/DateConstructor.h:
3620         (JSC::DateConstructor::createStructure):
3621         * runtime/ErrorPrototype.cpp:
3622         (JSC::ErrorPrototype::ErrorPrototype):
3623         (JSC::ErrorPrototype::getOwnPropertySlot):
3624         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
3625         * runtime/ErrorPrototype.h:
3626         (JSC::ErrorPrototype::createStructure): Standardized these objects
3627         to use static tables for function properties.
3628
3629         * runtime/JSGlobalData.cpp:
3630         (JSC::JSGlobalData::JSGlobalData):
3631         (JSC::JSGlobalData::~JSGlobalData):
3632         * runtime/JSGlobalData.h: Added new tables.
3633
3634         * runtime/JSGlobalObject.cpp:
3635         (JSC::JSGlobalObject::reset):
3636         (JSC::JSGlobalObject::addStaticGlobals):
3637         (JSC::JSGlobalObject::getOwnPropertySlot):
3638         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
3639         * runtime/JSGlobalObject.h:
3640         * runtime/JSGlobalObjectFunctions.cpp:
3641         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
3642         static table for its global functions. This required uninlining some
3643         things to avoid a circular header dependency. However, those things
3644         probably shouldn't have been inlined in the first place.
3645         
3646         Even more global object properties can be made lazy, but that requires
3647         more in-depth changes.
3648
3649         * runtime/MathObject.cpp:
3650         * runtime/NumberConstructor.cpp:
3651         (JSC::NumberConstructor::getOwnPropertySlot):
3652         (JSC::NumberConstructor::getOwnPropertyDescriptor):
3653         * runtime/NumberPrototype.cpp:
3654         (JSC::NumberPrototype::NumberPrototype):
3655         (JSC::NumberPrototype::getOwnPropertySlot):
3656         (JSC::NumberPrototype::getOwnPropertyDescriptor):
3657         * runtime/NumberPrototype.h:
3658         (JSC::NumberPrototype::createStructure):
3659         * runtime/ObjectPrototype.cpp:
3660         (JSC::ObjectPrototype::ObjectPrototype):
3661         (JSC::ObjectPrototype::put):
3662         (JSC::ObjectPrototype::getOwnPropertySlot):
3663         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
3664         * runtime/ObjectPrototype.h:
3665         (JSC::ObjectPrototype::createStructure):
3666         * runtime/RegExpPrototype.cpp:
3667         (JSC::RegExpPrototype::RegExpPrototype):
3668         (JSC::RegExpPrototype::getOwnPropertySlot):
3669         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
3670         * runtime/RegExpPrototype.h:
3671         (JSC::RegExpPrototype::createStructure):
3672         * runtime/StringConstructor.cpp:
3673         (JSC::StringConstructor::StringConstructor):
3674         (JSC::StringConstructor::getOwnPropertySlot):
3675         (JSC::StringConstructor::getOwnPropertyDescriptor):
3676         * runtime/StringConstructor.h:
3677         (JSC::StringConstructor::createStructure): Standardized these objects
3678         to use static tables for function properties.
3679
3680 2011-05-17  Sam Weinig  <sam@webkit.org>
3681
3682         Reviewed by Oliver Hunt.
3683
3684         JSGlobalContextRelease should not trigger a synchronous garbage collection
3685         https://bugs.webkit.org/show_bug.cgi?id=60990
3686
3687         * API/JSContextRef.cpp:
3688         Change synchronous call to collectAllGarbage to a call to trigger the
3689         activityCallback.
3690
3691 2011-05-16  Oliver Hunt  <oliver@apple.com>
3692
3693         Reviewed by Gavin Barraclough.
3694
3695         Reduce code size for inline cache
3696         https://bugs.webkit.org/show_bug.cgi?id=60942
3697
3698         This patch introduces the concept of a "compact" address that
3699         allows individual architectures to control the maximum offset
3700         used for the inline path of get_by_id.  This reduces the code
3701         size of get_by_id by 3 bytes on x86 and x86_64 and slightly
3702         improves performance on v8 tests.
3703
3704         * assembler/ARMAssembler.h:
3705         (JSC::ARMAssembler::repatchCompact):
3706         * assembler/ARMv7Assembler.h:
3707         (JSC::ARMv7Assembler::repatchCompact):
3708         * assembler/AbstractMacroAssembler.h:
3709         (JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
3710         (JSC::AbstractMacroAssembler::differenceBetween):
3711         (JSC::AbstractMacroAssembler::repatchCompact):
3712         * assembler/CodeLocation.h:
3713         (JSC::CodeLocationDataLabelCompact::CodeLocationDataLabelCompact):
3714         (JSC::CodeLocationCommon::dataLabelCompactAtOffset):
3715         * assembler/LinkBuffer.h:
3716         (JSC::LinkBuffer::locationOf):
3717         * assembler/MIPSAssembler.h:
3718         (JSC::MIPSAssembler::repatchCompact):
3719         * assembler/MacroAssembler.h:
3720         (JSC::MacroAssembler::loadPtrWithCompactAddressOffsetPatch):
3721         * assembler/MacroAssemblerARM.h:
3722         (JSC::MacroAssemblerARM::load32WithCompactAddressOffsetPatch):
3723         * assembler/MacroAssemblerARMv7.h:
3724         (JSC::MacroAssemblerARMv7::load32WithCompactAddressOffsetPatch):
3725         * assembler/MacroAssemblerMIPS.h:
3726         (JSC::MacroAssemblerMIPS::load32WithCompactAddressOffsetPatch):
3727         * assembler/MacroAssemblerSH4.h:
3728         (JSC::MacroAssemblerSH4::load32WithAddressOffsetPatch):
3729         * assembler/MacroAssemblerX86.h:
3730         (JSC::MacroAssemblerX86::repatchCompact):
3731         * assembler/MacroAssemblerX86Common.h:
3732         (JSC::MacroAssemblerX86Common::loadCompactWithAddressOffsetPatch):
3733         * assembler/MacroAssemblerX86_64.h:
3734         (JSC::MacroAssemblerX86_64::loadPtrWithCompactAddressOffsetPatch):
3735         * assembler/RepatchBuffer.h:
3736         (JSC::RepatchBuffer::repatch):
3737         * assembler/SH4Assembler.h:
3738         (JSC::SH4Assembler::repatchCompact):
3739         * assembler/X86Assembler.h:
3740         (JSC::X86Assembler::movl_mr_disp8):
3741         (JSC::X86Assembler::movq_mr_disp8):
3742         (JSC::X86Assembler::repatchCompact):
3743         (JSC::X86Assembler::setInt8):
3744         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp_disp8):
3745         (JSC::X86Assembler::X86InstructionFormatter::oneByteOp64_disp8):
3746         (JSC::X86Assembler::X86InstructionFormatter::memoryModRM):
3747         * jit/JIT.h:
3748         * jit/JITPropertyAccess.cpp:
3749         (JSC::JIT::compileGetByIdHotPath):
3750         (JSC::JIT::emit_op_put_by_id):
3751         (JSC::JIT::patchGetByIdSelf):
3752         * jit/JITPropertyAccess32_64.cpp:
3753         (JSC::JIT::compileGetByIdHotPath):
3754         (JSC::JIT::emit_op_put_by_id):
3755         (JSC::JIT::patchGetByIdSelf):
3756         * jit/JITStubs.cpp:
3757         (JSC::JITThunks::tryCacheGetByID):
3758
3759 2011-05-16  Sheriff Bot  <webkit.review.bot@gmail.com>
3760
3761         Unreviewed, rolling out r86653.
3762         http://trac.webkit.org/changeset/86653
3763         https://bugs.webkit.org/show_bug.cgi?id=60944
3764
3765         "Caused regressions on Windows, OSX and EFL" (Requested by
3766         yutak on #webkit).
3767
3768         * DerivedSources.make:
3769         * DerivedSources.pro:
3770         * GNUmakefile.am:
3771         * GNUmakefile.list.am:
3772         * JavaScriptCore.exp:
3773         * JavaScriptCore.gypi:
3774         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3775         * create_hash_table:
3776         * heap/Heap.cpp:
3777         (JSC::TypeCounter::operator()):
3778         * interpreter/CallFrame.h:
3779         (JSC::ExecState::arrayTable):
3780         (JSC::ExecState::numberTable):
3781         * runtime/ArrayConstructor.cpp:
3782         (JSC::ArrayConstructor::ArrayConstructor):
3783         * runtime/ArrayConstructor.h:
3784         * runtime/ArrayPrototype.cpp:
3785         (JSC::ArrayPrototype::getOwnPropertySlot):
3786         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
3787         * runtime/ArrayPrototype.h:
3788         * runtime/BooleanPrototype.cpp:
3789         (JSC::BooleanPrototype::BooleanPrototype):
3790         * runtime/BooleanPrototype.h:
3791         * runtime/DateConstructor.cpp:
3792         (JSC::DateConstructor::DateConstructor):
3793         * runtime/DateConstructor.h:
3794         * runtime/ErrorPrototype.cpp:
3795         (JSC::ErrorPrototype::ErrorPrototype):
3796         * runtime/ErrorPrototype.h:
3797         * runtime/JSGlobalData.cpp:
3798         (JSC::JSGlobalData::JSGlobalData):
3799         (JSC::JSGlobalData::~JSGlobalData):
3800         * runtime/JSGlobalData.h:
3801         * runtime/JSGlobalObject.cpp:
3802         (JSC::JSGlobalObject::reset):
3803         * runtime/JSGlobalObject.h:
3804         (JSC::JSGlobalObject::addStaticGlobals):
3805         (JSC::JSGlobalObject::getOwnPropertySlot):
3806         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
3807         * runtime/JSGlobalObjectFunctions.cpp:
3808         (JSC::globalFuncJSCPrint):
3809         * runtime/JSGlobalObjectFunctions.h:
3810         * runtime/MathObject.cpp:
3811         * runtime/NumberConstructor.cpp:
3812         (JSC::NumberConstructor::getOwnPropertySlot):
3813         (JSC::NumberConstructor::getOwnPropertyDescriptor):
3814         * runtime/NumberPrototype.cpp:
3815         (JSC::NumberPrototype::NumberPrototype):
3816         * runtime/NumberPrototype.h:
3817         * runtime/ObjectPrototype.cpp:
3818         (JSC::ObjectPrototype::ObjectPrototype):
3819         (JSC::ObjectPrototype::put):
3820         (JSC::ObjectPrototype::getOwnPropertySlot):
3821         * runtime/ObjectPrototype.h:
3822         * runtime/RegExpPrototype.cpp:
3823         (JSC::RegExpPrototype::RegExpPrototype):
3824         * runtime/RegExpPrototype.h:
3825         * runtime/StringConstructor.cpp:
3826         (JSC::StringConstructor::StringConstructor):
3827         * runtime/StringConstructor.h:
3828
3829 2011-05-16  Geoffrey Garen  <ggaren@apple.com>
3830
3831         Reviewed by Geoffrey Garen.
3832
3833         Global object initialization is expensive
3834         https://bugs.webkit.org/show_bug.cgi?id=60933
3835         
3836         Changed a bunch of globals to allocate their properties lazily, and changed
3837         the global object to allocate a bunch of its globals lazily.
3838         
3839         This reduces the footprint of a global object from 287 objects with 58
3840         functions for 24K to 173 objects with 20 functions for 15K.
3841
3842         Large patch, but it's all mechanical.
3843
3844         * DerivedSources.make:
3845         * JavaScriptCore.exp: Build!
3846
3847         * create_hash_table: Added a special case for fromCharCode, since it uses
3848         a custom "thunk generator".
3849
3850         * heap/Heap.cpp:
3851         (JSC::TypeCounter::operator()): Fixed a bug where the type counter would
3852         overcount objects that were owned through more than one mechanism because
3853         it was getting in the way of counting the results for this patch.
3854
3855         * interpreter/CallFrame.h:
3856         (JSC::ExecState::arrayConstructorTable):
3857         (JSC::ExecState::arrayPrototypeTable):
3858         (JSC::ExecState::booleanPrototypeTable):
3859         (JSC::ExecState::dateConstructorTable):
3860         (JSC::ExecState::errorPrototypeTable):
3861         (JSC::ExecState::globalObjectTable):
3862         (JSC::ExecState::numberConstructorTable):
3863         (JSC::ExecState::numberPrototypeTable):
3864         (JSC::ExecState::objectPrototypeTable):
3865         (JSC::ExecState::regExpPrototypeTable):
3866         (JSC::ExecState::stringConstructorTable): Added new tables.
3867
3868         * runtime/ArrayConstructor.cpp:
3869         (JSC::ArrayConstructor::ArrayConstructor):
3870         (JSC::ArrayConstructor::getOwnPropertySlot):
3871         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
3872         * runtime/ArrayConstructor.h:
3873         (JSC::ArrayConstructor::createStructure):
3874         * runtime/ArrayPrototype.cpp:
3875         (JSC::ArrayPrototype::getOwnPropertySlot):
3876         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
3877         * runtime/ArrayPrototype.h:
3878         * runtime/BooleanPrototype.cpp:
3879         (JSC::BooleanPrototype::BooleanPrototype):
3880         (JSC::BooleanPrototype::getOwnPropertySlot):
3881         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
3882         * runtime/BooleanPrototype.h:
3883         (JSC::BooleanPrototype::createStructure):
3884         * runtime/DateConstructor.cpp:
3885         (JSC::DateConstructor::DateConstructor):
3886         (JSC::DateConstructor::getOwnPropertySlot):
3887         (JSC::DateConstructor::getOwnPropertyDescriptor):
3888         * runtime/DateConstructor.h:
3889         (JSC::DateConstructor::createStructure):
3890         * runtime/ErrorPrototype.cpp:
3891         (JSC::ErrorPrototype::ErrorPrototype):
3892         (JSC::ErrorPrototype::getOwnPropertySlot):
3893         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
3894         * runtime/ErrorPrototype.h:
3895         (JSC::ErrorPrototype::createStructure): Standardized these objects
3896         to use static tables for function properties.
3897
3898         * runtime/JSGlobalData.cpp:
3899         (JSC::JSGlobalData::JSGlobalData):
3900         (JSC::JSGlobalData::~JSGlobalData):
3901         * runtime/JSGlobalData.h: Added new tables.
3902
3903         * runtime/JSGlobalObject.cpp:
3904         (JSC::JSGlobalObject::reset):
3905         (JSC::JSGlobalObject::addStaticGlobals):
3906         (JSC::JSGlobalObject::getOwnPropertySlot):
3907         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
3908         * runtime/JSGlobalObject.h:
3909         * runtime/JSGlobalObjectFunctions.cpp:
3910         * runtime/JSGlobalObjectFunctions.h: Changed JSGlobalObject to use a
3911         static table for its global functions. This required uninlining some
3912         things to avoid a circular header dependency. However, those things
3913         probably shouldn't have been inlined in the first place.
3914         
3915         Even more global object properties can be made lazy, but that requires
3916         more in-depth changes.
3917
3918         * runtime/MathObject.cpp:
3919         * runtime/NumberConstructor.cpp:
3920         (JSC::NumberConstructor::getOwnPropertySlot):
3921         (JSC::NumberConstructor::getOwnPropertyDescriptor):
3922         * runtime/NumberPrototype.cpp:
3923         (JSC::NumberPrototype::NumberPrototype):
3924         (JSC::NumberPrototype::getOwnPropertySlot):
3925         (JSC::NumberPrototype::getOwnPropertyDescriptor):
3926         * runtime/NumberPrototype.h:
3927         (JSC::NumberPrototype::createStructure):
3928         * runtime/ObjectPrototype.cpp:
3929         (JSC::ObjectPrototype::ObjectPrototype):
3930         (JSC::ObjectPrototype::put):
3931         (JSC::ObjectPrototype::getOwnPropertySlot):
3932         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
3933         * runtime/ObjectPrototype.h:
3934         (JSC::ObjectPrototype::createStructure):
3935         * runtime/RegExpPrototype.cpp:
3936         (JSC::RegExpPrototype::RegExpPrototype):
3937         (JSC::RegExpPrototype::getOwnPropertySlot):
3938         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
3939         * runtime/RegExpPrototype.h:
3940         (JSC::RegExpPrototype::createStructure):
3941         * runtime/StringConstructor.cpp:
3942         (JSC::StringConstructor::StringConstructor):
3943         (JSC::StringConstructor::getOwnPropertySlot):
3944         (JSC::StringConstructor::getOwnPropertyDescriptor):
3945         * runtime/StringConstructor.h:
3946         (JSC::StringConstructor::createStructure): Standardized these objects
3947         to use static tables for function properties.
3948
3949 2011-05-16  David Kilzer  <ddkilzer@apple.com>
3950
3951         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
3952         <rdar://problem/9446430>
3953
3954         Reviewed by Mark Rowe.
3955
3956         * Configurations/Base.xcconfig: Fixed typo.
3957
3958 2011-05-16  Oliver Hunt  <oliver@apple.com>
3959
3960         Reviewed by Geoffrey Garen.
3961
3962         JSWeakObjectMap finalisation may occur while gc is in inconsistent state
3963         https://bugs.webkit.org/show_bug.cgi?id=60908
3964         <rdar://problem/9409491>
3965
3966         We need to ensure that we have called all the weak map finalizers while
3967         the global object (and hence global context) is still in a consistent
3968         state.  The best way to achieve this is to simply use a weak handle and
3969         finalizer on the global object.
3970
3971         * JavaScriptCore.exp:
3972         * runtime/JSGlobalObject.cpp:
3973         (JSC::JSGlobalObject::WeakMapFinalizer::finalize):
3974         * runtime/JSGlobalObject.h:
3975         (JSC::JSGlobalObject::registerWeakMap):
3976
3977 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
3978
3979         Reviewed by Laszlo Gombos.
3980
3981         [Qt][WK2][Symbian] Shared memory implementation for Symbian
3982         https://bugs.webkit.org/show_bug.cgi?id=55875
3983
3984         * wtf/Platform.h: Exclude Symbian OS from USE(UNIX_DOMAIN_SOCKETS) users
3985
3986 2011-05-16  Gavin Barraclough  <barraclough@apple.com>
3987
3988         Rubber stamped by Geoff Garen.
3989
3990         https://bugs.webkit.org/show_bug.cgi?id=60866
3991         Evaluation order broken for empty alternatives in subpatterns
3992
3993         Reverting https://bugs.webkit.org/show_bug.cgi?id=51395
3994
3995         * yarr/YarrPattern.cpp:
3996         (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd):
3997
3998 2011-05-15  Gavin Barraclough  <barraclough@apple.com>
3999
4000         Reviewed by Geoff Garen & Michael Saboff.
4001
4002         https://bugs.webkit.org/show_bug.cgi?id=60860
4003         Simplify backtracking in YARR JIT
4004
4005         YARR JIT currently performs a single pass of code generation over the pattern,
4006         with special handling to allow the code generation for some backtracking code
4007         out of line. We can simplify things by moving to a common mechanism whereby all
4008         forwards matching code is generated in one pass, and all backtracking code is
4009         generated in another. Backtracking code can be generated in reverse order, to
4010         optimized the common fall-through case.
4011
4012         To make it easier to walk over the pattern, we can first convert to a more
4013         byte-code like format before JIT generating. In time we should unify this with
4014         the YARR interpreter to more closely unify the two.
4015
4016         * yarr/YarrJIT.cpp:
4017         (JSC::Yarr::YarrGenerator::jumpIfNoAvailableInput):
4018         (JSC::Yarr::YarrGenerator::YarrOp::YarrOp):
4019         (JSC::Yarr::YarrGenerator::BacktrackingState::BacktrackingState):
4020         (JSC::Yarr::YarrGenerator::BacktrackingState::append):
4021         (JSC::Yarr::YarrGenerator::BacktrackingState::fallthrough):
4022         (JSC::Yarr::YarrGenerator::BacktrackingState::link):
4023         (JSC::Yarr::YarrGenerator::BacktrackingState::linkTo):
4024         (JSC::Yarr::YarrGenerator::BacktrackingState::takeBacktracksToJumpList):
4025         (JSC::Yarr::YarrGenerator::BacktrackingState::isEmpty):
4026         (JSC::Yarr::YarrGenerator::BacktrackingState::linkDataLabels):
4027         (JSC::Yarr::YarrGenerator::BacktrackingState::ReturnAddressRecord::ReturnAddressRecord):
4028         (JSC::Yarr::YarrGenerator::generateAssertionBOL):
4029         (JSC::Yarr::YarrGenerator::backtrackAssertionBOL):
4030         (JSC::Yarr::YarrGenerator::generateAssertionEOL):
4031         (JSC::Yarr::YarrGenerator::backtrackAssertionEOL):
4032         (JSC::Yarr::YarrGenerator::matchAssertionWordchar):
4033         (JSC::Yarr::YarrGenerator::generateAssertionWordBoundary):
4034         (JSC::Yarr::YarrGenerator::backtrackAssertionWordBoundary):
4035         (JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):
4036         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterOnce):
4037         (JSC::Yarr::YarrGenerator::generatePatternCharacterFixed):
4038         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterFixed):
4039         (JSC::Yarr::YarrGenerator::generatePatternCharacterGreedy):
4040         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterGreedy):
4041         (JSC::Yarr::YarrGenerator::generatePatternCharacterNonGreedy):
4042         (JSC::Yarr::YarrGenerator::backtrackPatternCharacterNonGreedy):
4043         (JSC::Yarr::YarrGenerator::generateCharacterClassOnce):
4044         (JSC::Yarr::YarrGenerator::backtrackCharacterClassOnce):
4045         (JSC::Yarr::YarrGenerator::generateCharacterClassFixed):
4046         (JSC::Yarr::YarrGenerator::backtrackCharacterClassFixed):
4047         (JSC::Yarr::YarrGenerator::generateCharacterClassGreedy):
4048         (JSC::Yarr::YarrGenerator::backtrackCharacterClassGreedy):
4049         (JSC::Yarr::YarrGenerator::generateCharacterClassNonGreedy):
4050         (JSC::Yarr::YarrGenerator::backtrackCharacterClassNonGreedy):
4051         (JSC::Yarr::YarrGenerator::generateTerm):
4052         (JSC::Yarr::YarrGenerator::backtrackTerm):
4053         (JSC::Yarr::YarrGenerator::generate):
4054         (JSC::Yarr::YarrGenerator::backtrack):
4055         (JSC::Yarr::YarrGenerator::opCompileParenthesesSubpattern):
4056         (JSC::Yarr::YarrGenerator::opCompileParentheticalAssertion):
4057         (JSC::Yarr::YarrGenerator::opCompileAlternative):
4058         (JSC::Yarr::YarrGenerator::opCompileBody):
4059         (JSC::Yarr::YarrGenerator::YarrGenerator):
4060         (JSC::Yarr::YarrGenerator::compile):
4061
4062 2011-05-15  Adam Barth  <abarth@webkit.org>
4063
4064         Enable strict PassOwnPtr on Qt.  (Build fixes to follow.)
4065
4066         * wtf/PassOwnPtr.h:
4067
4068 2011-05-15  Geoffrey Garen  <ggaren@apple.com>
4069
4070         Reviewed by Maciej Stachowiak.
4071
4072         Partial fix for <rdar://problem/9417875> REGRESSION: SunSpider ~17% slower
4073         in browser than on command line
4074         
4075         This patch fixes a few issues in generated code that could unreasonably
4076         prolong object lifetimes.