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