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