fourthTier: JITCode should abstract exactly how the JIT code is structured and where...
[WebKit-https.git] / Source / JavaScriptCore / ChangeLog
1 2013-07-15  Oliver Hunt  <oliver@apple.com>
2
3         Merge dfgFourthTier r147014
4
5     2013-03-27  Filip Pizlo  <fpizlo@apple.com>
6
7         fourthTier: JITCode should abstract exactly how the JIT code is structured and where it was allocated
8         https://bugs.webkit.org/show_bug.cgi?id=113437
9
10         Reviewed by Mark Hahnenberg.
11         
12         JITCode is now a virtual base class, which will allow different JITs to have radically
13         different memory allocation and management conventions in the future. It will also
14         make it easier to store JIT-specific meta-data in CodeBlock just by putting it into
15         an appropriate JITCode subclass.
16         
17         For now there is one subclass, DirectJITCode, which just behaves like JITCode used to
18         behave.
19
20         * assembler/RepatchBuffer.h:
21         (JSC::RepatchBuffer::RepatchBuffer):
22         * bytecode/CodeBlock.cpp:
23         (JSC::CodeBlock::resetStubInternal):
24         (JSC::CodeBlock::bytecodeOffset):
25         (JSC::CodeBlock::codeOriginForReturn):
26         * bytecode/CodeBlock.h:
27         (JSC::CodeBlock::setJITCode):
28         (JSC::CodeBlock::getJITCode):
29         (JSC::CodeBlock::getJITType):
30         (CodeBlock):
31         * dfg/DFGDriver.cpp:
32         (JSC::DFG::compile):
33         (JSC::DFG::tryCompile):
34         (JSC::DFG::tryCompileFunction):
35         * dfg/DFGDriver.h:
36         (DFG):
37         (JSC::DFG::tryCompile):
38         (JSC::DFG::tryCompileFunction):
39         * dfg/DFGJITCompiler.cpp:
40         (JSC::DFG::JITCompiler::compile):
41         (JSC::DFG::JITCompiler::compileFunction):
42         * dfg/DFGJITCompiler.h:
43         (JITCompiler):
44         * dfg/DFGOSREntry.cpp:
45         (JSC::DFG::prepareOSREntry):
46         * dfg/DFGOSRExit.cpp:
47         (JSC::DFG::OSRExit::codeLocationForRepatch):
48         * dfg/DFGOSRExitCompiler32_64.cpp:
49         (JSC::DFG::OSRExitCompiler::compileExit):
50         * dfg/DFGOSRExitCompiler64.cpp:
51         (JSC::DFG::OSRExitCompiler::compileExit):
52         * dfg/DFGOperations.cpp:
53         * interpreter/Interpreter.cpp:
54         (JSC::Interpreter::execute):
55         (JSC::Interpreter::executeCall):
56         (JSC::Interpreter::executeConstruct):
57         * jit/JIT.cpp:
58         (JSC::JIT::privateCompile):
59         * jit/JIT.h:
60         (JSC::JIT::compile):
61         (JIT):
62         * jit/JITCode.cpp:
63         (JSC):
64         (JSC::JITCode::JITCode):
65         (JSC::JITCode::~JITCode):
66         (JSC::JITCode::execute):
67         (JSC::JITCode::hostFunction):
68         (JSC::DirectJITCode::DirectJITCode):
69         (JSC::DirectJITCode::~DirectJITCode):
70         (JSC::DirectJITCode::addressForCall):
71         (JSC::DirectJITCode::executableAddressAtOffset):
72         (JSC::DirectJITCode::dataAddressAtOffset):
73         (JSC::DirectJITCode::offsetOf):
74         (JSC::DirectJITCode::size):
75         (JSC::DirectJITCode::contains):
76         * jit/JITCode.h:
77         (JSC):
78         (JITCode):
79         (JSC::JITCode::bottomTierJIT):
80         (JSC::JITCode::topTierJIT):
81         (JSC::JITCode::nextTierJIT):
82         (JSC::JITCode::isOptimizingJIT):
83         (JSC::JITCode::isBaselineCode):
84         (JSC::JITCode::jitType):
85         (JSC::JITCode::jitTypeFor):
86         (JSC::JITCode::executableAddress):
87         (JSC::JITCode::start):
88         (JSC::JITCode::end):
89         (DirectJITCode):
90         * jit/JITDriver.h:
91         (JSC::jitCompileIfAppropriate):
92         (JSC::jitCompileFunctionIfAppropriate):
93         * jit/JITStubs.cpp:
94         (JSC::lazyLinkFor):
95         (JSC::DEFINE_STUB_FUNCTION):
96         * jit/ThunkGenerators.cpp:
97         (JSC::virtualForGenerator):
98         * llint/LLIntEntrypoints.cpp:
99         (JSC::LLInt::getFunctionEntrypoint):
100         (JSC::LLInt::getEvalEntrypoint):
101         (JSC::LLInt::getProgramEntrypoint):
102         * llint/LLIntEntrypoints.h:
103         (JSC):
104         (LLInt):
105         (JSC::LLInt::getEntrypoint):
106         * llint/LLIntSlowPaths.cpp:
107         (JSC::LLInt::jitCompileAndSetHeuristics):
108         (JSC::LLInt::entryOSR):
109         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
110         * runtime/Executable.cpp:
111         (JSC::EvalExecutable::compileInternal):
112         (JSC::ProgramExecutable::compileInternal):
113         (JSC::FunctionExecutable::compileForCallInternal):
114         (JSC::FunctionExecutable::compileForConstructInternal):
115         * runtime/Executable.h:
116         (JSC::ExecutableBase::generatedJITCodeForCall):
117         (JSC::ExecutableBase::generatedJITCodeForConstruct):
118         (JSC::ExecutableBase::generatedJITCodeFor):
119         (ExecutableBase):
120         (JSC::ExecutableBase::hostCodeEntryFor):
121         (JSC::ExecutableBase::jsCodeEntryFor):
122         (JSC::ExecutableBase::jsCodeWithArityCheckEntryFor):
123         (JSC::NativeExecutable::create):
124         (JSC::NativeExecutable::finishCreation):
125         (JSC::EvalExecutable::generatedJITCode):
126         (JSC::ProgramExecutable::generatedJITCode):
127         * runtime/ExecutionHarness.h:
128         (JSC::prepareForExecution):
129         (JSC::prepareFunctionForExecution):
130
131 2013-07-24  Filip Pizlo  <fpizlo@apple.com>
132
133         It should be possible to hijack IndexingHeader for things other than lengths
134         https://bugs.webkit.org/show_bug.cgi?id=119065
135
136         Reviewed by Mark Hahnenberg.
137         
138         Made the body of IndexingHeader be a union.
139         
140         Modified the offlineasm so that you can say IndexingHeader::u.lengths.publicLength.
141         Previously those dots would cause parse errors. Now an identifier in offlineasm can
142         have a dot anywhere except the first character.
143
144         * llint/LowLevelInterpreter32_64.asm:
145         * llint/LowLevelInterpreter64.asm:
146         * offlineasm/parser.rb:
147         * runtime/IndexingHeader.h:
148         (JSC::IndexingHeader::offsetOfPublicLength):
149         (JSC::IndexingHeader::offsetOfVectorLength):
150         (JSC::IndexingHeader::IndexingHeader):
151         (JSC::IndexingHeader::vectorLength):
152         (JSC::IndexingHeader::setVectorLength):
153         (JSC::IndexingHeader::publicLength):
154         (JSC::IndexingHeader::setPublicLength):
155
156 2013-07-24  Mark Hahnenberg  <mhahnenberg@apple.com>
157
158         JIT::updateTopCallFrame doesn't update the CallFrame's bytecodeOffset if bytecodeOffset == 0
159         https://bugs.webkit.org/show_bug.cgi?id=118923
160
161         Reviewed by Filip Pizlo.
162
163         This bug causes the CallFrame's bytecodeOffset to not be properly set when we 
164         enter, e.g., cti_optimize from an op_enter.
165
166         * jit/JITInlines.h:
167         (JSC::JIT::updateTopCallFrame):
168
169 2013-07-23  Filip Pizlo  <fpizlo@apple.com>
170
171         DFG string concatenation optimizations might emit speculative nodes after emitting nodes that kill the original inputs
172         https://bugs.webkit.org/show_bug.cgi?id=119032
173
174         Reviewed by Oliver Hunt.
175
176         It just needs some Phantom action.
177
178         * dfg/DFGFixupPhase.cpp:
179         (JSC::DFG::FixupPhase::attemptToMakeFastStringAdd):
180
181 2013-07-10  Mark Lam  <mark.lam@apple.com>
182
183         Need ExpressionRangeInfo before ResolveForPuts in strict mode.
184         https://bugs.webkit.org/show_bug.cgi?id=118997.
185
186         Reviewed by Oliver Hunt.
187
188         If we add an assertion in UnlinkedCodeBlock::expressionRangeForBytecodeOffset()
189         to ensure that we are able to find an ExpressionRangeInfo for any given bytecode
190         offset, the following tests will fails:
191             fast/js/basic-strict-mode.html
192             fast/js/mozilla/strict/8.7.2.html
193         With this fix, those tests will no longer fail.
194
195         * bytecompiler/NodesCodegen.cpp:
196         (JSC::AssignResolveNode::emitBytecode):
197         (JSC::ForInNode::emitBytecode):
198         - Emit expression info before calls to emitResolveBaseForPut() when in strict mode.
199
200 2013-07-23  Mark Lam  <mark.lam@apple.com>
201
202         Added ExpressionRangeInfo for BinaryOpNodes that can throw exceptions
203         due to type coersion.
204         https://bugs.webkit.org/show_bug.cgi?id=116853.
205
206         Reviewed by Geoffrey Garen.
207
208         * bytecompiler/NodesCodegen.cpp:
209         (JSC::BinaryOpNode::emitBytecode):
210         - Added expression info for the strcat and the general binary op cases.
211           I did not add expression info for the "compare with null" case because
212           that comparison cannot trigger type coersion, and hence it won't throw
213           any exceptions and doesn't need the expression info.
214
215 2013-07-23  Mark Lam  <mark.lam@apple.com>
216
217         Removed unused sourceOffset from JSTokenLocation.
218         https://bugs.webkit.org/show_bug.cgi?id=118996.
219
220         Reviewed by Geoffrey Garen.
221
222         This also removes the assertion reported in the bug because it is now
223         moot, thereby resolving the assertion failure issue on Windows.
224
225         * bytecompiler/NodesCodegen.cpp:
226         (JSC::ArrayNode::toArgumentList):
227         (JSC::ApplyFunctionCallDotNode::emitBytecode):
228         * parser/Lexer.cpp:
229         (JSC::::lex):
230         * parser/Lexer.h:
231         (JSC::::lexExpectIdentifier):
232         * parser/Nodes.h:
233         * parser/Parser.cpp:
234         (JSC::::Parser):
235         (JSC::::parseFunctionInfo):
236         (JSC::::parseExpressionOrLabelStatement):
237         (JSC::::parseMemberExpression):
238         * parser/Parser.h:
239         (JSC::::parse):
240         * parser/ParserTokens.h:
241         (JSC::JSTokenLocation::JSTokenLocation):
242
243 2013-07-22  Alex Christensen  <achristensen@apple.com>
244
245         Added assembly files to Windows 64-bit builds.
246         https://bugs.webkit.org/show_bug.cgi?id=118931
247
248         Reviewed by Brent Fulgham.
249
250         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added JITStubsMSVC64.asm for x64 and enabled MASM.
251         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Added JITStubsMSVC64.asm.
252
253 2013-07-20  Brent Fulgham  <bfulgham@apple.com>
254
255         [Windows] Remove unneeded custom stdint.h now that we build on VS2010.
256         https://bugs.webkit.org/show_bug.cgi?id=118868.
257
258         Reviewed by Anders Carlsson.
259
260         * os-win32/stdint.h: Removed.
261         * GNUmakefile.list.am: Removed reference to os-win32/stdint.h
262
263 2013-07-19  Alex Christensen  <achristensen@apple.com>
264
265         Added x64 configuration to Visual Studio build.
266         https://bugs.webkit.org/show_bug.cgi?id=118888
267
268         Reviewed by Brent Fulgham.
269
270         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
271         * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
272         * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
273         * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
274         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
275         * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
276         * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
277         * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
278
279 2013-07-18  Andreas Kling  <akling@apple.com>
280
281         CodeBlock DFG entry list isn't getting shrunk-to-fit after linking.
282         <http://webkit.org/b/118875>
283         <rdar://problem/14488577>
284
285         Reviewed by Geoffrey Garen.
286
287         Move the CodeBlock::shrinkToFit() call out of JITCompiler::link() and to the call sites
288         so SpeculativeJIT::linkOSREntries() can fill in CodeBlock::m_dfgData->osrEntry first.
289
290         886 kB progression on <http://twitter.com/awesomekling>
291
292         * dfg/DFGJITCompiler.cpp:
293         (JSC::DFG::JITCompiler::link):
294         (JSC::DFG::JITCompiler::compile):
295         (JSC::DFG::JITCompiler::compileFunction):
296
297 2013-07-18  Chris Curtis  <chris_curtis@apple.com>
298
299         Fixed ASSERTION FAILED: callFrame == vm->topCallFrame in JSC::Interpreter::addStackTraceIfNecessary
300         https://bugs.webkit.org/show_bug.cgi?id=118498
301
302         Reviewed by Geoffrey Garen.
303
304         * jit/JITStubs.cpp:
305         (throwExceptionFromOpCall):
306         Created new throwExceptionFromOpCall that takes in a functor that contains
307         a function pointer (to create the errorObject) instead of a JSValue. Inside
308         of throwExceptionFromOpCall the topCallFrame is being rolled back in order
309         to handle the error throw. By passing the function pointer in, we can defer
310         the creation of the error object until after topCallFrame has been rolled 
311         back. This allows the error object to be created with the appropriate top 
312         frame.
313
314         DEFINE_STUB_FUNCTION(void*, stack_check):
315         DEFINE_STUB_FUNCTION(void*, op_call_arityCheck):
316         DEFINE_STUB_FUNCTION(void*, op_construct_arityCheck):
317         DEFINE_STUB_FUNCTION(EncodedJSValue, op_call_NotJSFunction):
318         DEFINE_STUB_FUNCTION(EncodedJSValue, op_construct_NotJSConstruct):
319
320         (JSC::ErrorFunctor::~ErrorFunctor):
321         (JSC::ErrorWithExecFunctor::ErrorWithExecFunctor):
322         (JSC::ErrorWithExecFunctor::operator()):
323         (JSC::ErrorWithExecAndCalleeFunctor::ErrorWithExecAndCalleeFunctor):
324         (JSC::ErrorWithExecAndCalleeFunctor::operator()):
325         (JSC::ErrorWithExceptionFunctor::ErrorWithExceptionFunctor):
326         (JSC::ErrorWithExceptionFunctor::operator()):
327         (JSC::throwExceptionFromOpCall):
328
329         In order to eliminate the need to duplicate code, an error functor was 
330         created for the 3 different throwExceptionFromOpCall handles. 
331         1. The exception needs to be created, and the function pointer takes 1 
332             parameter(callFrame->callerFrame()).
333         2. The exception needs to be created, and the function pointer takes 2 
334             parameters (callFrame->callerFrame(), callFrame.calleeAsValue()).
335         3. The exception is already created. In this case, At the time when 
336             the error functor is called, vm.exception is returned. 
337
338         * llint/LLIntSlowPaths.cpp:
339         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
340         * runtime/ExceptionHelpers.cpp:
341         (JSC::errorDescriptionForValue):
342         (JSC::createError):
343         (JSC::createInvalidParameterError):
344         (JSC::createNotAConstructorError):
345         (JSC::createNotAFunctionError):
346         (JSC::createNotAnObjectError):
347         * runtime/ExceptionHelpers.h:
348
349         The function toString() was being used to stringify an object for an exception
350         message. If the user wrote a toString() for that object, then the system would 
351         continue to evaluate that code. A new helper function was created to prevent 
352         the system to continue execution and exception creation from that execution.
353
354 2013-07-18  Filip Pizlo  <fpizlo@apple.com>
355
356         LLInt get_argument_by_val for JSVALUE64 stores into the array profile when it meant to store into the value profile
357         https://bugs.webkit.org/show_bug.cgi?id=118865
358
359         Reviewed by Mark Hahnenberg.
360
361         * llint/LowLevelInterpreter64.asm:
362
363 2013-07-18  Andreas Kling  <akling@apple.com>
364
365         CodeBlock::m_argumentValueProfiles wastes a lot of memory.
366         <http://webkit.org/b/118852>
367         <rdar://problem/14481659>
368
369         Reviewed by Anders Carlsson.
370
371         Use Vector::resizeToFit() for CodeBlock::m_argumentValueProfiles. We don't need any padding
372         for growth, since we won't be appending to it anyway.
373
374         921 KB progression on <http://twitter.com/awesomekling>
375
376         * bytecode/CodeBlock.cpp:
377         (JSC::CodeBlock::setNumParameters):
378
379 2013-07-17  Filip Pizlo  <fpizlo@apple.com>
380
381         Unreviewed, fix 32-bit after http://trac.webkit.org/changeset/152813
382
383         * dfg/DFGSpeculativeJIT.cpp:
384         (JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
385         * dfg/DFGSpeculativeJIT32_64.cpp:
386         (JSC::DFG::SpeculativeJIT::compile):
387
388 2013-07-17  Geoffrey Garen  <ggaren@apple.com>
389
390         API tests should test for JSStringCreateWithCFString with empty string
391         https://bugs.webkit.org/show_bug.cgi?id=118819
392
393         Reviewed by Mark Hahnenberg.
394
395         * API/tests/testapi.c:
396         (main): Test!
397
398 2013-07-17  Filip Pizlo  <fpizlo@apple.com>
399
400         DFG assumes that NewFunction will never pass its input through
401         https://bugs.webkit.org/show_bug.cgi?id=118798
402
403         Reviewed by Sam Weinig.
404         
405         Previously the DFG was assuming that NewFunction always returns a function. That's not
406         the case. It may return whatever was passed to it, if it wasn't passed SpecEmpty.
407         
408         This fact needed to be wired through the compiler.
409
410         * dfg/DFGAbstractState.cpp:
411         (JSC::DFG::AbstractState::executeEffects):
412         * dfg/DFGAbstractValue.h:
413         (JSC::DFG::AbstractValue::makeTop):
414         * dfg/DFGGraph.cpp:
415         (JSC::DFG::Graph::dump):
416         * dfg/DFGOperations.cpp:
417         * dfg/DFGOperations.h:
418         * dfg/DFGPredictionPropagationPhase.cpp:
419         (JSC::DFG::PredictionPropagationPhase::propagate):
420         * dfg/DFGSpeculativeJIT.h:
421         (JSC::DFG::SpeculativeJIT::callOperation):
422         * dfg/DFGSpeculativeJIT32_64.cpp:
423         (JSC::DFG::SpeculativeJIT::compile):
424         * dfg/DFGSpeculativeJIT64.cpp:
425         (JSC::DFG::SpeculativeJIT::compile):
426
427 2013-07-17  Geoffrey Garen  <ggaren@apple.com>
428
429         JSStringCreateWithCFString should not convert the empty string into the NULL string
430         https://bugs.webkit.org/show_bug.cgi?id=118816
431
432         Reviewed by Sam Weinig.
433
434         * API/JSStringRef.cpp:
435         (JSStringCreateWithUTF8CString): Removed an extraneous comment, which
436         a previous version of the patch made incorrect.
437
438         * API/JSStringRefCF.cpp:
439         (JSStringCreateWithCFString): Don't convert the empty string into the
440         null string.
441
442 2013-07-17  Chris Curtis  <chris_curtis@apple.com>
443
444         Naming convention on createInvalidParamError is incorrect.
445         https://bugs.webkit.org/show_bug.cgi?id=118756
446
447         Reviewed by Geoffrey Garen.
448         
449         Changed the naming of createInvalidParamError to createInvalidParameterError.
450         This corrects the naming convention for the function listed in the WebKit code styling.
451
452         * interpreter/Interpreter.cpp:
453         (JSC::loadVarargs):
454         * jit/JITStubs.cpp:
455         (JSC::DEFINE_STUB_FUNCTION):
456         * llint/LLIntSlowPaths.cpp:
457         (JSC::LLInt::LLINT_SLOW_PATH_DECL):
458         * runtime/CommonSlowPaths.h:
459         (JSC::CommonSlowPaths::opIn):
460         * runtime/ExceptionHelpers.cpp:
461         (JSC::createInvalidParameterError):
462         * runtime/ExceptionHelpers.h:
463         * runtime/JSObject.cpp:
464         (JSC::JSObject::hasInstance):
465
466 2013-07-16  David Farler  <dfarler@apple.com>
467
468         Typo in DFGInsertionSet.h header guard: "DFGInsectionSet_h" -> "DFGInsertionSet_h"
469         https://bugs.webkit.org/show_bug.cgi?id=118753
470
471         Reviewed by Geoffrey Garen.
472
473         * dfg/DFGInsertionSet.h:
474         "DFGInsectionSet_h" -> "DFGInsertionSet_h"
475
476 2013-07-16  Filip Pizlo  <fpizlo@apple.com>
477
478         MakeRope fixup shouldn't lead to an Identity without kids
479         https://bugs.webkit.org/show_bug.cgi?id=118745
480
481         Reviewed by Mark Hahnenberg.
482         
483         Make the empty string pruning part of fixupMakeRope() stop if it's on the last child.
484         
485         Make Node::convertToIdentity release-assert that it has exactly one kid.
486
487         * dfg/DFGFixupPhase.cpp:
488         (JSC::DFG::FixupPhase::fixupMakeRope):
489         * dfg/DFGNode.h:
490         (JSC::DFG::Node::convertToIdentity):
491
492 2013-07-16  Mark Hahnenberg  <mhahnenberg@apple.com>
493
494         Remove reference to JSValueStructSupport.h from JSExport.h
495         https://bugs.webkit.org/show_bug.cgi?id=118746
496
497         Reviewed by Filip Pizlo.
498
499         * API/JSExport.h: No such header exists, so it doesn't make sense to reference it.
500
501 2013-07-13  Commit Queue  <commit-queue@webkit.org>
502
503         Unreviewed, rolling out r151978.
504         http://trac.webkit.org/changeset/151978
505         https://bugs.webkit.org/show_bug.cgi?id=118651
506
507         Caused regressions at least 3 websites (Requested by rniwa on
508         #webkit).
509
510         * runtime/JSCJSValue.h:
511         * runtime/JSString.h:
512
513 2013-07-12  Chris Curtis    <chris_curtis@apple.com>
514
515         Optimize addStrackTraceIfNecessary to be faster in the case when it's not necessary
516         https://bugs.webkit.org/show_bug.cgi?id=118328
517
518         Reviewed by Geoffrey Garen.
519
520         Retrieving the stack is costly. We want to get it only once. By moving the check
521         for the .stack property above the code to retrieve the stack, we ensure this. 
522
523         * interpreter/Interpreter.cpp:
524         (JSC::Interpreter::addStackTraceIfNecessary):
525
526 2013-07-12  Brent Fulgham  <bfulgham@apple.com>
527
528         [Windows] Build correction after r152573/r152577.
529         https://bugs.webkit.org/show_bug.cgi?id=118610
530
531         Reviewed by Oliver Hunt.
532
533         * jit/JITThunks.cpp:
534         (JSC::JITThunks::hostFunctionStub): Hand-feed MSVC++ the fact that we want the second
535         argument of the make_pair to be a function pointer.
536
537 2013-07-11  Oliver Hunt  <oliver@apple.com>
538
539         Attempt to fix the windows build.
540
541         * jit/JITThunks.cpp:
542         (JSC::JITThunks::hostFunctionStub):
543         * jit/JITThunks.h:
544
545 2013-07-10  Oliver Hunt  <oliver@apple.com>
546
547         NativeExecutable cache needs to use both call and construct functions for key
548         https://bugs.webkit.org/show_bug.cgi?id=118545
549
550         Reviewed by Geoffrey Garen.
551
552         Make the native executable cache make use a key pair so we don't decide to
553         treat all subsequent functions as not being constructors.
554
555         * jit/JITThunks.cpp:
556         (JSC::JITThunks::hostFunctionStub):
557         * jit/JITThunks.h:
558         * runtime/JSBoundFunction.cpp:
559         (JSC::JSBoundFunction::create):
560         * runtime/JSCell.cpp:
561         (JSC::JSCell::getCallData):
562         (JSC::JSCell::getConstructData):
563
564 2013-07-09  Mark Lam  <mark.lam@apple.com>
565
566         Gardening to unbreak builds on the Windows bot.
567
568         Not reviewed.
569
570         * parser/ParserTokens.h:
571
572 2013-07-09  Mark Lam  <mark.lam@apple.com>
573
574         Fix 30% JSBench regression (caused by adding column numbers to stack traces).
575         https://bugs.webkit.org/show_bug.cgi?id=118481.
576
577         Reviewed by Mark Hahnenberg and Geoffrey Garen.
578
579         Previously, we already capture ExpressionRangeInfo that provides a divot for
580         each bytecode that can potentially throw an exception (and therefore generate
581         a stack trace). On first attempt to compute column numbers, we then do a walk
582         of the source string to record all line start positions in a table associated
583         with the SourceProvider. The column number can then be computed as
584             divot - lineStartFor(bytecodeOffset).
585
586         The computation of this lineStarts table is the source of the 30% JSBench
587         performance regression.
588
589         The new code now records lineStarts as the lexer and parser scans the source
590         code. These lineStarts are then used to compute the column number for the
591         given divot, and stored in the ExpressionRangeInfo. Similarly, we also capture
592         the line number at the divot point and store that in the ExpressionRangeInfo.
593         Hence, to look up line and column numbers, we now lookup the ExpressionRangeInfo
594         for the bytecodeOffset, and then compute the line and column from the values
595         stored in the expression info.
596
597         The strategy:
598         1. We want to minimize perturbations to the lexer and parser. Specifically,
599            the changes added should not change how it scans code, and generate bytecode.
600         2. We regard the divot as the source character position we are interested
601            in. As such, we'll capture line and lineStart (for column) at the point
602            when we capture the divot information. This ensures that the 3 values are
603            consistent.
604
605         How the change is done:
606         1. Change the lexer to track lineStarts.
607         2. Change the parser to capture line and lineStarts at the point of capturing
608            divots.
609         3. Change the parser and associated code to plumb these values all the way to
610            the point that the correspoinding ExpressionRangeInfo is emitted.
611         4. Propagate and record SourceCode firstLine and firstLineColumnOffset to the
612            the necessary places so that we can add them as needed when reifying
613            UnlinkedCodeBlocks into CodeBlocks.
614         5. Compress the line and column number values in the ExpressionRangeInfo. In
615            practice, we seldom have both large line and column numbers. Hence, we can
616            encode both in an uint32_t most of the time. For the times when we encounter
617            both large line and column numbers, we have a fallback to store the "fat"
618            position info.
619         6. Emit an ExpressionRangeInfo for UnaryOp nodes to get more line and column
620            number coverage.
621         7. Change the interpreter to use the new way of computing line and column.
622         8. Delete old line and column computation code that is now unused.
623
624         Misc details:
625         - the old lexer was tracking both a startOffset and charPosition where
626           charPosition equals startOffset - SourceCode.startOffset. We now use
627           startOffset exclusively throughout the system for consistency.
628           All offset values (including lineStart) are relative to the start of the
629           SourceProvider string. These values will only be converted to be relative
630           to the SourceCode.startOffset at the very last minute i.e. when the divot
631           is stored into the ExpressionRangeInfo.
632
633           This change to use the same offset system everywhere reduces confusion
634           from having to convert back and forth between the 2 systems. It also
635           enables a lot of assertions to be used.
636
637         - Also fixed some bugs in the choice of divot positions to use. For example,
638           both Eval and Function expressions previously used column numbers from
639           the start of the expression but used the line number at the end of the
640           expression. This is now fixed to use either the start or end positions
641           as appropriate, but not a mix of line and columns from both.
642
643         - Why use ints instead of unsigneds for offsets and lineStarts inside the
644           lexer and parser?
645           Some tests (e.g. fast/js/call-base-resolution.html and
646           fast/js/eval-cross-window.html) has shown that lineStart offsets can be
647           prior to the SourceCode.startOffset. Keeping the lexer offsets as ints
648           simplifies computations and makes it easier to maintain the assertions
649           that (startOffset >= lineStartOffset).
650
651           However, column and line numbers are always unsigned when we publish
652           them to the ExpressionRangeInfo. The ints are only used inside the
653           lexer and parser ... well, and bytecode generator.
654
655         - For all cases, lineStart is always captured where the divot is captured.
656           However, some sputnik conformance tests have shown that we cannot honor
657           line breaks for assignment statements like the following:
658
659               eval("x\u000A*=\u000A-1;");
660
661           In this case, the lineStart is expected to be captured at the start of
662           the assignment expression instead of at the divot point in the middle.
663           The assignment expression is the only special case for this.
664
665         This patch has been tested against the full layout tests both with release
666         and debug builds with no regression.
667
668         * API/JSContextRef.cpp:
669         (JSContextCreateBacktrace):
670           - Updated to use the new StackFrame::computeLineAndColumn().
671         * bytecode/CodeBlock.cpp:
672         (JSC::CodeBlock::CodeBlock):
673           - Added m_firstLineColumnOffset initialization.
674           - Plumbed the firstLineColumnOffset into the SourceCode.
675           - Initialized column for op_debug using the new way.
676         (JSC::CodeBlock::lineNumberForBytecodeOffset):
677           - Changed to compute line number using the ExpressionRangeInfo.
678         (JSC::CodeBlock::columnNumberForBytecodeOffset): Added
679           - Changed to compute column number using the ExpressionRangeInfo.
680         (JSC::CodeBlock::expressionRangeForBytecodeOffset):
681         * bytecode/CodeBlock.h:
682         (JSC::CodeBlock::firstLineColumnOffset):
683         (JSC::GlobalCodeBlock::GlobalCodeBlock):
684           - Plumbed firstLineColumnOffset through to the super class.
685         (JSC::ProgramCodeBlock::ProgramCodeBlock):
686           - Plumbed firstLineColumnOffset through to the super class.
687         (JSC::EvalCodeBlock::EvalCodeBlock):
688           - Plumbed firstLineColumnOffset through to the super class.
689             But for EvalCodeBlocks, the firstLineColumnOffset is always 1
690             because we're starting with a new source string with no start
691             offset.
692         (JSC::FunctionCodeBlock::FunctionCodeBlock):
693           - Plumbed firstLineColumnOffset through to the super class.
694
695         * bytecode/ExpressionRangeInfo.h:
696           - Added modes for encoding line and column into a single 30-bit
697             unsigned. The encoding is in 1 of 3 modes:
698             1. FatLineMode: 22-bit line, 8-bit column
699             2. FatColumnMode: 8-bit line, 22-bit column
700             3. FatLineAndColumnMode: 32-bit line, 32-bit column
701         (JSC::ExpressionRangeInfo::encodeFatLineMode): Added.
702           - Encodes line and column into the 30-bit position using FatLine mode.
703         (JSC::ExpressionRangeInfo::encodeFatColumnMode): Added.
704           - Encodes line and column into the 30-bit position using FatColumn mode.
705         (JSC::ExpressionRangeInfo::decodeFatLineMode): Added.
706           - Decodes the FatLine mode 30-bit position into line and column.
707         (JSC::ExpressionRangeInfo::decodeFatColumnMode): Added.
708           - Decodes the FatColumn mode 30-bit position into line and column.
709
710         * bytecode/UnlinkedCodeBlock.cpp:
711         (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
712           - Plumbed startColumn through.
713         (JSC::UnlinkedFunctionExecutable::link):
714           - Plumbed startColumn through.
715         (JSC::UnlinkedCodeBlock::lineNumberForBytecodeOffset):
716           - Computes a line number using the new way.
717         (JSC::UnlinkedCodeBlock::expressionRangeForBytecodeOffset):
718           - Added decoding of line and column.
719           - Added handling of the case when we do not find a fitting expression
720             range info for a specified bytecodeOffset. This only happens if the
721             bytecodeOffset is below the first expression range info. In that
722             case, we'll use the first expression range info entry.
723         (JSC::UnlinkedCodeBlock::addExpressionInfo):
724           - Added encoding of line and column.
725
726         * bytecode/UnlinkedCodeBlock.h:
727           - Added m_expressionInfoFatPositions in RareData.
728         (JSC::UnlinkedFunctionExecutable::functionStartColumn):
729         (JSC::UnlinkedCodeBlock::shrinkToFit):
730           - Removed obsoleted m_lineInfo.
731         * bytecompiler/BytecodeGenerator.cpp:
732         (JSC::BytecodeGenerator::emitCall): Plumbed line and lineStart through.
733         (JSC::BytecodeGenerator::emitCallEval): Plumbed line and lineStart through.
734         (JSC::BytecodeGenerator::emitCallVarargs): Plumbed line and lineStart through.
735         (JSC::BytecodeGenerator::emitConstruct): Plumbed line and lineStart through.
736         (JSC::BytecodeGenerator::emitDebugHook): Plumbed lineStart through.
737         * bytecompiler/BytecodeGenerator.h:
738         (JSC::BytecodeGenerator::emitNode):
739         (JSC::BytecodeGenerator::emitNodeInConditionContext):
740           - Removed obsoleted m_lineInfo.
741         (JSC::BytecodeGenerator::emitExpressionInfo):
742           - Plumbed line and lineStart through.
743           - Compute the line and column to be added to the expression range info.
744         * bytecompiler/NodesCodegen.cpp:
745         (JSC::ThrowableExpressionData::emitThrowReferenceError):
746         (JSC::ResolveNode::emitBytecode):
747         (JSC::ArrayNode::toArgumentList):
748         (JSC::BracketAccessorNode::emitBytecode):
749         (JSC::DotAccessorNode::emitBytecode):
750         (JSC::NewExprNode::emitBytecode):
751         (JSC::EvalFunctionCallNode::emitBytecode):
752         (JSC::FunctionCallValueNode::emitBytecode):
753         (JSC::FunctionCallResolveNode::emitBytecode):
754         (JSC::FunctionCallBracketNode::emitBytecode):
755         (JSC::FunctionCallDotNode::emitBytecode):
756         (JSC::CallFunctionCallDotNode::emitBytecode):
757         (JSC::ApplyFunctionCallDotNode::emitBytecode):
758         (JSC::PostfixNode::emitResolve):
759         (JSC::PostfixNode::emitBracket):
760         (JSC::PostfixNode::emitDot):
761         (JSC::DeleteResolveNode::emitBytecode):
762         (JSC::DeleteBracketNode::emitBytecode):
763         (JSC::DeleteDotNode::emitBytecode):
764         (JSC::PrefixNode::emitResolve):
765         (JSC::PrefixNode::emitBracket):
766         (JSC::PrefixNode::emitDot):
767           - Plumbed line and lineStart through the above as needed.
768
769         (JSC::UnaryOpNode::emitBytecode):
770           - Added emission of an ExpressionRangeInfo for the UnaryOp node.
771
772         (JSC::BinaryOpNode::emitStrcat):
773         (JSC::ThrowableBinaryOpNode::emitBytecode):
774         (JSC::InstanceOfNode::emitBytecode):
775         (JSC::emitReadModifyAssignment):
776         (JSC::ReadModifyResolveNode::emitBytecode):
777         (JSC::AssignResolveNode::emitBytecode):
778         (JSC::AssignDotNode::emitBytecode):
779         (JSC::ReadModifyDotNode::emitBytecode):
780         (JSC::AssignBracketNode::emitBytecode):
781         (JSC::ReadModifyBracketNode::emitBytecode):
782           - Plumbed line and lineStart through the above as needed.
783
784         (JSC::ConstStatementNode::emitBytecode):
785         (JSC::EmptyStatementNode::emitBytecode):
786         (JSC::DebuggerStatementNode::emitBytecode):
787         (JSC::ExprStatementNode::emitBytecode):
788         (JSC::VarStatementNode::emitBytecode):
789         (JSC::IfElseNode::emitBytecode):
790         (JSC::DoWhileNode::emitBytecode):
791         (JSC::WhileNode::emitBytecode):
792         (JSC::ForNode::emitBytecode):
793         (JSC::ForInNode::emitBytecode):
794         (JSC::ContinueNode::emitBytecode):
795         (JSC::BreakNode::emitBytecode):
796         (JSC::ReturnNode::emitBytecode):
797         (JSC::WithNode::emitBytecode):
798         (JSC::SwitchNode::emitBytecode):
799         (JSC::LabelNode::emitBytecode):
800         (JSC::ThrowNode::emitBytecode):
801         (JSC::TryNode::emitBytecode):
802         (JSC::ProgramNode::emitBytecode):
803         (JSC::EvalNode::emitBytecode):
804         (JSC::FunctionBodyNode::emitBytecode):
805           - Plumbed line and lineStart through the above as needed.
806
807         * interpreter/Interpreter.cpp:
808         (JSC::appendSourceToError):
809           - Added line and column arguments for expressionRangeForBytecodeOffset().
810         (JSC::StackFrame::computeLineAndColumn):
811           - Replaces StackFrame::line() and StackFrame::column().
812         (JSC::StackFrame::expressionInfo):
813           - Added line and column arguments.
814         (JSC::StackFrame::toString):
815           - Changed to use the new StackFrame::computeLineAndColumn().
816         (JSC::Interpreter::getStackTrace):
817           - Added the needed firstLineColumnOffset arg for the StackFrame.
818
819         * interpreter/Interpreter.h:
820         * parser/ASTBuilder.h:
821         (JSC::ASTBuilder::BinaryOpInfo::BinaryOpInfo):
822         (JSC::ASTBuilder::AssignmentInfo::AssignmentInfo):
823         (JSC::ASTBuilder::createResolve):
824         (JSC::ASTBuilder::createBracketAccess):
825         (JSC::ASTBuilder::createDotAccess):
826         (JSC::ASTBuilder::createRegExp):
827         (JSC::ASTBuilder::createNewExpr):
828         (JSC::ASTBuilder::createAssignResolve):
829         (JSC::ASTBuilder::createFunctionExpr):
830         (JSC::ASTBuilder::createFunctionBody):
831         (JSC::ASTBuilder::createGetterOrSetterProperty):
832         (JSC::ASTBuilder::createFuncDeclStatement):
833         (JSC::ASTBuilder::createBlockStatement):
834         (JSC::ASTBuilder::createExprStatement):
835         (JSC::ASTBuilder::createIfStatement):
836         (JSC::ASTBuilder::createForLoop):
837         (JSC::ASTBuilder::createForInLoop):
838         (JSC::ASTBuilder::createVarStatement):
839         (JSC::ASTBuilder::createReturnStatement):
840         (JSC::ASTBuilder::createBreakStatement):
841         (JSC::ASTBuilder::createContinueStatement):
842         (JSC::ASTBuilder::createTryStatement):
843         (JSC::ASTBuilder::createSwitchStatement):
844         (JSC::ASTBuilder::createWhileStatement):
845         (JSC::ASTBuilder::createDoWhileStatement):
846         (JSC::ASTBuilder::createLabelStatement):
847         (JSC::ASTBuilder::createWithStatement):
848         (JSC::ASTBuilder::createThrowStatement):
849         (JSC::ASTBuilder::createDebugger):
850         (JSC::ASTBuilder::createConstStatement):
851         (JSC::ASTBuilder::appendBinaryExpressionInfo):
852         (JSC::ASTBuilder::appendUnaryToken):
853         (JSC::ASTBuilder::unaryTokenStackLastStart):
854         (JSC::ASTBuilder::unaryTokenStackLastLineStartPosition): Added.
855         (JSC::ASTBuilder::assignmentStackAppend):
856         (JSC::ASTBuilder::createAssignment):
857         (JSC::ASTBuilder::setExceptionLocation):
858         (JSC::ASTBuilder::makeDeleteNode):
859         (JSC::ASTBuilder::makeFunctionCallNode):
860         (JSC::ASTBuilder::makeBinaryNode):
861         (JSC::ASTBuilder::makeAssignNode):
862         (JSC::ASTBuilder::makePrefixNode):
863         (JSC::ASTBuilder::makePostfixNode):.
864           - Plumbed line, lineStart, and startColumn through the above as needed.
865
866         * parser/Lexer.cpp:
867         (JSC::::currentSourcePtr):
868         (JSC::::setCode):
869           - Added tracking for sourceoffset and lineStart.
870         (JSC::::internalShift):
871         (JSC::::parseIdentifier):
872           - Added tracking for lineStart.
873         (JSC::::parseIdentifierSlowCase):
874         (JSC::::parseString):
875           - Added tracking for lineStart.
876         (JSC::::parseStringSlowCase):
877         (JSC::::lex):
878           - Added tracking for sourceoffset.
879         (JSC::::sourceCode):
880         * parser/Lexer.h:
881         (JSC::Lexer::currentOffset):
882         (JSC::Lexer::currentLineStartOffset):
883         (JSC::Lexer::setOffset):
884           - Added tracking for lineStart.
885         (JSC::Lexer::offsetFromSourcePtr): Added. conversion function.
886         (JSC::Lexer::sourcePtrFromOffset): Added. conversion function.
887         (JSC::Lexer::setOffsetFromSourcePtr):
888         (JSC::::lexExpectIdentifier):
889           - Added tracking for sourceoffset and lineStart.
890
891         * parser/NodeConstructors.h:
892         (JSC::Node::Node):
893         (JSC::ResolveNode::ResolveNode):
894         (JSC::EvalFunctionCallNode::EvalFunctionCallNode):
895         (JSC::FunctionCallValueNode::FunctionCallValueNode):
896         (JSC::FunctionCallResolveNode::FunctionCallResolveNode):
897         (JSC::FunctionCallBracketNode::FunctionCallBracketNode):
898         (JSC::FunctionCallDotNode::FunctionCallDotNode):
899         (JSC::CallFunctionCallDotNode::CallFunctionCallDotNode):
900         (JSC::ApplyFunctionCallDotNode::ApplyFunctionCallDotNode):
901         (JSC::PostfixNode::PostfixNode):
902         (JSC::DeleteResolveNode::DeleteResolveNode):
903         (JSC::DeleteBracketNode::DeleteBracketNode):
904         (JSC::DeleteDotNode::DeleteDotNode):
905         (JSC::PrefixNode::PrefixNode):
906         (JSC::ReadModifyResolveNode::ReadModifyResolveNode):
907         (JSC::ReadModifyBracketNode::ReadModifyBracketNode):
908         (JSC::AssignBracketNode::AssignBracketNode):
909         (JSC::AssignDotNode::AssignDotNode):
910         (JSC::ReadModifyDotNode::ReadModifyDotNode):
911         (JSC::AssignErrorNode::AssignErrorNode):
912         (JSC::WithNode::WithNode):
913         (JSC::ForInNode::ForInNode):
914           - Plumbed line and lineStart through the above as needed.
915         * parser/Nodes.cpp:
916         (JSC::StatementNode::setLoc): Plumbed lineStart.
917         (JSC::ScopeNode::ScopeNode): Plumbed lineStart.
918         (JSC::ProgramNode::ProgramNode): Plumbed startColumn.
919         (JSC::ProgramNode::create): Plumbed startColumn.
920         (JSC::EvalNode::create):
921         (JSC::FunctionBodyNode::FunctionBodyNode): Plumbed startColumn.
922         (JSC::FunctionBodyNode::create): Plumbed startColumn.
923         * parser/Nodes.h:
924         (JSC::Node::startOffset):
925         (JSC::Node::lineStartOffset): Added.
926         (JSC::StatementNode::firstLine):
927         (JSC::StatementNode::lastLine):
928         (JSC::ThrowableExpressionData::ThrowableExpressionData):
929         (JSC::ThrowableExpressionData::setExceptionSourceCode):
930         (JSC::ThrowableExpressionData::divotStartOffset):
931         (JSC::ThrowableExpressionData::divotEndOffset):
932         (JSC::ThrowableExpressionData::divotLine):
933         (JSC::ThrowableExpressionData::divotLineStart):
934         (JSC::ThrowableSubExpressionData::ThrowableSubExpressionData):
935         (JSC::ThrowableSubExpressionData::setSubexpressionInfo):
936         (JSC::ThrowableSubExpressionData::subexpressionDivot):
937         (JSC::ThrowableSubExpressionData::subexpressionStartOffset):
938         (JSC::ThrowableSubExpressionData::subexpressionEndOffset):
939         (JSC::ThrowableSubExpressionData::subexpressionLine):
940         (JSC::ThrowableSubExpressionData::subexpressionLineStart):
941         (JSC::ThrowablePrefixedSubExpressionData::ThrowablePrefixedSubExpressionData):
942         (JSC::ThrowablePrefixedSubExpressionData::setSubexpressionInfo):
943         (JSC::ThrowablePrefixedSubExpressionData::subexpressionDivot):
944         (JSC::ThrowablePrefixedSubExpressionData::subexpressionStartOffset):
945         (JSC::ThrowablePrefixedSubExpressionData::subexpressionEndOffset):
946         (JSC::ThrowablePrefixedSubExpressionData::subexpressionLine):
947         (JSC::ThrowablePrefixedSubExpressionData::subexpressionLineStart):
948         (JSC::ScopeNode::startStartOffset):
949         (JSC::ScopeNode::startLineStartOffset):
950         (JSC::ProgramNode::startColumn):
951         (JSC::EvalNode::startColumn):
952         (JSC::FunctionBodyNode::startColumn):
953           - Plumbed line and lineStart through the above as needed.
954         * parser/Parser.cpp:
955         (JSC::::Parser):
956         (JSC::::parseSourceElements):
957         (JSC::::parseVarDeclarationList):
958         (JSC::::parseConstDeclarationList):
959         (JSC::::parseForStatement):
960         (JSC::::parseBreakStatement):
961         (JSC::::parseContinueStatement):
962         (JSC::::parseReturnStatement):
963         (JSC::::parseThrowStatement):
964         (JSC::::parseWithStatement):
965           - Plumbed line and lineStart through the above as needed.
966         (JSC::::parseFunctionBody):
967           - Plumbed startColumn.
968         (JSC::::parseFunctionInfo):
969         (JSC::::parseFunctionDeclaration):
970         (JSC::LabelInfo::LabelInfo):
971         (JSC::::parseExpressionOrLabelStatement):
972         (JSC::::parseAssignmentExpression):
973         (JSC::::parseBinaryExpression):
974         (JSC::::parseProperty):
975         (JSC::::parseObjectLiteral):
976         (JSC::::parsePrimaryExpression):
977         (JSC::::parseMemberExpression):
978         (JSC::::parseUnaryExpression):
979           - Plumbed line, lineStart, startColumn through the above as needed.
980         * parser/Parser.h:
981         (JSC::Parser::next):
982         (JSC::Parser::nextExpectIdentifier):
983         (JSC::Parser::tokenStart):
984         (JSC::Parser::tokenColumn):
985         (JSC::Parser::tokenEnd):
986         (JSC::Parser::tokenLineStart):
987         (JSC::Parser::lastTokenLine):
988         (JSC::Parser::lastTokenLineStart):
989         (JSC::::parse):
990         * parser/ParserTokens.h:
991         (JSC::JSTokenLocation::JSTokenLocation):
992           - Plumbed lineStart.
993         (JSC::JSTokenLocation::lineStartPosition):
994         (JSC::JSTokenLocation::startPosition):
995         (JSC::JSTokenLocation::endPosition):
996         * parser/SourceCode.h:
997         (JSC::SourceCode::SourceCode):
998         (JSC::SourceCode::startColumn):
999         (JSC::makeSource):
1000         (JSC::SourceCode::subExpression):
1001         * parser/SourceProvider.cpp: delete old code.
1002         * parser/SourceProvider.h: delete old code.
1003         * parser/SourceProviderCacheItem.h:
1004         (JSC::SourceProviderCacheItem::closeBraceToken):
1005         (JSC::SourceProviderCacheItem::SourceProviderCacheItem):
1006           - Plumbed lineStart.
1007         * parser/SyntaxChecker.h:
1008         (JSC::SyntaxChecker::makeFunctionCallNode):
1009         (JSC::SyntaxChecker::makeAssignNode):
1010         (JSC::SyntaxChecker::makePrefixNode):
1011         (JSC::SyntaxChecker::makePostfixNode):
1012         (JSC::SyntaxChecker::makeDeleteNode):
1013         (JSC::SyntaxChecker::createResolve):
1014         (JSC::SyntaxChecker::createBracketAccess):
1015         (JSC::SyntaxChecker::createDotAccess):
1016         (JSC::SyntaxChecker::createRegExp):
1017         (JSC::SyntaxChecker::createNewExpr):
1018         (JSC::SyntaxChecker::createAssignResolve):
1019         (JSC::SyntaxChecker::createFunctionExpr):
1020         (JSC::SyntaxChecker::createFunctionBody):
1021         (JSC::SyntaxChecker::createFuncDeclStatement):
1022         (JSC::SyntaxChecker::createForInLoop):
1023         (JSC::SyntaxChecker::createReturnStatement):
1024         (JSC::SyntaxChecker::createBreakStatement):
1025         (JSC::SyntaxChecker::createContinueStatement):
1026         (JSC::SyntaxChecker::createWithStatement):
1027         (JSC::SyntaxChecker::createLabelStatement):
1028         (JSC::SyntaxChecker::createThrowStatement):
1029         (JSC::SyntaxChecker::createGetterOrSetterProperty):
1030         (JSC::SyntaxChecker::appendBinaryExpressionInfo):
1031         (JSC::SyntaxChecker::operatorStackPop):
1032           - Made SyntaxChecker prototype changes to match ASTBuilder due to new
1033             args added for plumbing line, lineStart, and startColumn.
1034         * runtime/CodeCache.cpp:
1035         (JSC::CodeCache::generateBytecode):
1036         (JSC::CodeCache::getCodeBlock):
1037           - Plumbed startColumn.
1038         * runtime/Executable.cpp:
1039         (JSC::FunctionExecutable::FunctionExecutable):
1040         (JSC::ProgramExecutable::compileInternal):
1041         (JSC::FunctionExecutable::produceCodeBlockFor):
1042         (JSC::FunctionExecutable::fromGlobalCode):
1043           - Plumbed startColumn.
1044         * runtime/Executable.h:
1045         (JSC::ScriptExecutable::startColumn):
1046         (JSC::ScriptExecutable::recordParse):
1047         (JSC::FunctionExecutable::create):
1048           - Plumbed startColumn.
1049
1050 2013-07-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1051
1052         Unreviewed. Fix make distcheck.
1053
1054         * GNUmakefile.list.am: Add missing header files.
1055
1056 2013-07-04  Patrick Gansterer  <paroga@webkit.org>
1057
1058         [CMake] Add generation of JITStubs for x86_64 MSVC
1059         https://bugs.webkit.org/show_bug.cgi?id=116666
1060
1061         Reviewed by Laszlo Gombos.
1062
1063         Also move the generation for ARM CPU into the CMakeLists.txt,
1064         since it's compiler specific and not dedicated to Windows CE.
1065
1066         * CMakeLists.txt:
1067         * PlatformWinCE.cmake: Removed.
1068
1069 2013-07-04  Patrick Gansterer  <paroga@webkit.org>
1070
1071         [CMake] Add STATICALLY_LINKED_WITH_WTF to JavaScriptCore project
1072         https://bugs.webkit.org/show_bug.cgi?id=118120
1073
1074         Reviewed by Gyuyoung Kim.
1075
1076         Since WTF is a static library linked to JavaScriptCore on all CMake ports
1077         we need to define STATICALLY_LINKED_WITH_WTF for all of them.
1078         This makes only a difference for Windows, since WTF_EXPORT and WTF_IMPORT
1079         are the same on all other platforms.
1080
1081         * CMakeLists.txt:
1082
1083 2013-07-02  Mark Hahnenberg  <mhahnenberg@apple.com>
1084
1085         Replace RELEASE_ASSERT with ASSERT in CodeBlock:: bytecodeOffsetForCallAtIndex
1086         https://bugs.webkit.org/show_bug.cgi?id=118316
1087
1088         Reviewed by Geoffrey Garen.
1089
1090         This is causing some crashiness in release builds. We should replace it with an ASSERT 
1091         until we track down all the places that need fixing in bug 118315.
1092
1093         * bytecode/CodeBlock.h:
1094         (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
1095
1096 2013-07-02  Brent Fulgham  <bfulgham@apple.com>
1097
1098         [Windows] Unreviewed build correction for 'DebugSuffix' target.
1099
1100         * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Must pass the
1101         DEBUGSUFFIX definition to the nmake instance to be available during script processing.
1102
1103 2013-07-01  Sergio Correia  <sergio.correia@openbossa.org>
1104
1105         [JSC]: Fix maybe-uninitialized gcc 4.8 warning in DFGSpeculativeJIT.cpp
1106         https://bugs.webkit.org/show_bug.cgi?id=118278
1107
1108         Reviewed by Filip Pizlo.
1109
1110         * dfg/DFGSpeculativeJIT.cpp:
1111         (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
1112         Initialize valueGPR with InvalidGPRReg.
1113
1114 2013-07-01  Csaba Osztrogonác  <ossy@webkit.org>
1115
1116         Fix cast-align warnings in JavaScriptCore/heap/HandleBlockInlines.h
1117         https://bugs.webkit.org/show_bug.cgi?id=118242
1118
1119         Reviewed by Mark Hahnenberg.
1120
1121         * heap/HandleBlockInlines.h:
1122         (JSC::HandleBlock::nodes):
1123
1124 2013-06-29  Andreas Kling  <akling@apple.com>
1125
1126         Follow-up to r152206: also update HashFlags8BitBuffer in the LLInt.
1127
1128         * llint/LowLevelInterpreter.asm:
1129
1130 2013-06-28  Andreas Kling  <akling@apple.com>
1131
1132         Un-crashify JSC tests on debug bots after Anders had his way with StringImpl.
1133
1134         * llint/LLIntData.cpp:
1135         (JSC::LLInt::Data::performAssertions):
1136
1137 2013-06-28  Anders Carlsson  <andersca@apple.com>
1138
1139         Remove String::deprecatedCharactersWithNullTermination() and related code
1140         https://bugs.webkit.org/show_bug.cgi?id=118211
1141
1142         Reviewed by Benjamin Poulain.
1143
1144         * API/JSStringRef.cpp:
1145         (JSStringCreateWithCharactersNoCopy):
1146         Update call to StringImpl::createWithoutCopying.
1147
1148 2013-06-27  Timothy Hatcher  <timothy@apple.com>
1149
1150         Notify the debugger about functions created from source code via new Function() or WebCore::JSLazyEventListener.
1151
1152         https://bugs.webkit.org/show_bug.cgi?id=118063
1153
1154         Reviewed by Geoffrey Garen.
1155
1156         * bytecode/UnlinkedCodeBlock.cpp:
1157         (JSC::UnlinkedFunctionExecutable::fromGlobalCode): Call Debugger::sourceParsed.
1158
1159 2013-06-26  Anders Carlsson  <andersca@apple.com>
1160
1161         Add JSStringCreateWithCharactersNoCopy SPI
1162         https://bugs.webkit.org/show_bug.cgi?id=118074
1163         <rdar://problem/14279905>
1164
1165         Reviewed by Geoffrey Garen.
1166
1167         * API/JSStringRef.cpp:
1168         (JSStringCreateWithCharactersNoCopy):
1169         Create a new OpaqueJSString, using the newly added StringImpl::createWithoutCopying function.
1170
1171         * API/JSStringRefPrivate.h: Added.
1172         Add a home for the JSStringCreateWithCharactersNoCopy function.
1173
1174         * API/OpaqueJSString.h:
1175         (OpaqueJSString::OpaqueJSString):
1176         Just call isolatedCopy on the passed in string.
1177
1178         * API/tests/testapi.c:
1179         Add an API test for JSStringCreateWithCharactersNoCopy.
1180
1181         * JavaScriptCore.xcodeproj/project.pbxproj:
1182         Add new files.
1183
1184 2013-06-25  Ryosuke Niwa  <rniwa@webkit.org>
1185
1186         JSString should remember AtomicString
1187         https://bugs.webkit.org/show_bug.cgi?id=117386
1188
1189         Reviewed by Geoffrey Garen.
1190
1191         Added JSValue::toAtomicString and JSString::atomicString. These two functions allow WebCore to update
1192         JSString's m_value to set isAtomic flag and avoid the AtomicStringTable lookups in subsequent attempts
1193         to obtain the AtomicString of the same value.
1194
1195         * runtime/JSCJSValue.h:
1196         * runtime/JSString.h:
1197         (JSC::JSString::atomicString):
1198         (JSC::JSValue::toAtomicString):
1199
1200 2013-06-24  Roger Fong  <roger_fong@apple.com>
1201
1202         Unreviewed. Makefile build fix for AppleWindows.
1203
1204         * JavaScriptCore.vcxproj/JavaScriptCore.make:
1205
1206 2013-06-17  Darin Adler  <darin@apple.com>
1207
1208         Sort all the Xcode project files
1209         https://bugs.webkit.org/show_bug.cgi?id=117696
1210
1211         Reviewed by Anders Carlsson.
1212
1213         * JavaScriptCore.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
1214
1215 2013-06-21  Mark Lam  <mark.lam@apple.com>
1216
1217         Introducing the VMStackBounds class.
1218         https://bugs.webkit.org/show_bug.cgi?id=117862.
1219
1220         Reviewed by Geoffrey Garen.
1221
1222         - Removed Interpreter::StackPolicy.
1223         - The new VMStackBounds will take over choosing the appropriate stack
1224           size requirements, and invoking the underlying WTF::StackBounds to
1225           to the real bounds check.
1226         - VMStackBounds will now be used universally throughout JSC instead of
1227           WTF::StackBounds.
1228
1229         * JavaScriptCore.xcodeproj/project.pbxproj:
1230         * bytecompiler/BytecodeGenerator.cpp:
1231         (JSC::BytecodeGenerator::BytecodeGenerator):
1232         * bytecompiler/BytecodeGenerator.h:
1233         * interpreter/Interpreter.cpp:
1234         (JSC::Interpreter::execute):
1235         (JSC::Interpreter::executeCall):
1236         (JSC::Interpreter::executeConstruct):
1237         (JSC::Interpreter::prepareForRepeatCall):
1238         * interpreter/Interpreter.h:
1239         (JSC::Interpreter::isInErrorHandlingMode):
1240         * parser/Parser.cpp:
1241         (JSC::::Parser):
1242         * parser/Parser.h:
1243         * runtime/StringRecursionChecker.h:
1244         (JSC::StringRecursionChecker::performCheck):
1245         * runtime/VMStackBounds.h: Added.
1246         (JSC::VMStackBounds::VMStackBounds):
1247         (JSC::VMStackBounds::isSafeToRecurse):
1248         (JSC::VMStackBounds::requiredCapacity):
1249
1250 2013-06-20  Mark Lam  <mark.lam@apple.com>
1251
1252         Change stack capacity requirement to be more reasonable.
1253         https://bugs.webkit.org/show_bug.cgi?id=117801.
1254
1255         Reviewed by Geoffrey Garen.
1256
1257         Previously, the requiredStack in StackPolicy::StackPolicy() was set to
1258         to a high value like 256K to reduce the chances of encountering an
1259         undetected stack overflow in a scenario where we have a combination of
1260         deeply nested divs and a large amount recursive re-entries into the VM.
1261
1262         However, this high value of requiredStack still does not completely
1263         ensure that we will never encounter an undetected stack overflow. It
1264         only lessens the probability of encountering it.
1265
1266         Secondly, on some platforms, the total stack size can be less than 256K
1267         to start with. Hence, this high value requiredStack renders the VM
1268         unuseable on those platforms.
1269
1270         This patch will fix the requiredStack to be more reasonable based on
1271         real world stack usage by the VM. We won't (and cannot) try to prevent
1272         undetected stack overflows outside of JSC as well. External code that
1273         do deep recursion (e.g. Documnet::updateLayout()) should do their own
1274         stack checks.
1275
1276         From a previous experiment, we measured the following:
1277
1278         On a debug build on OSX:
1279         1. Stack usage different between recursive calls to interpreter entry:
1280            7744 bytes
1281         On a release build on OSX:
1282         2. Stack usage difference between recursive calls to interpreter entry:
1283            6352 bytes
1284
1285         Using these as a guide, we'll pick the following values for the
1286         StackPolicy:
1287            requiredStack: 32K
1288            errorModeRequiredStack: 16K
1289
1290         The requiredStack is chosen to be 4x the measured usage above. The
1291         additional 3x is a conservative estimate to account for stack space
1292         that may be needed by other native functions called while in the
1293         interpreter.
1294
1295         The errorModeRequiredStack has to be less than the requiredStack or we
1296         won't be able to reenter the interpreter to do error handling work when
1297         an imminent stack overflow is detected. It is assumed that the error
1298         handling code will only do minimal work to allocate an exception and its
1299         stack trace, and not run any arbitrary JS code. As such, it is safe to
1300         allow re-entry into the interpreter with only 2x the measured usage in
1301         this case.
1302
1303         * interpreter/Interpreter.cpp:
1304         (JSC::Interpreter::StackPolicy::StackPolicy):
1305
1306 2013-06-20  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1307
1308         HashSet: reverse the order of the template arguments at alternate 'find', 'contains' and 'add' methods
1309         https://bugs.webkit.org/show_bug.cgi?id=117830
1310
1311         Reviewed by Anders Carlsson.
1312
1313         The order of the template arguments at HashSet alternate 'find', 'contains' and
1314         'add' methods is reversed so that callers can just pass the translator
1315         and let the compiler deduce input argument type.
1316
1317         * runtime/Identifier.h:
1318         (JSC::IdentifierTable::add):
1319
1320 2013-06-20  Roger Fong  <roger_fong@apple.com>
1321
1322         Make Windows makefile copy build output to a different folder.
1323         <rdar://problem/14219184>.
1324
1325         * JavaScriptCore.vcxproj/JavaScriptCore.make:
1326
1327 2013-06-20  Mark Hahnenberg  <mhahnenberg@apple.com>
1328
1329         Improper deallocation of JSManagedValue causes crashes during autorelease pool draining
1330         https://bugs.webkit.org/show_bug.cgi?id=117840
1331
1332         Reviewed by Geoffrey Garen.
1333
1334         Improperly managing a JSManagedValue can cause a crash when the JSC::Weak inside the 
1335         JSManagedValue is destroyed upon deallocation. We would rather have improperly maintained 
1336         JSManagedValues cause memory leaks than take down the whole app. 
1337
1338         The fix is to use the callback to the JSC::Weak on the destruction of the VM so that we 
1339         can safely null it out. This will prevent ~Weak from crashing.
1340
1341         * API/JSManagedValue.mm:
1342         (-[JSManagedValue JSC::JSC::]):
1343         (JSManagedValueHandleOwner::finalize):
1344         * API/tests/testapi.mm: Added a test that crashed prior to this fix due to a leaked 
1345         managed reference. Also fixed a small style nit I noticed in another test.
1346
1347 2013-06-18  Oliver Hunt  <oliver@apple.com>
1348
1349         Going to google.com/trends causes a crash
1350         https://bugs.webkit.org/show_bug.cgi?id=117602
1351
1352         Reviewed by Geoffrey Garen.
1353
1354         When handling op_throw, etc we need to flush the variables and arguments
1355         for the entire inline stack, not just the top frame.
1356
1357         * dfg/DFGByteCodeParser.cpp:
1358         (JSC::DFG::ByteCodeParser::flushAllArgumentsAndCapturedVariablesInInlineStack):
1359         (JSC::DFG::ByteCodeParser::parseBlock):
1360
1361 2013-06-18  Roger Fong  <roger_fong@apple.com>
1362
1363         Replace tools32 folder with tools and update WebKit Windows solution accordingly.
1364         <rdar://problem/14118143>.
1365
1366         Rubberstamped by Brent Fulgham.
1367
1368         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
1369         * JavaScriptCore.vcxproj/JavaScriptCoreDebug.props:
1370         * JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props:
1371         * JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj:
1372         * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props:
1373         * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props:
1374         * JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props:
1375         * JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd:
1376         * JavaScriptCore.vcxproj/JavaScriptCoreProduction.props:
1377         * JavaScriptCore.vcxproj/JavaScriptCoreRelease.props:
1378         * JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props:
1379         * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj:
1380         * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj:
1381         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj:
1382         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props:
1383         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props:
1384         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props:
1385         * JavaScriptCore.vcxproj/jsc/jsc.vcxproj:
1386         * JavaScriptCore.vcxproj/jsc/jscDebug.props:
1387         * JavaScriptCore.vcxproj/jsc/jscProduction.props:
1388         * JavaScriptCore.vcxproj/jsc/jscRelease.props:
1389         * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
1390         * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props:
1391         * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props:
1392         * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props:
1393         * JavaScriptCore.vcxproj/testapi/testapi.vcxproj:
1394         * JavaScriptCore.vcxproj/testapi/testapiDebug.props:
1395         * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props:
1396         * JavaScriptCore.vcxproj/testapi/testapiProduction.props:
1397         * JavaScriptCore.vcxproj/testapi/testapiRelease.props:
1398         * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props:
1399
1400 2013-06-17  Roger Fong  <roger_fong@apple.com>
1401
1402         Modify Windows makefiles to copy some bin output into Program Files.
1403         https://bugs.webkit.org/show_bug.cgi?id=117714.
1404         <rdar://problem/14179054>
1405
1406         Reviewed by Brent Fulgham.
1407
1408         * JavaScriptCore.vcxproj/JavaScriptCore.make:
1409
1410 2013-06-14  Ryosuke Niwa  <rniwa@webkit.org>
1411
1412         Function names on Object.prototype should be common identifiers
1413         https://bugs.webkit.org/show_bug.cgi?id=117614
1414
1415         Reviewed by Darin Adler.
1416
1417         Patch written by Sam Weinig. Make Object's prototype function names common identififers since they're used frequently.
1418
1419         * runtime/CommonIdentifiers.h:
1420         * runtime/FunctionConstructor.cpp:
1421         (JSC::constructFunction):
1422         * runtime/JSGlobalObject.cpp:
1423         (JSC::JSGlobalObject::reset):
1424         * runtime/JSObject.h:
1425         * runtime/ObjectPrototype.cpp:
1426         (JSC::ObjectPrototype::finishCreation):
1427         * runtime/StringPrototype.cpp:
1428         (JSC::StringPrototype::finishCreation):
1429
1430 2013-06-13  Ryosuke Niwa  <rniwa@webkit.org>
1431
1432         Remove LiteralIdentifierTable
1433         https://bugs.webkit.org/show_bug.cgi?id=117613
1434
1435         Reviewed by Geoffrey Garen.
1436
1437         Removed LiteralIdentifierTable since it doesn't seem to have any perf. impact now.
1438
1439         * runtime/Identifier.cpp:
1440         (JSC::Identifier::add):
1441
1442 2013-06-12  Conrad Shultz  <conrad_shultz@apple.com>
1443
1444         JSExport header documentation substitutes "semicolon" for "colon"
1445         https://bugs.webkit.org/show_bug.cgi?id=117552
1446
1447         Reviewed by Mark Hahnenberg.
1448
1449         * API/JSExport.h:
1450         Fix a couple typos.
1451
1452 2013-06-10  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1453
1454         [JSC] Remove a vestige of wxWidgets support.
1455         https://bugs.webkit.org/show_bug.cgi?id=117419
1456
1457         Reviewed by Benjamin Poulain.
1458
1459         * runtime/JSExportMacros.h: Remove a check for BUILDING_WX__ that
1460         seems to have gone unnoticed when the wxWidgets port was removed.
1461
1462 2013-06-06  Roger Fong  <roger_fong@apple.com>
1463
1464         Stop copying AAS binaries into build folder.
1465         https://bugs.webkit.org/show_bug.cgi?id=117319.
1466
1467         Rubberstamped by Darin Adler.
1468
1469         * JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd:
1470         * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd:
1471         * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd:
1472         * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd:
1473         * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd:
1474         * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd:
1475
1476 2013-06-05  Filip Pizlo  <fpizlo@apple.com>
1477
1478         DFG CFA shouldn't filter ArrayModes with ALL_NON_ARRAY_ARRAY_MODES if the speculated type is not SpecArray
1479         https://bugs.webkit.org/show_bug.cgi?id=117279
1480         <rdar://problem/14078025>        
1481
1482         Reviewed by Mark Hahnenberg.
1483
1484         * dfg/DFGAbstractValue.h:
1485         (JSC::DFG::AbstractValue::filterArrayModesByType):
1486
1487 2013-06-05  Michael Saboff  <msaboff@apple.com>
1488
1489         JSC: Crash beneath cti_op_div @ http://gmailblog.blogspot.com
1490         https://bugs.webkit.org/show_bug.cgi?id=117280
1491
1492         Reviewed by Filip Pizlo.
1493
1494         Updated the merging of VariableAccessData nodes in ArgumentPosition lists
1495         to find the unified VariableAccessData node that is the root of the
1496         current node instead of using the current node directly when merging
1497         attributes.
1498         Added new dump code to dump the ArgumentPosition list.
1499
1500         * dfg/DFGArgumentPosition.h:
1501         (JSC::DFG::rgumentPosition::mergeArgumentPredictionAwareness):
1502         (JSC::DFG::ArgumentPosition::mergeArgumentUnboxingAwareness):
1503         (JSC::DFG::ArgumentPosition::dump):
1504         * dfg/DFGGraph.cpp:
1505         (JSC::DFG::Graph::dump):
1506
1507 2013-06-05  Bear Travis  <betravis@adobe.com>
1508
1509         [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
1510         https://bugs.webkit.org/show_bug.cgi?id=117172
1511
1512         Reviewed by Alexandru Chiculita.
1513
1514         Adding the CSS_SHAPES compile flag.
1515
1516         * Configurations/FeatureDefines.xcconfig:
1517
1518 2013-06-05  Balazs Kilvady  <kilvadyb@homejinni.com>
1519
1520         JSC Assertion tests failures on MIPS.
1521         https://bugs.webkit.org/show_bug.cgi?id=116552
1522
1523         Reviewed by Geoffrey Garen.
1524
1525         Fix condition handlig in branchAdd32 implemetations.
1526
1527         * assembler/MacroAssemblerMIPS.h:
1528         (JSC::MacroAssemblerMIPS::branchAdd32):
1529
1530 2013-06-04  Julien Brianceau  <jbrianceau@nds.com>
1531
1532         [sh4] Add floating point absolute function support in baseline JIT.
1533         https://bugs.webkit.org/show_bug.cgi?id=117147
1534
1535         Reviewed by Geoffrey Garen.
1536
1537         * assembler/MacroAssemblerSH4.h:
1538         (JSC::MacroAssemblerSH4::supportsFloatingPointAbs):
1539         (JSC::MacroAssemblerSH4::absDouble):
1540         * assembler/SH4Assembler.h:
1541         (JSC::SH4Assembler::dabs):
1542         (JSC::SH4Assembler::printInstr):
1543
1544 2013-06-04  Zan Dobersek  <zdobersek@igalia.com>
1545
1546         [JSC] Test262 15.5.4.9_3 test is failing
1547         https://bugs.webkit.org/show_bug.cgi?id=116789
1548
1549         Reviewed by Geoffrey Garen.
1550
1551         Bring the String.prototype.localeCompare behavior in line wit ES5 15.9.4.9.
1552         If method is not given enough arguments, the minimal amount of arguments must be assumed, with their value being undefined.
1553         The first argument to localeCompare, in its string form, is used as the 'that' string that's used in the comparison.
1554         Therefor, when calling str.localeCompare() or str.localeCompare(undefined), the first argument is `undefined` and the
1555         string "undefined" is used as the string to which value of str is compared.
1556
1557         * runtime/StringPrototype.cpp:
1558         (JSC::stringProtoFuncLocaleCompare): Remove the early return in case of no given arguments to achieve the desired behavior.
1559
1560 2013-06-03  Hojong Han  <hojong.han@samsung.com>
1561
1562         [EFL] Implement GCActivityCallback
1563         https://bugs.webkit.org/show_bug.cgi?id=95923
1564
1565         Reviewed by Geoffrey Garen.
1566
1567         Implements the activity triggered garbage collector.
1568         Additional GCs can be triggered by platfrom timer.
1569         It has sort of compaction effect not to make JSC heap grow fast
1570         so that memory usage becomes lower than usual.
1571
1572         * PlatformEfl.cmake: Added.
1573         * heap/HeapTimer.cpp:
1574         (JSC):
1575         (JSC::HeapTimer::HeapTimer):
1576         (JSC::HeapTimer::~HeapTimer):
1577         (JSC::HeapTimer::add):
1578         (JSC::HeapTimer::stop):
1579         (JSC::HeapTimer::timerEvent):
1580         * heap/HeapTimer.h:
1581         (HeapTimer):
1582         * jsc.cpp:
1583         (main):
1584         * runtime/GCActivityCallback.cpp:
1585         (JSC):
1586         (JSC::DefaultGCActivityCallback::DefaultGCActivityCallback):
1587         (JSC::DefaultGCActivityCallback::scheduleTimer):
1588         (JSC::DefaultGCActivityCallback::cancelTimer):
1589         (JSC::DefaultGCActivityCallback::didAllocate):
1590         * runtime/GCActivityCallback.h:
1591         (GCActivityCallback):
1592         (JSC::GCActivityCallback::GCActivityCallback):
1593         (DefaultGCActivityCallback):
1594
1595 2013-06-03  Roger Fong  <roger_fong@apple.com>
1596
1597         Nuke VS2005 files from the tree.
1598         <rdar://problem/14042021>.
1599
1600         Rubberstamped by Brent Fulgham.
1601
1602         * JavaScriptCore.vcproj: Removed.
1603         * JavaScriptCore.vcproj/JavaScriptCore: Removed.
1604         * JavaScriptCore.vcproj/JavaScriptCore.make: Removed.
1605         * JavaScriptCore.vcproj/JavaScriptCore.resources: Removed.
1606         * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: Removed.
1607         * JavaScriptCore.vcproj/JavaScriptCore.sln: Removed.
1608         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed.
1609         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCF.vsprops: Removed.
1610         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCFLite.vsprops: Removed.
1611         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Removed.
1612         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebug.vsprops: Removed.
1613         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugAll.vsprops: Removed.
1614         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreDebugCairoCFLite.vsprops: Removed.
1615         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Removed.
1616         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make: Removed.
1617         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.vcproj: Removed.
1618         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedCommon.vsprops: Removed.
1619         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebug.vsprops: Removed.
1620         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugAll.vsprops: Removed.
1621         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedDebugCairoCFLite.vsprops: Removed.
1622         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedProduction.vsprops: Removed.
1623         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedRelease.vsprops: Removed.
1624         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleaseCairoCFLite.vsprops: Removed.
1625         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGeneratedReleasePGO.vsprops: Removed.
1626         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePGOOptimize.vsprops: Removed.
1627         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePostBuild.cmd: Removed.
1628         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreBuild.cmd: Removed.
1629         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCorePreLink.cmd: Removed.
1630         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreProduction.vsprops: Removed.
1631         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreRelease.vsprops: Removed.
1632         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleaseCairoCFLite.vsprops: Removed.
1633         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGO.vsprops: Removed.
1634         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreReleasePGOOptimize.vsprops: Removed.
1635         * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh: Removed.
1636         * JavaScriptCore.vcproj/JavaScriptCore/copy-files.cmd: Removed.
1637         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln: Removed.
1638         * JavaScriptCore.vcproj/LLIntAssembly: Removed.
1639         * JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.make: Removed.
1640         * JavaScriptCore.vcproj/LLIntAssembly/LLIntAssembly.vcproj: Removed.
1641         * JavaScriptCore.vcproj/LLIntAssembly/build-LLIntAssembly.sh: Removed.
1642         * JavaScriptCore.vcproj/LLIntDesiredOffsets: Removed.
1643         * JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed.
1644         * JavaScriptCore.vcproj/LLIntDesiredOffsets/LLIntDesiredOffsets.vcproj: Removed.
1645         * JavaScriptCore.vcproj/LLIntDesiredOffsets/build-LLIntDesiredOffsets.sh: Removed.
1646         * JavaScriptCore.vcproj/LLIntOffsetsExtractor: Removed.
1647         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcproj: Removed.
1648         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.vsprops: Removed.
1649         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.vsprops: Removed.
1650         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugAll.vsprops: Removed.
1651         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebugCairoCFLite.vsprops: Removed.
1652         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.vsprops: Removed.
1653         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.vsprops: Removed.
1654         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleaseCairoCFLite.vsprops: Removed.
1655         * JavaScriptCore.vcproj/LLIntOffsetsExtractor/LLIntOffsetsExtractorReleasePGO.vsprops: Removed.
1656         * JavaScriptCore.vcproj/jsc: Removed.
1657         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Removed.
1658         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Removed.
1659         * JavaScriptCore.vcproj/jsc/jscDebug.vsprops: Removed.
1660         * JavaScriptCore.vcproj/jsc/jscDebugAll.vsprops: Removed.
1661         * JavaScriptCore.vcproj/jsc/jscDebugCairoCFLite.vsprops: Removed.
1662         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd: Removed.
1663         * JavaScriptCore.vcproj/jsc/jscPreBuild.cmd: Removed.
1664         * JavaScriptCore.vcproj/jsc/jscPreLink.cmd: Removed.
1665         * JavaScriptCore.vcproj/jsc/jscProduction.vsprops: Removed.
1666         * JavaScriptCore.vcproj/jsc/jscRelease.vsprops: Removed.
1667         * JavaScriptCore.vcproj/jsc/jscReleaseCairoCFLite.vsprops: Removed.
1668         * JavaScriptCore.vcproj/jsc/jscReleasePGO.vsprops: Removed.
1669         * JavaScriptCore.vcproj/testRegExp: Removed.
1670         * JavaScriptCore.vcproj/testRegExp/testRegExp.vcproj: Removed.
1671         * JavaScriptCore.vcproj/testRegExp/testRegExpCommon.vsprops: Removed.
1672         * JavaScriptCore.vcproj/testRegExp/testRegExpDebug.vsprops: Removed.
1673         * JavaScriptCore.vcproj/testRegExp/testRegExpDebugAll.vsprops: Removed.
1674         * JavaScriptCore.vcproj/testRegExp/testRegExpDebugCairoCFLite.vsprops: Removed.
1675         * JavaScriptCore.vcproj/testRegExp/testRegExpPostBuild.cmd: Removed.
1676         * JavaScriptCore.vcproj/testRegExp/testRegExpPreBuild.cmd: Removed.
1677         * JavaScriptCore.vcproj/testRegExp/testRegExpPreLink.cmd: Removed.
1678         * JavaScriptCore.vcproj/testRegExp/testRegExpProduction.vsprops: Removed.
1679         * JavaScriptCore.vcproj/testRegExp/testRegExpRelease.vsprops: Removed.
1680         * JavaScriptCore.vcproj/testRegExp/testRegExpReleaseCairoCFLite.vsprops: Removed.
1681         * JavaScriptCore.vcproj/testRegExp/testRegExpReleasePGO.vsprops: Removed.
1682         * JavaScriptCore.vcproj/testapi: Removed.
1683         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Removed.
1684         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Removed.
1685         * JavaScriptCore.vcproj/testapi/testapiDebug.vsprops: Removed.
1686         * JavaScriptCore.vcproj/testapi/testapiDebugAll.vsprops: Removed.
1687         * JavaScriptCore.vcproj/testapi/testapiDebugCairoCFLite.vsprops: Removed.
1688         * JavaScriptCore.vcproj/testapi/testapiPostBuild.cmd: Removed.
1689         * JavaScriptCore.vcproj/testapi/testapiPreBuild.cmd: Removed.
1690         * JavaScriptCore.vcproj/testapi/testapiPreLink.cmd: Removed.
1691         * JavaScriptCore.vcproj/testapi/testapiProduction.vsprops: Removed.
1692         * JavaScriptCore.vcproj/testapi/testapiRelease.vsprops: Removed.
1693         * JavaScriptCore.vcproj/testapi/testapiReleaseCairoCFLite.vsprops: Removed.
1694
1695 2013-05-31  Filip Pizlo  <fpizlo@apple.com>
1696
1697         Incorrect assertion in DFG::Graph::uncheckedActivationRegisterFor()
1698         <rdar://problem/13989324>
1699
1700         Rubber stamped by Mark Hahnenberg.
1701         
1702         This has a bogus assertion that checks that the passed CodeOrigin doesn't have
1703         an inline call frame. This was well intentioned in the sense that it is true
1704         that inlined call frames wouldn't have an activation register. But that doesn't
1705         mean that people won't ask. Removing the assertion fixes a debug-only crash and
1706         has no impact on production code. This change adds a comment to that effect.
1707
1708         * dfg/DFGGraph.h:
1709         (JSC::DFG::Graph::uncheckedActivationRegisterFor):
1710
1711 2013-05-31  Julien Brianceau  <jbrianceau@nds.com>
1712
1713         [sh4] Fix Overflow case of branchMul32 in baseline JIT.
1714         https://bugs.webkit.org/show_bug.cgi?id=117057
1715
1716         Reviewed by Oliver Hunt.
1717
1718         Current implementation of Overflow case in branchMul32 performs an
1719         unsigned multiplication whereas a signed multiplication is expected.
1720
1721         * assembler/MacroAssemblerSH4.h:
1722         (JSC::MacroAssemblerSH4::branchMul32):
1723
1724 2013-05-31  Julien Brianceau  <jbrianceau@nds.com>
1725
1726         [sh4] Fix floating point comparisons in baseline JIT.
1727         https://bugs.webkit.org/show_bug.cgi?id=117066.
1728
1729         Reviewed by Oliver Hunt.
1730
1731         Current implementation of branchDouble function in baseline JIT is wrong
1732         for some conditions and overkill for others. For instance:
1733         - With DoubleGreaterThanOrEqual condition, branch will be taken if either
1734           operand is NaN with current implementation whereras it should not.
1735         - With DoubleNotEqualOrUnordered condition, performed NaN checks are
1736           useless (because comparison result is false if either operand is NaN).
1737
1738         * assembler/MacroAssemblerSH4.h:
1739         (JSC::MacroAssemblerSH4::branchDouble):
1740
1741 2013-05-31  Julien Brianceau  <jbrianceau@nds.com>
1742
1743         [sh4] Fix double floating point transfer in baseline JIT.
1744         https://bugs.webkit.org/show_bug.cgi?id=117054
1745
1746         Reviewed by Oliver Hunt.
1747
1748         In current implementation, dmovRegReg function transfers only one single
1749         FPRegister as PR=1 and SZ=0 in floating point status/control register.
1750         Double transfers must be performed with two fmov.s opcodes.
1751
1752         * assembler/MacroAssemblerSH4.h:
1753         (JSC::MacroAssemblerSH4::moveDouble):
1754         (JSC::MacroAssemblerSH4::addDouble): Handle (op2==dest) case properly.
1755         (JSC::MacroAssemblerSH4::sqrtDouble):
1756         * assembler/SH4Assembler.h:
1757         (JSC::SH4Assembler::fmovsRegReg):
1758
1759 2013-05-31  Julien Brianceau  <jbrianceau@nds.com>
1760
1761         [sh4] Handle branchType properly in branchTruncateDoubleToInt32.
1762         https://bugs.webkit.org/show_bug.cgi?id=117062
1763
1764         Reviewed by Oliver Hunt.
1765
1766         Current implementation of branchTruncateDoubleToInt32 is incorrect
1767         when branchType == BranchIfTruncateSuccessful in sh4 baseline JIT.
1768
1769         * assembler/MacroAssemblerSH4.h:
1770         (JSC::MacroAssemblerSH4::branchTruncateDoubleToInt32):
1771
1772 2013-05-31  Brent Fulgham  <bfulgham@apple.com>
1773
1774         [Windows] Unreviewed build fix for VS2005 builders.
1775
1776         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def: Add
1777         missing export for WTF::SHA1::computeHexDigest
1778
1779 2013-05-30  David Farler  <dfarler@apple.com>
1780
1781         Fix jscore-test when not using --sdk option with jsDriver.pl
1782         https://bugs.webkit.org/show_bug.cgi?id=116339
1783
1784         Reviewed by Joe Pecoraro.
1785
1786         * tests/mozilla/jsDriver.pl:
1787         (execute_tests):
1788         With each test, the shell_command needs to be started from scratch.
1789
1790         This fix will clear the shell_command and start over as before with
1791         the opt_arch option when not using --sdk with jsDriver.pl.
1792
1793 2013-05-30  Roger Fong  <roger_fong@apple.com>
1794
1795         Get rid of JavaScript exports file on AppleWin port.
1796         https://bugs.webkit.org/show_bug.cgi?id=117050.
1797
1798         Reviewed by Darin Adler.
1799
1800         Delete the JavaScriptCoreExportGenerator folder and remove dependencies.
1801         Start linking in WTF.lib now that it's a shared library.
1802
1803         * JavaScriptCore.vcxproj/JavaScriptCore.submit.sln:
1804         * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
1805         * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
1806         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator: Removed.
1807         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj: Removed.
1808         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGenerator.vcxproj.filters: Removed.
1809         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorBuildCmd.cmd: Removed.
1810         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorCommon.props: Removed.
1811         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorDebug.props: Removed.
1812         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPostBuild.cmd: Removed.
1813         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorPreBuild.cmd: Removed.
1814         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorProduction.props: Removed.
1815         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExportGeneratorRelease.props: Removed.
1816         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in: Removed.
1817         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/make-export-file-generator: Removed.
1818         * JavaScriptCore.vcxproj/jsc/jscCommon.props:
1819         * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj:
1820         * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters:
1821         * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props:
1822         * JavaScriptCore.vcxproj/testapi/testapiCommon.props:
1823
1824 2013-05-22  David Farler  <dfarler@apple.com>
1825
1826         Add --sdk option to jsDriver.pl to run with iOS Simulator
1827         https://bugs.webkit.org/show_bug.cgi?id=116339
1828
1829         Reviewed by David Kilzer.
1830
1831         * tests/mozilla/jsDriver.pl:
1832         (execute_tests):
1833         Prefix shell command with the path to the "sim" tool.
1834         (parse_args):
1835         Add -d / --sdk option.
1836         (usage):
1837         Help message for -d / --sdk option.
1838
1839 2013-05-30  Julien Brianceau  <jbrianceau@nds.com>
1840
1841         [sh4] Optimize NaN checks in LLINT for floating point comparisons.
1842         https://bugs.webkit.org/show_bug.cgi?id=117049
1843
1844         Reviewed by Oliver Hunt.
1845
1846         Use the fcmp/eq opcode in sh4 LLINT to test if a double is NaN.
1847         This is more efficient, doesn't require two tmp registers and requires
1848         less code than current implementation (which converts double to float,
1849         then checks 'E = Emax + 1' and 'f != 0').
1850
1851         * offlineasm/sh4.rb:
1852
1853 2013-05-30  Oliver Hunt  <oliver@apple.com>
1854
1855         JSCallbackObject does not correctly initialise the PropertySlot for getOwnPropertyDescriptor
1856         https://bugs.webkit.org/show_bug.cgi?id=117053
1857
1858         Reviewed by Mark Hahnenberg.
1859
1860         Set appropriate thisValue on the PropertySlot
1861
1862         * API/JSCallbackObjectFunctions.h:
1863         (JSC::::getOwnPropertyDescriptor):
1864         * API/tests/testapi.mm:
1865
1866 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
1867
1868         [Mac] Enable cache partitioning and the public suffix list on 10.8
1869         <rdar://problem/13679019>
1870
1871         Rubber-stamped by David Kilzer.
1872
1873         * Configurations/FeatureDefines.xcconfig:
1874
1875 2013-05-28  Brent Fulgham  <bfulgham@apple.com>
1876
1877         [Windows] Put correct byteCompile symbol in file. Previous version
1878         had an extra 'i' appended to the end.
1879
1880         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
1881         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
1882
1883 2013-05-28  Brent Fulgham  <bfulgham@apple.com>
1884
1885         [Windows] Unreviewed build fix.  Remove ?byteCompile symbol that
1886         is no longer accessible during link.
1887
1888         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
1889         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
1890
1891 2013-05-28  Gavin Barraclough  <barraclough@apple.com>
1892
1893         String(new Date(2010,10,1)) is wrong in KRAT, YAKT
1894         https://bugs.webkit.org/show_bug.cgi?id=106750
1895
1896         Reviewed by Darin Adler.
1897
1898         * runtime/JSDateMath.cpp:
1899         (JSC::msToGregorianDateTime):
1900             - Additional review comment fix.
1901
1902 2013-05-28  Brent Fulgham  <bfulgham@apple.com>
1903
1904         [Windows] Unreviewed build fix after r150833
1905
1906         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
1907         A CR/LF combination was lost in the file, combining two symbols.
1908
1909 2013-05-27  Gavin Barraclough  <barraclough@apple.com>
1910
1911         String(new Date(2010,10,1)) is wrong in KRAT, YAKT
1912         https://bugs.webkit.org/show_bug.cgi?id=106750
1913
1914         Reviewed by Darin Adler.
1915
1916         First part of a fix, simplfy date handling code, instead of operating separately
1917         on the UTC-standard and standard-DST offsets, just generate a combined UTC-local
1918         offset (this is what we actually need, and what the OS gives us).
1919
1920         * runtime/JSDateMath.cpp:
1921         (JSC::getLocalTimeOffset):
1922             - removed getUTCOffset, converted getDSTOffset -> getLocalTimeOffset
1923         (JSC::gregorianDateTimeToMS):
1924         (JSC::msToGregorianDateTime):
1925         (JSC::parseDateFromNullTerminatedCharacters):
1926             - call getLocalTimeOffset instead of getUTCOffset/getDSTOffset
1927         * runtime/VM.cpp:
1928         (JSC::VM::resetDateCache):
1929             - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache
1930         * runtime/VM.h:
1931         (JSC::LocalTimeOffsetCache::LocalTimeOffsetCache):
1932         (JSC::LocalTimeOffsetCache::reset):
1933         (LocalTimeOffsetCache):
1934             - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache
1935
1936 2013-05-28  Mark Hahnenberg  <mhahnenberg@apple.com>
1937
1938         r150199 is very wrong
1939         https://bugs.webkit.org/show_bug.cgi?id=116876
1940
1941         JSValue needs to protect its internal JSValueRef.
1942
1943         Reviewed by Darin Adler.
1944
1945         * API/JSValue.mm:
1946         (-[JSValue initWithValue:inContext:]):
1947         (-[JSValue dealloc]):
1948         * API/tests/testapi.mm: Added a simple test to make sure that we protect the
1949         underlying JavaScript value across garbage collections.
1950
1951 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
1952
1953         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
1954         https://bugs.webkit.org/show_bug.cgi?id=116210
1955
1956         Reviewed by Rob Buis.
1957
1958         Set and use the ICU_INCLUDE_DIRS variable to avoid
1959         duplicated adding of the ICU include directory.
1960
1961         * PlatformBlackBerry.cmake:
1962
1963 2013-05-27  Gabor Rapcsanyi  <rgabor@webkit.org>
1964
1965         MacroAssemblerARM should use xor to swap registers instead of move
1966         https://bugs.webkit.org/show_bug.cgi?id=116306
1967
1968         Reviewed by Zoltan Herczeg.
1969
1970         Change register swapping to xor from move and this way we don't need
1971         temporary register anymore.
1972
1973         * assembler/MacroAssemblerARM.h:
1974         (JSC::MacroAssemblerARM::swap):
1975
1976 2013-05-25  Filip Pizlo  <fpizlo@apple.com>
1977
1978         We broke (-2^31/-1)|0 in the DFG
1979         https://bugs.webkit.org/show_bug.cgi?id=116767
1980
1981         Reviewed by Andreas Kling.
1982         
1983         The bug is that we were assuming that in the -2^31 case, we already had -2^31
1984         in the result register. This was a wrong assumption.
1985
1986         * dfg/DFGSpeculativeJIT.cpp:
1987         (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86):
1988
1989 2013-05-24  Filip Pizlo  <fpizlo@apple.com>
1990
1991         We broke !(0/0)
1992         https://bugs.webkit.org/show_bug.cgi?id=116736
1993
1994         Reviewed by Gavin Barraclough.
1995
1996         * parser/ASTBuilder.h:
1997         (JSC::ASTBuilder::createLogicalNot):
1998         * runtime/JSCJSValueInlines.h:
1999         (JSC::JSValue::pureToBoolean):
2000
2001 2013-05-24  Julien Brianceau  <jbrianceau@nds.com>
2002
2003         [sh4] Optimize LLINT generated code and fix few bugs in baseline JIT.
2004         https://bugs.webkit.org/show_bug.cgi?id=116716
2005
2006         Reviewed by Geoffrey Garen.
2007
2008         * assembler/MacroAssemblerSH4.h:
2009         (JSC::MacroAssemblerSH4::mul32): Cosmetic changes.
2010         (JSC::MacroAssemblerSH4::convertInt32ToDouble): Absolute address was not dereferenced.
2011         (JSC::MacroAssemblerSH4::branch32): Absolute address was not dereferenced.
2012         (JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch): Use all 32 bits of pointer for revertJump call.
2013         * assembler/SH4Assembler.h:
2014         (JSC::SH4Assembler::revertJump): Use changePCrelativeAddress to patch the whole pointer.
2015         (JSC::SH4Assembler::linkJump): Cosmetic change.
2016         * offlineasm/sh4.rb: Optimize LLINT generated code.
2017
2018 2013-05-23  Peter Wang  <peter.wang@torchmobile.com.cn>
2019
2020         CLoop llint backend should not use the d8 register as scratch register
2021         https://bugs.webkit.org/show_bug.cgi?id=116019
2022
2023         Reviewed by Csaba Osztrogonác.
2024
2025         * offlineasm/cloop.rb:
2026
2027 2013-05-22  Peter Wang  <peter.wang@torchmobile.com.cn>
2028
2029         Use uninitialized register in "JIT::emit_op_neq_null" and "emit_op_eq_null"
2030         https://bugs.webkit.org/show_bug.cgi?id=116593
2031
2032         Reviewed by Filip Pizlo.
2033
2034         Generated instructions using uninitialized register. It's caused by a mistake of r126494.
2035
2036         * jit/JITOpcodes32_64.cpp:
2037         (JSC::JIT::emit_op_eq_null):
2038         (JSC::JIT::emit_op_neq_null):
2039
2040 2013-05-22  Filip Pizlo  <fpizlo@apple.com>
2041
2042         Fix indentation of CodeBlock.h
2043
2044         Rubber stampted by Mark Hahnenberg.
2045
2046         * bytecode/CodeBlock.h:
2047
2048 2013-05-22  Julien Brianceau  <jbrianceau@nds.com>
2049
2050         [sh4] Remove MacroAssemblerSH4.cpp file.
2051         https://bugs.webkit.org/show_bug.cgi?id=116596.
2052
2053         Reviewed by Geoffrey Garen.
2054
2055         Move linkCall and repatchCall implementations from MacroAssemblerSH4.cpp
2056         to MacroAssemblerSH4.h and remove MacroAssemblerSH4.cpp, as it is done
2057         for other architectures.
2058
2059         * GNUmakefile.list.am:
2060         * JavaScriptCore.xcodeproj/project.pbxproj:
2061         * Target.pri:
2062         * assembler/MacroAssemblerSH4.cpp: Removed.
2063         * assembler/MacroAssemblerSH4.h:
2064         (JSC::MacroAssemblerSH4::linkCall):
2065         (MacroAssemblerSH4):
2066         (JSC::MacroAssemblerSH4::repatchCall):
2067
2068 2013-05-21  Brent Fulgham  <bfulgham@apple.com>
2069
2070         [Windows] Unreviewed speculative fix for test-bots.
2071
2072         Add export declaration for WTFInvokeCrashHook to avoid runtime
2073         load error on test bots.
2074
2075         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
2076         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
2077
2078 2013-05-21  Mark Lam  <mark.lam@apple.com>
2079
2080         Added missing assert condition for PositiveOrZero in ARM branch32().
2081         https://bugs.webkit.org/show_bug.cgi?id=116538.
2082
2083         Reviewed by Geoffrey Garen.
2084
2085         * assembler/MacroAssemblerARM.h:
2086         (JSC::MacroAssemblerARM::branchAdd32):
2087
2088 2013-05-20  Mark Hahnenberg  <mhahnenberg@apple.com>
2089
2090         Disable SuperRegion
2091         https://bugs.webkit.org/show_bug.cgi?id=116362
2092
2093         Rubber stamped by Geoff Garen.
2094
2095         * heap/Region.h:
2096
2097 2013-05-20  Oliver Hunt  <oliver@apple.com>
2098
2099         Make C API more robust against null contexts
2100         https://bugs.webkit.org/show_bug.cgi?id=116462
2101
2102         Reviewed by Anders Carlsson.
2103
2104         Handle null contexts in a non-crashy way.  It's a bug to ever call the
2105         API with a null context, and the absence of a context means we can't
2106         produce a meaningful result, so we still assert in debug builds.
2107
2108         Now where possible we detect and early return, returning null for any
2109         pointer type, NaN for doubles, and false for any boolean result.
2110
2111         * API/JSBase.cpp:
2112         (JSEvaluateScript):
2113         (JSCheckScriptSyntax):
2114         (JSReportExtraMemoryCost):
2115         * API/JSContextRef.cpp:
2116         (JSContextGetGlobalObject):
2117         (JSContextGetGroup):
2118         (JSContextGetGlobalContext):
2119         (JSContextCreateBacktrace):
2120         * API/JSObjectRef.cpp:
2121         (JSObjectMake):
2122         (JSObjectMakeFunctionWithCallback):
2123         (JSObjectMakeConstructor):
2124         (JSObjectMakeFunction):
2125         (JSObjectMakeArray):
2126         (JSObjectMakeDate):
2127         (JSObjectMakeError):
2128         (JSObjectMakeRegExp):
2129         (JSObjectGetPrototype):
2130         (JSObjectSetPrototype):
2131         (JSObjectHasProperty):
2132         (JSObjectGetProperty):
2133         (JSObjectSetProperty):
2134         (JSObjectGetPropertyAtIndex):
2135         (JSObjectSetPropertyAtIndex):
2136         (JSObjectDeleteProperty):
2137         (JSObjectCopyPropertyNames):
2138         * API/JSValueRef.cpp:
2139         (JSValueGetType):
2140         (JSValueIsUndefined):
2141         (JSValueIsNull):
2142         (JSValueIsBoolean):
2143         (JSValueIsNumber):
2144         (JSValueIsString):
2145         (JSValueIsObject):
2146         (JSValueIsObjectOfClass):
2147         (JSValueIsEqual):
2148         (JSValueIsStrictEqual):
2149         (JSValueIsInstanceOfConstructor):
2150         (JSValueMakeUndefined):
2151         (JSValueMakeNull):
2152         (JSValueMakeBoolean):
2153         (JSValueMakeNumber):
2154         (JSValueMakeString):
2155         (JSValueMakeFromJSONString):
2156         (JSValueCreateJSONString):
2157         (JSValueToBoolean):
2158         (JSValueToNumber):
2159         (JSValueToStringCopy):
2160         (JSValueToObject):
2161         (JSValueProtect):
2162         * API/JSWeakObjectMapRefPrivate.cpp:
2163
2164 2013-05-20  David Kilzer  <ddkilzer@apple.com>
2165
2166         Synchronize FeatureDefines.xcconfig
2167
2168         * Configurations/FeatureDefines.xcconfig: Remove
2169         ENABLE_LINK_PRERENDER.  This was missed in r150356.
2170
2171 2013-05-19  Anders Carlsson  <andersca@apple.com>
2172
2173         Remove link prerendering code
2174         https://bugs.webkit.org/show_bug.cgi?id=116415
2175
2176         Reviewed by Darin Adler.
2177
2178         This code was only used by Chromium and is dead now.
2179
2180         * Configurations/FeatureDefines.xcconfig:
2181
2182 2013-05-18  Patrick Gansterer  <paroga@webkit.org>
2183
2184         [CMake] Replace *_LIBRARY_NAME with *_OUTPUT_NAME
2185         https://bugs.webkit.org/show_bug.cgi?id=114554
2186
2187         Reviewed by Gyuyoung Kim.
2188
2189         Using variables as target names is very uncommon in CMake.
2190         The usual way to specify the name of the resulting binary
2191         is to set the OUTPUT_NAME target property.
2192
2193         * CMakeLists.txt:
2194         * shell/CMakeLists.txt:
2195
2196 2013-05-17  Patrick Gansterer  <paroga@webkit.org>
2197
2198         [CMake] Remove invalid include paths
2199         https://bugs.webkit.org/show_bug.cgi?id=116213
2200
2201         Reviewed by Gyuyoung Kim.
2202
2203         Since "${JAVASCRIPTCORE_DIR}/wtf" does not exist, it is safe
2204         to remove them from the list of include directories.
2205
2206         * PlatformEfl.cmake: Removed.
2207         * PlatformGTK.cmake: Removed.
2208
2209 2013-05-16  Patrick Gansterer  <paroga@webkit.org>
2210
2211         Consolidate lists in JavaScriptCore CMake files
2212         https://bugs.webkit.org/show_bug.cgi?id=115992
2213
2214         Reviewed by Gyuyoung Kim.
2215
2216         Move common files into the CMakeLists.txt to avoid duplicating the list of files.
2217         Also rebase the recently added GTK files to match the other CMake ports, since
2218         the submitted patch was based on an older version of the source tree.
2219
2220         * CMakeLists.txt:
2221         * PlatformEfl.cmake:
2222         * PlatformGTK.cmake:
2223         * shell/CMakeLists.txt:
2224         * shell/PlatformEfl.cmake:
2225         * shell/PlatformGTK.cmake:
2226
2227 2013-05-16  Geoffrey Garen  <ggaren@apple.com>
2228
2229         JSValue shouldn't protect/unprotect its context
2230         https://bugs.webkit.org/show_bug.cgi?id=116234
2231
2232         Reviewed by Mark Hahnenberg.
2233
2234         Our retain on _context is sufficient.
2235
2236         * API/JSValue.mm:
2237         (-[JSValue initWithValue:inContext:]):
2238         (-[JSValue dealloc]):
2239
2240 2013-05-15  Ryosuke Niwa  <rniwa@webkit.org>
2241
2242         Another Windows build fix attempt after r150160.
2243
2244         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
2245         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
2246
2247 2013-05-15  Oliver Hunt  <oliver@apple.com>
2248
2249         RefCountedArray needs to use vector initialisers for its backing store
2250         https://bugs.webkit.org/show_bug.cgi?id=116194
2251
2252         Reviewed by Gavin Barraclough.
2253
2254         Use an out of line function to clear the exception stack to avoid
2255         needing to include otherwise unnecessary headers all over the place.
2256
2257         Everything else is just being updated to use that.
2258
2259         * bytecompiler/BytecodeGenerator.cpp:
2260         * interpreter/CallFrame.h:
2261         (JSC::ExecState::clearSupplementaryExceptionInfo):
2262         * interpreter/Interpreter.cpp:
2263         (JSC::Interpreter::addStackTraceIfNecessary):
2264         (JSC::Interpreter::throwException):
2265         * runtime/JSGlobalObject.cpp:
2266         (JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
2267         * runtime/VM.cpp:
2268         (JSC):
2269         (JSC::VM::clearExceptionStack):
2270         * runtime/VM.h:
2271         (VM):
2272         (JSC::VM::exceptionStack):
2273
2274 2013-05-15  Commit Queue  <commit-queue@webkit.org>
2275
2276         Unreviewed, rolling out r150051.
2277         http://trac.webkit.org/changeset/150051
2278         https://bugs.webkit.org/show_bug.cgi?id=116186
2279
2280         Broke all JSC tests on Mac and the author is unresponsive
2281         (Requested by rniwa on #webkit).
2282
2283         * JavaScriptCore.xcodeproj/project.pbxproj:
2284
2285 2013-05-15  Julien Brianceau  <jbrianceau@nds.com>
2286
2287         Remove savedTimeoutReg from JITStackFrame for sh4 base JIT.
2288         https://bugs.webkit.org/show_bug.cgi?id=116143
2289
2290         Reviewed by Geoffrey Garen.
2291
2292         Since r148119, timeoutCheckRegister is removed from baseline JIT.
2293         So we don't need to save r8 register in JITStackFrame anymore for sh4.
2294
2295         * jit/JITStubs.cpp:
2296         * jit/JITStubs.h:
2297         (JITStackFrame):
2298
2299 2013-05-15  Nico Weber  <thakis@chromium.org>
2300
2301         WebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions.
2302         https://bugs.webkit.org/show_bug.cgi?id=116157
2303
2304         Reviewed by Anders Carlsson.
2305
2306         Also remove a gcc3.2 workaround.
2307
2308         Merges parts of these two commits by the talented Nico Weber:
2309         https://chromium.googlesource.com/chromium/blink/+/3677e2f47348daeff405a40b6f90fbdf0654c2f5
2310         https://chromium.googlesource.com/chromium/blink/+/0fcd96c448dc30be1416dcc15713c53710c1a312
2311
2312         * os-win32/inttypes.h:
2313
2314 2013-05-13  Alvaro Lopez Ortega  <alvaro@alobbs.com>
2315
2316         Nightly build's jsc doesn't work without DYLD_FRAMEWORK...
2317         https://bugs.webkit.org/show_bug.cgi?id=79065
2318
2319         Reviewed by Darin Adler.
2320
2321         Fixes the build process so the depencencies of the jsc binary are
2322         modified before its copied to its target directory. In this way
2323         jsc should always use relative reference to the JavaScriptCore
2324         libraries.
2325
2326         * JavaScriptCore.xcodeproj/project.pbxproj: Fixes the commands in
2327         the "Copy Into Framework" target.
2328
2329 2013-05-13  Mark Hahnenberg  <mhahnenberg@apple.com>
2330
2331         Objective-C API: scanExternalObjectGraph should not create new JSVirtualMachine wrappers
2332         https://bugs.webkit.org/show_bug.cgi?id=116074
2333
2334         If scanExternalObjectGraph creates a new JSVirtualMachine wrapper during collection, when the 
2335         scanExternalObjectGraph call finishes and the autorelease pool is drained we will dealloc the 
2336         JSVirtualMachine which will cause us to try to take the API lock for the corresponding VM. 
2337         If this happens on a GC thread other than the "main" thread, we will deadlock. The solution 
2338         is to just check the VM cache, and if there is no JSVirtualMachine wrapper, return early.
2339
2340         Reviewed by Darin Adler.
2341
2342         * API/JSVirtualMachine.mm:
2343         (scanExternalObjectGraph):
2344
2345 2013-05-13  Benjamin Poulain  <benjamin@webkit.org>
2346
2347         Improve stringProtoFuncLastIndexOf for the prefix case
2348         https://bugs.webkit.org/show_bug.cgi?id=115952
2349
2350         Reviewed by Geoffrey Garen.
2351
2352         * runtime/StringPrototype.cpp:
2353         (JSC::stringProtoFuncLastIndexOf):
2354         Use the optimized string search when possible.
2355
2356         On Joseph Pecoraro's tests, this gives a ~30% speed improvement.
2357
2358 2013-05-13  Zalan Bujtas  <zalan@apple.com>
2359
2360         WebProcess consuming very high CPU on linkedin.com
2361         https://bugs.webkit.org/show_bug.cgi?id=115601
2362
2363         Reviewed by Andreas Kling.
2364
2365         Disable WEB_TIMING_MINIMAL.
2366         Turn off window.performance and performance.now(). Some JS frameworks expect
2367         additional Web Timing APIs, when performance.now() is available.
2368
2369         * Configurations/FeatureDefines.xcconfig:
2370
2371 2013-05-12  Anders Carlsson  <andersca@apple.com>
2372
2373         Stop including UnusedParam.h
2374         https://bugs.webkit.org/show_bug.cgi?id=116003
2375
2376         Reviewed by Sam Weinig.
2377
2378         UnusedParam.h is empty now so there's no need to include it anymore.
2379
2380         * API/APICast.h:
2381         * API/tests/JSNode.c:
2382         * API/tests/JSNodeList.c:
2383         * API/tests/minidom.c:
2384         * API/tests/testapi.c:
2385         * assembler/AbstractMacroAssembler.h:
2386         * assembler/MacroAssemblerCodeRef.h:
2387         * bytecode/CodeBlock.cpp:
2388         * heap/HandleStack.h:
2389         * interpreter/JSStackInlines.h:
2390         * jit/CompactJITCodeMap.h:
2391         * jit/ExecutableAllocator.h:
2392         * parser/SourceProvider.h:
2393         * runtime/DatePrototype.cpp:
2394         * runtime/JSNotAnObject.cpp:
2395         * runtime/JSSegmentedVariableObject.h:
2396         * runtime/JSVariableObject.h:
2397         * runtime/Options.cpp:
2398         * runtime/PropertyOffset.h:
2399
2400 2013-05-11  Martin Robinson  <mrobinson@igalia.com>
2401
2402         [GTK] Add a basic cmake build for WTF and JavaScriptCore
2403         https://bugs.webkit.org/show_bug.cgi?id=115967
2404
2405         Reviewed by Laszlo Gombos.
2406
2407         * PlatformGTK.cmake: Added.
2408         * shell/PlatformGTK.cmake: Added.
2409
2410 2013-05-10  Laszlo Gombos  <l.gombos@samsung.com>
2411
2412         Remove USE(OS_RANDOMNESS)
2413         https://bugs.webkit.org/show_bug.cgi?id=108095
2414
2415         Reviewed by Darin Adler.
2416
2417         Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
2418         ports.
2419
2420         * jit/JIT.cpp:
2421         (JSC::JIT::JIT):
2422
2423 2013-05-10  Mark Hahnenberg  <mhahnenberg@apple.com>
2424
2425         Rename StructureCheckHoistingPhase to TypeCheckHoistingPhase
2426         https://bugs.webkit.org/show_bug.cgi?id=115938
2427
2428         We're going to add some more types of check hoisting soon, so let's have the right name here.
2429
2430         Rubber stamped by Filip Pizlo.
2431         
2432         * CMakeLists.txt:
2433         * GNUmakefile.list.am:
2434         * JavaScriptCore.xcodeproj/project.pbxproj:
2435         * Target.pri:
2436         * dfg/DFGDriver.cpp:
2437         (JSC::DFG::compile):
2438         * dfg/DFGStructureCheckHoistingPhase.cpp: Removed.
2439         * dfg/DFGStructureCheckHoistingPhase.h: Removed.
2440         * dfg/DFGTypeCheckHoistingPhase.cpp: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp.
2441         (JSC::DFG::TypeCheckHoistingPhase::TypeCheckHoistingPhase):
2442         (JSC::DFG::performTypeCheckHoisting):
2443         * dfg/DFGTypeCheckHoistingPhase.h: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.h.
2444
2445 2013-05-09  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2446
2447         Unreviewed build fix after r149836.
2448
2449         It broke at least EFL and GTK builds. Move new static members initialization
2450         outside the class. Those need to have a definition outside the class because
2451         their address is used (e.g. CodeCacheMap::nonGlobalWorkingSetMaxEntries).
2452
2453         * runtime/CodeCache.cpp:
2454         (JSC):
2455         * runtime/CodeCache.h:
2456         (CodeCacheMap):
2457
2458 2013-05-08  Oliver Hunt  <oliver@apple.com>
2459
2460         Code cache stores bogus var references for functions in eval code
2461         https://bugs.webkit.org/show_bug.cgi?id=115747
2462
2463         Reviewed by Mark Hahnenberg.
2464
2465         Non-global eval now uses a per-CodeBlock cache, and only use it
2466         when we're at the top of a function's scope.  This means that we
2467         will no longer cache the parsing of a single string across
2468         multiple functions, and we won't cache when we're nested inside
2469         constructs like |with| and |catch| where previously we would, which
2470         is good because caching in those cases is unsound.
2471
2472         * bytecode/EvalCodeCache.h:
2473         (JSC):
2474         (JSC::EvalCodeCache::getSlow):
2475         (JSC::EvalCodeCache::get):
2476         * bytecode/UnlinkedCodeBlock.h:
2477         (JSC::UnlinkedCodeBlock::codeCacheForEval):
2478         (UnlinkedCodeBlock):
2479         (RareData):
2480         * debugger/Debugger.cpp:
2481         (JSC::evaluateInGlobalCallFrame):
2482         * debugger/DebuggerCallFrame.cpp:
2483         (JSC::DebuggerCallFrame::evaluate):
2484         * interpreter/Interpreter.cpp:
2485         (JSC::eval):
2486         * runtime/CodeCache.cpp:
2487         (JSC::CodeCache::CodeCache):
2488         (JSC::CodeCache::generateBytecode):
2489         (JSC):
2490         (JSC::CodeCache::getCodeBlock):
2491         * runtime/CodeCache.h:
2492         (JSC::CodeCacheMap::CodeCacheMap):
2493         (CodeCacheMap):
2494         (JSC::CodeCacheMap::canPruneQuickly):
2495         (JSC::CodeCacheMap::prune):
2496         (JSC::CodeCache::create):
2497         (CodeCache):
2498         * runtime/Executable.cpp:
2499         (JSC::EvalExecutable::EvalExecutable):
2500         (JSC::EvalExecutable::compileInternal):
2501         * runtime/Executable.h:
2502         (JSC::EvalExecutable::create):
2503         (EvalExecutable):
2504         * runtime/JSGlobalObject.cpp:
2505         (JSC::JSGlobalObject::createEvalCodeBlock):
2506         * runtime/JSGlobalObject.h:
2507         (JSGlobalObject):
2508         * runtime/JSGlobalObjectFunctions.cpp:
2509         (JSC::globalFuncEval):
2510         * runtime/VM.cpp:
2511         (JSC::VM::VM):
2512         * runtime/VM.h:
2513         (VM):
2514
2515 2013-05-08  Mark Hahnenberg  <mhahnenberg@apple.com>
2516
2517         DFGArrayMode::fromObserved is too liberal when it sees different Array and NonArray shapes
2518         https://bugs.webkit.org/show_bug.cgi?id=115805
2519
2520         Reviewed by Geoffrey Garen.
2521
2522         It checks the observed ArrayModes to see if we have seen any ArrayWith* first. If so, it assumes it's 
2523         an Array::Array, even if we've also observed any NonArrayWith* in the ArrayProfile. This leads to the 
2524         code generated by jumpSlowForUnwantedArrayMode to check the indexing type against (shape | IsArray) 
2525         instead of just shape, which can cause us to exit a lot in the case that we saw a NonArray.
2526
2527         To fix this we need to add a case that checks for both ArrayWith* and NonArrayWith* cases first, which 
2528         should then use Array::PossiblyArray, then do the checks we were already doing.
2529
2530         * bytecode/ArrayProfile.h:
2531         (JSC::hasSeenArray):
2532         (JSC::hasSeenNonArray):
2533         * dfg/DFGArrayMode.cpp:
2534         (JSC::DFG::ArrayMode::fromObserved):
2535
2536 2013-05-09  Joe Mason  <jmason@blackberry.com>
2537
2538         [BlackBerry] Set up logging buffer on start of jsc executable
2539         https://bugs.webkit.org/show_bug.cgi?id=114688
2540
2541         Reviewed by Rob Buis.
2542
2543         Internal PR: 322715
2544         Internally Reviewed By: Jeff Rogers
2545
2546         * jsc.cpp:
2547         (main): call BB::Platform::setupApplicationLogging
2548
2549 2013-05-08  Michael Saboff  <msaboff@apple.com>
2550
2551         JSC: There should be a disassembler for ARM Thumb 2
2552         https://bugs.webkit.org/show_bug.cgi?id=115827
2553
2554         Reviewed by Filip Pizlo.
2555
2556         Added a new disassembler for ARMv7 Thumb2 instructions for use by the JSC debugging
2557         and profiling code.  The opcode coverage is currently not complete.  It covers all
2558         of the integer instructions JSC currently emits, but only a limited number of
2559         floating point opcodes.  Currently that is just the 64 bit vmov and vmsr instructions.
2560
2561         The disassembler is structured as a base opcode class ARMv7DOpcode with sub-classes
2562         for each instruction group.  There is a public format method that does the bulk of
2563         the disassembly work.  There are two broad sub-classes, ARMv7D16BitOpcode and
2564         ARMv7D32BitOpcode, for the 16 bit and 32 bit opcodes.  There are sub-classes under
2565         those two classes for individual and related groups of opcodes.  Instructions are
2566         "dispatched" to the right subclass via two arrays of linked lists in the inner classes
2567         OpcodeGroup.  There is one such inner class for each ARMv7D16BitOpcode and ARMv7D32BitOpcode.
2568         Each OpcodeGroup has a mask and a pattern that it applies to the instruction to determine
2569         that it matches a particular group.  OpcodeGroup uses a static method to reinterpret_cast
2570         the Opcode object to the right base class for the instruction group for formatting.
2571         The cast eliminates the need of allocating an object for each decoded instruction.
2572         Unknown instructions are formatted as ".word 1234" or ".long 12345678" depending whether
2573         the instruction is 16 or 32 bit.
2574
2575         * JavaScriptCore.xcodeproj/project.pbxproj:
2576         * disassembler/ARMv7: Added.
2577         * disassembler/ARMv7/ARMv7DOpcode.cpp: Added.
2578         (ARMv7Disassembler):
2579         (OpcodeGroupInitializer):
2580         (JSC::ARMv7Disassembler::ARMv7DOpcode::init):
2581         (JSC::ARMv7Disassembler::ARMv7DOpcode::startITBlock):
2582         (JSC::ARMv7Disassembler::ARMv7DOpcode::saveITConditionAt):
2583         (JSC::ARMv7Disassembler::ARMv7DOpcode::fetchOpcode):
2584         (JSC::ARMv7Disassembler::ARMv7DOpcode::disassemble):
2585         (JSC::ARMv7Disassembler::ARMv7DOpcode::bufferPrintf):
2586         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendInstructionName):
2587         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendRegisterName):
2588         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendRegisterList):
2589         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendFPRegisterName):
2590         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::init):
2591         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::doDisassemble):
2592         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::defaultFormat):
2593         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::format):
2594         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::format):
2595         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::format):
2596         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::format):
2597         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::format):
2598         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::format):
2599         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::format):
2600         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchT2::format):
2601         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::format):
2602         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT1::format):
2603         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::format):
2604         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::format):
2605         (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::format):
2606         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::format):
2607         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::format):
2608         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::format):
2609         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::format):
2610         (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::format):
2611         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::format):
2612         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscBreakpointT1::format):
2613         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::format):
2614         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::format):
2615         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::format):
2616         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::format):
2617         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::format):
2618         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::format):
2619         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::format):
2620         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::init):
2621         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::doDisassemble):
2622         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::defaultFormat):
2623         (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::format):
2624         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::format):
2625         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::appendModifiedImmediate):
2626         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::format):
2627         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::appendImmShift):
2628         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::format):
2629         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::format):
2630         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::appendFPRegister):
2631         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegShift::format):
2632         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::format):
2633         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegParallel::format):
2634         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegMisc::format):
2635         (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::format):
2636         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadRegister::format):
2637         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::format):
2638         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadUnsignedImmediate::format):
2639         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::format):
2640         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::format):
2641         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::format):
2642         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate12::format):
2643         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::format):
2644         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleRegister::format):
2645         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::format):
2646         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::format):
2647         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::format):
2648         * disassembler/ARMv7/ARMv7DOpcode.h: Added.
2649         (ARMv7Disassembler):
2650         (ARMv7DOpcode):
2651         (JSC::ARMv7Disassembler::ARMv7DOpcode::ARMv7DOpcode):
2652         (JSC::ARMv7Disassembler::ARMv7DOpcode::is32BitInstruction):
2653         (JSC::ARMv7Disassembler::ARMv7DOpcode::isFPInstruction):
2654         (JSC::ARMv7Disassembler::ARMv7DOpcode::conditionName):
2655         (JSC::ARMv7Disassembler::ARMv7DOpcode::shiftName):
2656         (JSC::ARMv7Disassembler::ARMv7DOpcode::inITBlock):
2657         (JSC::ARMv7Disassembler::ARMv7DOpcode::startingITBlock):
2658         (JSC::ARMv7Disassembler::ARMv7DOpcode::endITBlock):
2659         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendInstructionNameNoITBlock):
2660         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendSeparator):
2661         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendCharacter):
2662         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendString):
2663         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendShiftType):
2664         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendSignedImmediate):
2665         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendUnsignedImmediate):
2666         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendPCRelativeOffset):
2667         (JSC::ARMv7Disassembler::ARMv7DOpcode::appendShiftAmount):
2668         (ARMv7D16BitOpcode):
2669         (OpcodeGroup):
2670         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::OpcodeGroup):
2671         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::setNext):
2672         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::next):
2673         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::matches):
2674         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::OpcodeGroup::format):
2675         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::rm):
2676         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::rd):
2677         (JSC::ARMv7Disassembler::ARMv7D16BitOpcode::opcodeGroupNumber):
2678         (ARMv7DOpcodeAddRegisterT2):
2679         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::rdn):
2680         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddRegisterT2::rm):
2681         (ARMv7DOpcodeAddSPPlusImmediate):
2682         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::rd):
2683         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSPPlusImmediate::immediate8):
2684         (ARMv7DOpcodeAddSubtract):
2685         (ARMv7DOpcodeAddSubtractT1):
2686         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::opName):
2687         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::op):
2688         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::rm):
2689         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractT1::rn):
2690         (ARMv7DOpcodeAddSubtractImmediate3):
2691         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::opName):
2692         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::op):
2693         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::immediate3):
2694         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate3::rn):
2695         (ARMv7DOpcodeAddSubtractImmediate8):
2696         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::opName):
2697         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::op):
2698         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::rdn):
2699         (JSC::ARMv7Disassembler::ARMv7DOpcodeAddSubtractImmediate8::immediate8):
2700         (ARMv7DOpcodeBranchConditionalT1):
2701         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::condition):
2702         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchConditionalT1::offset):
2703         (ARMv7DOpcodeBranchExchangeT1):
2704         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::opName):
2705         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchExchangeT1::rm):
2706         (ARMv7DOpcodeBranchT2):
2707         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchT2::immediate11):
2708         (ARMv7DOpcodeCompareImmediateT1):
2709         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::rn):
2710         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareImmediateT1::immediate8):
2711         (ARMv7DOpcodeCompareRegisterT1):
2712         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT1::rn):
2713         (ARMv7DOpcodeCompareRegisterT2):
2714         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::rn):
2715         (JSC::ARMv7Disassembler::ARMv7DOpcodeCompareRegisterT2::rm):
2716         (ARMv7DOpcodeDataProcessingRegisterT1):
2717         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::opName):
2718         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::op):
2719         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::rm):
2720         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegisterT1::rdn):
2721         (ARMv7DOpcodeGeneratePCRelativeAddress):
2722         (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::rd):
2723         (JSC::ARMv7Disassembler::ARMv7DOpcodeGeneratePCRelativeAddress::immediate8):
2724         (ARMv7DOpcodeLoadFromLiteralPool):
2725         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::rt):
2726         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadFromLiteralPool::immediate8):
2727         (ARMv7DOpcodeLoadStoreRegisterImmediate):
2728         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::opName):
2729         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::op):
2730         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::immediate5):
2731         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::rn):
2732         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::rt):
2733         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterImmediate::scale):
2734         (ARMv7DOpcodeLoadStoreRegisterImmediateWordAndByte):
2735         (ARMv7DOpcodeLoadStoreRegisterImmediateHalfWord):
2736         (ARMv7DOpcodeLoadStoreRegisterOffsetT1):
2737         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::opName):
2738         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::opB):
2739         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rm):
2740         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rn):
2741         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterOffsetT1::rt):
2742         (ARMv7DOpcodeLoadStoreRegisterSPRelative):
2743         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::opName):
2744         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::op):
2745         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::rt):
2746         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadStoreRegisterSPRelative::immediate8):
2747         (ARMv7DOpcodeLogicalImmediateT1):
2748         (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::opName):
2749         (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::op):
2750         (JSC::ARMv7Disassembler::ARMv7DOpcodeLogicalImmediateT1::immediate5):
2751         (ARMv7DOpcodeMiscAddSubSP):
2752         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::opName):
2753         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::op):
2754         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscAddSubSP::immediate7):
2755         (ARMv7DOpcodeMiscByteHalfwordOps):
2756         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::opName):
2757         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscByteHalfwordOps::op):
2758         (ARMv7DOpcodeMiscBreakpointT1):
2759         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscBreakpointT1::immediate8):
2760         (ARMv7DOpcodeMiscCompareAndBranch):
2761         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::opName):
2762         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::op):
2763         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::immediate6):
2764         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscCompareAndBranch::rn):
2765         (ARMv7DOpcodeMiscHint16):
2766         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::opName):
2767         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscHint16::opA):
2768         (ARMv7DOpcodeMiscIfThenT1):
2769         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::firstCondition):
2770         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscIfThenT1::mask):
2771         (ARMv7DOpcodeMiscPushPop):
2772         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::opName):
2773         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::op):
2774         (JSC::ARMv7Disassembler::ARMv7DOpcodeMiscPushPop::registerMask):
2775         (ARMv7DOpcodeMoveImmediateT1):
2776         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::rd):
2777         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveImmediateT1::immediate8):
2778         (ARMv7DOpcodeMoveRegisterT1):
2779         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::rd):
2780         (JSC::ARMv7Disassembler::ARMv7DOpcodeMoveRegisterT1::rm):
2781         (ARMv7D32BitOpcode):
2782         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::OpcodeGroup):
2783         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::setNext):
2784         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::next):
2785         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::matches):
2786         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::OpcodeGroup::format):
2787         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rd):
2788         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rm):
2789         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rn):
2790         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::rt):
2791         (JSC::ARMv7Disassembler::ARMv7D32BitOpcode::opcodeGroupNumber):
2792         (ARMv7DOpcodeBranchRelative):
2793         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::sBit):
2794         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::j1):
2795         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::j2):
2796         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchRelative::immediate11):
2797         (ARMv7DOpcodeConditionalBranchT3):
2798         (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::offset):
2799         (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::condition):
2800         (JSC::ARMv7Disassembler::ARMv7DOpcodeConditionalBranchT3::immediate6):
2801         (ARMv7DOpcodeBranchOrBranchLink):
2802         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::offset):
2803         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::immediate10):
2804         (JSC::ARMv7Disassembler::ARMv7DOpcodeBranchOrBranchLink::isBL):
2805         (ARMv7DOpcodeDataProcessingLogicalAndRithmetic):
2806         (ARMv7DOpcodeDataProcessingModifiedImmediate):
2807         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::opName):
2808         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::op):
2809         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::sBit):
2810         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingModifiedImmediate::immediate12):
2811         (ARMv7DOpcodeDataProcessingShiftedReg):
2812         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::opName):
2813         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::sBit):
2814         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::op):
2815         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::immediate5):
2816         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::type):
2817         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::tbBit):
2818         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingShiftedReg::tBit):
2819         (ARMv7DOpcodeDataProcessingReg):
2820         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingReg::op1):
2821         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingReg::op2):
2822         (ARMv7DOpcodeDataProcessingRegShift):
2823         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegShift::opName):
2824         (ARMv7DOpcodeDataProcessingRegExtend):
2825         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::opExtendName):
2826         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::opExtendAndAddName):
2827         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegExtend::rotate):
2828         (ARMv7DOpcodeDataProcessingRegParallel):
2829         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegParallel::opName):
2830         (ARMv7DOpcodeDataProcessingRegMisc):
2831         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataProcessingRegMisc::opName):
2832         (ARMv7DOpcodeHint32):
2833         (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::opName):
2834         (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::isDebugHint):
2835         (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::debugOption):
2836         (JSC::ARMv7Disassembler::ARMv7DOpcodeHint32::op):
2837         (ARMv7DOpcodeFPTransfer):
2838         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opH):
2839         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opL):
2840         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::rt):
2841         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opC):
2842         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::opB):
2843         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::vd):
2844         (JSC::ARMv7Disassembler::ARMv7DOpcodeFPTransfer::vn):
2845         (ARMv7DOpcodeDataLoad):
2846         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataLoad::opName):
2847         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataLoad::op):
2848         (ARMv7DOpcodeLoadRegister):
2849         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadRegister::immediate2):
2850         (ARMv7DOpcodeLoadSignedImmediate):
2851         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::pBit):
2852         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::uBit):
2853         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::wBit):
2854         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadSignedImmediate::immediate8):
2855         (ARMv7DOpcodeLoadUnsignedImmediate):
2856         (JSC::ARMv7Disassembler::ARMv7DOpcodeLoadUnsignedImmediate::immediate12):
2857         (ARMv7DOpcodeLongMultipleDivide):
2858         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::opName):
2859         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlalOpName):
2860         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlaldOpName):
2861         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::smlsldOpName):
2862         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::rdLo):
2863         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::rdHi):
2864         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::op1):
2865         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::op2):
2866         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::nBit):
2867         (JSC::ARMv7Disassembler::ARMv7DOpcodeLongMultipleDivide::mBit):
2868         (ARMv7DOpcodeDataPushPopSingle):
2869         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::opName):
2870         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataPushPopSingle::op):
2871         (ARMv7DOpcodeDataStoreSingle):
2872         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataStoreSingle::opName):
2873         (JSC::ARMv7Disassembler::ARMv7DOpcodeDataStoreSingle::op):
2874         (ARMv7DOpcodeStoreSingleImmediate12):
2875         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate12::immediate12):
2876         (ARMv7DOpcodeStoreSingleImmediate8):
2877         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::pBit):
2878         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::uBit):
2879         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::wBit):
2880         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleImmediate8::immediate8):
2881         (ARMv7DOpcodeStoreSingleRegister):
2882         (JSC::ARMv7Disassembler::ARMv7DOpcodeStoreSingleRegister::immediate2):
2883         (ARMv7DOpcodeUnmodifiedImmediate):
2884         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::opName):
2885         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::op):
2886         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::shBit):
2887         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::bitNumOrSatImmediate):
2888         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate5):
2889         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate12):
2890         (JSC::ARMv7Disassembler::ARMv7DOpcodeUnmodifiedImmediate::immediate16):
2891         (ARMv7DOpcodeVMOVDoublePrecision):
2892         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::op):
2893         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::rt2):
2894         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::rt):
2895         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVDoublePrecision::vm):
2896         (ARMv7DOpcodeVMOVSinglePrecision):
2897         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::op):
2898         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::rt2):
2899         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::rt):
2900         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMOVSinglePrecision::vm):
2901         (ARMv7DOpcodeVMSR):
2902         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::opL):
2903         (JSC::ARMv7Disassembler::ARMv7DOpcodeVMSR::rt):
2904         * disassembler/ARMv7Disassembler.cpp: Added.
2905         (JSC::tryToDisassemble):
2906
2907 2013-05-07  Julien Brianceau  <jbrianceau@nds.com>
2908
2909         Take advantage of pre-decrement and post-increment opcodes for sh4 base JIT.
2910         https://bugs.webkit.org/show_bug.cgi?id=115722
2911
2912         Reviewed by Oliver Hunt.
2913
2914         * assembler/MacroAssemblerSH4.h:
2915         (JSC::MacroAssemblerSH4::load8PostInc):
2916         (MacroAssemblerSH4):
2917         (JSC::MacroAssemblerSH4::load16Unaligned):
2918         (JSC::MacroAssemblerSH4::load16PostInc):
2919         (JSC::MacroAssemblerSH4::storeDouble):
2920         (JSC::MacroAssemblerSH4::load32WithUnalignedHalfWords):
2921         * assembler/SH4Assembler.h:
2922         (JSC::SH4Assembler::movwMemRegIn):
2923         (SH4Assembler):
2924         (JSC::SH4Assembler::movbMemRegIn):
2925         (JSC::SH4Assembler::printInstr):
2926
2927 2013-05-07  Anders Carlsson  <andersca@apple.com>
2928
2929         Remove AlwaysInline.h from WTF
2930         https://bugs.webkit.org/show_bug.cgi?id=115727
2931
2932         Reviewed by Brent Fulgham.
2933
2934         The macro that used to be in AlwaysInline.h is now in Compiler.h so there's no reason
2935         to keep AlwaysInline.h around anymore.
2936
2937         * jit/JSInterfaceJIT.h:
2938         * parser/Lexer.h:
2939         * runtime/JSCJSValue.h:
2940         * runtime/SymbolTable.h:
2941
2942 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2943
2944         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
2945         https://bugs.webkit.org/show_bug.cgi?id=115646
2946
2947         Reviewed by Darin Adler.
2948
2949         * bytecompiler/StaticPropertyAnalyzer.h:
2950         (JSC::StaticPropertyAnalyzer::putById):
2951             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
2952
2953 2013-05-06  Julien Brianceau  <jbrianceau@nds.com>
2954
2955         Misc bugfix and cleaning in sh4 base JIT.
2956         https://bugs.webkit.org/show_bug.cgi?id=115627
2957
2958         Reviewed by Oliver Hunt.
2959
2960         Get rid of loadX(RegisterID r0, RegisterID src, RegisterID dest) functions.
2961         Remove misplaced extuw() implementation from MacroAssemblerSH4.
2962         Add movbRegMemr0 and movwRegMemr0 functions in SH4Assembler.
2963
2964         * assembler/MacroAssemblerSH4.h:
2965         (JSC::MacroAssemblerSH4::add32): Skip operation when first operand is a zero immediate.
2966         (JSC::MacroAssemblerSH4::sub32): Skip operation when first operand is a zero immediate.
2967         (JSC::MacroAssemblerSH4::load32): Fix wrong usage of r0 register.
2968         (JSC::MacroAssemblerSH4::load8Signed): Handle "base == r0" case.
2969         (MacroAssemblerSH4):
2970         (JSC::MacroAssemblerSH4::load16): Handle "base == r0" case.
2971         (JSC::MacroAssemblerSH4::load16Unaligned): Use extuw() implementation from SH4Assembler.
2972         (JSC::MacroAssemblerSH4::load16Signed): Cosmetic change.
2973         (JSC::MacroAssemblerSH4::store8): Fix unhandled BaseIndex offset and handle (base == r0) case.
2974         (JSC::MacroAssemblerSH4::store16): Fix unhandled BaseIndex offset and handle (base == r0) case.
2975         (JSC::MacroAssemblerSH4::store32):
2976         * assembler/SH4Assembler.h:
2977         (JSC::SH4Assembler::movwRegMemr0):
2978         (SH4Assembler):
2979         (JSC::SH4Assembler::movbRegMemr0):
2980         (JSC::SH4Assembler::placeConstantPoolBarrier): Cosmetic change.
2981         (JSC::SH4Assembler::maxJumpReplacementSize):
2982         (JSC::SH4Assembler::replaceWithJump): Correct branch range and save an opcode.
2983         (JSC::SH4Assembler::printInstr):
2984
2985 2013-05-06  Anders Carlsson  <andersca@apple.com>
2986
2987         Stop using WTF::deleteAllValues in JavaScriptCore
2988         https://bugs.webkit.org/show_bug.cgi?id=115670
2989
2990         Reviewed by Oliver Hunt.
2991
2992         Change the Vectors used to Vectors of OwnPtrs instead.
2993
2994         * heap/DFGCodeBlocks.cpp:
2995         (JSC::DFGCodeBlocks::~DFGCodeBlocks):
2996         (JSC::DFGCodeBlocks::deleteUnmarkedJettisonedCodeBlocks):
2997
2998 2013-05-06  Andras Becsi  <andras.becsi@digia.com>
2999
3000         Build with GCC 4.8 fails because of -Wmaybe-uninitialized
3001         https://bugs.webkit.org/show_bug.cgi?id=115648
3002
3003         Reviewed by Michael Saboff.
3004
3005         Initialize values in Options::setOption since from
3006         there we end up calling OptionRange::init with
3007         uninitialized members.
3008
3009         * runtime/Options.cpp:
3010
3011 2013-05-06  Gabor Rapcsanyi  <rgabor@webkit.org>
3012
3013         JSC ARM traditional failing on Octane NavierStokes test
3014         https://bugs.webkit.org/show_bug.cgi?id=115626
3015
3016         Reviewed by Zoltan Herczeg.
3017
3018         Change the ARM traditional assembler to use double precision on value
3019         conversions.
3020
3021         * assembler/ARMAssembler.h:
3022
3023 2013-05-03  Michael Saboff  <msaboff@apple.com>
3024
3025         There should be a runtime option to constrain what functions get DFG compiled
3026         https://bugs.webkit.org/show_bug.cgi?id=115576
3027
3028         Reviewed by Mark Hahnenberg.
3029
3030         Added OptionRange to Options to allow checking that something is within an option
3031         or not.  The new OptionClass supports range strings in the form of [!]<low>[:<high>].
3032         If only one value is given, then it will be used for both low and high.  A leading
3033         '!' inverts the check.  If no range is given, then checking for a value within a range
3034         will always return true.  Added the option "bytecodeRangeToDFGCompile" that takes an
3035         OptionRange string to select the bytecode range of code blocks to DFG compile.
3036
3037         * dfg/DFGDriver.cpp:
3038         (JSC::DFG::compile): Added new check for bytecode count within bytecodeRangeToDFGCompile
3039         range.
3040         * runtime/Options.cpp:
3041         (JSC::parse): Added overloaded parse() for OptionRange.
3042         (JSC::OptionRange::init): Parse range string and then initialize the range.
3043         (JSC::OptionRange::isInRange): Function used by consumer to check if a value is within
3044         the specified range.
3045         (JSC::Options::dumpOption): Added code to dump OptionRange options.
3046         * runtime/Options.h:
3047         (OptionRange): New class.
3048         (JSC::OptionRange::operator= ): This is really used as a default ctor for use within
3049         the Option static array initialization.
3050         (JSC::OptionRange::rangeString): This is used for debug.  It assumes that the char*
3051         passed into OptionRange::init is valid when this function is called.
3052
3053 2013-05-02  Oliver Hunt  <oliver@apple.com>
3054
3055         Fix potential bug in lookup logic
3056         https://bugs.webkit.org/show_bug.cgi?id=115522
3057
3058         Reviewed by Mark Hahnenberg.
3059
3060         Though not a problem in practise, it is technically possible
3061         to inject an un-proxied global object into the scope chain
3062         via the C API.  This change makes sure that the scope walk
3063         in BytecodeGenerator actually limits itself to scopes that
3064         are statically bindable.
3065
3066         * bytecompiler/BytecodeGenerator.cpp:
3067         (JSC::BytecodeGenerator::resolve):
3068         * runtime/JSObject.h:
3069         (JSObject):
3070         (JSC):
3071         (JSC::JSObject::isStaticScopeObject):
3072
3073 2013-05-01  Roger Fong  <roger_fong@apple.com>
3074
3075         Set Path in makefile for AppleWin.
3076
3077         * JavaScriptCore.vcxproj/JavaScriptCore.make:
3078
3079 2013-05-01  Benjamin Poulain  <benjamin@webkit.org>
3080
3081         Remove the remaining wscript
3082         https://bugs.webkit.org/show_bug.cgi?id=115459
3083
3084         Reviewed by Andreas Kling.
3085
3086         * wscript: Removed.
3087
3088 2013-04-30  Mark Lam  <mark.lam@apple.com>
3089
3090         JSContextGroupSetExecutionTimeLimit() should not pass a callback to the
3091         VM watchdog if its client did not pass one in.
3092         https://bugs.webkit.org/show_bug.cgi?id=115461.
3093
3094         Reviewed by Geoffrey Garen.
3095
3096         * API/JSContextRef.cpp:
3097         (internalScriptTimeoutCallback):
3098         (JSContextGroupSetExecutionTimeLimit):
3099         * API/tests/testapi.c:
3100         (main):
3101         - Added test case when the time limit callback is 0.
3102         - Also updated a check to verify that a TerminatedExecutionException is
3103           thrown when the time out is cancelled.
3104         - Also fixed some cosmetic typos.
3105
3106 2013-04-30  Geoffrey Garen  <ggaren@apple.com>
3107
3108         Removed op_ensure_property_exists
3109         https://bugs.webkit.org/show_bug.cgi?id=115460
3110
3111         Reviewed by Mark Hahnenberg.
3112
3113         It was unused, and whatever it was once used for was not optimized.
3114
3115         * JavaScriptCore.order:
3116         * bytecode/CodeBlock.cpp:
3117         (JSC::CodeBlock::dumpBytecode):
3118         * bytecode/Opcode.h:
3119         (JSC::padOpcodeName):
3120         * jit/JIT.cpp:
3121         (JSC::JIT::privateCompileMainPass):
3122         * jit/JIT.h:
3123         * jit/JITOpcodes.cpp:
3124         * jit/JITOpcodes32_64.cpp:
3125         * jit/JITStubs.cpp:
3126         * jit/JITStubs.h:
3127         * llint/LLIntSlowPaths.cpp:
3128         * llint/LLIntSlowPaths.h:
3129         * llint/LowLevelInterpreter.asm:
3130
3131 2013-04-30  Oliver Hunt  <oliver@apple.com>
3132
3133         JSC Stack walking logic craches in the face of inlined functions triggering VM re-entry
3134         https://bugs.webkit.org/show_bug.cgi?id=115449
3135
3136         Reviewed by Geoffrey Garen.
3137
3138         Rename callframeishost to something that makes sense, and fix
3139         getCallerInfo to correctly handle inline functions calling into
3140         the VM.
3141
3142         * bytecode/CodeBlock.cpp:
3143         (JSC::CodeBlock::codeOriginForReturn):
3144           Make this more robust in the face of incorrect stack walking
3145         * interpreter/CallFrame.cpp:
3146         (JSC::CallFrame::trueCallerFrame):
3147           Everyone has to perform a codeblock() check before calling this
3148           so we might as well just do it here.
3149         * interpreter/Interpreter.cpp:
3150         (JSC::getCallerInfo):
3151
3152 2013-04-30  Julien Brianceau  <jbrianceau@nds.com>
3153
3154         Bug fixing in sh4 base JIT and LLINT.
3155         https://bugs.webkit.org/show_bug.cgi?id=115420
3156
3157         Reviewed by Oliver Hunt.
3158
3159         * assembler/MacroAssemblerSH4.h:
3160         (JSC::MacroAssemblerSH4::lshift32):
3161         (JSC::MacroAssemblerSH4::rshift32):
3162         (JSC::MacroAssemblerSH4::branchMul32):
3163         (JSC::MacroAssemblerSH4::urshift32):
3164         (JSC::MacroAssemblerSH4::replaceWithJump):
3165         (JSC::MacroAssemblerSH4::maxJumpReplacementSize):
3166         * assembler/SH4Assembler.h:
3167         (JSC::SH4Assembler::shldRegReg):
3168         (JSC::SH4Assembler::shadRegReg):
3169         (JSC::SH4Assembler::shalImm8r):
3170         (SH4Assembler):
3171         (JSC::SH4Assembler::sharImm8r):
3172         (JSC::SH4Assembler::maxJumpReplacementSize):
3173         (JSC::SH4Assembler::replaceWithJump):
3174         * offlineasm/sh4.rb:
3175
3176 2013-04-30  Geoffrey Garen  <ggaren@apple.com>
3177
3178         Objective-C JavaScriptCore API should publicly support bridging to C
3179         https://bugs.webkit.org/show_bug.cgi?id=115447
3180
3181         Reviewed by Mark Hahnenberg.
3182
3183         For consistency, I renamed
3184
3185             +[JSValue valueWithValue:] => +[JSValue valueWithJSValueRef]
3186             +[JSContext contextWithGlobalContextRef] => +[JSContext contextWithJSGlobalContextRef]
3187             -[JSContext globalContext] => -[JSContext JSGlobalContextRef]
3188
3189         I searched svn to verify that these functions don't have clients yet,
3190         so we won't break anything.
3191
3192         I also exported as public API
3193
3194             +[JSValue valueWithJSValueRef:]
3195             +[JSContext contextWithJSGlobalContextRef:]
3196
3197         It's hard to integrate with the C API without these.
3198
3199 2013-04-30  Commit Queue  <rniwa@webkit.org>
3200
3201         Unreviewed, rolling out r149349 and r149354.
3202         http://trac.webkit.org/changeset/149349
3203         http://trac.webkit.org/changeset/149354
3204         https://bugs.webkit.org/show_bug.cgi?id=115444
3205
3206          The Thumb version of compileSoftModulo make invalid use of
3207         registers (Requested by benjaminp on #webkit).
3208
3209         * CMakeLists.txt:
3210         * GNUmakefile.list.am:
3211         * JavaScriptCore.xcodeproj/project.pbxproj:
3212         * assembler/ARMv7Assembler.h:
3213         (ARMv7Assembler):
3214         * assembler/AbstractMacroAssembler.h:
3215         (JSC::isARMv7s):
3216         (JSC):
3217         * assembler/MacroAssemblerARMv7.cpp: Removed.
3218         * assembler/MacroAssemblerARMv7.h:
3219         (MacroAssemblerARMv7):
3220         * dfg/DFGFixupPhase.cpp:
3221         (JSC::DFG::FixupPhase::fixupNode):
3222         * dfg/DFGOperations.cpp:
3223         * dfg/DFGOperations.h:
3224         * dfg/DFGSpeculativeJIT.cpp:
3225         (JSC::DFG::SpeculativeJIT::compileSoftModulo):
3226         (DFG):
3227         (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARMv7s):
3228         * dfg/DFGSpeculativeJIT.h:
3229         (JSC::DFG::SpeculativeJIT::callOperation):
3230         (SpeculativeJIT):
3231         * dfg/DFGSpeculativeJIT32_64.cpp:
3232         (JSC::DFG::SpeculativeJIT::compile):
3233
3234 2013-04-30  Zalan Bujtas  <zalan@apple.com>
3235
3236         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
3237         https://bugs.webkit.org/show_bug.cgi?id=111244
3238
3239         Reviewed by David Kilzer.
3240         
3241         Enable performance.now() as a minimal subset of Web Timing API. 
3242         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
3243         number of milliseconds from the start of the navigation of the current document.
3244         JS libraries use this API to check against the requestAnimationFrame() timestamp.
3245
3246         * Configurations/FeatureDefines.xcconfig:
3247
3248 2013-04-30  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
3249
3250         Unreviewed. Speculative build fix on Qt Arm and Mips after r149349.
3251
3252         * dfg/DFGSpeculativeJIT.cpp:
3253         (JSC::DFG::SpeculativeJIT::compileSoftModulo):
3254
3255 2013-04-29  Cosmin Truta  <ctruta@blackberry.com>
3256
3257         [ARM] Expand the use of integer division
3258         https://bugs.webkit.org/show_bug.cgi?id=115138
3259
3260         Reviewed by Benjamin Poulain.
3261
3262         If availability of hardware integer division isn't known at compile
3263         time, check the CPU flags and decide at runtime whether to fall back
3264         to software. Currently, this OS-specific check is implemented on QNX.
3265
3266         Moreover, use operator % instead of fmod() in the calculation of the
3267         software modulo. Even when it's software-emulated, operator % is faster
3268         than fmod(): on ARM v7 QNX, without hardware division, we noticed
3269         >3% speedup on SunSpider.
3270
3271         * CMakeLists.txt:
3272         * GNUmakefile.list.am:
3273         * JavaScriptCore.xcodeproj/project.pbxproj:
3274         * assembler/ARMv7Assembler.h:
3275         (JSC::ARMv7Assembler::sdiv): Did not compile conditionally.
3276         (JSC::ARMv7Assembler::udiv): Ditto.
3277         * assembler/AbstractMacroAssembler.h:
3278         (JSC::isARMv7s): Removed.
3279         * assembler/MacroAssemblerARMv7.cpp: Added.
3280         (JSC::isIntegerDivSupported): Added.
3281         * assembler/MacroAssemblerARMv7.h:
3282         (JSC::MacroAssemblerARMv7::supportsIntegerDiv): Added.
3283         * dfg/DFGFixupPhase.cpp:
3284         (JSC::DFG::FixupPhase::fixupNode): Checked MacroAssembler::supportsIntegerDiv() in ArithDiv case.
3285         * dfg/DFGOperations.cpp:
3286         (JSC::DFG::operationModOnInts): Added.
3287         * dfg/DFGOperations.h:
3288         (JSC::DFG::Z_DFGOperation_ZZ): Added.
3289         * dfg/DFGSpeculativeJIT.cpp:
3290         (JSC::DFG::SpeculativeJIT::compileSoftModulo): Separated the X86-specific and ARM-specific codegen
3291         from the common implementation; used operationModOnInts on ARM.
3292         (JSC::DFG::SpeculativeJIT::compileIntegerArithDivForARM): Renamed from compileIntegerArithDivForARMv7.
3293         (JSC::DFG::SpeculativeJIT::compileArithMod): Allowed run-time detection of integer div on ARM.
3294         * dfg/DFGSpeculativeJIT.h:
3295         (JSC::DFG::SpeculativeJIT::callOperation): Added overloads with Z_DFGOperation_ZZ arguments.
3296         * dfg/DFGSpeculativeJIT32_64.cpp:
3297         (JSC::DFG::SpeculativeJIT::compile): Used compileIntegerArithDivForARM.
3298
3299 2013-04-29  Benjamin Poulain  <benjamin@webkit.org>
3300
3301         Unify the data access of StringImpl members from JavaScriptCore
3302         https://bugs.webkit.org/show_bug.cgi?id=115320
3303
3304         Reviewed by Andreas Kling.
3305
3306         DFG accesses the member infos by directly calling the methods on StringImpl,
3307         while the baseline JIT was using helper methods on ThunkHelpers.
3308
3309         Cut the middle man, and use StringImpl directly everywhere.
3310
3311         * jit/JITInlines.h:
3312         (JSC::JIT::emitLoadCharacterString):
3313         * jit/JITPropertyAccess.cpp:
3314         (JSC::JIT::stringGetByValStubGenerator):
3315         * jit/JITPropertyAccess32_64.cpp:
3316         (JSC::JIT::stringGetByValStubGenerator):
3317         * jit/JSInterfaceJIT.h:
3318         * jit/ThunkGenerators.cpp:
3319         (JSC::stringCharLoad):
3320
3321 2013-04-29  Benjamin Poulain  <bpoulain@apple.com>
3322
3323         Use push and pop for iOS math function thunks
3324         https://bugs.webkit.org/show_bug.cgi?id=115215
3325
3326         Reviewed by Filip Pizlo.
3327
3328         The iOS ABI is a little different than regular ARM ABI regarding stack alignment.
3329         The requirement is 4 bytes:
3330         "The ARM environment uses a stack that—at the point of function calls—is 4-byte aligned,
3331          grows downward, and contains local variables and a function’s parameters."
3332
3333         Subsequently, we can just use push and pop to preserve the link register.
3334
3335         * jit/ThunkGenerators.cpp:
3336
3337 2013-04-29  Brent Fulgham  <bfulgham@webkit.org>
3338
3339         [Windows, WinCairo] Get rid of last few pthread include/link references.
3340         https://bugs.webkit.org/show_bug.cgi?id=115375
3341
3342         Reviewed by Tim Horton.
3343
3344         * JavaScriptCore.vcproj/jsc/jscPostBuild.cmd:
3345         * JavaScriptCore.vcxproj/JavaScriptCoreCommon.props:
3346         * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props:
3347         * JavaScriptCore.vcxproj/jsc/jscCommon.props:
3348         * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props:
3349         * JavaScriptCore.vcxproj/testapi/testapiCommon.props:
3350
3351 2013-04-29  Roger Fong  <roger_fong@apple.com>
3352
3353         Unreviewed. AppleWin VS2010 build fix.
3354
3355         * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
3356
3357 2013-04-26  Mark Hahnenberg  <mhahnenberg@apple.com>
3358
3359         ~BlockAllocator should ASSERT that it has no more Regions left
3360         https://bugs.webkit.org/show_bug.cgi?id=115287
3361
3362         Reviewed by Andreas Kling.
3363
3364         * heap/BlockAllocator.cpp:
3365         (JSC::BlockAllocator::~BlockAllocator):
3366         (JSC::BlockAllocator::allRegionSetsAreEmpty):
3367         * heap/BlockAllocator.h:
3368         (RegionSet):
3369         (JSC::BlockAllocator::RegionSet::isEmpty):
3370         (BlockAllocator):
3371
3372 2013-04-29  Mark Hahnenberg  <mhahnenberg@apple.com>
3373
3374         IndexingTypes should use hex
3375         https://bugs.webkit.org/show_bug.cgi?id=115286
3376
3377         Decimal is kind of confusing/hard to read because they're used as bit masks. Hex seems more appropriate.
3378
3379         Reviewed by Geoffrey Garen.
3380
3381         * runtime/IndexingType.h:
3382
3383 2013-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3384
3385         Unreviewed. Fix make distcheck.
3386
3387         * GNUmakefile.list.am: Add missing headers files to compilation
3388         and offlineasm/sh4.rb script.
3389