855f081d891d52e496bfbb05931483fd6417b59a
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2011-11-15  Simon Hausmann  <simon.hausmann@nokia.com>
2
3         [Qt] Centralize hide_symbols and ensure all libs are built with symbol visibility & bsymbolic_functions
4
5         Reviewed by Tor Arne Vestbø.
6
7         * Target.pri: Eliminate duplicated symbol stuff that lives now in default_post.prf.
8
9 2011-11-15  Yuqiang Xian  <yuqiang.xian@intel.com>
10
11         Remove DFGJITCompilerInlineMethods
12         https://bugs.webkit.org/show_bug.cgi?id=72366
13
14         Reviewed by Filip Pizlo.
15
16         Those methods are actually seldom used. Modify the few such places and
17         remove DFGJITCompilerInlineMethods stuffs totally.
18
19         * GNUmakefile.list.am:
20         * JavaScriptCore.xcodeproj/project.pbxproj:
21         * dfg/DFGJITCompiler.h:
22         (JSC::DFG::JITCompiler::addressOfDoubleConstant):
23         * dfg/DFGJITCompilerInlineMethods.h: Removed.
24         * dfg/DFGSpeculativeJIT.cpp:
25         * dfg/DFGSpeculativeJIT.h:
26         (JSC::DFG::SpeculativeJIT::silentFillFPR):
27         * dfg/DFGSpeculativeJIT32_64.cpp:
28         (JSC::DFG::SpeculativeJIT::fillJSValue):
29         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
30
31 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
32
33         DFG::SpeculativeJIT and DFG::JITCodeGenerator should be combined
34         https://bugs.webkit.org/show_bug.cgi?id=72348
35
36         Reviewed by Gavin Barraclough.
37         
38         Moved all of JITCodeGenerator into SpeculativeJIT.
39
40         * CMakeLists.txt:
41         * GNUmakefile.list.am:
42         * JavaScriptCore.xcodeproj/project.pbxproj:
43         * Target.pri:
44         * dfg/DFGJITCodeGenerator.cpp: Removed.
45         * dfg/DFGJITCodeGenerator.h: Removed.
46         * dfg/DFGJITCodeGenerator32_64.cpp: Removed.
47         * dfg/DFGJITCodeGenerator64.cpp: Removed.
48         * dfg/DFGJITCompiler.cpp:
49         * dfg/DFGRepatch.cpp:
50         (JSC::DFG::generateProtoChainAccessStub):
51         (JSC::DFG::tryCacheGetByID):
52         (JSC::DFG::tryCachePutByID):
53         * dfg/DFGSpeculativeJIT.cpp:
54         (JSC::DFG::SpeculativeJIT::clearGenerationInfo):
55         (JSC::DFG::SpeculativeJIT::fillStorage):
56         (JSC::DFG::SpeculativeJIT::useChildren):
57         (JSC::DFG::SpeculativeJIT::isStrictInt32):
58         (JSC::DFG::SpeculativeJIT::isKnownInteger):
59         (JSC::DFG::SpeculativeJIT::isKnownNumeric):
60         (JSC::DFG::SpeculativeJIT::isKnownCell):
61         (JSC::DFG::SpeculativeJIT::isKnownNotCell):
62         (JSC::DFG::SpeculativeJIT::isKnownNotInteger):
63         (JSC::DFG::SpeculativeJIT::isKnownNotNumber):
64         (JSC::DFG::SpeculativeJIT::isKnownBoolean):
65         (JSC::DFG::SpeculativeJIT::writeBarrier):
66         (JSC::DFG::SpeculativeJIT::markCellCard):
67         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
68         (JSC::DFG::SpeculativeJIT::nonSpeculativeStrictEq):
69         (JSC::DFG::dataFormatString):
70         (JSC::DFG::SpeculativeJIT::dump):
71         (JSC::DFG::SpeculativeJIT::checkConsistency):
72         (JSC::DFG::GPRTemporary::GPRTemporary):
73         (JSC::DFG::GPRTemporary::adopt):
74         (JSC::DFG::FPRTemporary::FPRTemporary):
75         * dfg/DFGSpeculativeJIT.h:
76         (JSC::DFG::SpeculativeJIT::at):
77         (JSC::DFG::SpeculativeJIT::lock):
78         (JSC::DFG::SpeculativeJIT::unlock):
79         (JSC::DFG::SpeculativeJIT::canReuse):
80         (JSC::DFG::SpeculativeJIT::reuse):
81         (JSC::DFG::SpeculativeJIT::allocate):
82         (JSC::DFG::SpeculativeJIT::tryAllocate):
83         (JSC::DFG::SpeculativeJIT::fprAllocate):
84         (JSC::DFG::SpeculativeJIT::isFilled):
85         (JSC::DFG::SpeculativeJIT::isFilledDouble):
86         (JSC::DFG::SpeculativeJIT::use):
87         (JSC::DFG::SpeculativeJIT::selectScratchGPR):
88         (JSC::DFG::SpeculativeJIT::silentSpillGPR):
89         (JSC::DFG::SpeculativeJIT::silentSpillFPR):
90         (JSC::DFG::SpeculativeJIT::silentFillGPR):
91         (JSC::DFG::SpeculativeJIT::silentFillFPR):
92         (JSC::DFG::SpeculativeJIT::silentSpillAllRegisters):
93         (JSC::DFG::SpeculativeJIT::silentFillAllRegisters):
94         (JSC::DFG::SpeculativeJIT::boxDouble):
95         (JSC::DFG::SpeculativeJIT::unboxDouble):
96         (JSC::DFG::SpeculativeJIT::spill):
97         (JSC::DFG::SpeculativeJIT::isConstant):
98         (JSC::DFG::SpeculativeJIT::isJSConstant):
99         (JSC::DFG::SpeculativeJIT::isInt32Constant):
100         (JSC::DFG::SpeculativeJIT::isDoubleConstant):
101         (JSC::DFG::SpeculativeJIT::isNumberConstant):
102         (JSC::DFG::SpeculativeJIT::isBooleanConstant):
103         (JSC::DFG::SpeculativeJIT::isFunctionConstant):
104         (JSC::DFG::SpeculativeJIT::valueOfInt32Constant):
105         (JSC::DFG::SpeculativeJIT::valueOfNumberConstant):
106         (JSC::DFG::SpeculativeJIT::addressOfDoubleConstant):
107         (JSC::DFG::SpeculativeJIT::valueOfJSConstant):
108         (JSC::DFG::SpeculativeJIT::valueOfBooleanConstant):
109         (JSC::DFG::SpeculativeJIT::valueOfFunctionConstant):
110         (JSC::DFG::SpeculativeJIT::isNullConstant):
111         (JSC::DFG::SpeculativeJIT::identifier):
112         (JSC::DFG::SpeculativeJIT::flushRegisters):
113         (JSC::DFG::SpeculativeJIT::isFlushed):
114         (JSC::DFG::SpeculativeJIT::valueOfJSConstantAsImmPtr):
115         (JSC::DFG::SpeculativeJIT::bitOp):
116         (JSC::DFG::SpeculativeJIT::shiftOp):
117         (JSC::DFG::SpeculativeJIT::detectPeepHoleBranch):
118         (JSC::DFG::SpeculativeJIT::addressOfCallData):
119         (JSC::DFG::SpeculativeJIT::tagOfCallData):
120         (JSC::DFG::SpeculativeJIT::payloadOfCallData):
121         (JSC::DFG::SpeculativeJIT::integerResult):
122         (JSC::DFG::SpeculativeJIT::noResult):
123         (JSC::DFG::SpeculativeJIT::cellResult):
124         (JSC::DFG::SpeculativeJIT::booleanResult):
125         (JSC::DFG::SpeculativeJIT::jsValueResult):
126         (JSC::DFG::SpeculativeJIT::storageResult):
127         (JSC::DFG::SpeculativeJIT::doubleResult):
128         (JSC::DFG::SpeculativeJIT::initConstantInfo):
129         (JSC::DFG::SpeculativeJIT::resetCallArguments):
130         (JSC::DFG::SpeculativeJIT::addCallArgument):
131         (JSC::DFG::SpeculativeJIT::setupArguments):
132         (JSC::DFG::SpeculativeJIT::setupArgumentsExecState):
133         (JSC::DFG::SpeculativeJIT::setupArgumentsWithExecState):
134         (JSC::DFG::SpeculativeJIT::setupTwoStubArgs):
135         (JSC::DFG::SpeculativeJIT::setupStubArguments):
136         (JSC::DFG::SpeculativeJIT::callOperation):
137         (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheck):
138         (JSC::DFG::SpeculativeJIT::appendCallWithExceptionCheckSetResult):
139         (JSC::DFG::SpeculativeJIT::setupResults):
140         (JSC::DFG::SpeculativeJIT::appendCallSetResult):
141         (JSC::DFG::SpeculativeJIT::addBranch):
142         (JSC::DFG::SpeculativeJIT::linkBranches):
143         (JSC::DFG::SpeculativeJIT::block):
144         (JSC::DFG::SpeculativeJIT::checkConsistency):
145         (JSC::DFG::SpeculativeJIT::BranchRecord::BranchRecord):
146         (JSC::DFG::IntegerOperand::IntegerOperand):
147         (JSC::DFG::IntegerOperand::~IntegerOperand):
148         (JSC::DFG::IntegerOperand::index):
149         (JSC::DFG::IntegerOperand::format):
150         (JSC::DFG::IntegerOperand::gpr):
151         (JSC::DFG::IntegerOperand::use):
152         (JSC::DFG::DoubleOperand::DoubleOperand):
153         (JSC::DFG::DoubleOperand::~DoubleOperand):
154         (JSC::DFG::DoubleOperand::index):
155         (JSC::DFG::DoubleOperand::fpr):
156         (JSC::DFG::DoubleOperand::use):
157         (JSC::DFG::JSValueOperand::JSValueOperand):
158         (JSC::DFG::JSValueOperand::~JSValueOperand):
159         (JSC::DFG::JSValueOperand::index):
160         (JSC::DFG::JSValueOperand::gpr):
161         (JSC::DFG::JSValueOperand::jsValueRegs):
162         (JSC::DFG::JSValueOperand::isDouble):
163         (JSC::DFG::JSValueOperand::fill):
164         (JSC::DFG::JSValueOperand::tagGPR):
165         (JSC::DFG::JSValueOperand::payloadGPR):
166         (JSC::DFG::JSValueOperand::fpr):
167         (JSC::DFG::JSValueOperand::use):
168         (JSC::DFG::StorageOperand::StorageOperand):
169         (JSC::DFG::StorageOperand::~StorageOperand):
170         (JSC::DFG::StorageOperand::index):
171         (JSC::DFG::StorageOperand::gpr):
172         (JSC::DFG::StorageOperand::use):
173         (JSC::DFG::GPRTemporary::~GPRTemporary):
174         (JSC::DFG::GPRTemporary::gpr):
175         (JSC::DFG::FPRTemporary::~FPRTemporary):
176         (JSC::DFG::FPRTemporary::fpr):
177         (JSC::DFG::FPRTemporary::FPRTemporary):
178         (JSC::DFG::GPRResult::GPRResult):
179         (JSC::DFG::GPRResult2::GPRResult2):
180         (JSC::DFG::FPRResult::FPRResult):
181         (JSC::DFG::FPRResult::lockedResult):
182         (JSC::DFG::SpeculativeJIT::SpeculativeJIT):
183         * dfg/DFGSpeculativeJIT32_64.cpp:
184         (JSC::DFG::SpeculativeJIT::fillInteger):
185         (JSC::DFG::SpeculativeJIT::fillDouble):
186         (JSC::DFG::SpeculativeJIT::fillJSValue):
187         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
188         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
189         (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
190         (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
191         (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
192         (JSC::DFG::SpeculativeJIT::cachedGetById):
193         (JSC::DFG::SpeculativeJIT::cachedPutById):
194         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
195         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
196         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
197         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
198         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
199         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
200         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
201         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
202         (JSC::DFG::SpeculativeJIT::emitCall):
203         * dfg/DFGSpeculativeJIT64.cpp:
204         (JSC::DFG::SpeculativeJIT::fillInteger):
205         (JSC::DFG::SpeculativeJIT::fillDouble):
206         (JSC::DFG::SpeculativeJIT::fillJSValue):
207         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToNumber):
208         (JSC::DFG::SpeculativeJIT::nonSpeculativeValueToInt32):
209         (JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
210         (JSC::DFG::SpeculativeJIT::nonSpeculativeKnownConstantArithOp):
211         (JSC::DFG::SpeculativeJIT::nonSpeculativeBasicArithOp):
212         (JSC::DFG::SpeculativeJIT::cachedGetById):
213         (JSC::DFG::SpeculativeJIT::cachedPutById):
214         (JSC::DFG::SpeculativeJIT::cachedGetMethod):
215         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
216         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
217         (JSC::DFG::SpeculativeJIT::nonSpeculativeCompareNull):
218         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
219         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
220         (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
221         (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
222         (JSC::DFG::SpeculativeJIT::emitCall):
223         * runtime/JSFunction.h:
224
225 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
226
227         Weak reference harvesters should run to fixpoint
228         https://bugs.webkit.org/show_bug.cgi?id=72346
229
230         Reviewed by Oliver Hunt.
231
232         * heap/Heap.cpp:
233         (JSC::Heap::markRoots):
234         * heap/ListableHandler.h:
235         (JSC::ListableHandler::next):
236         (JSC::ListableHandler::List::head):
237         (JSC::ListableHandler::List::removeNext):
238         (JSC::ListableHandler::List::removeAll):
239         * heap/MarkStack.cpp:
240         (JSC::MarkStackThreadSharedData::reset):
241         (JSC::SlotVisitor::harvestWeakReferences):
242         * heap/MarkStack.h:
243         (JSC::MarkStack::isEmpty):
244
245 2011-11-14  Oliver Hunt  <oliver@apple.com>
246
247         Start migrating typed array impl types to WTF
248         https://bugs.webkit.org/show_bug.cgi?id=72336
249
250         Reviewed by Geoffrey Garen.
251
252         Add typed array impls to WTF forwarding header.
253
254         * wtf/Forward.h:
255
256 2011-11-14  Julien Chaffraix  <jchaffraix@webkit.org>
257
258         Add --css-grid-layout to build-webkit and the build systems
259         https://bugs.webkit.org/show_bug.cgi?id=72320
260
261         Reviewed by Ojan Vafai.
262
263         * Configurations/FeatureDefines.xcconfig:
264
265 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
266
267         A little bit of arguments / activation cleanup
268         https://bugs.webkit.org/show_bug.cgi?id=72339
269
270         Reviewed by Gavin Barraclough.
271         
272         Renamed copyRegisters => tearOff to match bytecode and other terminology.
273         
274         Renamed setActivation => didTearOffActivation to indicate that this is a
275         notification the object may choose to ignore. Moved "Should I ignore?"
276         code into the arguments object to avoid duplication elsewhere.
277
278         * interpreter/Interpreter.cpp:
279         (JSC::Interpreter::unwindCallFrame):
280         (JSC::Interpreter::privateExecute):
281         (JSC::Interpreter::retrieveArguments):
282         * jit/JITStubs.cpp:
283         (JSC::DEFINE_STUB_FUNCTION):
284         * runtime/Arguments.h:
285         (JSC::Arguments::createAndTearOff):
286         (JSC::Arguments::didTearOffActivation):
287         (JSC::Arguments::finishCreationButDontTearOff):
288         (JSC::Arguments::finishCreation):
289         (JSC::Arguments::finishCreationAndTearOff):
290         (JSC::Arguments::tearOff):
291
292         * runtime/JSActivation.h:
293         (JSC::JSActivation::tearOff): Moved Activation's code into its own header
294         because that's where it belongs.
295
296 2011-11-14  Gavin Barraclough  <barraclough@apple.com>
297
298         Should sign the jsc binary
299         https://bugs.webkit.org/show_bug.cgi?id=72332
300
301         Reviewed by David Kilzer.
302
303         * Configurations/JSC.xcconfig:
304         * entitlements.plist: Added.
305
306 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
307
308         DFG's inline references to objects should be tracked
309         https://bugs.webkit.org/show_bug.cgi?id=72313
310
311         Reviewed by Gavin Barraclough.
312         
313         Added a pinCell() method in the parser that currently creates a
314         dummy constant in CodeBlock. Added calls to pinCell() wherever the
315         DFG would inline a constant reference that the original code would
316         not have referred to.
317         
318         * dfg/DFGByteCodeParser.cpp:
319         (JSC::DFG::ByteCodeParser::getCellConstantIndex):
320         (JSC::DFG::ByteCodeParser::pinCell):
321         (JSC::DFG::ByteCodeParser::cellConstant):
322         (JSC::DFG::ByteCodeParser::handleCall):
323         (JSC::DFG::ByteCodeParser::handleInlining):
324         (JSC::DFG::ByteCodeParser::parseBlock):
325
326 2011-11-14  Filip Pizlo  <fpizlo@apple.com>
327
328         DFG put_by_id transition optimizations test the wrong structures
329         https://bugs.webkit.org/show_bug.cgi?id=72324
330
331         Reviewed by Gavin Barraclough.
332
333         * dfg/DFGByteCodeParser.cpp:
334         (JSC::DFG::ByteCodeParser::structureChainIsStillValid):
335         (JSC::DFG::ByteCodeParser::parseBlock):
336         * jit/JITPropertyAccess.cpp:
337         (JSC::JIT::privateCompilePutByIdTransition):
338
339 2011-11-14  Michael Saboff  <msaboff@apple.com>
340
341         Further changes and cleanup to JSString.h and cpp.
342
343         Reviewed by Darin Adler.
344
345         * runtime/JSString.cpp:
346         (JSC::JSString::resolveRope): Change PassRefPtr to RefPtr.  Eliminated exec in slow case calls.
347         (JSC::JSString::resolveRopeSlowCase8): Darin and I agreed that this should have 8 in name.
348         (JSC::JSString::resolveRopeSlowCase): Removed exec parameter.
349         * runtime/JSString.h:
350
351 2011-11-14  Adam Barth  <abarth@webkit.org>
352
353         DateMath.cpp should not depend on JavaScriptCore
354         https://bugs.webkit.org/show_bug.cgi?id=71747
355
356         Reviewed by Darin Adler.
357
358         This patch moves the JSC-specific parts of DateMath into JSDateMath in
359         JavaScriptCore.  There shouldn't be any behavior change.
360
361         * CMakeLists.txt:
362         * GNUmakefile.list.am:
363         * JavaScriptCore.gypi:
364         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
365         * JavaScriptCore.xcodeproj/project.pbxproj:
366         * Target.pri:
367         * runtime/DateConstructor.cpp:
368         * runtime/DateConversion.cpp:
369         * runtime/DateInstance.cpp:
370         * runtime/DateInstanceCache.h:
371         * runtime/DatePrototype.cpp:
372         * runtime/InitializeThreading.cpp:
373         * runtime/JSDateMath.cpp: Copied from Source/JavaScriptCore/wtf/DateMath.cpp.
374         (JSC::timeToMS):
375         (JSC::msToSeconds):
376         * runtime/JSDateMath.h: Copied from Source/JavaScriptCore/wtf/DateMath.h.
377         * wtf/DateMath.cpp:
378         (WTF::isLeapYear):
379         (WTF::msToDays):
380         (WTF::msToMinutes):
381         (WTF::msToHours):
382         (WTF::parseDateFromNullTerminatedCharacters):
383         (WTF::makeRFC2822DateString):
384         * wtf/DateMath.h:
385
386 2011-11-14  Michael Saboff  <msaboff@apple.com>
387
388         Towards 8 bit strings - Add 8 bit handling to JSString Ropes
389         https://bugs.webkit.org/show_bug.cgi?id=72317
390
391         Added bit to track that a rope is made up of all 8 bit fibers.
392         Created an 8 bit path (fast and slow cases) to handle 8 bit 
393         only ropes.
394
395         Reviewed by Oliver Hunt.
396
397         * runtime/JSString.cpp:
398         (JSC::JSString::resolveRope):
399         (JSC::JSString::resolveRopeSlowCase8):
400         (JSC::JSString::resolveRopeSlowCase16):
401         * runtime/JSString.h:
402         (JSC::RopeBuilder::finishCreation):
403         (JSC::RopeBuilder::is8Bit):
404         (JSC::jsSubstring8):
405
406 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
407
408         A little bit of function call cleanup
409         https://bugs.webkit.org/show_bug.cgi?id=72314
410
411         Reviewed by Oliver Hunt.
412
413         * bytecompiler/BytecodeGenerator.cpp:
414         (JSC::BytecodeGenerator::emitCall): Renamed callFrame to registerOffset
415         because this value doesn't give you the offset of the callee's call frame.
416
417         (JSC::BytecodeGenerator::emitReturn): Tightened to use equality instead
418         of greater-than. Removed comment since its reasoning was wrong.
419         
420         (JSC::BytecodeGenerator::emitConstruct): Updated for rename mentioned above.
421
422         (JSC::BytecodeGenerator::isArgumentNumber): Provided a more precise way
423         to ask this question, giving the bytecode generator more freedom to change
424         internal implementation details.
425         
426         * bytecompiler/BytecodeGenerator.h: Reduced default vector capacity because
427         16 was overkill.
428         (JSC::CallArguments::registerOffset): Updated for rename mentioned above.
429
430         * bytecompiler/NodesCodegen.cpp:
431         (JSC::CallArguments::CallArguments):
432         (JSC::CallArguments::newArgument): Factored out argument allocation into
433         a helper function, so I can change it later.
434
435         (JSC::CallFunctionCallDotNode::emitBytecode):
436         (JSC::FunctionBodyNode::emitBytecode): Use helper function mentioned above.
437
438 2011-11-14  Tony Chang  <tony@chromium.org>
439
440         Remove the CSS3_FLEXBOX compile time flag and enable on all ports
441         https://bugs.webkit.org/show_bug.cgi?id=72196
442
443         Reviewed by Ojan Vafai.
444
445         * Configurations/FeatureDefines.xcconfig:
446
447 2011-11-14  Mark Rowe  <mrowe@apple.com>
448
449         <rdar://problem/10424154> testRegExp should not be installed as part of JavaScriptCore
450
451         testRegExp and testapi.js were being installed in the JavaScriptCore framework.
452         As test-only tools they shouldn't be installed there by default, only when
453         FORCE_TOOL_INSTALL is set to YES.
454
455         This patch incorprorates a few related changes:
456         1) Make the jsc and testRegExp targets be configured via .xcconfig files.
457         2) Sets up testRegExp so that SKIP_INSTALL is YES by default, and only NO when
458            FORCE_TOOL_INSTALL is YES.
459         3) Switches the testapi target to using a script build phase to install testapi.js
460            so that the installation will be skipped when SKIP_INSTALL is YES. I'm not sure
461            why this isn't the built-in behavior when a Copy Files build phase has "Copy only
462            when installing" checked, but it doesn't seem to be.
463         4) Other random cleanup such as removing a bogus group that refers to files that do
464            not exist, moving testRegExp.cpp in to the tests group, etc.
465
466         Reviewed by Geoff Garen.
467
468         * Configurations/JSC.xcconfig: Added.
469         * Configurations/TestRegExp.xcconfig: Added.
470         * JavaScriptCore.xcodeproj/project.pbxproj:
471
472 2011-11-14  Michael Saboff  <msaboff@apple.com>
473
474         Towards 8 bit strings - Add 8 bit paths to StringImpl methods
475         https://bugs.webkit.org/show_bug.cgi?id=72290
476
477         Added 8 bit patchs to StringImpl to number and find methods.
478
479         Reviewed by Oliver Hunt.
480
481         * wtf/text/StringImpl.cpp:
482         (WTF::StringImpl::toIntStrict):
483         (WTF::StringImpl::toUIntStrict):
484         (WTF::StringImpl::toInt64Strict):
485         (WTF::StringImpl::toUInt64Strict):
486         (WTF::StringImpl::toIntPtrStrict):
487         (WTF::StringImpl::toInt):
488         (WTF::StringImpl::toUInt):
489         (WTF::StringImpl::toInt64):
490         (WTF::StringImpl::toUInt64):
491         (WTF::StringImpl::toIntPtr):
492         (WTF::StringImpl::toDouble):
493         (WTF::StringImpl::toFloat):
494         (WTF::StringImpl::find):
495         (WTF::StringImpl::reverseFind):
496         * wtf/text/WTFString.cpp:
497         (WTF::toIntegralType):
498         (WTF::lengthOfCharactersAsInteger):
499         (WTF::charactersToIntStrict):
500         (WTF::charactersToUIntStrict):
501         (WTF::charactersToInt64Strict):
502         (WTF::charactersToUInt64Strict):
503         (WTF::charactersToIntPtrStrict):
504         (WTF::charactersToInt):
505         (WTF::charactersToUInt):
506         (WTF::charactersToInt64):
507         (WTF::charactersToUInt64):
508         (WTF::charactersToIntPtr):
509         (WTF::toDoubleType):
510         (WTF::charactersToDouble):
511         (WTF::charactersToFloat):
512         * wtf/text/WTFString.h:
513         (WTF::find):
514         (WTF::reverseFind):
515
516 2011-11-14  Vincent Scheib  <scheib@chromium.org>
517
518         Mouse Lock: Renaming to 'Pointer Lock': ENABLE Flags
519         https://bugs.webkit.org/show_bug.cgi?id=72286
520
521         Reviewed by Adam Barth.
522
523         * wtf/Platform.h:
524
525 2011-11-14  Gavin Barraclough  <barraclough@apple.com>
526
527         https://bugs.webkit.org/show_bug.cgi?id=72280
528
529         Rubber stamped by Geoff Garen.
530
531         Fix 32-bit Lion.
532
533         * JavaScriptCore.xcodeproj/project.pbxproj:
534         * wtf/OSAllocatorPosix.cpp:
535         (WTF::OSAllocator::reserveAndCommit):
536
537 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
538
539         32-bit Build fix: declare virtual register indices to be int rather than
540         unsigned, since they can be positive or negative.
541         
542         For better clarity, explicitly use ReturnPC instead of -1 as the "invalid"
543         state, since we'll never load and operate on the ReturnPC as a JS value.
544
545         * jit/JIT.cpp:
546         (JSC::JIT::JIT):
547         * jit/JIT.h:
548         * jit/JITInlineMethods.h:
549         (JSC::JIT::emitLoadTag):
550         (JSC::JIT::emitLoadPayload):
551         (JSC::JIT::emitLoad):
552         (JSC::JIT::emitLoad2):
553         (JSC::JIT::emitLoadDouble):
554         (JSC::JIT::emitLoadInt32ToDouble):
555         (JSC::JIT::emitStore):
556         (JSC::JIT::emitStoreInt32):
557         (JSC::JIT::emitStoreAndMapInt32):
558         (JSC::JIT::emitStoreCell):
559         (JSC::JIT::emitStoreBool):
560         (JSC::JIT::emitStoreDouble):
561         (JSC::JIT::map):
562         (JSC::JIT::unmap):
563         (JSC::JIT::isMapped):
564         (JSC::JIT::getMappedPayload):
565         (JSC::JIT::getMappedTag):
566         (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
567
568 2011-11-14  Michael Saboff  <msaboff@apple.com>
569
570         Remove unused m_data member from UStringSourceProvider
571         https://bugs.webkit.org/show_bug.cgi?id=72289
572
573         Removed unused m_data member from UStringSourceProvider.
574
575         Reviewed by Oliver Hunt.
576
577         * parser/SourceProvider.h:
578         (JSC::UStringSourceProvider::UStringSourceProvider):
579
580 2011-11-14  Michael Saboff  <msaboff@apple.com>
581
582         Towards 8 Bit Strings: Templatize YARR Parser
583         https://bugs.webkit.org/show_bug.cgi?id=72288
584
585         Changed Yarr::Parser to be a template based on character type.
586
587         Reviewed by Oliver Hunt.
588
589         * yarr/YarrParser.h:
590         (JSC::Yarr::Parser::Parser):
591         (JSC::Yarr::parse):
592
593 2011-11-14  Geoffrey Garen  <ggaren@apple.com>
594
595         32-bit build fix: Removed unused declaration.
596
597         * dfg/DFGJITCodeGenerator32_64.cpp:
598         (JSC::DFG::JITCodeGenerator::emitCall):
599
600 2011-11-12  Geoffrey Garen  <ggaren@apple.com>
601
602         Standardized the JS calling convention
603         https://bugs.webkit.org/show_bug.cgi?id=72221
604         
605         Reviewed by Oliver Hunt.
606
607         This patch standardizes the calling convention so that the caller always
608         sets up the callee's CallFrame. Adjustments for call type, callee type,
609         argument count, etc. now always take place after that initial setup.
610         
611         This is a step toward reversing the argument order, but also has these
612         immediate benefits (measured on x64):
613         
614         (1) 1% benchmark speedup across the board.
615         
616         (2) 50% code size reduction in baseline JIT function calls.
617         
618         (3) 1.5x speedup for single-dispatch .apply forwarding.
619         
620         (4) 1.1x speedup for multi-dispatch .apply forwarding.
621
622         This change affected the baseline JIT most, since the baseline JIT had
623         lots of ad hoc calling conventions for different caller / callee types.
624
625         * assembler/MacroAssemblerX86_64.h:
626         (JSC::MacroAssemblerX86_64::branchPtr):
627         (JSC::MacroAssemblerX86_64::branchAddPtr): Optimize compare to 0 into
628         a test, like other assemblers do. (I added some compares to 0, and didn't
629         want them to be slow.)
630
631         * bytecode/CodeBlock.cpp:
632         (JSC::CodeBlock::dump): Merged op_load_varargs into op_call_varargs so
633         op_call_varargs could share code generation with other forms of op_call.
634         This is also a small optimization, since op_*varargs no longer have to
635         pass arguments to each other through the register file.
636
637         (JSC::CallLinkInfo::unlink):
638         * bytecode/CodeBlock.h: Added a new call type: CallVarargs. This allows
639         us to link functions called through .apply syntax. We need to distinguish
640         CallVarargs from Call because CallVarargs changes its argument count
641         on each inovcation, so we must always link to the argument count checking
642         version of the callee.
643
644         * bytecode/Opcode.h:
645         * bytecompiler/BytecodeGenerator.cpp:
646         (JSC::BytecodeGenerator::emitCallVarargs):
647         * bytecompiler/BytecodeGenerator.h: Merged op_load_varargs into op_call_varargs.
648
649         * bytecompiler/NodesCodegen.cpp:
650         (JSC::ApplyFunctionCallDotNode::emitBytecode): Ditto. Also, simplified
651         some of this bytecode generation to remove redundant copies.
652
653         * dfg/DFGJITCodeGenerator32_64.cpp:
654         (JSC::DFG::JITCodeGenerator::emitCall):
655         * dfg/DFGJITCodeGenerator64.cpp:
656         (JSC::DFG::JITCodeGenerator::emitCall): Added a new call type: CallVarargs.
657         DFG doesn't support this type, but its code needs to change slightly
658         to accomodate a 3-state variable.
659
660         Stopped passing the argument count in regT1 because this is non-standard.
661         (The argument count goes in the CallFrame. This trades speed on the slow
662         path for speed and code size on the fast path, and simplicity on all paths.
663         A good trade, in my opinion.)
664
665         * dfg/DFGJITCompiler.cpp:
666         (JSC::DFG::JITCompiler::compileEntry):
667         (JSC::DFG::JITCompiler::link):
668         (JSC::DFG::JITCompiler::compile):
669         (JSC::DFG::JITCompiler::compileFunction): Tweaked code to make CallFrame
670         setup more obvious when single-stepping. Also, updated for argument count
671         not being in regT1.
672
673         * dfg/DFGJITCompiler.h:
674         (JSC::DFG::JITCompiler::addJSCall):
675         (JSC::DFG::JITCompiler::JSCallRecord::JSCallRecord): Added a new call
676         type: CallVarargs.
677
678         * dfg/DFGOperations.cpp: Do finish CallFrame setup in one place before
679         doing anything else. Don't check for stack overflow because we have no callee
680         registers, and our caller has already checked for its own registers.
681
682         * dfg/DFGRepatch.cpp:
683         (JSC::DFG::dfgLinkFor): We can link to our callee even if our argument
684         count doesn't match -- we just need to link to the argument count checking
685         version.
686
687         * interpreter/CallFrameClosure.h:
688         (JSC::CallFrameClosure::setArgument): BUG FIX: When supplying too many
689         arguments from C++, we need to supply a full copy of the arguments prior
690         to the subset copy that matches our callee's argument count. (That is what
691         the standard calling convention would have produced in JS.) I would have
692         split this into its own patch, but I couldn't find a way to get the JIT
693         to fail a regression test in this area without my patch applied.
694
695         * interpreter/Interpreter.cpp: Let the true code bomb begin!
696
697         (JSC::eval): Fixed up this helper function to operate on eval()'s CallFrame,
698         and not eval()'s caller frame. We no longer leave the CallFrame pointing
699         to eval()'s caller during a call to eval(), since that is not standard.
700
701         (JSC::loadVarargs): Factored out a shared helper function for use by JIT
702         and interpreter because half the code means one quarter the bugs -- in my
703         programming, at least.
704
705         (JSC::Interpreter::execute): Removed a now-unused way to invoke eval.
706         
707         (JSC::Interpreter::privateExecute): Removed an invalid ASSERT following
708         putDirect, because it got in the way of my testing. (When putting a
709         function, the cached base of a PutPropertySlot can be 0 to signify "do
710         not optimize".)
711         
712         op_call_eval: Updated for new, standard eval calling convention.
713         
714         op_load_varargs: Merged op_load_varargs into op_call_varargs.
715
716         op_call_varags: Updated for new, standard eval calling convention. Don't
717         check for stack overflow because the loadVarargs helper function already
718         checked.
719
720         * interpreter/Interpreter.h:
721         (JSC::Interpreter::execute): Headers are fun and educational!
722
723         * interpreter/RegisterFile.cpp:
724         (JSC::RegisterFile::growSlowCase):
725         * interpreter/RegisterFile.h:
726         (JSC::RegisterFile::grow): Factored out the slow case into a slow
727         case because it was cramping the style of my fast case.
728
729         * jit/JIT.cpp:
730         (JSC::JIT::privateCompile): Moved initialization of
731         RegisterFile::CodeBlock to make it more obvious when debugging. Removed
732         assumption that argument count is in regT1, as above. Removed call to
733         restoreArgumentReference() because the JITStubCall abstraction does this for us.
734
735         (JSC::JIT::linkFor): Link even if we miss on argument count, as above.
736
737         * jit/JIT.h:
738         * jit/JITCall32_64.cpp:
739         (JSC::JIT::emitSlow_op_call):
740         (JSC::JIT::emitSlow_op_call_eval):
741         (JSC::JIT::emitSlow_op_call_varargs):
742         (JSC::JIT::emitSlow_op_construct):
743         (JSC::JIT::emit_op_call_eval):
744         (JSC::JIT::emit_op_call_varargs): Share all function call code generation.
745         Don't count call_eval when accounting for linkable function calls because
746         eval doesn't link. (Its fast path is to perform the eval.)
747
748         (JSC::JIT::compileLoadVarargs): Ported this inline copying optimization
749         to our new calling convention. The key to this optimization is the
750         observation that, in a function that declares no arguments, if any
751         arguments are passed, they all end up right behind 'this'.
752
753         (JSC::JIT::compileCallEval):
754         (JSC::JIT::compileCallEvalSlowCase): Factored out eval for a little clarity.
755
756         (JSC::JIT::compileOpCall):
757         (JSC::JIT::compileOpCallSlowCase): If you are still with me, dear reader,
758         this is the whole point of my patch. The caller now unconditionally moves
759         the CallFrame forward and fills in the data it knows before taking any
760         branches to deal with weird caller/callee pairs.
761         
762         This also means that there is almost no slow path for calls -- it all
763         gets folded into the shared virtual call stub. The only things remaining
764         in the slow path are the rare case counter and a call to the stub.
765
766         * jit/JITOpcodes32_64.cpp:
767         (JSC::JIT::privateCompileCTIMachineTrampolines):
768         (JSC::JIT::privateCompileCTINativeCall): Updated for values being in
769         different registers or in memory, based on our new standard calling
770         convention.
771         
772         Added a shared path for calling out to CTI helper functions for non-JS
773         calls.
774
775         * jit/JITPropertyAccess32_64.cpp:
776         (JSC::JIT::emit_op_method_check): method_check emits its own code and
777         the following get_by_id's code, so it needs to add both when informing
778         result chaining of its result. This is important because the standard
779         calling convention can now take advantage of this chaining.
780
781         * jit/JITCall.cpp:
782         (JSC::JIT::compileLoadVarargs):
783         (JSC::JIT::compileCallEval):
784         (JSC::JIT::compileCallEvalSlowCase):
785         (JSC::JIT::compileOpCall):
786         (JSC::JIT::compileOpCallSlowCase):
787         * jit/JITOpcodes.cpp:
788         (JSC::JIT::privateCompileCTIMachineTrampolines):
789         (JSC::JIT::emit_op_call_eval):
790         (JSC::JIT::emit_op_call_varargs):
791         (JSC::JIT::emitSlow_op_call):
792         (JSC::JIT::emitSlow_op_call_eval):
793         (JSC::JIT::emitSlow_op_call_varargs):
794         (JSC::JIT::emitSlow_op_construct): Observe, as I write all of my code a
795         second time, now with 64 bits.
796
797         * jit/JITStubs.cpp:
798         (JSC::throwExceptionFromOpCall):
799         (JSC::jitCompileFor):
800         (JSC::arityCheckFor):
801         (JSC::lazyLinkFor): A lot of mechanical changes here for one purpose:
802         Exceptions thrown in the middle of a function call now use a shared helper
803         function (throwExceptionFromOpCall). This function understands that the
804         CallFrame currently points to the callEE, and the exception must be
805         thrown by the callER. (The old calling convention would often still have
806         the CallFrame pointing at the callER at the point of an exception. That
807         is not the way of our new, standard calling convention.)
808
809         (JSC::op_call_eval): Finish standard CallFrame setup before calling 
810         our eval helper function, which now depends on that setup.
811
812         * runtime/Arguments.h:
813         (JSC::Arguments::length): Renamed numProvidedArguments() to length()
814         because that's what other objects call it, and the difference made our
815         new loadVarargs helper function hard to read.
816
817         * runtime/Executable.cpp:
818         (JSC::FunctionExecutable::compileForCallInternal):
819         (JSC::FunctionExecutable::compileForConstructInternal): Interpreter build
820         fixes.
821
822         * runtime/FunctionPrototype.cpp:
823         (JSC::functionProtoFuncApply): Honor Arguments::MaxArguments even when
824         the .apply call_varargs optimization fails. (This bug appears on layout
825         tests when you disable the optimization.)
826
827 2011-11-11  Jer Noble  <jer.noble@apple.com>
828
829         Implement MediaController.
830         https://bugs.webkit.org/show_bug.cgi?id=71408
831
832         Reviewed by Eric Carlson.
833
834         Change the definition of WTF_USE_COREAUDIO to exclude Windows completely, as 
835         CoreAudioClock.h is not available there.
836
837         * wtf/Platform.h:
838
839 2011-11-14  Patrick Gansterer  <paroga@webkit.org>
840
841         [WIN] Remove dependency on pthread from FastMalloc
842         https://bugs.webkit.org/show_bug.cgi?id=72098
843
844         Reviewed by Adam Roben.
845
846         All pthread calls are already ported to native Windows calls.
847         Use the native version for all OS(WINDOWS) to remove the
848         runtime dependency on the pthread dll.
849
850         * wtf/FastMalloc.cpp:
851
852 2011-11-14  Simon Hausmann  <simon.hausmann@nokia.com>
853
854         [Qt] Replace use of QApplication with QGuiApplication.
855
856         Reviewed by Tor Arne Vestbø.
857
858         * wtf/qt/compat/qguiapplication.h:
859         (QGuiApplication::styleHints): Introduce styleHints wrapper hack.
860
861 2011-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
862
863         Unreviewed. Fix make distcheck build.
864
865         * GNUmakefile.list.am: Add missing files.
866
867 2011-11-11  Yury Semikhatsky  <yurys@chromium.org>
868
869         Web Inspector: function remote objetct should provide access to function position in the script
870         https://bugs.webkit.org/show_bug.cgi?id=71808
871
872         Exposed accessor for function source code.
873
874         Reviewed by Pavel Feldman.
875
876         * JavaScriptCore.exp:
877         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
878         * runtime/JSFunction.cpp:
879         (JSC::JSFunction::sourceCode):
880         * runtime/JSFunction.h:
881
882 2011-11-13  Yuqiang Xian  <yuqiang.xian@intel.com>
883
884         Fix silent spilling/filling GPRs in DFG 32_64
885         https://bugs.webkit.org/show_bug.cgi?id=72201
886
887         Reviewed by Gavin Barraclough.
888
889         Current silentSpillGPR/silentFillGPR may not work as expected for some
890         cases in 32_64. If there's a JSValue which was retained by two GPRs,
891         we may end up failing to spill/fill some GPRs or redundantly
892         spilling/filling some GPRs. For example, if we tend to exclude "eax"
893         from spilling while a JSValue is retained by both "eax" and "edx",
894         then "edx" won't be spilled as well (wrong). And if another JSValue is
895         retained by "ecx" and "ebx", both "ecx" and "ebx" will be spilled
896         twice. The similar problem applies to silentFillGPR.
897         The fix is to make silentSpillGPR/silentFillGPR more straightforward,
898         i.e., spilling/filling based on the GPR instead of the virtual
899         register. FPR spilling/filling is also modified accordingly to make it
900         consistent with GPR spilling/filling.
901
902         * dfg/DFGJITCodeGenerator.h:
903         (JSC::DFG::JITCodeGenerator::silentSpillGPR):
904         (JSC::DFG::JITCodeGenerator::silentSpillFPR):
905         (JSC::DFG::JITCodeGenerator::silentFillGPR):
906         (JSC::DFG::JITCodeGenerator::silentFillFPR):
907         (JSC::DFG::JITCodeGenerator::silentSpillAllRegisters):
908         (JSC::DFG::JITCodeGenerator::silentFillAllRegisters):
909
910 2011-11-12  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
911
912         [Qt][Symbian] Remove support for WINSCW compiler
913         https://bugs.webkit.org/show_bug.cgi?id=70178
914
915         Reviewed by Chang Shu.
916
917         * API/JSStringRef.h:
918         * create_hash_table: Revert r45553.
919         * runtime/JSGlobalData.cpp: Revert r45553.
920         * runtime/LiteralParser.cpp: Remove WINSCW comment.
921         (JSC::LiteralParser::Lexer::lexString):
922         * runtime/Lookup.h: Revert r45553.
923         * runtime/Structure.h: Revert r48461.
924         * wtf/Alignment.h:
925         * wtf/Assertions.h: Revert r52337.
926         * wtf/Compiler.h:
927         * wtf/ListRefPtr.h: Revert r48988.
928         (WTF::ListRefPtr::~ListRefPtr):
929         * wtf/OwnArrayPtr.h: Revert r45911.
930         (WTF::OwnArrayPtr::operator UnspecifiedBoolType):
931         * wtf/PassOwnArrayPtr.h:
932         (WTF::PassOwnArrayPtr::operator UnspecifiedBoolType):
933         * wtf/PassRefPtr.h:
934         * wtf/StaticConstructors.h:
935         * wtf/unicode/qt4/UnicodeQt4.h:
936
937 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
938
939         Unreviewed. Add ENABLE(DFG_JIT) around DFGCorrectableJumpPoint code.
940
941         * dfg/DFGCorrectableJumpPoint.cpp:
942         * dfg/DFGCorrectableJumpPoint.h:
943
944 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
945
946         [CMake] Move list of DFG source files into correct file
947         https://bugs.webkit.org/show_bug.cgi?id=72212
948
949         Reviewed by Daniel Bates.
950
951         The DFG files are platform independent. So move them from
952         the EFL specific file into the general CMakeLists.txt.
953
954         * CMakeLists.txt:
955         * PlatformEfl.cmake:
956
957 2011-11-12  Patrick Gansterer  <paroga@webkit.org>
958
959         Fix "unused variable" warning in JSLock
960         https://bugs.webkit.org/show_bug.cgi?id=72213
961
962         Reviewed by Anders Carlsson.
963
964         Use ASSERT_UNUSED() instead of ASSERT() to make sure
965         that the variable is also used in the release build.
966
967         * runtime/JSLock.cpp:
968         (JSC::JSLock::lock):
969         (JSC::JSLock::unlock):
970
971 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
972
973         Update iOS compiler version.
974
975         Reviewed by David Kilzer.
976
977         * Configurations/CompilerVersion.xcconfig:
978             - Update compiler version.
979
980 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
981
982         Update iOS port's configuration setting, particularly in Platform.h
983         https://bugs.webkit.org/show_bug.cgi?id=72187
984         
985         Reviewed by David Kilzer.
986
987         * interpreter/Interpreter.h:
988             - Lower the reentry depth.
989         * runtime/DatePrototype.cpp:
990             - iOS also uses CF.
991         * wtf/FastMalloc.cpp:
992         (WTF::TCMalloc_PageHeap::IncrementalScavenge):
993             - Update fastmalloc configuration for iOS.
994         * wtf/OSAllocatorPosix.cpp:
995         (WTF::OSAllocator::reserveAndCommit):
996             - Added flag.
997         * wtf/Platform.h:
998             - Update platform configuration for iOS.
999
1000 2011-11-11  David Kilzer  <ddkilzer@apple.com>
1001
1002         Only define BUILDING_ON_* and TARGETING_* macros when building for Mac OS X
1003         <http://webkit.org/b/72175>
1004
1005         Reviewed by Joseph Pecoraro.
1006
1007         * wtf/Platform.h: Move the definition of the BUILDING_ON_* and
1008         TARGETING_* macros to where the WTF_OS_MAC_OS_X macro is defined
1009         so that they're only defined on Mac OS X builds.  Also include
1010         Availability.h, which is needed on iOS builds.
1011
1012 2011-11-11  Darin Adler  <darin@apple.com>
1013
1014         Remove all releaseRef implementations except for RetainPtr
1015         https://bugs.webkit.org/show_bug.cgi?id=71423
1016
1017         Reviewed by Julien Chaffraix.
1018
1019         * API/JSRetainPtr.h: Removed releaseRef.
1020         * wtf/PassRefPtr.h: Removed releaseRef.
1021
1022 2011-11-11  Darin Adler  <darin@apple.com>
1023
1024         * JavaScriptCore.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
1025         If an older Xcode downgrades this file and we have a risk of some kind of
1026         oscillating commit situation, please contact me so I know not to do this again.
1027
1028 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
1029
1030         Add jsCast to replace static_cast
1031         https://bugs.webkit.org/show_bug.cgi?id=72071
1032
1033         Reviewed by Geoffrey Garen.
1034
1035         Added new jsCast and changed all of the static_cast sites in functions that 
1036         are in the MethodTable to use jsCast instead.
1037
1038         * API/JSCallbackFunction.cpp:
1039         (JSC::JSCallbackFunction::toStringCallback):
1040         (JSC::JSCallbackFunction::valueOfCallback):
1041         * API/JSCallbackObject.h:
1042         (JSC::JSCallbackObject::visitChildren):
1043         * API/JSCallbackObjectFunctions.h:
1044         (JSC::::className):
1045         (JSC::::getOwnPropertySlot):
1046         (JSC::::getOwnPropertyDescriptor):
1047         (JSC::::put):
1048         (JSC::::deleteProperty):
1049         (JSC::::deletePropertyByIndex):
1050         (JSC::::getConstructData):
1051         (JSC::::hasInstance):
1052         (JSC::::getCallData):
1053         (JSC::::getOwnPropertyNames):
1054         * debugger/DebuggerActivation.cpp:
1055         (JSC::DebuggerActivation::visitChildren):
1056         (JSC::DebuggerActivation::className):
1057         (JSC::DebuggerActivation::getOwnPropertySlot):
1058         (JSC::DebuggerActivation::put):
1059         (JSC::DebuggerActivation::putWithAttributes):
1060         (JSC::DebuggerActivation::deleteProperty):
1061         (JSC::DebuggerActivation::getOwnPropertyNames):
1062         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
1063         (JSC::DebuggerActivation::defineGetter):
1064         (JSC::DebuggerActivation::defineSetter):
1065         * runtime/Arguments.cpp:
1066         (JSC::Arguments::visitChildren):
1067         (JSC::Arguments::getOwnPropertySlotByIndex):
1068         (JSC::Arguments::getOwnPropertySlot):
1069         (JSC::Arguments::getOwnPropertyDescriptor):
1070         (JSC::Arguments::getOwnPropertyNames):
1071         (JSC::Arguments::putByIndex):
1072         (JSC::Arguments::put):
1073         (JSC::Arguments::deletePropertyByIndex):
1074         (JSC::Arguments::deleteProperty):
1075         * runtime/ArrayConstructor.cpp:
1076         (JSC::ArrayConstructor::getOwnPropertySlot):
1077         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1078         * runtime/ArrayPrototype.cpp:
1079         (JSC::ArrayPrototype::getOwnPropertySlot):
1080         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1081         * runtime/BooleanPrototype.cpp:
1082         (JSC::BooleanPrototype::getOwnPropertySlot):
1083         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
1084         * runtime/DateConstructor.cpp:
1085         (JSC::DateConstructor::getOwnPropertySlot):
1086         (JSC::DateConstructor::getOwnPropertyDescriptor):
1087         * runtime/DatePrototype.cpp:
1088         (JSC::DatePrototype::getOwnPropertySlot):
1089         (JSC::DatePrototype::getOwnPropertyDescriptor):
1090         * runtime/ErrorPrototype.cpp:
1091         (JSC::ErrorPrototype::getOwnPropertySlot):
1092         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
1093         * runtime/Executable.cpp:
1094         (JSC::ExecutableBase::clearCode):
1095         (JSC::EvalExecutable::visitChildren):
1096         (JSC::ProgramExecutable::visitChildren):
1097         (JSC::FunctionExecutable::visitChildren):
1098         * runtime/GetterSetter.cpp:
1099         (JSC::GetterSetter::visitChildren):
1100         * runtime/JSActivation.cpp:
1101         (JSC::JSActivation::visitChildren):
1102         (JSC::JSActivation::getOwnPropertyNames):
1103         (JSC::JSActivation::getOwnPropertySlot):
1104         (JSC::JSActivation::put):
1105         (JSC::JSActivation::putWithAttributes):
1106         * runtime/JSArray.cpp:
1107         (JSC::JSArray::getOwnPropertySlotByIndex):
1108         (JSC::JSArray::getOwnPropertySlot):
1109         (JSC::JSArray::getOwnPropertyDescriptor):
1110         (JSC::JSArray::put):
1111         (JSC::JSArray::putByIndex):
1112         (JSC::JSArray::deleteProperty):
1113         (JSC::JSArray::deletePropertyByIndex):
1114         (JSC::JSArray::getOwnPropertyNames):
1115         (JSC::JSArray::visitChildren):
1116         * runtime/JSBoundFunction.cpp:
1117         (JSC::JSBoundFunction::hasInstance):
1118         (JSC::JSBoundFunction::visitChildren):
1119         * runtime/JSByteArray.cpp:
1120         (JSC::JSByteArray::getOwnPropertySlot):
1121         (JSC::JSByteArray::getOwnPropertyDescriptor):
1122         (JSC::JSByteArray::getOwnPropertySlotByIndex):
1123         (JSC::JSByteArray::put):
1124         (JSC::JSByteArray::putByIndex):
1125         (JSC::JSByteArray::getOwnPropertyNames):
1126         * runtime/JSCell.h:
1127         (JSC::JSCell::visitChildren):
1128         (JSC::jsCast):
1129         * runtime/JSFunction.cpp:
1130         (JSC::JSFunction::visitChildren):
1131         (JSC::JSFunction::getCallData):
1132         (JSC::JSFunction::getOwnPropertySlot):
1133         (JSC::JSFunction::getOwnPropertyDescriptor):
1134         (JSC::JSFunction::getOwnPropertyNames):
1135         (JSC::JSFunction::put):
1136         (JSC::JSFunction::deleteProperty):
1137         (JSC::JSFunction::getConstructData):
1138         * runtime/JSGlobalData.cpp:
1139         (JSC::StackPreservingRecompiler::operator()):
1140         * runtime/JSGlobalObject.cpp:
1141         (JSC::JSGlobalObject::put):
1142         (JSC::JSGlobalObject::putWithAttributes):
1143         (JSC::JSGlobalObject::defineGetter):
1144         (JSC::JSGlobalObject::defineSetter):
1145         (JSC::JSGlobalObject::visitChildren):
1146         (JSC::JSGlobalObject::getOwnPropertySlot):
1147         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
1148         (JSC::JSGlobalObject::clearRareData):
1149         * runtime/JSGlobalThis.cpp:
1150         (JSC::JSGlobalThis::visitChildren):
1151         * runtime/JSONObject.cpp:
1152         (JSC::JSONObject::getOwnPropertySlot):
1153         (JSC::JSONObject::getOwnPropertyDescriptor):
1154         * runtime/JSObject.cpp:
1155         (JSC::JSObject::finalize):
1156         (JSC::JSObject::visitChildren):
1157         (JSC::JSObject::getOwnPropertySlotByIndex):
1158         (JSC::JSObject::put):
1159         (JSC::JSObject::putByIndex):
1160         (JSC::JSObject::deleteProperty):
1161         (JSC::JSObject::deletePropertyByIndex):
1162         * runtime/JSObject.h:
1163         (JSC::JSObject::getOwnPropertySlot):
1164         * runtime/JSPropertyNameIterator.cpp:
1165         (JSC::JSPropertyNameIterator::visitChildren):
1166         * runtime/JSStaticScopeObject.cpp:
1167         (JSC::JSStaticScopeObject::visitChildren):
1168         (JSC::JSStaticScopeObject::put):
1169         (JSC::JSStaticScopeObject::putWithAttributes):
1170         (JSC::JSStaticScopeObject::getOwnPropertySlot):
1171         * runtime/JSString.cpp:
1172         (JSC::JSString::visitChildren):
1173         (JSC::JSString::toThisObject):
1174         (JSC::JSString::getOwnPropertySlot):
1175         (JSC::JSString::getOwnPropertySlotByIndex):
1176         * runtime/JSVariableObject.cpp:
1177         (JSC::JSVariableObject::deleteProperty):
1178         (JSC::JSVariableObject::getOwnPropertyNames):
1179         * runtime/JSWrapperObject.cpp:
1180         (JSC::JSWrapperObject::visitChildren):
1181         * runtime/MathObject.cpp:
1182         (JSC::MathObject::getOwnPropertySlot):
1183         (JSC::MathObject::getOwnPropertyDescriptor):
1184         * runtime/NativeErrorConstructor.cpp:
1185         (JSC::NativeErrorConstructor::visitChildren):
1186         * runtime/NumberConstructor.cpp:
1187         (JSC::NumberConstructor::getOwnPropertySlot):
1188         (JSC::NumberConstructor::getOwnPropertyDescriptor):
1189         * runtime/NumberPrototype.cpp:
1190         (JSC::NumberPrototype::getOwnPropertySlot):
1191         (JSC::NumberPrototype::getOwnPropertyDescriptor):
1192         * runtime/ObjectConstructor.cpp:
1193         (JSC::ObjectConstructor::getOwnPropertySlot):
1194         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
1195         * runtime/ObjectPrototype.cpp:
1196         (JSC::ObjectPrototype::put):
1197         (JSC::ObjectPrototype::getOwnPropertySlotByIndex):
1198         (JSC::ObjectPrototype::getOwnPropertySlot):
1199         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
1200         * runtime/RegExpConstructor.cpp:
1201         (JSC::RegExpConstructor::getOwnPropertySlot):
1202         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
1203         (JSC::RegExpConstructor::put):
1204         * runtime/RegExpMatchesArray.h:
1205         (JSC::RegExpMatchesArray::getOwnPropertySlot):
1206         (JSC::RegExpMatchesArray::getOwnPropertySlotByIndex):
1207         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
1208         (JSC::RegExpMatchesArray::put):
1209         (JSC::RegExpMatchesArray::putByIndex):
1210         (JSC::RegExpMatchesArray::deleteProperty):
1211         (JSC::RegExpMatchesArray::deletePropertyByIndex):
1212         (JSC::RegExpMatchesArray::getOwnPropertyNames):
1213         * runtime/RegExpObject.cpp:
1214         (JSC::RegExpObject::visitChildren):
1215         (JSC::RegExpObject::getOwnPropertySlot):
1216         (JSC::RegExpObject::getOwnPropertyDescriptor):
1217         (JSC::RegExpObject::put):
1218         * runtime/RegExpPrototype.cpp:
1219         (JSC::RegExpPrototype::getOwnPropertySlot):
1220         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
1221         * runtime/ScopeChain.cpp:
1222         (JSC::ScopeChainNode::visitChildren):
1223         * runtime/StringConstructor.cpp:
1224         (JSC::StringConstructor::getOwnPropertySlot):
1225         (JSC::StringConstructor::getOwnPropertyDescriptor):
1226         * runtime/StringObject.cpp:
1227         (JSC::StringObject::getOwnPropertySlot):
1228         (JSC::StringObject::getOwnPropertySlotByIndex):
1229         (JSC::StringObject::getOwnPropertyDescriptor):
1230         (JSC::StringObject::deleteProperty):
1231         (JSC::StringObject::getOwnPropertyNames):
1232         * runtime/StringPrototype.cpp:
1233         (JSC::StringPrototype::getOwnPropertySlot):
1234         (JSC::StringPrototype::getOwnPropertyDescriptor):
1235         * runtime/Structure.cpp:
1236         (JSC::Structure::visitChildren):
1237         * runtime/StructureChain.cpp:
1238         (JSC::StructureChain::visitChildren):
1239
1240 2011-11-11  Gavin Barraclough  <barraclough@apple.com>
1241
1242         Enable DFG JIT for ARMv7/iOS.
1243
1244         Rubber stamped by Oliver Hunt.
1245
1246         * wtf/Platform.h:
1247             - enable DFG JIT for ARMv7/iOS.
1248
1249 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
1250
1251         De-virtualize supportsProfiling, supportsRichSourceInfo, shouldInterruptScript in JSGlobalObject
1252         https://bugs.webkit.org/show_bug.cgi?id=72035
1253
1254         Reviewed by Geoffrey Garen.
1255
1256         De-virtualized the methods through the use of a new method table just for JSGlobalObject and subclasses.
1257
1258         * JavaScriptCore.exp:
1259         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1260         * bytecompiler/BytecodeGenerator.cpp: Changed call sites to use the new GlobalObjectMethodTable.
1261         (JSC::BytecodeGenerator::BytecodeGenerator):
1262         * interpreter/Interpreter.cpp: Ditto.
1263         (JSC::Interpreter::execute):
1264         * runtime/JSGlobalObject.cpp: Added a static const GlobalObjectMethodTable with the correct function pointers.
1265         * runtime/JSGlobalObject.h: Added a field in JSGlobalObject to keep track of the current method table.
1266         (JSC::JSGlobalObject::JSGlobalObject):
1267         (JSC::JSGlobalObject::globalObjectMethodTable): The new struct to contain the function pointers.
1268         (JSC::JSGlobalObject::supportsProfiling): Made static to put in the method table.
1269         (JSC::JSGlobalObject::supportsRichSourceInfo): Ditto.
1270         (JSC::JSGlobalObject::shouldInterruptScript): Ditto.
1271         * runtime/TimeoutChecker.cpp: Changed call sites to use the new GlobalObjectMethodTable for lookup.
1272         (JSC::TimeoutChecker::didTimeOut):
1273
1274 2011-11-11  Mark Hahnenberg  <mhahnenberg@apple.com>
1275
1276         De-virtualize JSGlobalObject::allowsAccessFrom
1277         https://bugs.webkit.org/show_bug.cgi?id=71969
1278
1279         Reviewed by Darin Adler.
1280
1281         * runtime/JSGlobalObject.h: Removed allowsAccessFrom from JSGlobalObject since it is exclusive to 
1282         JSDOMWindowBase and WebScriptObject.
1283
1284 2011-11-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1285
1286         Unreviewed, rolling out r99950.
1287         http://trac.webkit.org/changeset/99950
1288         https://bugs.webkit.org/show_bug.cgi?id=72117
1289
1290         "Landed wrong patch by mistake" (Requested by yurys on
1291         #webkit).
1292
1293         * JavaScriptCore.exp:
1294         * runtime/JSFunction.cpp:
1295         * runtime/JSFunction.h:
1296
1297 2011-11-11  Patrick Gansterer  <paroga@webkit.org>
1298
1299         Unreviewed. Build fix for !ENABLE(JIT) after r99898.
1300
1301         * bytecode/CodeBlock.cpp:
1302         (JSC::CodeBlock::CodeBlock):
1303
1304 2011-11-10  Dan Bernstein  <mitz@apple.com>
1305
1306         Disabling assertions breaks the debug build
1307         https://bugs.webkit.org/show_bug.cgi?id=72091
1308
1309         Reviewed by Geoff Garen.
1310
1311         * dfg/DFGNode.h: Made hasIdentifier() available when assertions are
1312         disabled. It is used in Graph::dump().
1313         * runtime/JSObject.cpp:
1314         (JSC::JSObject::visitChildren): Update m_isCheckingForDefaultMarkViolation
1315         only if assertions are enabled.
1316         * wtf/Deque.h:
1317         (WTF::::checkIndexValidity): Changed ASSERT to ASSERT_UNUSED.
1318         * wtf/ThreadRestrictionVerifier.h:
1319         (WTF::ThreadRestrictionVerifier::setShared): Guarded the definition of
1320         a local variable that is only used in an assertion.
1321
1322 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
1323
1324         JSString forgets to clear m_fibers when resolving ropes
1325         https://bugs.webkit.org/show_bug.cgi?id=72089
1326
1327         Reviewed by Geoff Garen.
1328
1329         * runtime/JSString.cpp:
1330         (JSC::JSString::resolveRopeSlowCase):
1331
1332 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
1333
1334         DFG byte array support sometimes clamps values incorrectly
1335         https://bugs.webkit.org/show_bug.cgi?id=71975
1336
1337         Reviewed by Oliver Hunt.
1338
1339         * dfg/DFGSpeculativeJIT.cpp:
1340         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
1341
1342 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
1343
1344         ValueProfile/PredictedType contains dead code, and doesn't recognize functions
1345         https://bugs.webkit.org/show_bug.cgi?id=72065
1346
1347         Reviewed by Gavin Barraclough and Geoff Garen.
1348         
1349         Added PredictFunction support, and did some cleaning up along the way.
1350         ValueProfile no longer has statistics machinery, because we never used
1351         it. Rearranged some bits in PredictedType to more easily make room for
1352         one more object type. Changed some debug code to use more consistent
1353         conventions (ByteArray becomes Bytearray so that if we ever have a
1354         "Byte" prediction we don't get confused between a prediction that is
1355         the union of Byte and Array and a prediction that indicates precisely
1356         a ByteArray).
1357
1358         * bytecode/PredictedType.cpp:
1359         (JSC::predictionToString):
1360         (JSC::predictionFromClassInfo):
1361         * bytecode/PredictedType.h:
1362         (JSC::isFunctionPrediction):
1363         * bytecode/ValueProfile.cpp:
1364         * bytecode/ValueProfile.h:
1365         (JSC::ValueProfile::dump):
1366         * dfg/DFGAbstractState.cpp:
1367         (JSC::DFG::AbstractState::execute):
1368         * dfg/DFGPropagator.cpp:
1369         (JSC::DFG::Propagator::propagateNodePredictions):
1370
1371 2011-11-10  David Kilzer  <ddkilzer@apple.com>
1372
1373         <http://webkit.org/b/72049> Specify testapi.js install path using JAVASCRIPTCORE_FRAMEWORKS_DIR
1374
1375         Reviewed by Joseph Pecoraro.
1376
1377         * JavaScriptCore.xcodeproj/project.pbxproj: The testapi.js
1378         script should use JAVASCRIPTCORE_FRAMEWORKS_DIR in its dstPath
1379         for installation.  Also removed "Versions/A/" from the path
1380         since this is unneeded due the default symlinks present in the
1381         framework.
1382
1383 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
1384
1385         Add ARMv7 support to the DFG JIT
1386         https://bugs.webkit.org/show_bug.cgi?id=72061
1387
1388         Reviewed by Geoff Garen.
1389
1390         * dfg/DFGAssemblyHelpers.h:
1391         (JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall):
1392         (JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn):
1393         (JSC::DFG::AssemblyHelpers::emitPutImmediateToCallFrameHeader):
1394         (JSC::DFG::AssemblyHelpers::boxDouble):
1395         (JSC::DFG::AssemblyHelpers::unboxDouble):
1396             - Add CPU(ARM) copies of these functions.
1397         * dfg/DFGJITCodeGenerator.h:
1398         (JSC::DFG::JITCodeGenerator::spill):
1399             - Fix matching of '}' re #if blocks, makes some tools happy.
1400         (JSC::DFG::JITCodeGenerator::setupArguments):
1401         (JSC::DFG::JITCodeGenerator::setupArgumentsWithExecState):
1402         (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheckSetResult):
1403         (JSC::DFG::JITCodeGenerator::appendCallSetResult):
1404             - Add CPU(ARM) / 4 argument register copies of these functions.
1405         * dfg/DFGJITCodeGenerator32_64.cpp:
1406         (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
1407             - Should use callOperation to plant a call to a DFG_OPERATION.
1408         (JSC::DFG::JITCodeGenerator::cachedGetById):
1409         (JSC::DFG::JITCodeGenerator::cachedPutById):
1410             - These methods need to plant a relinkable jump; we currently do so
1411               using beginUninterruptedSequence() / endUninterruptedSequence().
1412         * dfg/DFGJITCodeGenerator64.cpp:
1413         (JSC::DFG::JITCodeGenerator::nonSpeculativeValueToInt32):
1414             - Should use callOperation to plant a call to a DFG_OPERATION.
1415         * dfg/DFGJITCompiler.cpp:
1416         (JSC::DFG::JITCompiler::linkOSRExits):
1417             - This method needs to plant a relinkable jump; we currently do so
1418               using beginUninterruptedSequence() / endUninterruptedSequence().
1419         (JSC::DFG::JITCompiler::compileBody):
1420             - Add abstraction to retrieve the pc after a call.
1421         * dfg/DFGOSRExitCompiler.cpp:
1422             - Fix a bug - CodeLocationLabel needs a data address rather than an
1423               executable one, but can just take a MacroAssemblerCodePtr instead!
1424         * dfg/DFGOperations.cpp:
1425         * dfg/DFGSpeculativeJIT.cpp:
1426         (JSC::DFG::compileClampDoubleToByte):
1427             - Add FIXME comment to come back to! - bug#72054.
1428         * dfg/DFGSpeculativeJIT.h:
1429         (JSC::DFG::SpeculativeJIT::speculationCheck):
1430             - Add missing method (ooops, required by bug#72047)
1431         * dfg/DFGSpeculativeJIT32_64.cpp:
1432             - Need to wrap fmod on ARMv7.
1433
1434
1435 2011-11-10  Filip Pizlo  <fpizlo@apple.com>
1436
1437         DFG should not reparse code that was just parsed
1438         https://bugs.webkit.org/show_bug.cgi?id=71977
1439
1440         Reviewed by Geoff Garen.
1441         
1442         The instruction stream of a code block is now kept around until
1443         the next GC. When doing either an optimizing compilation of an
1444         executable, or inlining of an executable, we now try to find the
1445         already preexisting bytecode. If we find it, we don't have to parse.
1446         If we don't find it, we parse as before. Inlining takes the extra
1447         step of caching code blocks, so if the same executable gets inlined
1448         multiple times into the same caller, then we parse it at most once
1449         even if prior to inlining that executable did not have any code
1450         blocks with an instruction stream.
1451         
1452         Also fixed a silly bug where the strict mode for various operations
1453         was being determined by looking at the machine code block rather
1454         than the inlinee.
1455
1456         To enable the delete-on-next-GC policy, I introduced the notion
1457         of an ultra weak finalizer, which anyone can register during
1458         tracing. This is thread-safe (for parallel GC) and
1459         stop-the-world-safe (so calls to free() are postponed until the
1460         world is resumed). This required reusing some facilities previously
1461         created for WeakReferenceHarvester, so I created a common utility
1462         class. I also retweaked the handling of WeakReferenceHarvesters,
1463         since they should be executed during stop-the-world since in the
1464         future we may want to allow them to call drain().
1465         
1466         2% win on SunSpider. 2% win on V8, when run in my harness. Neutral
1467         elsewhere.
1468
1469         * JavaScriptCore.xcodeproj/project.pbxproj:
1470         * bytecode/CodeBlock.cpp:
1471         (JSC::CodeBlock::CodeBlock):
1472         (JSC::CodeBlock::visitAggregate):
1473         (JSC::CodeBlock::copyPostParseDataFrom):
1474         (JSC::CodeBlock::copyPostParseDataFromAlternative):
1475         (JSC::CodeBlock::finalizeUnconditionally):
1476         * bytecode/CodeBlock.h:
1477         (JSC::CodeBlock::canProduceCopyWithBytecode):
1478         (JSC::CodeBlock::discardBytecodeLater):
1479         (JSC::CodeBlock::handleBytecodeDiscardingOpportunity):
1480         (JSC::GlobalCodeBlock::GlobalCodeBlock):
1481         (JSC::ProgramCodeBlock::ProgramCodeBlock):
1482         (JSC::EvalCodeBlock::EvalCodeBlock):
1483         (JSC::FunctionCodeBlock::FunctionCodeBlock):
1484         (JSC::BytecodeDestructionBlocker::BytecodeDestructionBlocker):
1485         (JSC::BytecodeDestructionBlocker::~BytecodeDestructionBlocker):
1486         * dfg/DFGAssemblyHelpers.h:
1487         (JSC::DFG::AssemblyHelpers::strictModeFor):
1488         * dfg/DFGByteCodeCache.h: Added.
1489         (JSC::DFG::CodeBlockKey::CodeBlockKey):
1490         (JSC::DFG::CodeBlockKey::operator==):
1491         (JSC::DFG::CodeBlockKey::hash):
1492         (JSC::DFG::CodeBlockKey::executable):
1493         (JSC::DFG::CodeBlockKey::kind):
1494         (JSC::DFG::CodeBlockKey::isHashTableDeletedValue):
1495         (JSC::DFG::CodeBlockKeyHash::hash):
1496         (JSC::DFG::CodeBlockKeyHash::equal):
1497         (JSC::DFG::ByteCodeCache::ByteCodeCache):
1498         (JSC::DFG::ByteCodeCache::~ByteCodeCache):
1499         (JSC::DFG::ByteCodeCache::get):
1500         * dfg/DFGByteCodeParser.cpp:
1501         (JSC::DFG::ByteCodeParser::handleInlining):
1502         * dfg/DFGJITCodeGenerator32_64.cpp:
1503         (JSC::DFG::JITCodeGenerator::cachedPutById):
1504         * dfg/DFGJITCodeGenerator64.cpp:
1505         (JSC::DFG::JITCodeGenerator::cachedPutById):
1506         * dfg/DFGSpeculativeJIT64.cpp:
1507         (JSC::DFG::SpeculativeJIT::compile):
1508         * heap/Heap.cpp:
1509         (JSC::Heap::finalizeUnconditionally):
1510         (JSC::Heap::markRoots):
1511         (JSC::Heap::collect):
1512         * heap/Heap.h:
1513         * heap/ListableHandler.h: Added.
1514         (JSC::ListableHandler::ListableHandler):
1515         (JSC::ListableHandler::~ListableHandler):
1516         (JSC::ListableHandler::List::List):
1517         (JSC::ListableHandler::List::addNotThreadSafe):
1518         (JSC::ListableHandler::List::addThreadSafe):
1519         (JSC::ListableHandler::List::hasNext):
1520         (JSC::ListableHandler::List::removeNext):
1521         * heap/MarkStack.cpp:
1522         (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
1523         (JSC::SlotVisitor::harvestWeakReferences):
1524         (JSC::SlotVisitor::finalizeUnconditionally):
1525         * heap/MarkStack.h:
1526         (JSC::MarkStack::addWeakReferenceHarvester):
1527         (JSC::MarkStack::addUnconditionalFinalizer):
1528         * heap/SlotVisitor.h:
1529         * heap/UnconditionalFinalizer.h: Added.
1530         (JSC::UnconditionalFinalizer::~UnconditionalFinalizer):
1531         * heap/WeakReferenceHarvester.h:
1532         (JSC::WeakReferenceHarvester::WeakReferenceHarvester):
1533         (JSC::WeakReferenceHarvester::~WeakReferenceHarvester):
1534         * runtime/Executable.cpp:
1535         (JSC::EvalExecutable::compileInternal):
1536         (JSC::ProgramExecutable::compileInternal):
1537         (JSC::FunctionExecutable::baselineCodeBlockFor):
1538         (JSC::FunctionExecutable::codeBlockWithBytecodeFor):
1539         (JSC::FunctionExecutable::produceCodeBlockFor):
1540         (JSC::FunctionExecutable::compileForCallInternal):
1541         (JSC::FunctionExecutable::compileForConstructInternal):
1542         * runtime/Executable.h:
1543         (JSC::FunctionExecutable::profiledCodeBlockFor):
1544
1545 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
1546
1547         Add ARMv7 register info for the DFG JIT
1548         https://bugs.webkit.org/show_bug.cgi?id=72050
1549
1550         Reviewed by Geoff Garen.
1551
1552         * dfg/DFGFPRInfo.h:
1553         (JSC::DFG::FPRInfo::toRegister):
1554         (JSC::DFG::FPRInfo::toIndex):
1555         (JSC::DFG::FPRInfo::debugName):
1556         * dfg/DFGGPRInfo.h:
1557         (JSC::DFG::GPRInfo::toRegister):
1558         (JSC::DFG::GPRInfo::toIndex):
1559         (JSC::DFG::GPRInfo::debugName):
1560
1561 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
1562
1563         #ifdef CPU(X86) specific div/mod code in DFGSpeculativeJIT32_64
1564         https://bugs.webkit.org/show_bug.cgi?id=72047
1565
1566         Reviewed by Geoff Garen.
1567
1568         We currently don't attempt to abstract divide through the macro assembler,
1569         due to these instructions commonly having specific requirements. This means
1570         there is architecture specific code in the JIT - #ifdef it, and provide a
1571         common implementation.
1572
1573         * dfg/DFGSpeculativeJIT32_64.cpp:
1574         (JSC::DFG::fmodAsDFGOperation):
1575         (JSC::DFG::SpeculativeJIT::compile):
1576
1577 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
1578
1579         Add ENABLE_VALUE_PROFILER support for ARMv7
1580         https://bugs.webkit.org/show_bug.cgi?id=72043
1581
1582         Reviewed by Geoff Garen.
1583
1584         This requires us to make a bucketCounterRegister available; to do so we'll need to spill more registers on entry to JIT code.
1585
1586         * jit/JITArithmetic32_64.cpp:
1587         (JSC::JIT::emitSlow_op_mod):
1588             - cleanup location of UNUSED_PARAM
1589         * jit/JITStubs.cpp:
1590         (JSC::ctiTrampoline):
1591         (JSC::ctiVMThrowTrampoline):
1592         (JSC::ctiOpThrowNotCaught):
1593         (JSC::JITThunks::JITThunks):
1594         * jit/JITStubs.h:
1595             - Update JITStackFrame structure & asm code to spill more registers.
1596         * jit/JSInterfaceJIT.h:
1597             - Assign a bucketCounterRegister.
1598
1599 2011-11-10  Gavin Barraclough  <barraclough@apple.com>
1600
1601         Fix sampling counters on ARMv7, move add64 functionality to macro assembler
1602         https://bugs.webkit.org/show_bug.cgi?id=72040
1603
1604         Reviewed by Geoff Garen.
1605
1606         The ability to add an integer to a uint64_t in memory is poorly copied in
1607         multiple places & ifdef'ed on architecture, addWithCarry32 is also a badly
1608         designed interface since add32 is not required to set flags (we have no
1609         concept of flags in the macro assembler interface).
1610
1611         * assembler/MacroAssemblerARMv7.h:
1612         (JSC::MacroAssemblerARMv7::add64):
1613         * assembler/MacroAssemblerX86.h:
1614         (JSC::MacroAssemblerX86::add64):
1615         * assembler/MacroAssemblerX86_64.h:
1616         (JSC::MacroAssemblerX86_64::add64):
1617         * dfg/DFGAssemblyHelpers.cpp:
1618         * dfg/DFGAssemblyHelpers.h:
1619         (JSC::DFG::AssemblyHelpers::emitCount):
1620         * dfg/DFGJITCodeGenerator.cpp:
1621         (JSC::DFG::JITCodeGenerator::writeBarrier):
1622         * jit/JIT.h:
1623         * jit/JITInlineMethods.h:
1624         (JSC::JIT::emitCount):
1625
1626 011-11-10  Ryuan Choi  <ryuan.choi@samsung.com>
1627
1628         [CMAKE] Refactoring CMakeLists${PORT}.txt to Platform${PORT}.cmake
1629         https://bugs.webkit.org/show_bug.cgi?id=56705
1630
1631         Reviewed by Adam Roben.
1632
1633         * CMakeLists.txt:
1634         * PlatformEfl.cmake: Renamed from Source/JavaScriptCore/CMakeListsEfl.txt.
1635         * PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/CMakeListsWinCE.txt.
1636         * shell/CMakeLists.txt:
1637         * shell/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsEfl.txt.
1638         * shell/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/shell/CMakeListsWinCE.txt.
1639         * wtf/CMakeLists.txt:
1640         * wtf/PlatformEfl.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsEfl.txt.
1641         * wtf/PlatformWinCE.cmake: Renamed from Source/JavaScriptCore/wtf/CMakeListsWinCE.txt.
1642
1643 2011-11-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1644
1645         Unreviewed. Fix make distcheck build.
1646
1647         * GNUmakefile.list.am: Add missing files.
1648
1649 2011-11-09  Michael Saboff  <msaboff@apple.com>
1650
1651         Towards 8 Bit Strings: Templatize JSC::LiteralParser class by character type
1652         https://bugs.webkit.org/show_bug.cgi?id=71862
1653
1654         Changed LiteralParser to be templatized of character type.
1655
1656         Moved five enums out of class definition to work around a clang compiler defect.
1657
1658         Added lexIdentifier templated method to break out character specific versions.
1659         Added static setParserTokenString templated method to handle setting approriately
1660         sized string pointer.
1661
1662         To keep code in LiteralParser.cpp and keep LiteralParser.h small, the two
1663         flavors of LiteralParser are explicitly instantiated at the end of
1664         LiteralParser.cpp.
1665
1666         Reviewed by Oliver Hunt.
1667
1668         * API/JSValueRef.cpp:
1669         (JSValueMakeFromJSONString):
1670         * JavaScriptCore.exp:
1671         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1672         * interpreter/Interpreter.cpp:
1673         (JSC::Interpreter::callEval):
1674         (JSC::Interpreter::execute):
1675         * runtime/JSGlobalObjectFunctions.cpp:
1676         (JSC::globalFuncEval):
1677         * runtime/JSONObject.cpp:
1678         (JSC::JSONProtoFuncParse):
1679         * runtime/LiteralParser.cpp:
1680         (JSC::isJSONWhiteSpace):
1681         (JSC::::tryJSONPParse):
1682         (JSC::::makeIdentifier):
1683         (JSC::::Lexer::lex):
1684         (JSC::::Lexer::lexIdentifier):
1685         (JSC::::Lexer::next):
1686         (JSC::LChar):
1687         (JSC::UChar):
1688         (JSC::isSafeStringCharacter):
1689         (JSC::::Lexer::lexString):
1690         (JSC::::Lexer::lexNumber):
1691         (JSC::::parse):
1692         * runtime/LiteralParser.h:
1693         (JSC::LiteralParser::LiteralParser):
1694         (JSC::LiteralParser::getErrorMessage):
1695         (JSC::LiteralParser::tryLiteralParse):
1696         (JSC::LiteralParser::Lexer::Lexer):
1697         (JSC::LiteralParser::Lexer::currentToken):
1698         (JSC::LiteralParser::Lexer::getErrorMessage):
1699         * runtime/UString.h:
1700         (JSC::LChar):
1701         (JSC::UChar):
1702         * wtf/text/StringBuilder.cpp:
1703         (WTF::StringBuilder::append):
1704         * wtf/text/StringBuilder.h:
1705         (WTF::StringBuilder::append):
1706
1707 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
1708
1709         Multiple CodeBlock should be able to share the same instruction
1710         stream without copying
1711         https://bugs.webkit.org/show_bug.cgi?id=71978
1712
1713         Reviewed by Oliver Hunt.
1714         
1715         This refactors CodeBlock::m_instructions to be a Vector boxed in a
1716         ref-counted object, but otherwise does not take advantage of this.
1717         
1718         This is performance neutral.
1719
1720         * bytecode/CodeBlock.cpp:
1721         (JSC::CodeBlock::printStructure):
1722         (JSC::CodeBlock::printStructures):
1723         (JSC::CodeBlock::dump):
1724         (JSC::CodeBlock::CodeBlock):
1725         (JSC::CodeBlock::visitAggregate):
1726         (JSC::CodeBlock::shrinkToFit):
1727         * bytecode/CodeBlock.h:
1728         (JSC::CodeBlock::hasInstructions):
1729         (JSC::CodeBlock::numberOfInstructions):
1730         (JSC::CodeBlock::instructions):
1731         * jit/JIT.cpp:
1732         (JSC::JIT::JIT):
1733
1734 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
1735
1736         Renovate ARMv7 assembler/macro-assembler
1737         https://bugs.webkit.org/show_bug.cgi?id=71982
1738
1739         Reviewed by Geoff Garen.
1740
1741         ARMv7Assembler:
1742         * add support for strb (byte stores)
1743         * rename the VMOV_CtoS opcodes (there are currently backwards!)
1744         * add support for adc (add with carry)
1745         * add support for vsqrt, vabs
1746         * add support for vmov (between FPRs, and to/from GPR pairs).
1747         * remove '_F64' postfixes from instructions (these aren't helpful, functions can already be distinguished by their signatures).
1748         * rename vcvt_F64_S32  to vcvt_signedToFloatingPoint, the prior postfix was unhelpful in failing to distinguish the types (S32 indicates a single precision register, but the type could be float, int32, or uint32).
1749         * rename vcvtr_S32_F64 to vcvt_floatingPointToSigned, as for previous, also vcvtr was the incorrect name for the operation (the emitted instruction truncates).
1750
1751         MacroAssemblerARMv7:
1752         * add 3-operand versions of and32, lshift32, or32, rshift32, urshift32, sub32, xor32, 
1753         * add store8, and store32 imm to base-index.
1754         * fix load32WithCompactAddressOffsetPatch to work for all gprs (the fix is a little kludgy but functional; to do better we'll have to also fix the repatching code).
1755         * Update supportsFloating* flags (all features now supported).
1756         * add moveDouble, storeDouble to absolute address, addDouble to absolute address
1757         * add 3-operand double operations.
1758         * implement sqrtDouble/absDouble
1759         * add branchTruncateDoubleToInt32, implement truncateDoubleToInt32
1760         * move should do nothing if src == dest
1761         * branchTest8-on-memory can be implemented in terms of branchTest32-on-register (branchTest8-on-register has been removed).
1762         * add 3-operand branchAdd32, branchSub32, also branchAdd32 absolute address.
1763
1764 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
1765
1766         https://bugs.webkit.org/show_bug.cgi?id=71873
1767
1768         Reviewed by Geoff Garen.
1769
1770         Incrementally re-landing these changes, trying to determine what went wrong.
1771         (The whole patch failed tests on the build bot but worked locally.
1772
1773         * dfg/DFGByteCodeParser.cpp:
1774         (JSC::DFG::ByteCodeParser::handleIntrinsic):
1775
1776 2011-11-09  Filip Pizlo  <fpizlo@apple.com>
1777
1778         DFG OSR exit code should be lazily generated
1779         https://bugs.webkit.org/show_bug.cgi?id=71744
1780
1781         Reviewed by Gavin Barraclough.
1782         
1783         The OSR exit code is now generated the first time it is executed,
1784         rather than right after speculative compilation. Because most OSR
1785         exits are never taken, this should greatly reduce both code size
1786         and compilation time.
1787         
1788         This is a 1% win on SunSpider, and a 1% win on V8 when running in
1789         my harness. No change in V8 in V8's harness (due to the long runs,
1790         so compile time is not an issue) and no change in Kraken (again,
1791         long runs of small code so compile time has no measurable effect).
1792
1793         * CMakeListsEfl.txt:
1794         * GNUmakefile.list.am:
1795         * JavaScriptCore.xcodeproj/project.pbxproj:
1796         * Target.pri:
1797         * assembler/AbstractMacroAssembler.h:
1798         * assembler/MacroAssemblerX86.h:
1799         (JSC::MacroAssemblerX86::jump):
1800         * assembler/MacroAssemblerX86_64.h:
1801         (JSC::MacroAssemblerX86_64::jump):
1802         * assembler/X86Assembler.h:
1803         (JSC::X86Assembler::jmp_m):
1804         * bytecode/CodeBlock.h:
1805         (JSC::CodeBlock::createDFGDataIfNecessary):
1806         (JSC::CodeBlock::appendDFGOSREntryData):
1807         (JSC::CodeBlock::numberOfDFGOSREntries):
1808         (JSC::CodeBlock::dfgOSREntryData):
1809         (JSC::CodeBlock::dfgOSREntryDataForBytecodeIndex):
1810         (JSC::CodeBlock::appendOSRExit):
1811         (JSC::CodeBlock::appendSpeculationRecovery):
1812         (JSC::CodeBlock::numberOfOSRExits):
1813         (JSC::CodeBlock::numberOfSpeculationRecoveries):
1814         (JSC::CodeBlock::osrExit):
1815         (JSC::CodeBlock::speculationRecovery):
1816         * dfg/DFGAssemblyHelpers.h:
1817         (JSC::DFG::AssemblyHelpers::debugCall):
1818         * dfg/DFGCorrectableJumpPoint.cpp: Added.
1819         (JSC::DFG::CorrectableJumpPoint::codeLocationForRepatch):
1820         * dfg/DFGCorrectableJumpPoint.h: Added.
1821         (JSC::DFG::CorrectableJumpPoint::CorrectableJumpPoint):
1822         (JSC::DFG::CorrectableJumpPoint::switchToLateJump):
1823         (JSC::DFG::CorrectableJumpPoint::correctInitialJump):
1824         (JSC::DFG::CorrectableJumpPoint::correctLateJump):
1825         (JSC::DFG::CorrectableJumpPoint::initialJump):
1826         (JSC::DFG::CorrectableJumpPoint::lateJump):
1827         (JSC::DFG::CorrectableJumpPoint::correctJump):
1828         (JSC::DFG::CorrectableJumpPoint::getJump):
1829         * dfg/DFGJITCompiler.cpp:
1830         (JSC::DFG::JITCompiler::linkOSRExits):
1831         (JSC::DFG::JITCompiler::compileBody):
1832         (JSC::DFG::JITCompiler::link):
1833         * dfg/DFGJITCompiler.h:
1834         * dfg/DFGOSRExit.cpp: Added.
1835         (JSC::DFG::OSRExit::OSRExit):
1836         (JSC::DFG::OSRExit::dump):
1837         * dfg/DFGOSRExit.h:
1838         * dfg/DFGOSRExitCompiler.cpp: Added.
1839         * dfg/DFGOSRExitCompiler.h:
1840         * dfg/DFGOSRExitCompiler32_64.cpp:
1841         (JSC::DFG::OSRExitCompiler::compileExit):
1842         * dfg/DFGOSRExitCompiler64.cpp:
1843         (JSC::DFG::OSRExitCompiler::compileExit):
1844         * dfg/DFGOperations.cpp:
1845         * dfg/DFGSpeculativeJIT.cpp:
1846         * dfg/DFGSpeculativeJIT.h:
1847         (JSC::DFG::SpeculativeJIT::speculationCheck):
1848         * dfg/DFGThunks.cpp: Added.
1849         (JSC::DFG::osrExitGenerationThunkGenerator):
1850         * dfg/DFGThunks.h: Added.
1851         * jit/JITCode.h:
1852         (JSC::JITCode::dataAddressAtOffset):
1853         * runtime/JSGlobalData.h:
1854
1855 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1856
1857         Fixing build breakage
1858
1859         Unreviewed build fix
1860
1861         * JavaScriptCore.exp:
1862         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1863
1864 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1865
1866         De-virtualize JSVariableObject::isDynamicScope
1867         https://bugs.webkit.org/show_bug.cgi?id=71933
1868
1869         Reviewed by Geoffrey Garen.
1870
1871         * runtime/JSActivation.cpp:
1872         * runtime/JSActivation.h: Inlined and de-virtualized isDynamicScope
1873         (JSC::JSActivation::isDynamicScope):
1874         * runtime/JSGlobalObject.cpp:
1875         * runtime/JSGlobalObject.h: Inlined and de-virtualized isDynamicScope
1876         (JSC::JSGlobalObject::isDynamicScope):
1877         * runtime/JSStaticScopeObject.cpp:
1878         * runtime/JSStaticScopeObject.h: Inlined and de-virtualized isDynamicScope
1879         (JSC::JSStaticScopeObject::createStructure): Changed createStructure to use new JSType
1880         (JSC::JSStaticScopeObject::isDynamicScope):
1881         * runtime/JSType.h: Added new type for JSStaticScopeObject
1882         * runtime/JSVariableObject.cpp: De-virtualized and added an implementation that checks the 
1883         object's type and calls the corresponding implementation.
1884         (JSC::JSVariableObject::isDynamicScope):
1885         * runtime/JSVariableObject.h:
1886
1887 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1888
1889         De-virtualize JSGlobalObject::hasOwnPropertyForWrite
1890         https://bugs.webkit.org/show_bug.cgi?id=71934
1891
1892         Reviewed by Geoffrey Garen.
1893
1894         * runtime/JSGlobalObject.h: Removed the virtual-ness of hasOwnPropertyForWrite since nobody overrides it.
1895
1896 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
1897
1898         https://bugs.webkit.org/show_bug.cgi?id=71873
1899
1900         Reviewed by Geoff Garen.
1901
1902         Incrementally re-landing these changes, trying to determine what went wrong.
1903         (The whole patch failed tests on the build bot but worked locally.
1904
1905         * assembler/MacroAssemblerARM.h:
1906         (JSC::MacroAssemblerARM::absDouble):
1907         * assembler/MacroAssemblerARMv7.h:
1908         * assembler/MacroAssemblerMIPS.h:
1909         (JSC::MacroAssemblerMIPS::absDouble):
1910         * assembler/MacroAssemblerSH4.h:
1911         (JSC::MacroAssemblerSH4::absDouble):
1912         * assembler/MacroAssemblerX86.h:
1913         (JSC::MacroAssemblerX86::absDouble):
1914         * assembler/MacroAssemblerX86Common.h:
1915         * assembler/MacroAssemblerX86_64.h:
1916         (JSC::MacroAssemblerX86_64::absDouble):
1917         * dfg/DFGSpeculativeJIT32_64.cpp:
1918         (JSC::DFG::SpeculativeJIT::compile):
1919         * dfg/DFGSpeculativeJIT64.cpp:
1920         (JSC::DFG::SpeculativeJIT::compile):
1921         * jit/ThunkGenerators.cpp:
1922         (JSC::absThunkGenerator):
1923
1924 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
1925
1926         De-virtualize JSObject::getOwnPropertyDescriptor
1927         https://bugs.webkit.org/show_bug.cgi?id=71523
1928
1929         Reviewed by Sam Weinig.
1930
1931         Added getOwnPropertyDescriptor to the MethodTable, changed all of the 
1932         virtual versions of getOwnPropertyDescriptor to static ones, and 
1933         changed all of the call sites to the corresponding lookup in the MethodTable.
1934
1935         * API/JSCallbackObject.h:
1936         * API/JSCallbackObjectFunctions.h:
1937         (JSC::::getOwnPropertyDescriptor):
1938         * JavaScriptCore.exp:
1939         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1940         * debugger/DebuggerActivation.cpp:
1941         (JSC::DebuggerActivation::getOwnPropertyDescriptor):
1942         * debugger/DebuggerActivation.h:
1943         * runtime/Arguments.cpp:
1944         (JSC::Arguments::getOwnPropertyDescriptor):
1945         * runtime/Arguments.h:
1946         * runtime/ArrayConstructor.cpp:
1947         (JSC::ArrayConstructor::getOwnPropertyDescriptor):
1948         * runtime/ArrayConstructor.h:
1949         * runtime/ArrayPrototype.cpp:
1950         (JSC::ArrayPrototype::getOwnPropertyDescriptor):
1951         * runtime/ArrayPrototype.h:
1952         * runtime/BooleanPrototype.cpp:
1953         (JSC::BooleanPrototype::getOwnPropertyDescriptor):
1954         * runtime/BooleanPrototype.h:
1955         * runtime/ClassInfo.h:
1956         * runtime/DateConstructor.cpp:
1957         (JSC::DateConstructor::getOwnPropertyDescriptor):
1958         * runtime/DateConstructor.h:
1959         * runtime/DatePrototype.cpp:
1960         (JSC::DatePrototype::getOwnPropertyDescriptor):
1961         * runtime/DatePrototype.h:
1962         * runtime/ErrorPrototype.cpp:
1963         (JSC::ErrorPrototype::getOwnPropertyDescriptor):
1964         * runtime/ErrorPrototype.h:
1965         * runtime/JSArray.cpp:
1966         (JSC::JSArray::getOwnPropertyDescriptor):
1967         * runtime/JSArray.h:
1968         * runtime/JSByteArray.cpp:
1969         (JSC::JSByteArray::getOwnPropertyDescriptor):
1970         * runtime/JSByteArray.h:
1971         * runtime/JSCell.cpp:
1972         (JSC::JSCell::getOwnPropertyDescriptor):
1973         * runtime/JSCell.h:
1974         * runtime/JSFunction.cpp:
1975         (JSC::JSFunction::getOwnPropertyDescriptor):
1976         * runtime/JSFunction.h:
1977         * runtime/JSGlobalObject.cpp:
1978         (JSC::JSGlobalObject::getOwnPropertyDescriptor):
1979         * runtime/JSGlobalObject.h:
1980         * runtime/JSNotAnObject.cpp:
1981         (JSC::JSNotAnObject::getOwnPropertyDescriptor):
1982         * runtime/JSNotAnObject.h:
1983         * runtime/JSONObject.cpp:
1984         (JSC::JSONObject::getOwnPropertyDescriptor):
1985         * runtime/JSONObject.h:
1986         * runtime/JSObject.cpp:
1987         (JSC::JSObject::vtableAnchor):
1988         (JSC::JSObject::propertyIsEnumerable):
1989         (JSC::JSObject::getOwnPropertyDescriptor):
1990         (JSC::JSObject::getPropertyDescriptor):
1991         (JSC::JSObject::defineOwnProperty):
1992         * runtime/JSObject.h:
1993         * runtime/JSString.cpp: Removed getOwnPropertyDescriptor, since this seems to be a relic from a 
1994         bygone era when getOwnPropertyDescriptor was rooted in JSCell rather than JSObject.  There were 
1995         no call sites for this version of getOwnPropertyDescriptor in the entire project.
1996         * runtime/JSString.h:
1997         * runtime/Lookup.h:
1998         (JSC::getStaticPropertyDescriptor):
1999         (JSC::getStaticFunctionDescriptor):
2000         (JSC::getStaticValueDescriptor):
2001         * runtime/MathObject.cpp:
2002         (JSC::MathObject::getOwnPropertyDescriptor):
2003         * runtime/MathObject.h:
2004         * runtime/NumberConstructor.cpp:
2005         (JSC::NumberConstructor::getOwnPropertyDescriptor):
2006         * runtime/NumberConstructor.h:
2007         * runtime/NumberPrototype.cpp:
2008         (JSC::NumberPrototype::getOwnPropertyDescriptor):
2009         * runtime/NumberPrototype.h:
2010         * runtime/ObjectConstructor.cpp:
2011         (JSC::ObjectConstructor::getOwnPropertyDescriptor):
2012         (JSC::objectConstructorGetOwnPropertyDescriptor):
2013         * runtime/ObjectConstructor.h:
2014         * runtime/ObjectPrototype.cpp:
2015         (JSC::ObjectPrototype::getOwnPropertyDescriptor):
2016         * runtime/ObjectPrototype.h:
2017         * runtime/RegExpConstructor.cpp:
2018         (JSC::RegExpConstructor::getOwnPropertyDescriptor):
2019         * runtime/RegExpConstructor.h:
2020         * runtime/RegExpMatchesArray.h:
2021         (JSC::RegExpMatchesArray::getOwnPropertyDescriptor):
2022         * runtime/RegExpObject.cpp:
2023         (JSC::RegExpObject::getOwnPropertyDescriptor):
2024         * runtime/RegExpObject.h:
2025         * runtime/RegExpPrototype.cpp:
2026         (JSC::RegExpPrototype::getOwnPropertyDescriptor):
2027         * runtime/RegExpPrototype.h:
2028         * runtime/StringConstructor.cpp:
2029         (JSC::StringConstructor::getOwnPropertyDescriptor):
2030         * runtime/StringConstructor.h:
2031         * runtime/StringObject.cpp:
2032         (JSC::StringObject::vtableAnchor): Added to prevent a weak vtable.
2033         (JSC::StringObject::getOwnPropertyDescriptor):
2034         * runtime/StringObject.h:
2035         * runtime/StringPrototype.cpp:
2036         (JSC::StringPrototype::getOwnPropertyDescriptor):
2037         * runtime/StringPrototype.h:
2038
2039 2011-11-09  Gavin Barraclough  <barraclough@apple.com>
2040
2041         https://bugs.webkit.org/show_bug.cgi?id=71873
2042
2043         Reviewed by Geoff Garen.
2044
2045         Incrementally re-landing these changes, trying to determine what went wrong.
2046         (The whole patch failed tests on the build bot but worked locally.
2047
2048         * assembler/MacroAssemblerARM.h:
2049         (JSC::MacroAssemblerARM::supportsFloatingPoint):
2050         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2051         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2052         (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
2053         * assembler/MacroAssemblerARMv7.h:
2054         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2055         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2056         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2057         (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
2058         * assembler/MacroAssemblerMIPS.h:
2059         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2060         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2061         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2062         (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
2063         * assembler/MacroAssemblerSH4.h:
2064         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2065         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2066         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2067         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
2068         * assembler/MacroAssemblerX86.h:
2069         (JSC::MacroAssemblerX86::supportsFloatingPoint):
2070         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2071         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2072         (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
2073         * assembler/MacroAssemblerX86_64.h:
2074         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
2075         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
2076         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
2077         (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
2078         * jit/ThunkGenerators.cpp:
2079         (JSC::absThunkGenerator):
2080
2081 2011-11-08  Darin Adler  <darin@apple.com>
2082
2083         Add code path in HashTable for emptyValueIsZero that does not require copying the empty value
2084         https://bugs.webkit.org/show_bug.cgi?id=71875
2085
2086         Reviewed by Anders Carlsson.
2087
2088         This is a step along the path of making OwnPtr work as HashMap value types.
2089
2090         * wtf/Alignment.h: Moved the AlignedBufferChar and AlignedBuffer types from Vector.h here.
2091         Also fixed include style. To include other WTF headers inside WTF, we use "" includes.
2092         I did not change the code to fix style checker complaints.
2093
2094         * wtf/HashTable.h: Added includes as needed and fixed include style.
2095         (WTF::doubleHash): Removed the uneeeded and inappropriate "static" in this function, which
2096         gave it internal linkage for no good reason.
2097         (WTF::HashTable::checkKey): Made this use AlignedBuffer for the deleted value check to avoid
2098         construction/destruction problems instead of doing the trick where we construct and destroy
2099         an empty value twice. It's cleaner and simpler and avoids copying the empty value.
2100         (WTF::HashTable::initializeBucket): Specialized initializeBucket to use memset when the
2101         empty value is zero rather than copying an empty value.
2102
2103         * wtf/Vector.h: Moved the AlignedBufferChar and AlignedBuffer types into Alignment.h.
2104
2105 2011-11-09  Gabor Rapcsanyi  <rgabor@webkit.org>
2106
2107         Buildfix for 32bit debug mode.
2108
2109         Reviewed by Csaba Osztrogonác.
2110
2111         * dfg/DFGAbstractState.cpp:
2112         (JSC::DFG::AbstractState::dump):
2113         * dfg/DFGGraph.cpp:
2114         (JSC::DFG::Graph::dump):
2115
2116 2011-11-09  Andy Wingo  <wingo@igalia.com>
2117
2118         Enable the DFG JIT on X86-64 Linux platforms
2119         https://bugs.webkit.org/show_bug.cgi?id=71373
2120
2121         Reviewed by Csaba Osztrogonác.
2122
2123         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
2124         x86-64 GNU/Linux platform.
2125         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
2126
2127 2011-11-09  Csaba Osztrogonác  <ossy@webkit.org>
2128
2129         Enable the DFG JIT on x86-64 Linux platforms
2130         https://bugs.webkit.org/show_bug.cgi?id=71373
2131
2132         Enable DFG JIT by default on X86 Linux and Mac platforms
2133         https://bugs.webkit.org/show_bug.cgi?id=71686
2134
2135         Buildfix for stricter compilers: -Werror=unused-but-set-variable
2136
2137         Reviewed by Zoltan Herczeg.
2138
2139         * dfg/DFGSpeculativeJIT.cpp:
2140         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
2141         * dfg/DFGSpeculativeJIT32_64.cpp:
2142         (JSC::DFG::SpeculativeJIT::compile):
2143         * dfg/DFGSpeculativeJIT64.cpp:
2144         (JSC::DFG::SpeculativeJIT::compile):
2145
2146 2011-11-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2147
2148         Unreviewed, rolling out r99678.
2149         http://trac.webkit.org/changeset/99678
2150         https://bugs.webkit.org/show_bug.cgi?id=71882
2151
2152         broke the build with -Werror=unused-but-set-variable
2153         (Requested by tronical_ on #webkit).
2154
2155         * CMakeListsEfl.txt:
2156         * wtf/Platform.h:
2157
2158 2011-11-09  Andy Wingo  <wingo@igalia.com>
2159
2160         Enable the DFG JIT on X86-64 Linux platforms
2161         https://bugs.webkit.org/show_bug.cgi?id=71373
2162
2163         Reviewed by Filip Pizlo.
2164
2165         * wtf/Platform.h (ENABLE_DFG_JIT): Enable the DFG JIT on the
2166         x86-64 GNU/Linux platform.
2167         * CMakeListsEfl.txt: Add JSValue64 implementations to EFL build.
2168
2169 2011-11-09  Mark Hahnenberg  <mhahnenberg@apple.com>
2170
2171         De-virtualize JSObject::defineOwnProperty
2172         https://bugs.webkit.org/show_bug.cgi?id=71429
2173
2174         Reviewed by Geoffrey Garen.
2175
2176         Added defineOwnProperty to the MethodTable, changed all the virtual 
2177         implementations of defineOwnProperty to static ones, and replaced 
2178         all call sites with corresponding lookups in the MethodTable.
2179
2180         * JavaScriptCore.exp:
2181         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2182         * runtime/Arguments.cpp:
2183         (JSC::Arguments::createStrictModeCallerIfNecessary):
2184         (JSC::Arguments::createStrictModeCalleeIfNecessary):
2185         * runtime/ClassInfo.h:
2186         * runtime/JSCell.cpp:
2187         (JSC::JSCell::defineOwnProperty):
2188         * runtime/JSCell.h:
2189         * runtime/JSObject.cpp:
2190         (JSC::JSObject::defineOwnProperty):
2191         * runtime/JSObject.h:
2192         * runtime/ObjectConstructor.cpp:
2193         (JSC::objectConstructorDefineProperty):
2194         (JSC::defineProperties):
2195
2196 2011-11-09  Simon Hausmann  <simon.hausmann@nokia.com>
2197
2198         [Qt] Build system cleanup
2199         https://bugs.webkit.org/show_bug.cgi?id=71815
2200
2201         Reviewed by Kenneth Rohde Christiansen.
2202
2203         * wtf/wtf.pri: Moved the glib dependency to javascriptcore.prf.
2204
2205 2011-11-08  Simon Hausmann  <simon.hausmann@nokia.com>
2206
2207         [Qt] Replace use of QApplication with QGuiApplication
2208         https://bugs.webkit.org/show_bug.cgi?id=71794
2209
2210         Reviewed by Andreas Kling.
2211
2212         Add compat headers for use when building with Qt 4: QGuiApplication
2213         is typedef'ed to QApplication.
2214
2215         * wtf/qt/compat/QGuiApplication: Added.
2216         * wtf/qt/compat/qguiapplication.h: Added.
2217
2218 2011-11-08  Sheriff Bot  <webkit.review.bot@gmail.com>
2219
2220         Unreviewed, rolling out r99647.
2221         http://trac.webkit.org/changeset/99647
2222         https://bugs.webkit.org/show_bug.cgi?id=71876
2223
2224         It broke jsc and layout tests on all bot (Requested by
2225         Ossy_night on #webkit).
2226
2227         * assembler/MacroAssemblerARM.h:
2228         (JSC::MacroAssemblerARM::supportsFloatingPoint):
2229         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2230         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2231         (JSC::MacroAssemblerARM::supportsDoubleBitops):
2232         (JSC::MacroAssemblerARM::andnotDouble):
2233         * assembler/MacroAssemblerARMv7.h:
2234         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2235         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2236         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2237         (JSC::MacroAssemblerARMv7::supportsDoubleBitops):
2238         * assembler/MacroAssemblerMIPS.h:
2239         (JSC::MacroAssemblerMIPS::andnotDouble):
2240         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2241         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2242         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2243         (JSC::MacroAssemblerMIPS::supportsDoubleBitops):
2244         * assembler/MacroAssemblerSH4.h:
2245         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2246         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2247         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2248         (JSC::MacroAssemblerSH4::supportsDoubleBitops):
2249         (JSC::MacroAssemblerSH4::andnotDouble):
2250         * assembler/MacroAssemblerX86.h:
2251         (JSC::MacroAssemblerX86::MacroAssemblerX86):
2252         (JSC::MacroAssemblerX86::supportsFloatingPoint):
2253         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2254         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2255         (JSC::MacroAssemblerX86::supportsDoubleBitops):
2256         * assembler/MacroAssemblerX86Common.h:
2257         (JSC::MacroAssemblerX86Common::andnotDouble):
2258         * assembler/MacroAssemblerX86_64.h:
2259         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
2260         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
2261         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
2262         (JSC::MacroAssemblerX86_64::supportsDoubleBitops):
2263         * assembler/X86Assembler.h:
2264         * dfg/DFGByteCodeParser.cpp:
2265         (JSC::DFG::ByteCodeParser::handleIntrinsic):
2266         * dfg/DFGSpeculativeJIT32_64.cpp:
2267         (JSC::DFG::SpeculativeJIT::compile):
2268         * dfg/DFGSpeculativeJIT64.cpp:
2269         (JSC::DFG::SpeculativeJIT::compile):
2270         * jit/ThunkGenerators.cpp:
2271         (JSC::absThunkGenerator):
2272         * runtime/JSGlobalData.cpp:
2273
2274 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2275
2276         Better abstract 'abs' operation through the MacroAssembler.
2277         https://bugs.webkit.org/show_bug.cgi?id=71873
2278
2279         Reviewed by Geoff Garen.
2280
2281         Currently the x86 specific instruction sequence to perform a double abs
2282         is duplicated throughout the JITs / thunk generators.
2283
2284         * assembler/MacroAssemblerARM.h:
2285         (JSC::MacroAssemblerARM::supportsFloatingPoint):
2286         (JSC::MacroAssemblerARM::supportsFloatingPointTruncate):
2287         (JSC::MacroAssemblerARM::supportsFloatingPointSqrt):
2288         (JSC::MacroAssemblerARM::supportsFloatingPointAbs):
2289         (JSC::MacroAssemblerARM::absDouble):
2290             - Renamed supportsFloatingPointAbs, make these methods static so that
2291               we can check the JIT's capabilites before we begin compilation.
2292         * assembler/MacroAssemblerARMv7.h:
2293         (JSC::MacroAssemblerARMv7::supportsFloatingPoint):
2294         (JSC::MacroAssemblerARMv7::supportsFloatingPointTruncate):
2295         (JSC::MacroAssemblerARMv7::supportsFloatingPointSqrt):
2296         (JSC::MacroAssemblerARMv7::supportsFloatingPointAbs):
2297             - Renamed supportsFloatingPointAbs, make these methods static so that
2298               we can check the JIT's capabilites before we begin compilation.
2299         * assembler/MacroAssemblerMIPS.h:
2300         (JSC::MacroAssemblerMIPS::absDouble):
2301         (JSC::MacroAssemblerMIPS::supportsFloatingPoint):
2302         (JSC::MacroAssemblerMIPS::supportsFloatingPointTruncate):
2303         (JSC::MacroAssemblerMIPS::supportsFloatingPointSqrt):
2304         (JSC::MacroAssemblerMIPS::supportsFloatingPointAbs):
2305             - Renamed supportsFloatingPointAbs, make these methods static so that
2306               we can check the JIT's capabilites before we begin compilation.
2307         * assembler/MacroAssemblerSH4.h:
2308         (JSC::MacroAssemblerSH4::supportsFloatingPoint):
2309         (JSC::MacroAssemblerSH4::supportsFloatingPointTruncate):
2310         (JSC::MacroAssemblerSH4::supportsFloatingPointSqrt):
2311         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
2312         (JSC::MacroAssemblerSH4::absDouble):
2313             - Renamed supportsFloatingPointAbs, make these methods static so that
2314               we can check the JIT's capabilites before we begin compilation.
2315         * assembler/MacroAssemblerX86.h:
2316         (JSC::MacroAssemblerX86::absDouble):
2317         (JSC::MacroAssemblerX86::supportsFloatingPoint):
2318         (JSC::MacroAssemblerX86::supportsFloatingPointTruncate):
2319         (JSC::MacroAssemblerX86::supportsFloatingPointSqrt):
2320         (JSC::MacroAssemblerX86::supportsFloatingPointAbs):
2321             - Made supports* methods static so that we can check the JIT's
2322               capabilites before we begin compilation. Added absDouble.
2323         * assembler/MacroAssemblerX86Common.h:
2324             - Removed andnotDouble, added s_maskSignBit.
2325         * assembler/MacroAssemblerX86_64.h:
2326         (JSC::MacroAssemblerX86_64::absDouble):
2327         (JSC::MacroAssemblerX86_64::supportsFloatingPoint):
2328         (JSC::MacroAssemblerX86_64::supportsFloatingPointTruncate):
2329         (JSC::MacroAssemblerX86_64::supportsFloatingPointSqrt):
2330         (JSC::MacroAssemblerX86_64::supportsFloatingPointAbs):
2331             - Made supports* methods static so that we can check the JIT's
2332               capabilites before we begin compilation. Added absDouble.
2333         * assembler/X86Assembler.h:
2334         (JSC::X86Assembler::andpd_rr):
2335         (JSC::X86Assembler::andpd_mr):
2336             - Added support for andpd instruction.
2337         * dfg/DFGByteCodeParser.cpp:
2338         (JSC::DFG::ByteCodeParser::handleIntrinsic):
2339             - Added checks for supportsFloatingPointAbs, supportsFloatingPointSqrt.
2340         * dfg/DFGSpeculativeJIT32_64.cpp:
2341         (JSC::DFG::SpeculativeJIT::compile):
2342             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
2343         * dfg/DFGSpeculativeJIT64.cpp:
2344         (JSC::DFG::SpeculativeJIT::compile):
2345             - Switched to use doubleAbs, we can now also reuse the operand register for the result.
2346         * jit/ThunkGenerators.cpp:
2347             - Switched to use doubleAbs.
2348         (JSC::absThunkGenerator):
2349         * runtime/JSGlobalData.cpp:
2350             - Declared MacroAssemblerX86Common::s_maskSignBit here.
2351               This is a little ugly, but it doesn't seem worth adding a whole extra .cpp
2352               to the compile for just one constant.
2353
2354 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2355
2356         Move duplicates of SYMBOL_STRING* macros to the single location
2357         https://bugs.webkit.org/show_bug.cgi?id=71456
2358
2359         Reviewed by Sam Weinig.
2360
2361         * JavaScriptCore.xcodeproj/project.pbxproj:
2362         * dfg/DFGOperations.cpp:
2363         * jit/JITStubs.cpp:
2364         * wtf/InlineASM.h: Added.
2365             - Moved asm related macros.
2366
2367 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2368
2369         Move code to handle 8bit regs from X86Assembler to MacroAssembler
2370         https://bugs.webkit.org/show_bug.cgi?id=71867
2371
2372         Reviewed by Oliver Hunt.
2373
2374         This code is fine, but is in the wrong place really. X86 assembler should
2375         basically just format up exactly the instruction you request - not expand
2376         out to a set of instructions (that is what the macro assembler layer is
2377         for!). For other 8-bit ops, on X86 we don't guard against clients accessing
2378         the XH registers.
2379
2380         * assembler/MacroAssemblerX86Common.h:
2381         (JSC::MacroAssemblerX86Common::store8):
2382         * assembler/X86Assembler.h:
2383         (JSC::X86Assembler::movb_rm):
2384             - moved some code.
2385
2386 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
2387
2388         Unreviewed build fix for GTK.
2389
2390         * GNUmakefile.list.am:
2391
2392 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2393
2394         Build fix.
2395
2396         * assembler/X86Assembler.h:
2397
2398 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2399
2400         Errrk, failed to commit this in last change.
2401
2402         * assembler/X86Assembler.h:
2403
2404 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2405
2406         Remove an unused method.
2407
2408         Rubber stamped by Geoff Garen.
2409
2410         * assembler/AbstractMacroAssembler.h:
2411         * assembler/AssemblerBuffer.h:
2412             - removed rewindToLabel.
2413
2414 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2415
2416         Fix OSR entry points to calculate offsets correctly WRT to branch compaction.
2417         https://bugs.webkit.org/show_bug.cgi?id=71864
2418
2419         Reviewed by Filip Pizlo.
2420
2421         * assembler/LinkBuffer.h:
2422         (JSC::LinkBuffer::offsetOf):
2423             - We use this to return the offsets into the code of the entry points.
2424         * dfg/DFGJITCompiler.cpp:
2425         (JSC::DFG::JITCompiler::compileEntry):
2426         (JSC::DFG::JITCompiler::compileBody):
2427         (JSC::DFG::JITCompiler::compile):
2428         (JSC::DFG::JITCompiler::compileFunction):
2429             - Move the construction of the speculative JIT outside of
2430               compileBody, such that it is still available to link the
2431               OSR entry points at the point we are linking.
2432         * dfg/DFGJITCompiler.h:
2433         (JSC::DFG::JITCompiler::noticeOSREntry):
2434             - Pass the label of the block & linkbuffer into noticeOSREntry.
2435         * dfg/DFGSpeculativeJIT.cpp:
2436         (JSC::DFG::SpeculativeJIT::compile):
2437         (JSC::DFG::SpeculativeJIT::linkOSREntries):
2438             - Moved call to noticeOSREntry until we we linking.
2439         * dfg/DFGSpeculativeJIT.h:
2440         * jit/JIT.cpp:
2441         (JSC::JIT::privateCompileMainPass):
2442         (JSC::JIT::privateCompileSlowCases):
2443         (JSC::JIT::privateCompile):
2444             - Moved calculation of entries until we we linking.
2445         * jit/JIT.h:
2446             - Removed some members.
2447
2448 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
2449
2450         DFG OSR exit code should be generated by a separate compiler, not
2451         related to DFG::JITCompiler
2452         https://bugs.webkit.org/show_bug.cgi?id=71787
2453
2454         Reviewed by Gavin Barraclough.
2455         
2456         Moves the exitSpeculativeWithOSR() method from JITCompiler to
2457         OSRExitCompiler::compileExit().
2458
2459         * CMakeListsEfl.txt:
2460         * JavaScriptCore.xcodeproj/project.pbxproj:
2461         * Target.pri:
2462         * dfg/DFGJITCompiler.cpp:
2463         (JSC::DFG::JITCompiler::linkOSRExits):
2464         * dfg/DFGJITCompiler32_64.cpp: Removed.
2465         * dfg/DFGOSRExitCompiler.h: Added.
2466         (JSC::DFG::OSRExitCompiler::OSRExitCompiler):
2467         * dfg/DFGOSRExitCompiler32_64.cpp: Added.
2468         (JSC::DFG::OSRExitCompiler::compileExit):
2469         * dfg/DFGOSRExitCompiler64.cpp: Added.
2470         (JSC::DFG::OSRExitCompiler::compileExit):
2471         * runtime/JSValue.h:
2472
2473 2011-11-08  Filip Pizlo  <fpizlo@apple.com>
2474
2475         Basic DFG definitions should be moved out of DFGNode.h
2476         https://bugs.webkit.org/show_bug.cgi?id=71861
2477
2478         Rubber-stamped by Gavin Barraclough.
2479
2480         * JavaScriptCore.xcodeproj/project.pbxproj:
2481         * dfg/DFGCommon.h: Added.
2482         (JSC::DFG::NodeIndexTraits::defaultValue):
2483         * dfg/DFGNode.h:
2484         * dfg/DFGOSRExit.h:
2485         * dfg/DFGRegisterBank.h:
2486
2487 2011-11-08  Michael Saboff  <msaboff@apple.com>
2488
2489         Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
2490         https://bugs.webkit.org/show_bug.cgi?id=71761
2491
2492         Templatized Parser based on Lexer<T>. Moved two enums,
2493         SourceElementsMode and FunctionRequirements out of Parser definition
2494         to work around a clang compiler defect.
2495
2496         Cleaned up SourceCode data() to return StringImpl* and eliminated
2497         the recently added stringData() virtual method.
2498
2499         To keep code in Parser.cpp and keep Parser.h small, the two flavors
2500         of Parser are explicitly instantiated at the end of Parser.cpp.
2501
2502         Reviewed by Gavin Barraclough.
2503
2504         * interpreter/Interpreter.cpp:
2505         (JSC::appendSourceToError):
2506         * parser/Lexer.cpp:
2507         (JSC::::setCode):
2508         (JSC::::sourceCode):
2509         * parser/Parser.cpp:
2510         (JSC::::Parser):
2511         (JSC::::~Parser):
2512         (JSC::::parseInner):
2513         (JSC::::didFinishParsing):
2514         (JSC::::allowAutomaticSemicolon):
2515         (JSC::::parseSourceElements):
2516         (JSC::::parseVarDeclaration):
2517         (JSC::::parseConstDeclaration):
2518         (JSC::::parseDoWhileStatement):
2519         (JSC::::parseWhileStatement):
2520         (JSC::::parseVarDeclarationList):
2521         (JSC::::parseConstDeclarationList):
2522         (JSC::::parseForStatement):
2523         (JSC::::parseBreakStatement):
2524         (JSC::::parseContinueStatement):
2525         (JSC::::parseReturnStatement):
2526         (JSC::::parseThrowStatement):
2527         (JSC::::parseWithStatement):
2528         (JSC::::parseSwitchStatement):
2529         (JSC::::parseSwitchClauses):
2530         (JSC::::parseSwitchDefaultClause):
2531         (JSC::::parseTryStatement):
2532         (JSC::::parseDebuggerStatement):
2533         (JSC::::parseBlockStatement):
2534         (JSC::::parseStatement):
2535         (JSC::::parseFormalParameters):
2536         (JSC::::parseFunctionBody):
2537         (JSC::::parseFunctionInfo):
2538         (JSC::::parseFunctionDeclaration):
2539         (JSC::::parseExpressionOrLabelStatement):
2540         (JSC::::parseExpressionStatement):
2541         (JSC::::parseIfStatement):
2542         (JSC::::parseExpression):
2543         (JSC::::parseAssignmentExpression):
2544         (JSC::::parseConditionalExpression):
2545         (JSC::::isBinaryOperator):
2546         (JSC::::parseBinaryExpression):
2547         (JSC::::parseProperty):
2548         (JSC::::parseObjectLiteral):
2549         (JSC::::parseStrictObjectLiteral):
2550         (JSC::::parseArrayLiteral):
2551         (JSC::::parsePrimaryExpression):
2552         (JSC::::parseArguments):
2553         (JSC::::parseMemberExpression):
2554         (JSC::::parseUnaryExpression):
2555         * parser/Parser.h:
2556         (JSC::::parse):
2557         (JSC::parse):
2558         * parser/SourceCode.h:
2559         (JSC::SourceCode::data):
2560         (JSC::SourceCode::subExpression):
2561         * parser/SourceProvider.h:
2562         (JSC::UStringSourceProvider::data):
2563
2564 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2565
2566         Fix PropertyAccessRecords in DFG JIT to take account of branch compaction.
2567         https://bugs.webkit.org/show_bug.cgi?id=71855
2568
2569         Reviewed by Filip Pizlo.
2570
2571         The DFG JIT presently calculates a set of offsets early, before branches have been compacted.
2572         This won't work on ARMv7.
2573
2574         * assembler/AbstractMacroAssembler.h:
2575         (JSC::AbstractMacroAssembler::differenceBetweenCodePtr):
2576         * assembler/LinkBuffer.h:
2577         (JSC::LinkBuffer::locationOf):
2578         * dfg/DFGJITCodeGenerator32_64.cpp:
2579         (JSC::DFG::JITCodeGenerator::cachedGetById):
2580         (JSC::DFG::JITCodeGenerator::cachedPutById):
2581         * dfg/DFGJITCodeGenerator64.cpp:
2582         (JSC::DFG::JITCodeGenerator::cachedGetById):
2583         (JSC::DFG::JITCodeGenerator::cachedPutById):
2584         * dfg/DFGJITCompiler.cpp:
2585         (JSC::DFG::JITCompiler::link):
2586         * dfg/DFGJITCompiler.h:
2587         (JSC::DFG::PropertyAccessRecord::PropertyAccessRecord):
2588         (JSC::DFG::JITCompiler::addPropertyAccess):
2589
2590 2011-11-08  Gavin Barraclough  <barraclough@apple.com>
2591
2592         DFG JIT calculation of OSR entry points is not THUMB2 safe
2593         https://bugs.webkit.org/show_bug.cgi?id=71852
2594
2595         Reviewed by Oliver Hunt.
2596
2597         Executable addresses are tagged with a low bit set to distinguish
2598         between THUMB2 and traditional ARM.
2599
2600         * dfg/DFGJITCompiler.cpp:
2601         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
2602         * dfg/DFGJITCompiler32_64.cpp:
2603         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
2604         * dfg/DFGOSREntry.cpp:
2605         (JSC::DFG::prepareOSREntry):
2606         * jit/JITCode.h:
2607         (JSC::JITCode::executableAddressAtOffset):
2608         (JSC::JITCode::start):
2609         (JSC::JITCode::size):
2610
2611 2011-11-08  Michael Saboff  <msaboff@apple.com>
2612
2613         JSC::Parser::Parser leaks Lexer member
2614         https://bugs.webkit.org/show_bug.cgi?id=71847
2615
2616         Changed m_lexer member of Parser to be OwnPtr to fix a memory leak.
2617
2618         Reviewed by Oliver Hunt.
2619
2620         * parser/Parser.cpp:
2621         (JSC::Parser::Parser):
2622         (JSC::Parser::parseFunctionBody):
2623         * parser/Parser.h:
2624
2625 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
2626
2627         Enable DFG JIT by default on X86 Linux and Mac platforms
2628         https://bugs.webkit.org/show_bug.cgi?id=71686
2629
2630         Reviewed by Filip Pizlo.
2631
2632         We can get 9% on SunSpider, 89% on Kraken and 37% on V8, on Linux X86.
2633
2634         * wtf/Platform.h:
2635
2636 2011-11-08  Yuqiang Xian  <yuqiang.xian@intel.com>
2637
2638         DFG 32_64 - update make lists for efl, gtk, and Qt ports with DFG change r99519
2639         https://bugs.webkit.org/show_bug.cgi?id=71768
2640
2641         Reviewed by Geoffrey Garen.
2642
2643         Also includes a fix to make the newly introduced AssemblyHelpers
2644         friend of JSValue as we need the Tag definitions.
2645
2646         * CMakeListsEfl.txt:
2647         * GNUmakefile.list.am:
2648         * Target.pri:
2649         * runtime/JSValue.h:
2650
2651 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
2652
2653         Fix gcc 4.4 compilation warnings in DFG 32_64
2654         https://bugs.webkit.org/show_bug.cgi?id=71762
2655
2656         Reviewed by Filip Pizlo.
2657
2658         * dfg/DFGJITCodeGenerator.h:
2659         (JSC::DFG::JITCodeGenerator::registersMatched):
2660
2661 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
2662
2663         DFG code base should allow for classes not related to DFG::JITCompiler
2664         to use DFG idioms
2665         https://bugs.webkit.org/show_bug.cgi?id=71746
2666
2667         Reviewed by Gavin Barraclough.
2668
2669         * JavaScriptCore.xcodeproj/project.pbxproj:
2670         * dfg/DFGAssemblyHelpers.cpp: Added.
2671         (JSC::DFG::AssemblyHelpers::decodedCodeMapFor):
2672         (JSC::DFG::AssemblyHelpers::emitCount):
2673         (JSC::DFG::AssemblyHelpers::setSamplingFlag):
2674         (JSC::DFG::AssemblyHelpers::clearSamplingFlag):
2675         (JSC::DFG::AssemblyHelpers::jitAssertIsInt32):
2676         (JSC::DFG::AssemblyHelpers::jitAssertIsJSInt32):
2677         (JSC::DFG::AssemblyHelpers::jitAssertIsJSNumber):
2678         (JSC::DFG::AssemblyHelpers::jitAssertIsJSDouble):
2679         (JSC::DFG::AssemblyHelpers::jitAssertIsCell):
2680         * dfg/DFGAssemblyHelpers.h: Added.
2681         * dfg/DFGJITCompiler.cpp:
2682         * dfg/DFGJITCompiler.h:
2683         (JSC::DFG::JITCompiler::JITCompiler):
2684         (JSC::DFG::JITCompiler::graph):
2685         * dfg/DFGJITCompiler32_64.cpp:
2686         * dfg/DFGOSRExit.h: Added.
2687         (JSC::DFG::SpeculationRecovery::SpeculationRecovery):
2688         (JSC::DFG::SpeculationRecovery::type):
2689         (JSC::DFG::SpeculationRecovery::dest):
2690         (JSC::DFG::SpeculationRecovery::src):
2691         (JSC::DFG::OSRExit::numberOfRecoveries):
2692         (JSC::DFG::OSRExit::valueRecovery):
2693         (JSC::DFG::OSRExit::isArgument):
2694         (JSC::DFG::OSRExit::isVariable):
2695         (JSC::DFG::OSRExit::argumentForIndex):
2696         (JSC::DFG::OSRExit::variableForIndex):
2697         (JSC::DFG::OSRExit::operandForArgument):
2698         (JSC::DFG::OSRExit::operandForIndex):
2699         * dfg/DFGSpeculativeJIT.h:
2700
2701 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
2702
2703         Switch back to 1+1 value profiling buckets, since it didn't help on arewefastyet,
2704         but it appears to help on other benchmarks.
2705
2706         Rubber stamped by Oliver Hunt.
2707
2708         * bytecode/ValueProfile.h:
2709
2710 2011-11-07  Ariya Hidayat  <ariya@sencha.com>
2711
2712         "use strict" can not contain escape sequences or line continuation
2713         https://bugs.webkit.org/show_bug.cgi?id=71532
2714
2715         Reviewed by Darin Adler.
2716
2717         Store the actual literal length (before the escapes and line
2718         continuation are encoded) while parsing the directive and use it
2719         for the directive comparison.
2720
2721         * parser/Parser.cpp:
2722         (JSC::Parser::parseSourceElements):
2723         (JSC::Parser::parseStatement):
2724         * parser/Parser.h:
2725
2726 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
2727
2728         DFG operationCreateThis slow path may get the wrong callee in case of inlining
2729         https://bugs.webkit.org/show_bug.cgi?id=71647
2730
2731         Reviewed by Oliver Hunt.
2732         
2733         No new tests because I only saw this manifest itself when I had other bugs
2734         leading to spurious slow path executions.
2735
2736         * dfg/DFGJITCodeGenerator.h:
2737         (JSC::DFG::callOperation):
2738         * dfg/DFGOperations.cpp:
2739         * dfg/DFGOperations.h:
2740         * dfg/DFGSpeculativeJIT32_64.cpp:
2741         (JSC::DFG::SpeculativeJIT::compile):
2742         * dfg/DFGSpeculativeJIT64.cpp:
2743         (JSC::DFG::SpeculativeJIT::compile):
2744
2745 2011-11-07  Mark Hahnenberg  <mhahnenberg@apple.com>
2746
2747         De-virtualize JSObject::putWithAttributes
2748         https://bugs.webkit.org/show_bug.cgi?id=71716
2749
2750         Reviewed by Darin Adler.
2751
2752         Added putWithAttributes to the MethodTable, changed all the virtual 
2753         implementations of putWithAttributes to static ones, and replaced 
2754         all call sites with corresponding lookups in the MethodTable.
2755
2756         * API/JSObjectRef.cpp:
2757         (JSObjectSetProperty):
2758         * JavaScriptCore.exp:
2759         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2760         * debugger/DebuggerActivation.cpp:
2761         (JSC::DebuggerActivation::putWithAttributes):
2762         * debugger/DebuggerActivation.h:
2763         * interpreter/Interpreter.cpp:
2764         (JSC::Interpreter::execute):
2765         * runtime/ClassInfo.h:
2766         * runtime/JSActivation.cpp:
2767         (JSC::JSActivation::putWithAttributes):
2768         * runtime/JSActivation.h:
2769         * runtime/JSCell.cpp:
2770         (JSC::JSCell::putWithAttributes):
2771         * runtime/JSCell.h:
2772         * runtime/JSGlobalObject.cpp:
2773         (JSC::JSGlobalObject::putWithAttributes):
2774         * runtime/JSGlobalObject.h:
2775         * runtime/JSObject.cpp:
2776         (JSC::JSObject::putWithAttributes):
2777         (JSC::putDescriptor):
2778         * runtime/JSObject.h:
2779         * runtime/JSStaticScopeObject.cpp:
2780         (JSC::JSStaticScopeObject::putWithAttributes):
2781         * runtime/JSStaticScopeObject.h:
2782         * runtime/JSVariableObject.cpp:
2783         (JSC::JSVariableObject::putWithAttributes):
2784         * runtime/JSVariableObject.h:
2785
2786 2011-11-07  Dmitry Lomov  <dslomov@google.com>
2787
2788         Unreviewed. Release build fix.
2789
2790         * parser/Lexer.cpp:
2791         (JSC::assertCharIsIn8BitRange):
2792
2793 2011-11-07  Filip Pizlo  <fpizlo@apple.com>
2794
2795         Switch the value profiler back to 8 buckets, because we suspect that while this
2796         is more expensive it's also more stable.
2797
2798         Rubber stamped by Geoff Garen.
2799
2800         * bytecode/ValueProfile.h:
2801
2802 2011-11-07  Andrew Wason  <rectalogic@rectalogic.com>
2803
2804         Uninitialized Heap member var
2805         https://bugs.webkit.org/show_bug.cgi?id=71722
2806
2807         Reviewed by Filip Pizlo.
2808
2809         * heap/Heap.cpp:
2810         (JSC::Heap::Heap): Initialize m_blockFreeingThreadShouldQuit
2811
2812 2011-11-07  Yuqiang Xian  <yuqiang.xian@intel.com>
2813
2814         DFG 32_64 - registers cannot be reused arbitrarily if speculation failures are possible
2815         https://bugs.webkit.org/show_bug.cgi?id=71684
2816
2817         Reviewed by Filip Pizlo.
2818
2819         Currently in DFG JIT, we try to reuse the physical register of an
2820         operand for temporary usage if the current use of the operand is the
2821         last use. But sometimes this can be wrong, for example if there are
2822         possible speculation failures and we need to fallback to baseline JIT,
2823         the value of the operand which is supposed to be hold in the physical
2824         register can be modified by register reusing. The fixes the last
2825         inspector failures in layout test on Mac 32-bit if switching on DFG.
2826
2827         * dfg/DFGSpeculativeJIT32_64.cpp:
2828         (JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
2829         (JSC::DFG::SpeculativeJIT::compile):
2830
2831 2011-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2832
2833         REGRESSION(r99436): Broke Snow Leopard debug build
2834         https://bugs.webkit.org/show_bug.cgi?id=71713
2835
2836         Reviewed by Darin Adler.
2837
2838         Put the assertion in a template and use template specialization
2839         to avoid warning when instantiated with UChar or LChar.
2840
2841         In the long term, we should have traits for unsigned integral types
2842         and use that to specialize template instead of specializing it for UChar and LChar.
2843
2844         * parser/Lexer.cpp:
2845         (JSC::assertCharIsIn8BitRange):
2846         (JSC::::append8):
2847
2848 2011-11-07  ChangSeok Oh  <shivamidow@gmail.com>
2849
2850         [EFL] Support requestAnimationFrame API
2851         https://bugs.webkit.org/show_bug.cgi?id=67112
2852
2853         Reviewed by Andreas Kling.
2854
2855         Let EFL port use REQUEST_ANIMATION_FRAME_TIMER.
2856
2857         * wtf/Platform.h:
2858
2859 2011-11-07  Michael Saboff  <msaboff@apple.com>
2860
2861         Towards 8 Bit Strings: Templatize JSC::Lexer class by character type
2862         https://bugs.webkit.org/show_bug.cgi?id=71331
2863
2864         Change the Lexer class to be a template class based on the character
2865         type of the source.  In the process updated the parseIdentifier()
2866         and parseString() methods to create 8 bit strings where possible.
2867         Also added some helper methods for accumulating temporary string
2868         data in the 8 and 16 bit vectors.
2869
2870         Changed the SourceProvider::data() virtual method to return a
2871         StringImpl* instead of a UChar*.
2872
2873         Updated the KeywordLookup generator to create code to match keywords
2874         for both 8 and 16 bit source strings.
2875
2876         Due to a compiler bug (<rdar://problem/10194295>) moved enum
2877         definition outside of Lexer class declaration.  Remove second enum
2878         no longer needed.
2879
2880         Reviewed by Darin Adler.
2881
2882         * KeywordLookupGenerator.py:
2883         * interpreter/Interpreter.cpp:
2884         (JSC::Interpreter::callEval):
2885         * parser/Lexer.cpp:
2886         (JSC::::Lexer):
2887         (JSC::::~Lexer):
2888         (JSC::::getInvalidCharMessage):
2889         (JSC::::currentCharacter):
2890         (JSC::::setCode):
2891         (JSC::::internalShift):
2892         (JSC::::shift):
2893         (JSC::::peek):
2894         (JSC::::getUnicodeCharacter):
2895         (JSC::::shiftLineTerminator):
2896         (JSC::::lastTokenWasRestrKeyword):
2897         (JSC::::record8):
2898         (JSC::::append8):
2899         (JSC::::append16):
2900         (JSC::::record16):
2901         (JSC::::parseIdentifier):
2902         (JSC::::parseIdentifierSlowCase):
2903         (JSC::::parseString):
2904         (JSC::::parseStringSlowCase):
2905         (JSC::::parseHex):
2906         (JSC::::parseOctal):
2907         (JSC::::parseDecimal):
2908         (JSC::::parseNumberAfterDecimalPoint):
2909         (JSC::::parseNumberAfterExponentIndicator):
2910         (JSC::::parseMultilineComment):
2911         (JSC::::nextTokenIsColon):
2912         (JSC::::lex):
2913         (JSC::::scanRegExp):
2914         (JSC::::skipRegExp):
2915         (JSC::::clear):
2916         (JSC::::sourceCode):
2917         * parser/Lexer.h:
2918         (JSC::Lexer::append16):
2919         (JSC::Lexer::currentOffset):
2920         (JSC::Lexer::setOffsetFromCharOffset):
2921         (JSC::::isWhiteSpace):
2922         (JSC::::isLineTerminator):
2923         (JSC::::convertHex):
2924         (JSC::::convertUnicode):
2925         (JSC::::makeIdentifier):
2926         (JSC::::setCodeStart):
2927         (JSC::::makeIdentifierLCharFromUChar):
2928         (JSC::::lexExpectIdentifier):
2929         * parser/Parser.cpp:
2930         (JSC::Parser::Parser):
2931         (JSC::Parser::parseProperty):
2932         (JSC::Parser::parseMemberExpression):
2933         * parser/Parser.h:
2934         (JSC::Parser::next):
2935         (JSC::Parser::nextExpectIdentifier):
2936         * parser/ParserArena.h:
2937         (JSC::IdentifierArena::makeIdentifier):
2938         (JSC::IdentifierArena::makeIdentifierLCharFromUChar):
2939         * parser/SourceCode.h:
2940         (JSC::SourceCode::subExpression):
2941         * parser/SourceProvider.h:
2942         (JSC::UStringSourceProvider::stringData):
2943         * parser/SourceProviderCache.h:
2944         * parser/SyntaxChecker.h:
2945         * runtime/FunctionPrototype.cpp:
2946         (JSC::insertSemicolonIfNeeded):
2947         * runtime/Identifier.cpp:
2948         (JSC::IdentifierTable::add):
2949         (JSC::IdentifierLCharFromUCharTranslator::hash):
2950         (JSC::IdentifierLCharFromUCharTranslator::equal):
2951         (JSC::IdentifierLCharFromUCharTranslator::translate):
2952         (JSC::Identifier::add8):
2953         * runtime/Identifier.h:
2954         (JSC::Identifier::Identifier):
2955         (JSC::Identifier::createLCharFromUChar):
2956         (JSC::Identifier::canUseSingleCharacterString):
2957         (JSC::IdentifierCharBufferTranslator::hash):
2958         (JSC::IdentifierCharBufferTranslator::equal):
2959         (JSC::IdentifierCharBufferTranslator::translate):
2960         (JSC::Identifier::add):
2961         (JSC::Identifier::equal):
2962         (JSC::IdentifierTable::add):
2963         * runtime/JSGlobalObjectFunctions.cpp:
2964         (JSC::decode):
2965         (JSC::parseIntOverflow):
2966         (JSC::globalFuncUnescape):
2967         * runtime/JSGlobalObjectFunctions.h:
2968         (JSC::parseIntOverflow):
2969         * runtime/LiteralParser.cpp:
2970         (JSC::LiteralParser::tryJSONPParse):
2971         (JSC::LiteralParser::Lexer::lexString):
2972         * wtf/text/StringImpl.h:
2973
2974 2011-11-07  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2975
2976         [Qt] Put the jsc binary in 'bin' instead of leaving it deep in the build tree
2977
2978         Allows us to not package up the whole Source/JavaScriptCore directory for the
2979         buildbots.
2980
2981         Reviewed-by Simon Hausmann.
2982
2983         * jsc.pro:
2984
2985 2011-11-06  Filip Pizlo  <fpizlo@apple.com>
2986
2987         REGRESSION(r99374): GTK+ build of the jsc binary doesn't like the call
2988         to initializeMainThread, and crashes
2989         https://bugs.webkit.org/show_bug.cgi?id=71643
2990
2991         Reviewed by Sam Weinig.
2992
2993         * jsc.cpp:
2994         (main):
2995
2996 2011-11-06  Sam Weinig  <sam@webkit.org>
2997
2998         Add space missing from some class declarations
2999         https://bugs.webkit.org/show_bug.cgi?id=71632
3000
3001         Reviewed by Anders Carlsson.
3002
3003         * assembler/AssemblerBufferWithConstantPool.h:
3004         * bytecode/CodeBlock.h:
3005         * dfg/DFGVariableAccessData.h:
3006         * heap/VTableSpectrum.h:
3007         * jit/ExecutableAllocator.cpp:
3008         * jit/ExecutableAllocatorFixedVMPool.cpp:
3009         * wtf/MetaAllocatorHandle.h:
3010         * wtf/UnionFind.h:
3011
3012 2011-11-06  Sam Weinig  <sam@webkit.org>
3013
3014         Allow use of FINAL in JavaScriptCore
3015         https://bugs.webkit.org/show_bug.cgi?id=71630
3016
3017         Reviewed by Anders Carlsson.
3018
3019         * Configurations/Base.xcconfig:
3020         Don't warn about C++11 extensions used in C++98 mode.
3021
3022 2011-11-05  Filip Pizlo  <fpizlo@apple.com>
3023
3024         Value profiling should just use two buckets
3025         https://bugs.webkit.org/show_bug.cgi?id=71619
3026
3027         Reviewed by Gavin Barraclough.
3028         
3029         Added one more configuration options (like Heuristics::minimumOptimizationDelay),
3030         improved debugging in JIT optimization support, changed the number of buckets
3031         in the value profile from 9 to 2, and wrote a more optimal value profiling path
3032         in the old JIT to take advantage of this. It's still possible to play around with
3033         larger numbers of buckets, and we should probably keep this for a little while
3034         until we convince ourselves that using just two buckets is the right call.
3035
3036         * bytecode/CodeBlock.cpp:
3037         (JSC::CodeBlock::shouldOptimizeNow):
3038         * bytecode/ValueProfile.h:
3039         * jit/JITInlineMethods.h:
3040         (JSC::JIT::emitValueProfilingSite):
3041         * jit/JITStubs.cpp:
3042         (JSC::DEFINE_STUB_FUNCTION):
3043         * runtime/Heuristics.cpp:
3044         (JSC::Heuristics::initializeHeuristics):
3045         * runtime/Heuristics.h:
3046
3047 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
3048
3049         JSC should be able to sample itself in a more flexible way than just sampling flags
3050         https://bugs.webkit.org/show_bug.cgi?id=71522
3051
3052         Reviewed by Gavin Barraclough.
3053         
3054         Added a construct that looks like SamplingRegion samplingRegion("name").
3055
3056         * JavaScriptCore.exp:
3057         * JavaScriptCore.xcodeproj/project.pbxproj:
3058         * bytecode/SamplingTool.cpp:
3059         (JSC::SamplingRegion::Locker::Locker):
3060         (JSC::SamplingRegion::Locker::~Locker):
3061         (JSC::SamplingRegion::sample):
3062         (JSC::SamplingRegion::dump):
3063         (JSC::SamplingRegion::dumpInternal):
3064         (JSC::SamplingThread::threadStartFunc):
3065         * bytecode/SamplingTool.h:
3066         (JSC::SamplingRegion::SamplingRegion):
3067         (JSC::SamplingRegion::~SamplingRegion):
3068         (JSC::SamplingRegion::exchangeCurrent):
3069         * bytecompiler/BytecodeGenerator.cpp:
3070         (JSC::BytecodeGenerator::generate):
3071         * dfg/DFGDriver.cpp:
3072         (JSC::DFG::compile):
3073         * heap/Heap.cpp:
3074         (JSC::Heap::markRoots):
3075         (JSC::Heap::collect):
3076         * heap/VTableSpectrum.cpp:
3077         (JSC::VTableSpectrum::countVPtr):
3078         (JSC::VTableSpectrum::dump):
3079         * heap/VTableSpectrum.h:
3080         * jsc.cpp:
3081         (main):
3082         (runWithScripts):
3083         * parser/Parser.h:
3084         (JSC::parse):
3085         * runtime/Executable.cpp:
3086         (JSC::EvalExecutable::compileInternal):
3087         (JSC::ProgramExecutable::compileInternal):
3088         (JSC::FunctionExecutable::compileForCallInternal):
3089         (JSC::FunctionExecutable::compileForConstructInternal):
3090         * wtf/Atomics.h:
3091         (WTF::weakCompareAndSwap):
3092         * wtf/Platform.h:
3093         * wtf/Spectrum.h: Added.
3094         (WTF::Spectrum::Spectrum):
3095         (WTF::Spectrum::add):
3096         (WTF::Spectrum::get):
3097         (WTF::Spectrum::begin):
3098         (WTF::Spectrum::end):
3099         (WTF::Spectrum::KeyAndCount::KeyAndCount):
3100         (WTF::Spectrum::KeyAndCount::operator<):
3101         (WTF::Spectrum::buildList):
3102         * wtf/wtf.pri:
3103
3104 2011-11-05  Sam Weinig  <sam@webkit.org>
3105
3106         Fix windows build.
3107
3108         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3109
3110 2011-11-04  Sam Weinig  <sam@webkit.org>
3111
3112         Reduce the number of putWithAttributes
3113         https://bugs.webkit.org/show_bug.cgi?id=71597
3114
3115         Reviewed by Adam Roben.
3116
3117         * JavaScriptCore.exp:
3118         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3119         Remove exports of removed functions.
3120
3121         * runtime/JSActivation.cpp:
3122         (JSC::JSActivation::putWithAttributes):
3123         Calling the overload without the extra parameters does the same thing.
3124
3125         * runtime/JSObject.cpp:
3126         (JSC::JSObject::putWithAttributes):
3127         * runtime/JSObject.h:
3128         Remove four unused JSObject::putWithAttributes overloads and make one of the remaining
3129         two overloads not virtual, since no one overrides it.
3130
3131 2011-11-04  Pratik Solanki  <psolanki@apple.com>
3132
3133         sqrtDouble and andnotDouble should be declared noreturn
3134         https://bugs.webkit.org/show_bug.cgi?id=71592
3135
3136         Reviewed by Sam Weinig.
3137
3138         * assembler/MacroAssemblerARMv7.h:
3139
3140 2011-11-04  Mark Hahnenberg  <mhahnenberg@apple.com>
3141
3142         De-virtualize JSObject::hasInstance
3143         https://bugs.webkit.org/show_bug.cgi?id=71430
3144
3145         Reviewed by Darin Adler.
3146
3147         Added hasInstance to the MethodTable, changed all the virtual 
3148         implementations of hasInstance to static ones, and replaced 
3149         all call sites with corresponding lookups in the MethodTable.
3150
3151         * API/JSCallbackObject.h:
3152         * API/JSCallbackObjectFunctions.h:
3153         (JSC::::hasInstance):
3154         * API/JSValueRef.cpp:
3155         (JSValueIsInstanceOfConstructor):
3156         * JavaScriptCore.exp:
3157         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3158         * interpreter/Interpreter.cpp:
3159         (JSC::Interpreter::privateExecute):
3160         * jit/JITStubs.cpp:
3161         (JSC::DEFINE_STUB_FUNCTION):
3162         * runtime/ClassInfo.h:
3163         * runtime/JSBoundFunction.cpp:
3164         (JSC::JSBoundFunction::hasInstance):
3165         * runtime/JSBoundFunction.h:
3166         * runtime/JSCell.cpp:
3167         (JSC::JSCell::hasInstance):
3168         * runtime/JSCell.h:
3169         * runtime/JSObject.cpp:
3170         (JSC::JSObject::hasInstance):
3171         * runtime/JSObject.h:
3172
3173 2011-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3174
3175         [Qt] Refactor and clean up the qmake build system
3176
3177         The qmake build system has accumulated a bit of cruft and redundancy
3178         over time. There's also a fairly tight coupling between how to build
3179         the various targets, and _what_ to build, making it harder to add new
3180         rules or sources. This patch aims to elevate these issues somewhat.
3181
3182         This is a short-list of the changes:
3183
3184           * The rules for how to build targets are now mostly contained as
3185             prf-files in Tools/qmake/mkspecs/features. Using mkspecs also
3186             allows us to do pre- and post-processing of each project file,
3187             which helps to clean up the actual project files.
3188
3189           * Derived sources are no longer generated as a separate make-step
3190             but is part of each target's project file as a subdir. Makefile
3191             rules are used to ensure that we run make on the derived sources
3192             before running qmake on the actual target makefile. This makes
3193             it easier to keep a proper dependency between derived sources
3194             and the target.
3195
3196           * We use GNU make and the compiler to generate dependencies on
3197             UNIX-based systems running Qt 5. This allows us to lessen the
3198             need to run qmake, which should reduce compile time.
3199
3200           * WebKit2 is now build by default if building with Qt 5. It can
3201             be disabled by passing --no-webkit2 to build-webkit.
3202
3203         The result of these changes are hopefully a cleaner and easier
3204         build system to modify, and faster build times due to no longer
3205         running qmake on every single build. It's also a first step
3206         towards possibly generating the list of sources using another
3207         build system.
3208
3209         https://bugs.webkit.org/show_bug.cgi?id=71222
3210
3211         Reviewed by Simon Hausmann.
3212
3213         * DerivedSources.pri: Added.
3214         * DerivedSources.pro: Removed.
3215         * JavaScriptCore.pro:
3216         * Target.pri: Copied from Source/JavaScriptCore/JavaScriptCore.pro.
3217         * headers.pri: Removed.
3218         * jsc.pro:
3219         * wtf/wtf.pri:
3220         * yarr/yarr.pri:
3221
3222 2011-11-04  Yuqiang Xian  <yuqiang.xian@intel.com>
3223
3224         More code clean-up in DFG 32_64
3225         https://bugs.webkit.org/show_bug.cgi?id=71540
3226
3227         Remove unnecessary code duplications, and fix compilation warnings.
3228
3229         Reviewed by Gavin Barraclough.
3230
3231         * dfg/DFGJITCompiler.cpp:
3232         (JSC::DFG::JITCompiler::emitCount):
3233         (JSC::DFG::JITCompiler::setSamplingFlag):
3234         (JSC::DFG::JITCompiler::clearSamplingFlag):
3235         (JSC::DFG::JITCompiler::jitAssertIsCell):
3236         * dfg/DFGJITCompiler32_64.cpp:
3237         * dfg/DFGSpeculativeJIT32_64.cpp:
3238         (JSC::DFG::SpeculativeJIT::compile):
3239
3240 2011-11-04  Csaba Osztrogonác  <ossy@webkit.org>
3241
3242         De-virtualize JSObject::hasInstance
3243         https://bugs.webkit.org/show_bug.cgi?id=71430
3244
3245         Unreviewed rolling out r99238, because it made a test crash on all platform.
3246
3247         * API/JSCallbackObject.h:
3248         * API/JSCallbackObjectFunctions.h:
3249         (JSC::::hasInstance):
3250         * API/JSValueRef.cpp:
3251         (JSValueIsInstanceOfConstructor):
3252         * JavaScriptCore.exp:
3253         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3254         * interpreter/Interpreter.cpp:
3255         (JSC::Interpreter::privateExecute):
3256         * jit/JITStubs.cpp:
3257         (JSC::DEFINE_STUB_FUNCTION):
3258         * runtime/ClassInfo.h:
3259         * runtime/JSBoundFunction.cpp:
3260         (JSC::JSBoundFunction::hasInstance):
3261         * runtime/JSBoundFunction.h:
3262         * runtime/JSCell.cpp:
3263         * runtime/JSCell.h:
3264         * runtime/JSObject.cpp:
3265         (JSC::JSObject::hasInstance):
3266         * runtime/JSObject.h:
3267
3268 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
3269
3270         De-virtualize JSObject::getPropertyNames
3271         https://bugs.webkit.org/show_bug.cgi?id=71306
3272
3273         Reviewed by Darin Adler.
3274
3275         Added getPropertyNames to the MethodTable, changed all the virtual 
3276         implementations of getPropertyNames to static ones, and replaced 
3277         all call sites with corresponding lookups in the MethodTable.
3278
3279         * API/JSObjectRef.cpp:
3280         (JSObjectCopyPropertyNames):
3281         * JavaScriptCore.exp:
3282         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3283         * debugger/DebuggerActivation.cpp:
3284         (JSC::DebuggerActivation::getOwnPropertyNames):
3285         * runtime/ClassInfo.h:
3286         * runtime/JSCell.cpp:
3287         (JSC::JSCell::getPropertyNames):
3288         * runtime/JSCell.h:
3289         * runtime/JSObject.cpp:
3290         (JSC::JSObject::getPropertyNames):
3291         (JSC::JSObject::getOwnPropertyNames):
3292         * runtime/JSObject.h:
3293         * runtime/JSPropertyNameIterator.cpp:
3294         (JSC::JSPropertyNameIterator::create):
3295         * runtime/ScopeChain.cpp:
3296         (JSC::ScopeChainNode::print):
3297         * runtime/Structure.cpp:
3298         (JSC::Structure::getPropertyNamesFromStructure):
3299         * runtime/Structure.h:
3300
3301 2011-11-03  Darin Adler  <darin@apple.com>
3302
3303         Change remaining callers of releaseRef to call leakRef
3304         https://bugs.webkit.org/show_bug.cgi?id=71422
3305
3306         * wtf/text/AtomicString.cpp:
3307         (WTF::HashAndUTF8CharactersTranslator::translate): Use leakRef.
3308
3309 2011-11-02  Darin Adler  <darin@apple.com>
3310
3311         Change remaining callers of releaseRef to call leakRef
3312         https://bugs.webkit.org/show_bug.cgi?id=71422
3313
3314         * wtf/text/AtomicString.cpp:
3315         (WTF::HashAndUTF8CharactersTranslator::translate): Use leakRef.
3316
3317 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
3318
3319         De-virtualize JSObject::hasInstance
3320         https://bugs.webkit.org/show_bug.cgi?id=71430
3321
3322         Reviewed by Darin Adler.
3323
3324         Added hasInstance to the MethodTable, changed all the virtual 
3325         implementations of hasInstance to static ones, and replaced 
3326         all call sites with corresponding lookups in the MethodTable.
3327
3328         * API/JSCallbackObject.h:
3329         * API/JSCallbackObjectFunctions.h:
3330         (JSC::::hasInstance):
3331         * API/JSValueRef.cpp:
3332         (JSValueIsInstanceOfConstructor):
3333         * JavaScriptCore.exp:
3334         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3335         * interpreter/Interpreter.cpp:
3336         (JSC::Interpreter::privateExecute):
3337         * jit/JITStubs.cpp:
3338         (JSC::DEFINE_STUB_FUNCTION):
3339         * runtime/ClassInfo.h:
3340         * runtime/JSBoundFunction.cpp:
3341         (JSC::JSBoundFunction::hasInstance):
3342         * runtime/JSBoundFunction.h:
3343         * runtime/JSCell.cpp:
3344         (JSC::JSCell::hasInstance):
3345         * runtime/JSCell.h:
3346         * runtime/JSObject.cpp:
3347         (JSC::JSObject::hasInstance):
3348         * runtime/JSObject.h:
3349
3350 2011-11-03  Filip Pizlo  <fpizlo@apple.com>
3351
3352         JIT-specific code should be able to refer to register types even on JIT-disabled builds
3353         https://bugs.webkit.org/show_bug.cgi?id=71498
3354
3355         Reviewed by Gavin Barraclough.
3356
3357         * assembler/MacroAssembler.h:
3358         (MacroAssembler::MacroAssembler):
3359
3360 2011-11-03  Mark Hahnenberg  <mhahnenberg@apple.com>
3361
3362         De-virtualize JSObject::className
3363         https://bugs.webkit.org/show_bug.cgi?id=71428
3364
3365         Reviewed by Sam Weinig.
3366
3367         Added className to the MethodTable, changed all the virtual 
3368         implementations of className to static ones, and replaced 
3369         all call sites with corresponding lookups in the MethodTable.
3370
3371         * API/JSCallbackObject.h:
3372         * API/JSCallbackObjectFunctions.h:
3373         (JSC::::className):
3374         * JavaScriptCore.exp:
3375         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3376         * debugger/DebuggerActivation.cpp:
3377         (JSC::DebuggerActivation::className):
3378         * debugger/DebuggerActivation.h:
3379         * jsc.cpp:
3380         (GlobalObject::createStructure):
3381         * profiler/Profiler.cpp:
3382         (JSC::Profiler::createCallIdentifier):
3383         * runtime/ClassInfo.h:
3384         * runtime/JSCell.cpp:
3385         (JSC::JSCell::className):
3386         * runtime/JSCell.h:
3387         * runtime/JSObject.cpp:
3388         (JSC::JSObject::className):
3389         * runtime/JSObject.h:
3390         * runtime/ObjectPrototype.cpp:
3391         (JSC::objectProtoFuncToString):
3392         * testRegExp.cpp:
3393         (GlobalObject::createStructure):
3394
3395 2011-11-02  Jer Noble  <jer.noble@apple.com>
3396
3397         Add Clock class and platform-specific implementations.
3398         https://bugs.webkit.org/show_bug.cgi?id=71341
3399
3400         Reviewed by Sam Weinig.
3401
3402         Add WTF_USE_COREAUDIO macro for use by PlatformClockCA.
3403
3404         * wtf/Platform.h:
3405
3406 2011-11-03  Pavel Feldman  <pfeldman@chromium.org>
3407
3408         Not reviewed: fixing win build. step2.
3409
3410         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3411
3412 2011-11-03  Pavel Feldman  <pfeldman@chromium.org>
3413
3414         Not reviewed: fix windows build, step1
3415
3416         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3417
3418 2011-11-03  Pavel Feldman  <pfeldman@google.com>
3419
3420         Web Inspector: preserve script location for inline handlers.
3421         https://bugs.webkit.org/show_bug.cgi?id=71367
3422
3423         Makes SourceCode factories receive TextPosition instead of the line number;
3424         Stores consistent position values in SourceCode and SourceProvider;
3425
3426         Reviewed by Yury Semikhatsky.
3427
3428         * API/JSBase.cpp:
3429         (JSEvaluateScript):
3430         (JSCheckScriptSyntax):
3431         * API/JSObjectRef.cpp:
3432         (JSObjectMakeFunction):
3433         * parser/SourceCode.h:
3434         (JSC::makeSource):
3435         * parser/SourceProvider.h:
3436         (JSC::SourceProvider::SourceProvider):
3437         (JSC::SourceProvider::startPosition):
3438         (JSC::UStringSourceProvider::create):
3439         (JSC::UStringSourceProvider::UStringSourceProvider):
3440         * runtime/FunctionConstructor.cpp:
3441         (JSC::constructFunction):
3442         (JSC::constructFunctionSkippingEvalEnabledCheck):
3443         * runtime/FunctionConstructor.h:
3444
3445 2011-11-03  Kentaro Hara  <haraken@chromium.org>
3446
3447         Fixed wrong implementation of doubleValue % 2^{64}.
3448         https://bugs.webkit.org/show_bug.cgi?id=67980
3449
3450         Reviewed by Hajime Morita.
3451
3452         fast/events/constructors/progress-event-constructor.html was failing
3453         because of the wrong implementation of conversion from an ECMAScript value
3454         to an IDL unsigned long long value (Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long).
3455         In particular, the calculation of doubleValue % 2^{64} was wrong.
3456         This patch implemented it correctly in doubleToInteger() in wtf/MathExtras.h.
3457
3458         * wtf/MathExtras.h:
3459         (doubleToInteger): Implemented the spec correctly.
3460
3461 2011-11-03  Sheriff Bot  <webkit.review.bot@gmail.com>
3462
3463         Unreviewed, rolling out r99089.
3464         http://trac.webkit.org/changeset/99089
3465         https://bugs.webkit.org/show_bug.cgi?id=71448
3466
3467         @plt postfix for math functions cause crash on Linux 32 (the
3468         symbol is defined but it points to NULL) (Requested by
3469         zherczeg on #webkit).
3470
3471         * dfg/DFGOperations.cpp:
3472         * jit/JITStubs.cpp:
3473         * jit/ThunkGenerators.cpp:
3474
3475 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
3476
3477         DFG inlining breaks function.arguments[something] if the argument being
3478         retrieved was subjected to DFG's unboxing optimizations
3479         https://bugs.webkit.org/show_bug.cgi?id=71436
3480
3481         Reviewed by Oliver Hunt.
3482         
3483         This makes inlined arguments retrieval use some of the same machinery as
3484         OSR to determine where from, and how, to retrieve a value that the DFG
3485         might have somehow squirreled away while the old JIT would put it in its
3486         obvious location, using an obvious format.
3487         
3488         To that end, previously DFG-internal notions such as DataFormat,
3489         VirtualRegister, and ValueRecovery are now in bytecode/ since they are
3490         stored as part of InlineCallFrames.
3491
3492         * bytecode/CodeOrigin.h:
3493         * dfg/DFGAbstractState.cpp:
3494         (JSC::DFG::AbstractState::execute):
3495         * dfg/DFGByteCodeParser.cpp:
3496         (JSC::DFG::ByteCodeParser::handleInlining):
3497         (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
3498         * dfg/DFGJITCompiler.cpp:
3499         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3500         * dfg/DFGJITCompiler32_64.cpp:
3501         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3502         * dfg/DFGNode.h:
3503         * dfg/DFGPropagator.cpp:
3504         (JSC::DFG::Propagator::propagateNodePredictions):
3505         * dfg/DFGSpeculativeJIT.cpp:
3506         (JSC::DFG::SpeculativeJIT::compile):
3507         * dfg/DFGSpeculativeJIT64.cpp:
3508         (JSC::DFG::SpeculativeJIT::compile):
3509         * interpreter/CallFrame.cpp:
3510         (JSC::CallFrame::trueCallerFrame):
3511         * interpreter/CallFrame.h:
3512         (JSC::ExecState::inlineCallFrame):
3513         * interpreter/Register.h:
3514         (JSC::Register::asInlineCallFrame):
3515         (JSC::Register::unboxedInt32):
3516         (JSC::Register::unboxedBoolean):
3517         (JSC::Register::unboxedCell):
3518         * runtime/Arguments.h:
3519         (JSC::Arguments::finishCreationAndCopyRegisters):
3520
3521 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
3522
3523         ValueRecovery should be moved out of the DFG JIT
3524         https://bugs.webkit.org/show_bug.cgi?id=71439
3525
3526         Reviewed by Oliver Hunt.
3527
3528         * JavaScriptCore.xcodeproj/project.pbxproj:
3529         * bytecode/DataFormat.h: Added.
3530         (JSC::dataFormatToString):
3531         (JSC::needDataFormatConversion):
3532         (JSC::isJSFormat):
3533         (JSC::isJSInteger):
3534         (JSC::isJSDouble):
3535         (JSC::isJSCell):
3536         (JSC::isJSBoolean):
3537         * bytecode/ValueRecovery.h: Added.
3538         (JSC::ValueRecovery::ValueRecovery):
3539         (JSC::ValueRecovery::alreadyInRegisterFile):
3540         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedInt32):
3541         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedCell):
3542         (JSC::ValueRecovery::alreadyInRegisterFileAsUnboxedBoolean):
3543         (JSC::ValueRecovery::inGPR):
3544         (JSC::ValueRecovery::inPair):
3545         (JSC::ValueRecovery::inFPR):
3546         (JSC::ValueRecovery::displacedInRegisterFile):
3547         (JSC::ValueRecovery::constant):
3548         (JSC::ValueRecovery::technique):
3549         (JSC::ValueRecovery::isInRegisters):
3550         (JSC::ValueRecovery::gpr):
3551         (JSC::ValueRecovery::tagGPR):
3552         (JSC::ValueRecovery::payloadGPR):
3553         (JSC::ValueRecovery::fpr):
3554         (JSC::ValueRecovery::virtualRegister):
3555         (JSC::ValueRecovery::dump):
3556         * bytecode/VirtualRegister.h: Added.
3557         * dfg/DFGGenerationInfo.h:
3558         (JSC::DFG::GenerationInfo::isJSFormat):
3559         * dfg/DFGSpeculativeJIT.cpp:
3560         (JSC::DFG::ValueSource::dump):
3561         * dfg/DFGSpeculativeJIT.h:
3562         * dfg/DFGVariableAccessData.h:
3563
3564 2011-11-02  Sam Weinig  <sam@webkit.org>
3565
3566         Object.getOwnPropertyDescriptor() does not retrieve the getter/setter from a property on the window that has been overridden with a getter/setter
3567         https://bugs.webkit.org/show_bug.cgi?id=71333
3568
3569         Reviewed by Gavin Barraclough.
3570
3571         Tested by fast/dom/getter-on-window-object2.html
3572
3573         * runtime/PropertyDescriptor.cpp:
3574         (JSC::PropertyDescriptor::setDescriptor):
3575         The attributes returned from Structure::get do not include Getter or Setter, so
3576         instead check if the value is a GetterSetter like we do elsewhere. If it is, update
3577         the descriptor's attributes accordingly.
3578
3579 2011-11-02  Yuqiang Xian  <yuqiang.xian@intel.com>
3580
3581         FunctionPtr should accept FASTCALL functions on X86
3582         https://bugs.webkit.org/show_bug.cgi?id=71434
3583
3584         Reviewed by Filip Pizlo.
3585
3586         On X86 we sometimes use FASTCALL convention functions, for example the
3587         cti functions, and we may need the pointers to such functions, e.g.,
3588         in current DFG register file check and arity check, though long term
3589         we may avoid such usage of cti calls in DFG.
3590
3591         * assembler/MacroAssemblerCodeRef.h:
3592         (JSC::FunctionPtr::FunctionPtr):
3593
3594 2011-11-02  Filip Pizlo  <fpizlo@apple.com>
3595
3596         Inlined uses of the global object should use the right global object
3597         https://bugs.webkit.org/show_bug.cgi?id=71427
3598
3599         Reviewed by Oliver Hunt.
3600
3601         * dfg/DFGJITCompiler.h:
3602         (JSC::DFG::JITCompiler::globalObjectFor):
3603         * dfg/DFGSpeculativeJIT64.cpp:
3604         (JSC::DFG::SpeculativeJIT::compile):
3605
3606 2011-11-02  Yuqiang Xian  <yuqiang.xian@intel.com>
3607
3608         Remove some unnecessary loads/stores in DFG JIT 32_64
3609         https://bugs.webkit.org/show_bug.cgi?id=71090
3610
3611         Reviewed by Filip Pizlo.
3612
3613         In fillSpeculateCell and OSR exit, some unnecessary loads/stores can
3614         be eliminated.
3615
3616         * dfg/DFGJITCompiler32_64.cpp:
3617         (JSC::DFG::JITCompiler::exitSpeculativeWithOSR):
3618         * dfg/DFGSpeculativeJIT32_64.cpp:
3619         (JSC::DFG::SpeculativeJIT::fillSpeculateCell):
3620
3621 2011-11-02  Adam Klein  <adamk@chromium.org>
3622
3623         Replace usage of StringImpl with String where possible in CharacterData and Text
3624         https://bugs.webkit.org/show_bug.cgi?id=71383
3625
3626         Reviewed by Darin Adler.
3627
3628         * wtf/text/WTFString.h:
3629         (WTF::String::containsOnlyWhitespace): Added new method.
3630
3631 2011-11-02  Mark Hahnenberg  <mhahnenberg@apple.com>
3632
3633         De-virtualize JSObject::getOwnPropertyNames
3634         https://bugs.webkit.org/show_bug.cgi?id=71307
3635
3636         Reviewed by Darin Adler.
3637
3638         Added getOwnPropertyNames to the MethodTable, changed all the virtual 
3639         implementations of getOwnPropertyNames to static ones, and replaced 
3640         all call sites with corresponding lookups in the MethodTable.
3641
3642         * API/JSCallbackObject.h:
3643         * API/JSCallbackObjectFunctions.h:
3644         (JSC::::getOwnPropertyNames):
3645         * JavaScriptCore.exp:
3646         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3647         * debugger/DebuggerActivation.cpp:
3648         (JSC::DebuggerActivation::getOwnPropertyNames):
3649         * debugger/DebuggerActivation.h:
3650         * runtime/Arguments.cpp:
3651         (JSC::Arguments::getOwnPropertyNames):
3652         * runtime/Arguments.h:
3653         * runtime/ClassInfo.h:
3654         * runtime/JSActivation.cpp:
3655         (JSC::JSActivation::getOwnPropertyNames):
3656         * runtime/JSActivation.h:
3657         * runtime/JSArray.cpp:
3658         (JSC::JSArray::getOwnPropertyNames):
3659         * runtime/JSArray.h:
3660         * runtime/JSByteArray.cpp:
3661         (JSC::JSByteArray::getOwnPropertyNames):
3662         * runtime/JSByteArray.h:
3663         * runtime/JSCell.cpp:
3664         (JSC::JSCell::getOwnPropertyNames):
3665         * runtime/JSCell.h:
3666         * runtime/JSFunction.cpp:
3667         (JSC::JSFunction::getOwnPropertyNames):
3668         * runtime/JSFunction.h:
3669         * runtime/JSNotAnObject.cpp:
3670         (JSC::JSNotAnObject::getOwnPropertyNames):
3671         * runtime/JSNotAnObject.h:
3672         * runtime/JSONObject.cpp:
3673         (JSC::Stringifier::Holder::appendNextProperty):
3674         (JSC::Walker::walk):
3675         * runtime/JSObject.cpp:
3676         (JSC::JSObject::getPropertyNames):
3677         (JSC::JSObject::getOwnPropertyNames):
3678         * runtime/JSObject.h:
3679         * runtime/JSVariableObject.cpp:
3680         (JSC::JSVariableObject::~JSVariableObject):
3681         (JSC::JSVariableObject::getOwnPropertyNames):
3682         * runtime/JSVariableObject.h:
3683         * runtime/ObjectConstructor.cpp:
3684         (JSC::objectConstructorGetOwnPropertyNames):
3685         (JSC::objectConstructorKeys):
3686         (JSC::defineProperties):
3687         * runtime/RegExpMatchesArray.h:
3688         (JSC::RegExpMatchesArray::getOwnPropertyNames):
3689         * runtime/StringObject.cpp:
3690         (JSC::StringObject::getOwnPropertyNames):
3691         * runtime/StringObject.h:
3692         * runtime/Structure.h:
3693
3694 2011-11-02  Dean Jackson  <dino@apple.com>
3695
3696         Add ENABLE_CSS_SHADERS flag
3697         https://bugs.webkit.org/show_bug.cgi?id=71394
3698
3699         Reviewed by Sam Weinig.
3700
3701         * Configurations/FeatureDefines.xcconfig:
3702
3703 2011-11-02  Alexey Shabalin  <a.shabalin@gmail.com>
3704
3705         TEXTREL in libjavascriptcoregtk-1.0.so.0.11.0 on x86 (or i586)
3706         https://bugs.webkit.org/show_bug.cgi?id=70610
3707
3708         Reviewed by Martin Robinson.
3709
3710         Properly annotate ASM on BSD and Linux x86 systems.
3711
3712         * dfg/DFGOperations.cpp: Add annotation for X86.
3713         * jit/JITStubs.cpp: Ditto.
3714         * jit/ThunkGenerators.cpp: Ditto.
3715
3716 2011-11-02  Xianzhu Wang  <wangxianzhu@chromium.org>
3717
3718         Missing Force8BitConstructor in 8-bit version of StringImpl::reallocate()
3719         https://bugs.webkit.org/show_bug.cgi?id=71347
3720
3721         Reviewed by Geoffrey Garen.
3722
3723         * wtf/text/StringImpl.cpp:
3724         (WTF::StringImpl::reallocate):
3725
3726 2011-11-01  Darin Adler  <darin@apple.com>
3727
3728         Cut down on malloc/free a bit in the parser arena
3729         https://bugs.webkit.org/show_bug.cgi?id=71343
3730
3731         Reviewed by Oliver Hunt.
3732
3733         * parser/ParserArena.cpp:
3734         (JSC::ParserArena::deallocateObjects): Call the destructors of
3735         the deletable objects before freeing the pools. Don't call
3736         fastFree on the deletable objects any more.
3737
3738         * parser/ParserArena.h:
3739         (JSC::ParserArena::allocateDeletable): Use allocateFreeable
3740         instead of fastMalloc here.
3741
3742 2011-11-01  Sam Weinig  <sam@webkit.org>
3743
3744         Implement __lookupGetter__/__lookupSetter__ in terms of getPropertyDescriptor
3745         https://bugs.webkit.org/show_bug.cgi?id=71336
3746
3747         Reviewed by Darin Adler.
3748
3749         * debugger/DebuggerActivation.cpp:
3750         * debugger/DebuggerActivation.h:
3751         Remove overrides of lookupGetter/lookupSetter, which are no longer needed
3752         due to implementing getPropertyDescriptor.
3753
3754         * runtime/JSObject.cpp:
3755         (JSC::JSObject::lookupGetter):
3756         (JSC::JSObject::lookupSetter):
3757         * runtime/JSObject.h:
3758         De-virtualize lookupGetter/lookupSetter, and implement them in terms of
3759         getPropertyDescriptor.
3760
3761 2011-11-01  Mark Hahnenberg  <mhahnenberg@apple.com>
3762
3763         De-virtualize JSObject::defineSetter
3764         https://bugs.webkit.org/show_bug.cgi?id=71303
3765
3766         Reviewed by Darin Adler.
3767
3768         Added defineSetter to the MethodTable, changed all the virtual 
3769         implementations of defineSetter to static ones, and replaced 
3770         all call sites with corresponding lookups in the MethodTable.
3771
3772         * JavaScriptCore.exp:
3773         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3774         * debugger/DebuggerActivation.cpp:
3775         (JSC::DebuggerActivation::defineSetter):
3776         * debugger/DebuggerActivation.h:
3777         * interpreter/Interpreter.cpp:
3778         (JSC::Interpreter::privateExecute):
3779         * jit/JITStubs.cpp:
3780         (JSC::DEFINE_STUB_FUNCTION):
3781         * runtime/ClassInfo.h:
3782         * runtime/JSCell.cpp:
3783         (JSC::JSCell::defineSetter):
3784         * runtime/JSCell.h:
3785         * runtime/JSGlobalObject.cpp:
3786         (JSC::JSGlobalObject::defineSetter):
3787         * runtime/JSGlobalObject.h:
3788         * runtime/JSObject.cpp:
3789         (JSC::JSObject::defineSetter):
3790         (JSC::putDescriptor):
3791         * runtime/JSObject.h:
3792         * runtime/ObjectPrototype.cpp:
3793         (JSC::objectProtoFuncDefineSetter):
3794
3795 2011-11-01  Filip Pizlo  <fpizlo@apple.com>
3796
3797         DFG inlining breaks function.arguments
3798         https://bugs.webkit.org/show_bug.cgi?id=71329
3799
3800         Reviewed by Oliver Hunt.
3801         
3802         The DFG was forgetting to store code origin mappings for inlined
3803         call sites. Some of the fast-path optimizations for
3804         CallFrame::trueCallerFrame() were wrong. An assertion in Arguments
3805         was wrong.
3806         
3807         I also took the opportunity to decrease code duplication between
3808         DFG64 and DFG32_64, because I didn't feel like writing the same
3809         code twice.
3810
3811         * bytecode/CodeBlock.h:
3812         (JSC::ExecState::isInlineCallFrame):
3813         * dfg/DFGJITCompiler.cpp:
3814         (JSC::DFG::JITCompiler::compileEntry):
3815         (JSC::DFG::JITCompiler::compileBody):
3816         (JSC::DFG::JITCompiler::link):
3817         (JSC::DFG::JITCompiler::compile):
3818         (JSC::DFG::JITCompiler::compileFunction):
3819         * dfg/DFGJITCompiler32_64.cpp:
3820         * dfg/DFGNode.h:
3821         * interpreter/CallFrame.cpp:
3822         (JSC::CallFrame::trueCallerFrame):
3823         * interpreter/CallFrame.h:
3824         * runtime/Arguments.h:
3825         (JSC::Arguments::getArgumentsData):
3826
3827 2011-11-01  Xianzhu Wang  <wangxianzhu@chromium.org>
3828
3829         StringImpl::reallocate() should have a 8-bit version
3830         https://bugs.webkit.org/show_bug.cgi?id=71210
3831
3832         Reviewed by Geoffrey Garen.
3833
3834         * wtf/text/StringImpl.cpp:
3835         (WTF::StringImpl::reallocate):
3836         * wtf/text/StringImpl.h:
3837
3838 2011-10-31  Filip Pizlo  <fpizlo@apple.com>
3839
3840         The GC should be parallel
3841         https://bugs.webkit.org/show_bug.cgi?id=70995
3842
3843         Reviewed by Geoff Garen.
3844         
3845         Added parallel tracing to the GC. This works by having local mark
3846         stacks per thread, and a global shared one. Threads sometimes
3847         donate cells from the mark stack to the global one if the heuristics
3848         tell them that it's affordable to do so. Threads that have depleted
3849         their local mark stacks try to steal some from the shared one.
3850
3851         Marking is now done using an atomic weak relaxed CAS (compare-and-swap).
3852         
3853         This is a 23% speed-up on V8-splay when I use 4 marking threads,
3854         leading to a 3.5% speed-up on V8.
3855         
3856         It also appears that this reduces GC pause times on real websites by
3857         more than half.
3858
3859         * JavaScriptCore.exp:
3860         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3861         * heap/Heap.cpp:
3862         (JSC::Heap::Heap):
3863         (JSC::Heap::~Heap):
3864         (JSC::Heap::markRoots):
3865         * heap/Heap.h:
3866         * heap/MarkStack.cpp:
3867         (JSC::MarkStackSegmentAllocator::MarkStackSegmentAllocator):
3868         (JSC::MarkStackSegmentAllocator::~MarkStackSegmentAllocator):
3869         (JSC::MarkStackSegmentAllocator::allocate):
3870         (JSC::MarkStackSegmentAllocator::release):
3871         (JSC::MarkStackSegmentAllocator::shrinkReserve):
3872         (JSC::MarkStackArray::MarkStackArray):
3873         (JSC::MarkStackArray::~MarkStackArray):
3874         (JSC::MarkStackArray::expand):
3875         (JSC::MarkStackArray::refill):
3876         (JSC::MarkStackArray::donateSomeCellsTo):
3877         (JSC::MarkStackArray::stealSomeCellsFrom):
3878         (JSC::MarkStackThreadSharedData::markingThreadMain):
3879         (JSC::MarkStackThreadSharedData::markingThreadStartFunc):
3880         (JSC::MarkStackThreadSharedData::MarkStackThreadSharedData):
3881         (JSC::MarkStackThreadSharedData::~MarkStackThreadSharedData):
3882         (JSC::MarkStackThreadSharedData::reset):
3883         (JSC::MarkStack::reset):
3884         (JSC::SlotVisitor::donateSlow):
3885         (JSC::SlotVisitor::drain):
3886         (JSC::SlotVisitor::drainFromShared):
3887         (JSC::MarkStack::mergeOpaqueRoots):
3888         (JSC::SlotVisitor::harvestWeakReferences):
3889         * heap/MarkStack.h:
3890         (JSC::MarkStackSegment::data):
3891         (JSC::MarkStackSegment::capacityFromSize):
3892         (JSC::MarkStackSegment::sizeFromCapacity):
3893         (JSC::MarkStackArray::postIncTop):
3894         (JSC::MarkStackArray::preDecTop):
3895         (JSC::MarkStackArray::setTopForFullSegment):
3896         (JSC::MarkStackArray::setTopForEmptySegment):
3897         (JSC::MarkStackArray::top):
3898         (JSC::MarkStackArray::validatePrevious):
3899         (JSC::MarkStack::addWeakReferenceHarvester):
3900         (JSC::MarkStack::mergeOpaqueRootsIfNecessary):
3901         (JSC::MarkStack::mergeOpaqueRootsIfProfitable):
3902         (JSC::MarkStack::MarkStack):
3903         (JSC::MarkStack::addOpaqueRoot):
3904         (JSC::MarkStack::containsOpaqueRoot):
3905         (JSC::MarkStack::opaqueRootCount):
3906         (JSC::MarkStackArray::append):
3907         (JSC::MarkStackArray::canRemoveLast):
3908         (JSC::MarkStackArray::removeLast):
3909         (JSC::MarkStackArray::isEmpty):
3910         (JSC::MarkStackArray::canDonateSomeCells):
3911         (JSC::MarkStackArray::size):
3912         (JSC::ParallelModeEnabler::ParallelModeEnabler):
3913         (JSC::ParallelModeEnabler::~ParallelModeEnabler):
3914         * heap/MarkedBlock.h:
3915         (JSC::MarkedBlock::testAndSetMarked):
3916         * heap/SlotVisitor.h:
3917         (JSC::SlotVisitor::donate):
3918         (JSC::SlotVisitor::donateAndDrain):
3919         (JSC::SlotVisitor::donateKnownParallel):
3920         (JSC::SlotVisitor::SlotVisitor):
3921         * heap/WeakReferenceHarvester.h:
3922         * runtime/Heuristics.cpp:
3923         (JSC::Heuristics::initializeHeuristics):
3924         * runtime/Heuristics.h:
3925         * wtf/Atomics.h:
3926         (WTF::weakCompareAndSwap):
3927         * wtf/Bitmap.h:
3928         (WTF::::Bitmap):
3929         (WTF::::get):
3930         (WTF::::set):
3931         (WTF::::testAndSet):
3932         (WTF::::testAndClear):
3933         (WTF::::concurrentTestAndSet):
3934         (WTF::::concurrentTestAndClear):
3935         (WTF::::clear):
3936         (WTF::::clearAll):
3937         (WTF::::nextPossiblyUnset):
3938         (WTF::::findRunOfZeros):
3939         (WTF::::count):
3940         (WTF::::isEmpty):
3941         (WTF::::isFull):
3942         * wtf/MainThread.h:
3943         (WTF::isMainThreadOrGCThread):
3944         * wtf/Platform.h:
3945         * wtf/ThreadSpecific.h:
3946         (WTF::::isSet):
3947         * wtf/mac/MainThreadMac.mm:
3948         (WTF::initializeGCThreads):
3949         (WTF::initializeMainThreadPlatform):
3950         (WTF::initializeMainThreadToProcessMainThreadPlatform):
3951         (WTF::registerGCThread):
3952         (WTF::isMainThreadOrGCThread):
3953
3954 2011-10-31  Mark Hahnenberg  <mhahnenberg@apple.com>
3955
3956         De-virtualize JSObject::defaultValue
3957         https://bugs.webkit.org/show_bug.cgi?id=71146
3958
3959         Reviewed by Sam Weinig.
3960
3961         Added defaultValue to the MethodTable.  Replaced all virtual versions of 
3962         defaultValue with static versions.  Replaced all call sites with lookups in the 
3963         MethodTable.
3964
3965         * JavaScriptCore.exp:
3966         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
3967         * runtime/ClassInfo.h:
3968         * runtime/ExceptionHelpers.cpp:
3969         (JSC::InterruptedExecutionError::defaultValue):
3970         (JSC::TerminatedExecutionError::defaultValue):
3971         * runtime/ExceptionHelpers.h:
3972         * runtime/JSCell.cpp:
3973         (JSC::JSCell::defaultValue):
3974         * runtime/JSCell.h:
3975         * runtime/JSNotAnObject.cpp:
3976         (JSC::JSNotAnObject::defaultValue):
3977         * runtime/JSNotAnObject.h:
3978         * runtime/JSObject.cpp:
3979         (JSC::JSObject::getPrimitiveNumber):
3980         (JSC::JSObject::defaultValue):
3981         * runtime/JSObject.h:
3982         (JSC::JSObject::toPrimitive):
3983
3984 2011-10-31  Mark Hahnenberg  <mhahnenberg@apple.com>
3985
3986         Interpreter build fix
3987
3988         Unreviewed build fix
3989
3990         * interpreter/Interpreter.cpp:
3991         (JSC::Interpreter::privateExecute):
3992         * runtime/Executable.cpp:
3993         (JSC::FunctionExecutable::compileForCallInternal):
3994         (JSC::FunctionExecutable::compileForConstructInternal):
3995
3996 2011-10-31  Filip Pizlo  <fpizlo@apple.com>
3997
3998         DFG OSR exits should add to value profiles
3999         https://bugs.webkit.org/show_bug.cgi?id=71202
4000
4001         Reviewed by Oliver Hunt.
4002         
4003         Value profiles now have an extra special slot not used by the old JIT's
4004         profiling, which is reserved for OSR exits.
4005         
4006         The DFG's OSR exit code now knows which register, node index, and value
4007         profiling site was responsible for the (possibly flawed) information that
4008         led to the OSR failure. This is somewhat opportunistic and imperfect;
4009         if there's a lot of control flow between the value profiling site and the
4010         OSR failure point, then this mechanism simply gives up. It also gives up
4011         if the OSR failure is caused by either known deficiencies in the DFG