89aa9c995a22ea7477ac297a7eed8f80b3a2b16a
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2009-05-05  Darin Adler  <darin@apple.com>
2
3         Try to fix Windows build.
4
5         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
6         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
7
8         Try to fix Mac build.
9
10         * JavaScriptCore.xcodeproj/project.pbxproj: Made SegmentedVector.h private.
11
12 2009-05-05  Darin Adler  <darin@apple.com>
13
14         Try to fix Mac build.
15
16         * JavaScriptCore.xcodeproj/project.pbxproj: Made Lexer.h private.
17
18 2009-05-05  Darin Adler  <darin@apple.com>
19
20         Reviewed by Sam Weinig.
21
22         Bug 25569: make ParserRefCounted use conventional reference counting
23         https://bugs.webkit.org/show_bug.cgi?id=25569
24
25         SunSpider speedup of about 1.6%.
26
27         * JavaScriptCore.exp: Updated.
28
29         * parser/Nodes.cpp:
30         (JSC::NodeReleaser::releaseAllNodes): ALWAYS_INLINE.
31         (JSC::NodeReleaser::adopt): Ditto.
32         (JSC::ParserRefCounted::ParserRefCounted): Removed most of the code.
33         Add the object to a Vector<RefPtr> that gets cleared after parsing.
34         (JSC::ParserRefCounted::~ParserRefCounted): Removed most of the code.
35
36         * parser/Nodes.h: Made ParserRefCounted inherit from RefCounted and
37         made inline versions of the constructor and destructor. Made the
38         Node constructor inline.
39
40         * parser/Parser.cpp:
41         (JSC::Parser::parse): Call globalData->parserObjects.shrink(0) after
42         parsing, where it used to call ParserRefCounted::deleteNewObjects.
43
44         * runtime/JSGlobalData.cpp:
45         (JSC::JSGlobalData::JSGlobalData): Eliminated code to manage the
46         newParserObjects and parserObjectExtraRefCounts.
47         (JSC::JSGlobalData::~JSGlobalData): Ditto.
48
49         * runtime/JSGlobalData.h: Replaced the HashSet and HashCountedSet
50         with a Vector.
51
52         * wtf/PassRefPtr.h:
53         (WTF::PassRefPtr::~PassRefPtr): The most common thing to do with a
54         PassRefPtr in hot code is to pass it and then destroy it once it's
55         set to zero. Help the optimizer by telling it that's true.
56
57 2009-05-05  Xan Lopez  <xlopez@igalia.com> and Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
58
59         Reviewed by Oliver Hunt.
60
61         Disable the NativeFunctionWrapper for all non-Mac ports for now,
62         as it is also crashing on Linux/x86.
63
64         * runtime/NativeFunctionWrapper.h:
65
66 2009-05-05  Steve Falkenburg  <sfalken@apple.com>
67
68         Fix build.
69
70         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
71         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
72
73 2009-05-05  Oliver Hunt  <oliver@apple.com>
74
75         Reviewed by Maciej Stachowiak.
76
77         Expose toThisObject for the DOM Window
78
79         * JavaScriptCore.exp:
80
81 2009-05-05  Oliver Hunt  <oliver@apple.com>
82
83         Reviewed by NOBODY (Make windows go again until i work out the
84         accursed calling convention).
85
86         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
87         * jit/JIT.cpp:
88         * runtime/NativeFunctionWrapper.h:
89
90 2009-05-05  Oliver Hunt  <oliver@apple.com>
91
92         Reviewed by NOBODY (Fix windows debug builds).
93
94         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
95
96 2009-05-05  Oliver Hunt  <oliver@apple.com>
97
98         Reviewed by NOBODY (Hopefully the last fix).
99
100         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
101
102 2009-05-05  Oliver Hunt  <oliver@apple.com>
103
104         Reviewed by NOBODY (Fix the build fix caused by a different build fix).
105
106         * parser/Nodes.cpp:
107         * parser/Nodes.h:
108
109 2009-05-05  Oliver Hunt  <oliver@apple.com>
110
111         Reviewed by NOBODY (No idea how my changes could have broken these).
112
113         * runtime/DatePrototype.cpp:
114         * runtime/RegExpObject.cpp:
115
116 2009-05-05  Oliver Hunt  <oliver@apple.com>
117
118         Reviewed by NOBODY (Why should i expect msvc to list all the errors in a file?).
119
120         * parser/Nodes.cpp:
121
122 2009-05-05  Oliver Hunt  <oliver@apple.com>
123
124         Reviewed by NOBODY (Fix warning, and another missing include).
125
126         * jit/JIT.cpp:
127         * parser/Nodes.h:
128
129 2009-05-05  Oliver Hunt  <oliver@apple.com>
130
131         Reviewed by NOBODY (More build fixes).
132
133         * runtime/ErrorPrototype.cpp:
134         * runtime/JSGlobalObject.cpp:
135         * runtime/NumberPrototype.cpp:
136         * runtime/ObjectPrototype.cpp:
137         * runtime/StringConstructor.cpp:
138
139 2009-05-05  Oliver Hunt  <oliver@apple.com>
140
141         Reviewed by NOBODY (Will the fixes never end?).
142
143         * runtime/FunctionPrototype.h:
144         * runtime/Lookup.cpp:
145
146 2009-05-05  Oliver Hunt  <oliver@apple.com>
147
148         Reviewed by NOBODY (More build fixes).
149
150         * jit/JIT.cpp:
151
152 2009-05-05  Oliver Hunt  <oliver@apple.com>
153
154         Reviewed by NOBODY (More build fixing).
155
156         * runtime/CallData.h:
157
158 2009-05-05  Oliver Hunt  <oliver@apple.com>
159
160         Reviewed by NOBODY (Build fix).
161
162         * runtime/ArrayConstructor.cpp:
163         * runtime/BooleanPrototype.cpp:
164         * runtime/DateConstructor.cpp:
165         * runtime/Error.cpp:
166         * runtime/ObjectConstructor.cpp:
167         * runtime/RegExpPrototype.cpp:
168
169 2009-05-05  Oliver Hunt  <oliver@apple.com>
170
171         Reviewed by NOBODY (Buildfix).
172
173         Add missing file
174
175         * runtime/NativeFunctionWrapper.h: Copied from JavaScriptCore/jit/ExecutableAllocator.cpp.
176
177 2009-05-05  Oliver Hunt  <oliver@apple.com>
178
179         Reviewed by Gavin Barraclough.
180
181         Bug 25559: Improve native function call performance
182         <https://bugs.webkit.org/show_bug.cgi?id=25559>
183
184         In order to cache calls to native functions we now make the standard
185         prototype functions use a small assembly thunk that converts the JS
186         calling convention into the native calling convention.  As this is
187         only beneficial in the JIT we use the NativeFunctionWrapper typedef
188         to alternate between PrototypeFunction and JSFunction to keep the
189         code sane.  This change from PrototypeFunction to NativeFunctionWrapper
190         is the bulk of this patch.
191
192         * JavaScriptCore.exp:
193         * JavaScriptCore.xcodeproj/project.pbxproj:
194         * assembler/MacroAssemblerX86Common.h:
195         (JSC::MacroAssemblerX86Common::call):
196         * assembler/MacroAssemblerX86_64.h:
197         (JSC::MacroAssemblerX86_64::addPtr):
198         * assembler/X86Assembler.h:
199         (JSC::X86Assembler::leaq_mr):
200         (JSC::X86Assembler::call_m):
201         * interpreter/Interpreter.cpp:
202         (JSC::Interpreter::execute):
203         (JSC::Interpreter::prepareForRepeatCall):
204         * jit/JIT.cpp:
205         (JSC::JIT::privateCompileCTIMachineTrampolines):
206         * jit/JIT.h:
207         (JSC::JIT::compileCTIMachineTrampolines):
208         * jit/JITCall.cpp:
209         (JSC::JIT::linkCall):
210         (JSC::JIT::compileOpCallInitializeCallFrame):
211         (JSC::JIT::compileOpCall):
212         * jit/JITCode.h:
213         (JSC::JITCode::operator bool):
214         * jit/JITInlineMethods.h:
215         (JSC::JIT::emitGetFromCallFrameHeader):
216         (JSC::JIT::emitGetFromCallFrameHeader32):
217         * jit/JITStubs.cpp:
218         (JSC::JITStubs::JITStubs):
219         (JSC::JITStubs::cti_op_call_JSFunction):
220         (JSC::JITStubs::cti_vm_dontLazyLinkCall):
221         (JSC::JITStubs::cti_vm_lazyLinkCall):
222         (JSC::JITStubs::cti_op_construct_JSConstruct):
223         * jit/JITStubs.h:
224         (JSC::JITStubs::ctiNativeCallThunk):
225         * jsc.cpp:
226         (GlobalObject::GlobalObject):
227         * parser/Nodes.cpp:
228         (JSC::FunctionBodyNode::FunctionBodyNode):
229         (JSC::FunctionBodyNode::createNativeThunk):
230         (JSC::FunctionBodyNode::generateJITCode):
231         * parser/Nodes.h:
232         (JSC::FunctionBodyNode::):
233         (JSC::FunctionBodyNode::generatedJITCode):
234         (JSC::FunctionBodyNode::jitCode):
235         * profiler/Profiler.cpp:
236         (JSC::Profiler::createCallIdentifier):
237         * runtime/ArgList.h:
238         * runtime/ArrayPrototype.cpp:
239         (JSC::isNumericCompareFunction):
240         * runtime/BooleanPrototype.cpp:
241         (JSC::BooleanPrototype::BooleanPrototype):
242         * runtime/DateConstructor.cpp:
243         (JSC::DateConstructor::DateConstructor):
244         * runtime/ErrorPrototype.cpp:
245         (JSC::ErrorPrototype::ErrorPrototype):
246         * runtime/FunctionPrototype.cpp:
247         (JSC::FunctionPrototype::addFunctionProperties):
248         (JSC::functionProtoFuncToString):
249         * runtime/FunctionPrototype.h:
250         * runtime/JSFunction.cpp:
251         (JSC::JSFunction::JSFunction):
252         (JSC::JSFunction::~JSFunction):
253         (JSC::JSFunction::mark):
254         (JSC::JSFunction::getCallData):
255         (JSC::JSFunction::call):
256         (JSC::JSFunction::argumentsGetter):
257         (JSC::JSFunction::callerGetter):
258         (JSC::JSFunction::lengthGetter):
259         (JSC::JSFunction::getOwnPropertySlot):
260         (JSC::JSFunction::put):
261         (JSC::JSFunction::deleteProperty):
262         (JSC::JSFunction::getConstructData):
263         (JSC::JSFunction::construct):
264         * runtime/JSFunction.h:
265         (JSC::JSFunction::JSFunction):
266         (JSC::JSFunction::setScope):
267         (JSC::JSFunction::scope):
268         (JSC::JSFunction::isHostFunction):
269         (JSC::JSFunction::scopeChain):
270         (JSC::JSFunction::clearScopeChain):
271         (JSC::JSFunction::setScopeChain):
272         (JSC::JSFunction::nativeFunction):
273         (JSC::JSFunction::setNativeFunction):
274         * runtime/JSGlobalData.cpp:
275         (JSC::JSGlobalData::~JSGlobalData):
276         (JSC::JSGlobalData::createNativeThunk):
277         * runtime/JSGlobalData.h:
278         (JSC::JSGlobalData::nativeFunctionThunk):
279         * runtime/JSGlobalObject.cpp:
280         (JSC::JSGlobalObject::reset):
281         * runtime/JSGlobalObject.h:
282         * runtime/Lookup.cpp:
283         (JSC::setUpStaticFunctionSlot):
284         * runtime/Lookup.h:
285         * runtime/NumberPrototype.cpp:
286         (JSC::NumberPrototype::NumberPrototype):
287         * runtime/ObjectPrototype.cpp:
288         (JSC::ObjectPrototype::ObjectPrototype):
289         * runtime/RegExpPrototype.cpp:
290         (JSC::RegExpPrototype::RegExpPrototype):
291         * runtime/StringConstructor.cpp:
292         (JSC::StringConstructor::StringConstructor):
293
294 2009-05-05  Gavin Barraclough  <barraclough@apple.com>
295
296         Reviewed by Oliver Hunt.
297
298         For convenience, let the sampling flags tool clear multiple flags at once.
299
300         * jsc.cpp:
301         (GlobalObject::GlobalObject):
302         (functionSetSamplingFlags):
303         (functionClearSamplingFlags):
304
305 2009-05-04  Maciej Stachowiak  <mjs@apple.com>
306
307         Rubber stamped by Gavin.
308
309         - inline Vector::resize for a ~1.5% speedup on string-tagcloud
310
311         * wtf/Vector.h:
312         (WTF::Vector::resize): Inline
313
314 2009-05-03  Steve Falkenburg  <sfalken@apple.com>
315
316         Windows build fix.
317
318         * JavaScriptCore.vcproj/JavaScriptCoreSubmit.sln:
319
320 2009-05-03  Mark Rowe  <mrowe@apple.com>
321
322         Fix the 64-bit build.
323
324         * API/APICast.h:
325         (toJS):
326         (toRef):
327         * runtime/JSNumberCell.cpp:
328         (JSC::jsAPIMangledNumber):
329         * runtime/JSNumberCell.h:
330
331 2009-05-02  Sam Weinig  <sam@webkit.org>
332
333         Roll JSC API number marshaling back in one last time (I hope).
334
335 2009-05-03  Sam Weinig  <sam@webkit.org>
336
337         Roll JSC API number marshaling back out. It still breaks windows.
338
339 2009-05-03  Sam Weinig  <sam@webkit.org>
340
341         Roll JSC API number marshaling back in.
342
343 2009-05-02  Darin Adler  <darin@apple.com>
344
345         Reviewed by Maciej Stachowiak.
346
347         Bug 25519: streamline lexer by handling BOMs differently
348         https://bugs.webkit.org/show_bug.cgi?id=25519
349
350         Roughly 1% faster SunSpider.
351
352         * parser/Grammar.y: Tweak formatting a bit.
353
354         * parser/Lexer.cpp:
355         (JSC::Lexer::Lexer): Remove unnnecessary initialization of data members
356         that are set up by setCode.
357         (JSC::Lexer::currentOffset): Added. Used where the old code would look at
358         m_currentOffset.
359         (JSC::Lexer::shift1): Replaces the old shift function. No longer does anything
360         to handle BOM characters.
361         (JSC::Lexer::shift2): Ditto.
362         (JSC::Lexer::shift3): Ditto.
363         (JSC::Lexer::shift4): Ditto.
364         (JSC::Lexer::setCode): Updated for name change from yylineno to m_line.
365         Removed now-unused m_eatNextIdentifier, m_stackToken, and m_restrKeyword.
366         Replaced m_skipLF and m_skipCR with m_skipLineEnd. Replaced the old
367         m_length with m_codeEnd and m_currentOffset with m_codeStart. Added code
368         to scan for a BOM character and call copyCodeWithoutBOMs() if we find any.
369         (JSC::Lexer::copyCodeWithoutBOMs): Added.
370         (JSC::Lexer::nextLine): Updated for name change from yylineno to m_line.
371         (JSC::Lexer::makeIdentifier): Moved up higher in the file.
372         (JSC::Lexer::matchPunctuator): Moved up higher in the file and changed to
373         use a switch statement instead of just if statements.
374         (JSC::Lexer::isLineTerminator): Moved up higher in the file and changed to
375         have fewer branches.
376         (JSC::Lexer::lastTokenWasRestrKeyword): Added. This replaces the old
377         m_restrKeyword boolean.
378         (JSC::Lexer::isIdentStart): Moved up higher in the file. Changed to use
379         fewer branches in the ASCII but not identifier case.
380         (JSC::Lexer::isIdentPart): Ditto.
381         (JSC::Lexer::singleEscape): Moved up higher in the file.
382         (JSC::Lexer::convertOctal): Moved up higher in the file.
383         (JSC::Lexer::convertHex): Moved up higher in the file. Changed to use
384         toASCIIHexValue instead of rolling our own here.
385         (JSC::Lexer::convertUnicode): Ditto.
386         (JSC::Lexer::record8): Moved up higher in the file.
387         (JSC::Lexer::record16): Moved up higher in the file.
388         (JSC::Lexer::lex): Changed type of stringType to int. Replaced m_skipLF
389         and m_skipCR with m_skipLineEnd, which requires fewer branches in the
390         main lexer loop. Use currentOffset instead of m_currentOffset. Removed
391         unneeded m_stackToken. Use isASCIIDigit instead of isDecimalDigit.
392         Split out the two cases for InIdentifierOrKeyword and InIdentifier.
393         Added special case tight loops for identifiers and other simple states.
394         Removed a branch from the code that sets m_atLineStart to false using goto.
395         Streamlined the number-handling code so we don't check for the same types
396         twice for non-numeric cases and don't add a null to m_buffer8 when it's
397         not being used. Removed m_eatNextIdentifier, which wasn't working anyway,
398         and m_restrKeyword, which is redundant with m_lastToken. Set the
399         m_delimited flag without using a branch.
400         (JSC::Lexer::scanRegExp): Tweaked style a bit.
401         (JSC::Lexer::clear): Clear m_codeWithoutBOMs so we don't use memory after
402         parsing. Clear out UString objects in the more conventional way.
403         (JSC::Lexer::sourceCode): Made this no-longer inline since it has more
404         work to do in the case where we stripped BOMs.
405
406         * parser/Lexer.h: Renamed yylineno to m_lineNumber. Removed convertHex
407         function, which is the same as toASCIIHexValue. Removed isHexDigit
408         function, which is the same as isASCIIHedDigit. Replaced shift with four
409         separate shift functions. Removed isWhiteSpace function that passes
410         m_current, instead just passing m_current explicitly. Removed isOctalDigit,
411         which is the same as isASCIIOctalDigit. Eliminated unused arguments from
412         matchPunctuator. Added copyCoodeWithoutBOMs and currentOffset. Moved the
413         makeIdentifier function out of the header. Added lastTokenWasRestrKeyword
414         function. Added new constants for m_skipLineEnd. Removed unused yycolumn,
415         m_restrKeyword, m_skipLF, m_skipCR, m_eatNextIdentifier, m_stackToken,
416         m_position, m_length, m_currentOffset, m_nextOffset1, m_nextOffset2,
417         m_nextOffset3. Added m_skipLineEnd, m_codeStart, m_codeEnd, and
418         m_codeWithoutBOMs.
419
420         * parser/SourceProvider.h: Added hasBOMs function. In the future this can
421         be used to tell the lexer about strings known not to have BOMs.
422
423         * runtime/JSGlobalObjectFunctions.cpp:
424         (JSC::globalFuncUnescape): Changed to use isASCIIHexDigit.
425
426         * wtf/ASCIICType.h: Added using statements to match the design of the
427         other WTF headers.
428
429 2009-05-02  Ada Chan  <adachan@apple.com>
430
431         Fix windows build (when doing a clean build)
432
433         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
434
435 2009-05-02  Geoffrey Garen  <ggaren@apple.com>
436
437         Reviewed by Sam Weinig.
438
439         Simplified null-ish JSValues.
440         
441         Replaced calls to noValue() with calls to JSValue() (which is what
442         noValue() returned). Removed noValue().
443         
444         Replaced almost all uses of jsImpossibleValue() with uses of JSValue().
445         Its one remaining use is for construction of hash table deleted values.
446         For that specific task, I made a new, private constructor with a special
447         tag. Removed jsImpossibleValue().
448         
449         Removed "JSValue()" initialiazers, since default construction happens...
450         by default.
451
452         * API/JSCallbackObjectFunctions.h:
453         (JSC::::call):
454         * bytecompiler/BytecodeGenerator.cpp:
455         (JSC::BytecodeGenerator::emitLoad):
456         * bytecompiler/BytecodeGenerator.h:
457         * debugger/DebuggerCallFrame.cpp:
458         (JSC::DebuggerCallFrame::evaluate):
459         * debugger/DebuggerCallFrame.h:
460         (JSC::DebuggerCallFrame::DebuggerCallFrame):
461         * interpreter/CallFrame.h:
462         (JSC::ExecState::clearException):
463         * interpreter/Interpreter.cpp:
464         (JSC::Interpreter::privateExecute):
465         (JSC::Interpreter::retrieveLastCaller):
466         * interpreter/Register.h:
467         (JSC::Register::Register):
468         * jit/JITCall.cpp:
469         (JSC::JIT::unlinkCall):
470         (JSC::JIT::compileOpCallInitializeCallFrame):
471         (JSC::JIT::compileOpCall):
472         * jit/JITStubs.cpp:
473         (JSC::JITStubs::cti_op_call_eval):
474         (JSC::JITStubs::cti_vm_throw):
475         * profiler/Profiler.cpp:
476         (JSC::Profiler::willExecute):
477         (JSC::Profiler::didExecute):
478         * runtime/ArrayPrototype.cpp:
479         (JSC::getProperty):
480         * runtime/Completion.cpp:
481         (JSC::evaluate):
482         * runtime/Completion.h:
483         (JSC::Completion::Completion):
484         * runtime/GetterSetter.cpp:
485         (JSC::GetterSetter::getPrimitiveNumber):
486         * runtime/JSArray.cpp:
487         (JSC::JSArray::putSlowCase):
488         (JSC::JSArray::deleteProperty):
489         (JSC::JSArray::increaseVectorLength):
490         (JSC::JSArray::setLength):
491         (JSC::JSArray::pop):
492         (JSC::JSArray::sort):
493         (JSC::JSArray::compactForSorting):
494         * runtime/JSCell.cpp:
495         (JSC::JSCell::getJSNumber):
496         * runtime/JSCell.h:
497         (JSC::JSValue::getJSNumber):
498         * runtime/JSGlobalData.cpp:
499         (JSC::JSGlobalData::JSGlobalData):
500         * runtime/JSImmediate.h:
501         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
502         (JSC::JSImmediate::from):
503         * runtime/JSNumberCell.cpp:
504         (JSC::jsNumberCell):
505         * runtime/JSObject.cpp:
506         (JSC::callDefaultValueFunction):
507         * runtime/JSObject.h:
508         (JSC::JSObject::getDirect):
509         * runtime/JSPropertyNameIterator.cpp:
510         (JSC::JSPropertyNameIterator::toPrimitive):
511         * runtime/JSPropertyNameIterator.h:
512         (JSC::JSPropertyNameIterator::next):
513         * runtime/JSValue.h:
514         (JSC::JSValue::):
515         (JSC::JSValueHashTraits::constructDeletedValue):
516         (JSC::JSValueHashTraits::isDeletedValue):
517         (JSC::JSValue::JSValue):
518         * runtime/JSWrapperObject.h:
519         (JSC::JSWrapperObject::JSWrapperObject):
520         * runtime/Operations.h:
521         (JSC::resolveBase):
522         * runtime/PropertySlot.h:
523         (JSC::PropertySlot::clearBase):
524         (JSC::PropertySlot::clearValue):
525
526 2009-05-02  Maciej Stachowiak  <mjs@apple.com>
527
528         Reviewed by Cameron Zwarich.
529
530         - speed up the lexer in various ways
531
532         ~2% command-line SunSpider speedup
533
534         * parser/Lexer.cpp:
535         (JSC::Lexer::setCode): Moved below shift() so it can inline.
536         (JSC::Lexer::scanRegExp):  Use resize(0) instead of clear() on Vectors, since the intent
537         here is not to free the underlying buffer.
538         (JSC::Lexer::lex): ditto; also, change the loop logic a bit for the main lexing loop
539         to avoid branching on !m_done twice per iteration. Now we only check it once.
540         (JSC::Lexer::shift): Make this ALWAYS_INLINE and tag an unusual branch as UNLIKELY
541         * parser/Lexer.h:
542         (JSC::Lexer::makeIdentifier): force to be ALWAYS_INLINE
543         * wtf/Vector.h:
544         (WTF::::append): force to be ALWAYS_INLINE (may have helped in ways other than parsing but it wasn't
545         getting inlined in a hot code path in the lexer)
546
547 2009-05-01  Steve Falkenburg  <sfalken@apple.com>
548
549         Windows build fix.
550
551         * JavaScriptCore.vcproj/JavaScriptCore.make:
552
553 2009-05-01  Sam Weinig  <sam@webkit.org>
554
555         Fix 64bit build.
556
557         * runtime/JSNumberCell.h:
558         (JSC::JSValue::JSValue):
559         * runtime/JSValue.h:
560         (JSC::jsNumber):
561
562 2009-05-01  Sam Weinig  <sam@webkit.org>
563
564         Roll out JavaScriptCore API number marshaling.
565
566         * API/APICast.h:
567         (toJS):
568         (toRef):
569         * API/JSBase.cpp:
570         (JSEvaluateScript):
571         (JSCheckScriptSyntax):
572         * API/JSCallbackConstructor.cpp:
573         (JSC::constructJSCallback):
574         * API/JSCallbackFunction.cpp:
575         (JSC::JSCallbackFunction::call):
576         * API/JSCallbackObjectFunctions.h:
577         (JSC::::getOwnPropertySlot):
578         (JSC::::put):
579         (JSC::::deleteProperty):
580         (JSC::::construct):
581         (JSC::::hasInstance):
582         (JSC::::call):
583         (JSC::::toNumber):
584         (JSC::::toString):
585         (JSC::::staticValueGetter):
586         (JSC::::callbackGetter):
587         * API/JSObjectRef.cpp:
588         (JSObjectMakeFunction):
589         (JSObjectMakeArray):
590         (JSObjectMakeDate):
591         (JSObjectMakeError):
592         (JSObjectMakeRegExp):
593         (JSObjectGetPrototype):
594         (JSObjectSetPrototype):
595         (JSObjectGetProperty):
596         (JSObjectSetProperty):
597         (JSObjectGetPropertyAtIndex):
598         (JSObjectSetPropertyAtIndex):
599         (JSObjectDeleteProperty):
600         (JSObjectCallAsFunction):
601         (JSObjectCallAsConstructor):
602         * API/JSValueRef.cpp:
603         (JSValueGetType):
604         (JSValueIsUndefined):
605         (JSValueIsNull):
606         (JSValueIsBoolean):
607         (JSValueIsNumber):
608         (JSValueIsString):
609         (JSValueIsObject):
610         (JSValueIsObjectOfClass):
611         (JSValueIsEqual):
612         (JSValueIsStrictEqual):
613         (JSValueIsInstanceOfConstructor):
614         (JSValueMakeUndefined):
615         (JSValueMakeNull):
616         (JSValueMakeBoolean):
617         (JSValueMakeNumber):
618         (JSValueMakeString):
619         (JSValueToBoolean):
620         (JSValueToNumber):
621         (JSValueToStringCopy):
622         (JSValueToObject):
623         (JSValueProtect):
624         (JSValueUnprotect):
625         * JavaScriptCore.exp:
626         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
627         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
628         * runtime/JSNumberCell.cpp:
629         * runtime/JSNumberCell.h:
630         * runtime/JSValue.h:
631
632 2009-05-01  Sam Weinig  <sam@webkit.org>
633
634         Fix windows build.
635
636         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
637         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
638
639 2009-05-01  Sam Weinig  <sam@webkit.org>
640
641         Fix the build.
642
643         * JavaScriptCore.exp:
644
645 2009-05-01  Sam Weinig  <sam@webkit.org>
646
647         Reviewed by Geoffrey "Too Far!" Garen.
648
649         Move JS number construction into JSValue.
650
651         * runtime/JSImmediate.h:
652         * runtime/JSNumberCell.h:
653         (JSC::JSValue::JSValue):
654         * runtime/JSValue.h:
655         (JSC::jsNumber):
656
657 2009-05-01  Sam Weinig  <sam@webkit.org>
658
659         Reviewed by Geoff "The Minneapolis" Garen.
660
661         Add mechanism to vend heap allocated JS numbers to JavaScriptCore API clients with a
662         representation that is independent of the number representation in the VM.
663         - Numbers leaving the interpreter are converted to a tagged JSNumberCell.
664         - The numbers coming into the interpreter (asserted to be the tagged JSNumberCell) are
665           converted back to the VM's internal number representation.
666
667         * API/APICast.h:
668         (toJS):
669         (toRef):
670         * API/JSBase.cpp:
671         (JSEvaluateScript):
672         (JSCheckScriptSyntax):
673         * API/JSCallbackConstructor.cpp:
674         (JSC::constructJSCallback):
675         * API/JSCallbackFunction.cpp:
676         (JSC::JSCallbackFunction::call):
677         * API/JSCallbackObjectFunctions.h:
678         (JSC::::getOwnPropertySlot):
679         (JSC::::put):
680         (JSC::::deleteProperty):
681         (JSC::::construct):
682         (JSC::::hasInstance):
683         (JSC::::call):
684         (JSC::::toNumber):
685         (JSC::::toString):
686         (JSC::::staticValueGetter):
687         (JSC::::callbackGetter):
688         * API/JSObjectRef.cpp:
689         (JSObjectMakeFunction):
690         (JSObjectMakeArray):
691         (JSObjectMakeDate):
692         (JSObjectMakeError):
693         (JSObjectMakeRegExp):
694         (JSObjectGetPrototype):
695         (JSObjectSetPrototype):
696         (JSObjectGetProperty):
697         (JSObjectSetProperty):
698         (JSObjectGetPropertyAtIndex):
699         (JSObjectSetPropertyAtIndex):
700         (JSObjectDeleteProperty):
701         (JSObjectCallAsFunction):
702         (JSObjectCallAsConstructor):
703         * API/JSValueRef.cpp:
704         (JSValueGetType):
705         (JSValueIsUndefined):
706         (JSValueIsNull):
707         (JSValueIsBoolean):
708         (JSValueIsNumber):
709         (JSValueIsString):
710         (JSValueIsObject):
711         (JSValueIsObjectOfClass):
712         (JSValueIsEqual):
713         (JSValueIsStrictEqual):
714         (JSValueIsInstanceOfConstructor):
715         (JSValueMakeUndefined):
716         (JSValueMakeNull):
717         (JSValueMakeBoolean):
718         (JSValueMakeNumber):
719         (JSValueMakeString):
720         (JSValueToBoolean):
721         (JSValueToNumber):
722         (JSValueToStringCopy):
723         (JSValueToObject):
724         (JSValueProtect):
725         (JSValueUnprotect):
726         * runtime/JSNumberCell.cpp:
727         (JSC::jsAPIMangledNumber):
728         * runtime/JSNumberCell.h:
729         (JSC::JSNumberCell::isAPIMangledNumber):
730         (JSC::JSNumberCell::):
731         (JSC::JSNumberCell::JSNumberCell):
732         (JSC::JSValue::isAPIMangledNumber):
733         * runtime/JSValue.h:
734
735 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
736
737         Windows build fix take 6.
738
739         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
740
741 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
742
743         Windows build fix take 5.
744
745         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
746
747 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
748
749         Windows build fix take 4.
750
751         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
752
753 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
754
755         Windows build fix take 3.
756
757         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
758
759 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
760
761         Windows build fix take 2.
762
763         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
764
765 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
766
767         Windows build fix take 1.
768
769         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
770         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
771
772 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
773
774         Rubber Stamped by Sam Weinig.
775         
776         Renamed JSValuePtr => JSValue.
777
778         * API/APICast.h:
779         (toJS):
780         (toRef):
781         * API/JSCallbackConstructor.h:
782         (JSC::JSCallbackConstructor::createStructure):
783         * API/JSCallbackFunction.cpp:
784         (JSC::JSCallbackFunction::call):
785         * API/JSCallbackFunction.h:
786         (JSC::JSCallbackFunction::createStructure):
787         * API/JSCallbackObject.h:
788         (JSC::JSCallbackObject::createStructure):
789         * API/JSCallbackObjectFunctions.h:
790         (JSC::::asCallbackObject):
791         (JSC::::put):
792         (JSC::::hasInstance):
793         (JSC::::call):
794         (JSC::::staticValueGetter):
795         (JSC::::staticFunctionGetter):
796         (JSC::::callbackGetter):
797         * API/JSContextRef.cpp:
798         * API/JSObjectRef.cpp:
799         (JSObjectMakeConstructor):
800         (JSObjectSetPrototype):
801         (JSObjectGetProperty):
802         (JSObjectSetProperty):
803         (JSObjectGetPropertyAtIndex):
804         (JSObjectSetPropertyAtIndex):
805         * API/JSValueRef.cpp:
806         (JSValueGetType):
807         (JSValueIsUndefined):
808         (JSValueIsNull):
809         (JSValueIsBoolean):
810         (JSValueIsNumber):
811         (JSValueIsString):
812         (JSValueIsObject):
813         (JSValueIsObjectOfClass):
814         (JSValueIsEqual):
815         (JSValueIsStrictEqual):
816         (JSValueIsInstanceOfConstructor):
817         (JSValueToBoolean):
818         (JSValueToNumber):
819         (JSValueToStringCopy):
820         (JSValueToObject):
821         (JSValueProtect):
822         (JSValueUnprotect):
823         * JavaScriptCore.exp:
824         * bytecode/CodeBlock.cpp:
825         (JSC::valueToSourceString):
826         (JSC::constantName):
827         (JSC::CodeBlock::dump):
828         * bytecode/CodeBlock.h:
829         (JSC::CodeBlock::getConstant):
830         (JSC::CodeBlock::addUnexpectedConstant):
831         (JSC::CodeBlock::unexpectedConstant):
832         * bytecode/EvalCodeCache.h:
833         (JSC::EvalCodeCache::get):
834         * bytecompiler/BytecodeGenerator.cpp:
835         (JSC::BytecodeGenerator::addConstant):
836         (JSC::BytecodeGenerator::addUnexpectedConstant):
837         (JSC::BytecodeGenerator::emitLoad):
838         (JSC::BytecodeGenerator::emitGetScopedVar):
839         (JSC::BytecodeGenerator::emitPutScopedVar):
840         (JSC::BytecodeGenerator::emitNewError):
841         (JSC::keyForImmediateSwitch):
842         * bytecompiler/BytecodeGenerator.h:
843         (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue):
844         (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue):
845         * debugger/Debugger.cpp:
846         (JSC::evaluateInGlobalCallFrame):
847         * debugger/Debugger.h:
848         * debugger/DebuggerActivation.cpp:
849         (JSC::DebuggerActivation::put):
850         (JSC::DebuggerActivation::putWithAttributes):
851         (JSC::DebuggerActivation::lookupGetter):
852         (JSC::DebuggerActivation::lookupSetter):
853         * debugger/DebuggerActivation.h:
854         (JSC::DebuggerActivation::createStructure):
855         * debugger/DebuggerCallFrame.cpp:
856         (JSC::DebuggerCallFrame::evaluate):
857         * debugger/DebuggerCallFrame.h:
858         (JSC::DebuggerCallFrame::DebuggerCallFrame):
859         (JSC::DebuggerCallFrame::exception):
860         * interpreter/CachedCall.h:
861         (JSC::CachedCall::CachedCall):
862         (JSC::CachedCall::call):
863         (JSC::CachedCall::setThis):
864         (JSC::CachedCall::setArgument):
865         * interpreter/CallFrame.cpp:
866         (JSC::CallFrame::thisValue):
867         (JSC::CallFrame::dumpCaller):
868         * interpreter/CallFrame.h:
869         (JSC::ExecState::setException):
870         (JSC::ExecState::exception):
871         (JSC::ExecState::exceptionSlot):
872         * interpreter/CallFrameClosure.h:
873         (JSC::CallFrameClosure::setArgument):
874         * interpreter/Interpreter.cpp:
875         (JSC::Interpreter::resolve):
876         (JSC::Interpreter::resolveSkip):
877         (JSC::Interpreter::resolveGlobal):
878         (JSC::Interpreter::resolveBase):
879         (JSC::Interpreter::resolveBaseAndProperty):
880         (JSC::Interpreter::resolveBaseAndFunc):
881         (JSC::isNotObject):
882         (JSC::Interpreter::callEval):
883         (JSC::Interpreter::unwindCallFrame):
884         (JSC::Interpreter::throwException):
885         (JSC::Interpreter::execute):
886         (JSC::Interpreter::prepareForRepeatCall):
887         (JSC::Interpreter::createExceptionScope):
888         (JSC::Interpreter::tryCachePutByID):
889         (JSC::Interpreter::tryCacheGetByID):
890         (JSC::Interpreter::privateExecute):
891         (JSC::Interpreter::retrieveArguments):
892         (JSC::Interpreter::retrieveCaller):
893         (JSC::Interpreter::retrieveLastCaller):
894         * interpreter/Interpreter.h:
895         * interpreter/Register.h:
896         (JSC::Register::):
897         (JSC::Register::Register):
898         (JSC::Register::jsValue):
899         * jit/JIT.cpp:
900         (JSC::):
901         (JSC::JIT::privateCompileMainPass):
902         * jit/JIT.h:
903         * jit/JITArithmetic.cpp:
904         (JSC::JIT::compileFastArith_op_mod):
905         * jit/JITCall.cpp:
906         (JSC::JIT::unlinkCall):
907         (JSC::JIT::compileOpCallInitializeCallFrame):
908         (JSC::JIT::compileOpCall):
909         * jit/JITCode.h:
910         (JSC::):
911         (JSC::JITCode::execute):
912         * jit/JITInlineMethods.h:
913         (JSC::JIT::emitGetVirtualRegister):
914         (JSC::JIT::getConstantOperand):
915         (JSC::JIT::emitPutJITStubArgFromVirtualRegister):
916         (JSC::JIT::emitInitRegister):
917         * jit/JITPropertyAccess.cpp:
918         (JSC::JIT::privateCompilePutByIdTransition):
919         (JSC::JIT::patchGetByIdSelf):
920         (JSC::JIT::patchPutByIdReplace):
921         (JSC::JIT::privateCompileGetByIdSelf):
922         (JSC::JIT::privateCompileGetByIdProto):
923         (JSC::JIT::privateCompileGetByIdSelfList):
924         (JSC::JIT::privateCompileGetByIdProtoList):
925         (JSC::JIT::privateCompileGetByIdChainList):
926         (JSC::JIT::privateCompileGetByIdChain):
927         (JSC::JIT::privateCompilePutByIdReplace):
928         * jit/JITStubs.cpp:
929         (JSC::JITStubs::tryCachePutByID):
930         (JSC::JITStubs::tryCacheGetByID):
931         (JSC::JITStubs::cti_op_convert_this):
932         (JSC::JITStubs::cti_op_add):
933         (JSC::JITStubs::cti_op_pre_inc):
934         (JSC::JITStubs::cti_op_loop_if_less):
935         (JSC::JITStubs::cti_op_loop_if_lesseq):
936         (JSC::JITStubs::cti_op_get_by_id_generic):
937         (JSC::JITStubs::cti_op_get_by_id):
938         (JSC::JITStubs::cti_op_get_by_id_second):
939         (JSC::JITStubs::cti_op_get_by_id_self_fail):
940         (JSC::JITStubs::cti_op_get_by_id_proto_list):
941         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
942         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
943         (JSC::JITStubs::cti_op_get_by_id_array_fail):
944         (JSC::JITStubs::cti_op_get_by_id_string_fail):
945         (JSC::JITStubs::cti_op_instanceof):
946         (JSC::JITStubs::cti_op_del_by_id):
947         (JSC::JITStubs::cti_op_mul):
948         (JSC::JITStubs::cti_op_call_NotJSFunction):
949         (JSC::JITStubs::cti_op_resolve):
950         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
951         (JSC::JITStubs::cti_op_get_by_val):
952         (JSC::JITStubs::cti_op_get_by_val_string):
953         (JSC::JITStubs::cti_op_get_by_val_byte_array):
954         (JSC::JITStubs::cti_op_resolve_func):
955         (JSC::JITStubs::cti_op_sub):
956         (JSC::JITStubs::cti_op_put_by_val):
957         (JSC::JITStubs::cti_op_put_by_val_array):
958         (JSC::JITStubs::cti_op_put_by_val_byte_array):
959         (JSC::JITStubs::cti_op_lesseq):
960         (JSC::JITStubs::cti_op_loop_if_true):
961         (JSC::JITStubs::cti_op_load_varargs):
962         (JSC::JITStubs::cti_op_negate):
963         (JSC::JITStubs::cti_op_resolve_base):
964         (JSC::JITStubs::cti_op_resolve_skip):
965         (JSC::JITStubs::cti_op_resolve_global):
966         (JSC::JITStubs::cti_op_div):
967         (JSC::JITStubs::cti_op_pre_dec):
968         (JSC::JITStubs::cti_op_jless):
969         (JSC::JITStubs::cti_op_not):
970         (JSC::JITStubs::cti_op_jtrue):
971         (JSC::JITStubs::cti_op_post_inc):
972         (JSC::JITStubs::cti_op_eq):
973         (JSC::JITStubs::cti_op_lshift):
974         (JSC::JITStubs::cti_op_bitand):
975         (JSC::JITStubs::cti_op_rshift):
976         (JSC::JITStubs::cti_op_bitnot):
977         (JSC::JITStubs::cti_op_resolve_with_base):
978         (JSC::JITStubs::cti_op_mod):
979         (JSC::JITStubs::cti_op_less):
980         (JSC::JITStubs::cti_op_neq):
981         (JSC::JITStubs::cti_op_post_dec):
982         (JSC::JITStubs::cti_op_urshift):
983         (JSC::JITStubs::cti_op_bitxor):
984         (JSC::JITStubs::cti_op_bitor):
985         (JSC::JITStubs::cti_op_call_eval):
986         (JSC::JITStubs::cti_op_throw):
987         (JSC::JITStubs::cti_op_next_pname):
988         (JSC::JITStubs::cti_op_typeof):
989         (JSC::JITStubs::cti_op_is_undefined):
990         (JSC::JITStubs::cti_op_is_boolean):
991         (JSC::JITStubs::cti_op_is_number):
992         (JSC::JITStubs::cti_op_is_string):
993         (JSC::JITStubs::cti_op_is_object):
994         (JSC::JITStubs::cti_op_is_function):
995         (JSC::JITStubs::cti_op_stricteq):
996         (JSC::JITStubs::cti_op_nstricteq):
997         (JSC::JITStubs::cti_op_to_jsnumber):
998         (JSC::JITStubs::cti_op_in):
999         (JSC::JITStubs::cti_op_switch_imm):
1000         (JSC::JITStubs::cti_op_switch_char):
1001         (JSC::JITStubs::cti_op_switch_string):
1002         (JSC::JITStubs::cti_op_del_by_val):
1003         (JSC::JITStubs::cti_op_new_error):
1004         (JSC::JITStubs::cti_vm_throw):
1005         * jit/JITStubs.h:
1006         * jsc.cpp:
1007         (functionPrint):
1008         (functionDebug):
1009         (functionGC):
1010         (functionVersion):
1011         (functionRun):
1012         (functionLoad):
1013         (functionSetSamplingFlag):
1014         (functionClearSamplingFlag):
1015         (functionReadline):
1016         (functionQuit):
1017         * parser/Nodes.cpp:
1018         (JSC::processClauseList):
1019         * profiler/ProfileGenerator.cpp:
1020         (JSC::ProfileGenerator::addParentForConsoleStart):
1021         * profiler/Profiler.cpp:
1022         (JSC::Profiler::willExecute):
1023         (JSC::Profiler::didExecute):
1024         (JSC::Profiler::createCallIdentifier):
1025         * profiler/Profiler.h:
1026         * runtime/ArgList.cpp:
1027         (JSC::MarkedArgumentBuffer::slowAppend):
1028         * runtime/ArgList.h:
1029         (JSC::MarkedArgumentBuffer::at):
1030         (JSC::MarkedArgumentBuffer::append):
1031         (JSC::ArgList::ArgList):
1032         (JSC::ArgList::at):
1033         * runtime/Arguments.cpp:
1034         (JSC::Arguments::put):
1035         * runtime/Arguments.h:
1036         (JSC::Arguments::createStructure):
1037         (JSC::asArguments):
1038         * runtime/ArrayConstructor.cpp:
1039         (JSC::callArrayConstructor):
1040         * runtime/ArrayPrototype.cpp:
1041         (JSC::getProperty):
1042         (JSC::putProperty):
1043         (JSC::arrayProtoFuncToString):
1044         (JSC::arrayProtoFuncToLocaleString):
1045         (JSC::arrayProtoFuncJoin):
1046         (JSC::arrayProtoFuncConcat):
1047         (JSC::arrayProtoFuncPop):
1048         (JSC::arrayProtoFuncPush):
1049         (JSC::arrayProtoFuncReverse):
1050         (JSC::arrayProtoFuncShift):
1051         (JSC::arrayProtoFuncSlice):
1052         (JSC::arrayProtoFuncSort):
1053         (JSC::arrayProtoFuncSplice):
1054         (JSC::arrayProtoFuncUnShift):
1055         (JSC::arrayProtoFuncFilter):
1056         (JSC::arrayProtoFuncMap):
1057         (JSC::arrayProtoFuncEvery):
1058         (JSC::arrayProtoFuncForEach):
1059         (JSC::arrayProtoFuncSome):
1060         (JSC::arrayProtoFuncReduce):
1061         (JSC::arrayProtoFuncReduceRight):
1062         (JSC::arrayProtoFuncIndexOf):
1063         (JSC::arrayProtoFuncLastIndexOf):
1064         * runtime/BooleanConstructor.cpp:
1065         (JSC::callBooleanConstructor):
1066         (JSC::constructBooleanFromImmediateBoolean):
1067         * runtime/BooleanConstructor.h:
1068         * runtime/BooleanObject.h:
1069         (JSC::asBooleanObject):
1070         * runtime/BooleanPrototype.cpp:
1071         (JSC::booleanProtoFuncToString):
1072         (JSC::booleanProtoFuncValueOf):
1073         * runtime/CallData.cpp:
1074         (JSC::call):
1075         * runtime/CallData.h:
1076         * runtime/Collector.cpp:
1077         (JSC::Heap::protect):
1078         (JSC::Heap::unprotect):
1079         (JSC::Heap::heap):
1080         * runtime/Collector.h:
1081         * runtime/Completion.cpp:
1082         (JSC::evaluate):
1083         * runtime/Completion.h:
1084         (JSC::Completion::Completion):
1085         (JSC::Completion::value):
1086         (JSC::Completion::setValue):
1087         * runtime/ConstructData.cpp:
1088         (JSC::construct):
1089         * runtime/ConstructData.h:
1090         * runtime/DateConstructor.cpp:
1091         (JSC::constructDate):
1092         (JSC::callDate):
1093         (JSC::dateParse):
1094         (JSC::dateNow):
1095         (JSC::dateUTC):
1096         * runtime/DateInstance.h:
1097         (JSC::asDateInstance):
1098         * runtime/DatePrototype.cpp:
1099         (JSC::dateProtoFuncToString):
1100         (JSC::dateProtoFuncToUTCString):
1101         (JSC::dateProtoFuncToDateString):
1102         (JSC::dateProtoFuncToTimeString):
1103         (JSC::dateProtoFuncToLocaleString):
1104         (JSC::dateProtoFuncToLocaleDateString):
1105         (JSC::dateProtoFuncToLocaleTimeString):
1106         (JSC::dateProtoFuncGetTime):
1107         (JSC::dateProtoFuncGetFullYear):
1108         (JSC::dateProtoFuncGetUTCFullYear):
1109         (JSC::dateProtoFuncToGMTString):
1110         (JSC::dateProtoFuncGetMonth):
1111         (JSC::dateProtoFuncGetUTCMonth):
1112         (JSC::dateProtoFuncGetDate):
1113         (JSC::dateProtoFuncGetUTCDate):
1114         (JSC::dateProtoFuncGetDay):
1115         (JSC::dateProtoFuncGetUTCDay):
1116         (JSC::dateProtoFuncGetHours):
1117         (JSC::dateProtoFuncGetUTCHours):
1118         (JSC::dateProtoFuncGetMinutes):
1119         (JSC::dateProtoFuncGetUTCMinutes):
1120         (JSC::dateProtoFuncGetSeconds):
1121         (JSC::dateProtoFuncGetUTCSeconds):
1122         (JSC::dateProtoFuncGetMilliSeconds):
1123         (JSC::dateProtoFuncGetUTCMilliseconds):
1124         (JSC::dateProtoFuncGetTimezoneOffset):
1125         (JSC::dateProtoFuncSetTime):
1126         (JSC::setNewValueFromTimeArgs):
1127         (JSC::setNewValueFromDateArgs):
1128         (JSC::dateProtoFuncSetMilliSeconds):
1129         (JSC::dateProtoFuncSetUTCMilliseconds):
1130         (JSC::dateProtoFuncSetSeconds):
1131         (JSC::dateProtoFuncSetUTCSeconds):
1132         (JSC::dateProtoFuncSetMinutes):
1133         (JSC::dateProtoFuncSetUTCMinutes):
1134         (JSC::dateProtoFuncSetHours):
1135         (JSC::dateProtoFuncSetUTCHours):
1136         (JSC::dateProtoFuncSetDate):
1137         (JSC::dateProtoFuncSetUTCDate):
1138         (JSC::dateProtoFuncSetMonth):
1139         (JSC::dateProtoFuncSetUTCMonth):
1140         (JSC::dateProtoFuncSetFullYear):
1141         (JSC::dateProtoFuncSetUTCFullYear):
1142         (JSC::dateProtoFuncSetYear):
1143         (JSC::dateProtoFuncGetYear):
1144         * runtime/DatePrototype.h:
1145         (JSC::DatePrototype::createStructure):
1146         * runtime/ErrorConstructor.cpp:
1147         (JSC::callErrorConstructor):
1148         * runtime/ErrorPrototype.cpp:
1149         (JSC::errorProtoFuncToString):
1150         * runtime/ExceptionHelpers.cpp:
1151         (JSC::createInterruptedExecutionException):
1152         (JSC::createError):
1153         (JSC::createStackOverflowError):
1154         (JSC::createUndefinedVariableError):
1155         (JSC::createErrorMessage):
1156         (JSC::createInvalidParamError):
1157         (JSC::createNotAConstructorError):
1158         (JSC::createNotAFunctionError):
1159         * runtime/ExceptionHelpers.h:
1160         * runtime/FunctionConstructor.cpp:
1161         (JSC::callFunctionConstructor):
1162         * runtime/FunctionPrototype.cpp:
1163         (JSC::callFunctionPrototype):
1164         (JSC::functionProtoFuncToString):
1165         (JSC::functionProtoFuncApply):
1166         (JSC::functionProtoFuncCall):
1167         * runtime/FunctionPrototype.h:
1168         (JSC::FunctionPrototype::createStructure):
1169         * runtime/GetterSetter.cpp:
1170         (JSC::GetterSetter::toPrimitive):
1171         (JSC::GetterSetter::getPrimitiveNumber):
1172         * runtime/GetterSetter.h:
1173         (JSC::asGetterSetter):
1174         * runtime/InternalFunction.cpp:
1175         (JSC::InternalFunction::displayName):
1176         * runtime/InternalFunction.h:
1177         (JSC::InternalFunction::createStructure):
1178         (JSC::asInternalFunction):
1179         * runtime/JSActivation.cpp:
1180         (JSC::JSActivation::getOwnPropertySlot):
1181         (JSC::JSActivation::put):
1182         (JSC::JSActivation::putWithAttributes):
1183         (JSC::JSActivation::argumentsGetter):
1184         * runtime/JSActivation.h:
1185         (JSC::JSActivation::createStructure):
1186         (JSC::asActivation):
1187         * runtime/JSArray.cpp:
1188         (JSC::storageSize):
1189         (JSC::JSArray::JSArray):
1190         (JSC::JSArray::getOwnPropertySlot):
1191         (JSC::JSArray::put):
1192         (JSC::JSArray::putSlowCase):
1193         (JSC::JSArray::deleteProperty):
1194         (JSC::JSArray::setLength):
1195         (JSC::JSArray::pop):
1196         (JSC::JSArray::push):
1197         (JSC::JSArray::mark):
1198         (JSC::compareNumbersForQSort):
1199         (JSC::JSArray::sortNumeric):
1200         (JSC::JSArray::sort):
1201         (JSC::JSArray::compactForSorting):
1202         (JSC::JSArray::checkConsistency):
1203         (JSC::constructArray):
1204         * runtime/JSArray.h:
1205         (JSC::JSArray::getIndex):
1206         (JSC::JSArray::setIndex):
1207         (JSC::JSArray::createStructure):
1208         (JSC::asArray):
1209         (JSC::isJSArray):
1210         * runtime/JSByteArray.cpp:
1211         (JSC::JSByteArray::createStructure):
1212         (JSC::JSByteArray::put):
1213         * runtime/JSByteArray.h:
1214         (JSC::JSByteArray::getIndex):
1215         (JSC::JSByteArray::setIndex):
1216         (JSC::asByteArray):
1217         (JSC::isJSByteArray):
1218         * runtime/JSCell.cpp:
1219         (JSC::JSCell::put):
1220         (JSC::JSCell::getJSNumber):
1221         * runtime/JSCell.h:
1222         (JSC::asCell):
1223         (JSC::JSValue::asCell):
1224         (JSC::JSValue::isString):
1225         (JSC::JSValue::isGetterSetter):
1226         (JSC::JSValue::isObject):
1227         (JSC::JSValue::getString):
1228         (JSC::JSValue::getObject):
1229         (JSC::JSValue::getCallData):
1230         (JSC::JSValue::getConstructData):
1231         (JSC::JSValue::getUInt32):
1232         (JSC::JSValue::getTruncatedInt32):
1233         (JSC::JSValue::getTruncatedUInt32):
1234         (JSC::JSValue::mark):
1235         (JSC::JSValue::marked):
1236         (JSC::JSValue::toPrimitive):
1237         (JSC::JSValue::getPrimitiveNumber):
1238         (JSC::JSValue::toBoolean):
1239         (JSC::JSValue::toNumber):
1240         (JSC::JSValue::toString):
1241         (JSC::JSValue::toObject):
1242         (JSC::JSValue::toThisObject):
1243         (JSC::JSValue::needsThisConversion):
1244         (JSC::JSValue::toThisString):
1245         (JSC::JSValue::getJSNumber):
1246         * runtime/JSFunction.cpp:
1247         (JSC::JSFunction::call):
1248         (JSC::JSFunction::argumentsGetter):
1249         (JSC::JSFunction::callerGetter):
1250         (JSC::JSFunction::lengthGetter):
1251         (JSC::JSFunction::getOwnPropertySlot):
1252         (JSC::JSFunction::put):
1253         (JSC::JSFunction::construct):
1254         * runtime/JSFunction.h:
1255         (JSC::JSFunction::createStructure):
1256         (JSC::asFunction):
1257         * runtime/JSGlobalData.h:
1258         * runtime/JSGlobalObject.cpp:
1259         (JSC::markIfNeeded):
1260         (JSC::JSGlobalObject::put):
1261         (JSC::JSGlobalObject::putWithAttributes):
1262         (JSC::JSGlobalObject::reset):
1263         (JSC::JSGlobalObject::resetPrototype):
1264         * runtime/JSGlobalObject.h:
1265         (JSC::JSGlobalObject::createStructure):
1266         (JSC::JSGlobalObject::GlobalPropertyInfo::GlobalPropertyInfo):
1267         (JSC::asGlobalObject):
1268         (JSC::Structure::prototypeForLookup):
1269         (JSC::Structure::prototypeChain):
1270         (JSC::Structure::isValid):
1271         * runtime/JSGlobalObjectFunctions.cpp:
1272         (JSC::encode):
1273         (JSC::decode):
1274         (JSC::globalFuncEval):
1275         (JSC::globalFuncParseInt):
1276         (JSC::globalFuncParseFloat):
1277         (JSC::globalFuncIsNaN):
1278         (JSC::globalFuncIsFinite):
1279         (JSC::globalFuncDecodeURI):
1280         (JSC::globalFuncDecodeURIComponent):
1281         (JSC::globalFuncEncodeURI):
1282         (JSC::globalFuncEncodeURIComponent):
1283         (JSC::globalFuncEscape):
1284         (JSC::globalFuncUnescape):
1285         (JSC::globalFuncJSCPrint):
1286         * runtime/JSGlobalObjectFunctions.h:
1287         * runtime/JSImmediate.cpp:
1288         (JSC::JSImmediate::toThisObject):
1289         (JSC::JSImmediate::toObject):
1290         (JSC::JSImmediate::prototype):
1291         (JSC::JSImmediate::toString):
1292         * runtime/JSImmediate.h:
1293         (JSC::JSImmediate::isImmediate):
1294         (JSC::JSImmediate::isNumber):
1295         (JSC::JSImmediate::isIntegerNumber):
1296         (JSC::JSImmediate::isDoubleNumber):
1297         (JSC::JSImmediate::isPositiveIntegerNumber):
1298         (JSC::JSImmediate::isBoolean):
1299         (JSC::JSImmediate::isUndefinedOrNull):
1300         (JSC::JSImmediate::isEitherImmediate):
1301         (JSC::JSImmediate::areBothImmediate):
1302         (JSC::JSImmediate::areBothImmediateIntegerNumbers):
1303         (JSC::JSImmediate::makeValue):
1304         (JSC::JSImmediate::makeInt):
1305         (JSC::JSImmediate::makeDouble):
1306         (JSC::JSImmediate::makeBool):
1307         (JSC::JSImmediate::makeUndefined):
1308         (JSC::JSImmediate::makeNull):
1309         (JSC::JSImmediate::doubleValue):
1310         (JSC::JSImmediate::intValue):
1311         (JSC::JSImmediate::uintValue):
1312         (JSC::JSImmediate::boolValue):
1313         (JSC::JSImmediate::rawValue):
1314         (JSC::JSImmediate::trueImmediate):
1315         (JSC::JSImmediate::falseImmediate):
1316         (JSC::JSImmediate::undefinedImmediate):
1317         (JSC::JSImmediate::nullImmediate):
1318         (JSC::JSImmediate::zeroImmediate):
1319         (JSC::JSImmediate::oneImmediate):
1320         (JSC::JSImmediate::impossibleValue):
1321         (JSC::JSImmediate::toBoolean):
1322         (JSC::JSImmediate::getTruncatedUInt32):
1323         (JSC::JSImmediate::fromNumberOutsideIntegerRange):
1324         (JSC::JSImmediate::from):
1325         (JSC::JSImmediate::getTruncatedInt32):
1326         (JSC::JSImmediate::toDouble):
1327         (JSC::JSImmediate::getUInt32):
1328         (JSC::JSValue::JSValue):
1329         (JSC::JSValue::isUndefinedOrNull):
1330         (JSC::JSValue::isBoolean):
1331         (JSC::JSValue::getBoolean):
1332         (JSC::JSValue::toInt32):
1333         (JSC::JSValue::toUInt32):
1334         (JSC::JSValue::isCell):
1335         (JSC::JSValue::isInt32Fast):
1336         (JSC::JSValue::getInt32Fast):
1337         (JSC::JSValue::isUInt32Fast):
1338         (JSC::JSValue::getUInt32Fast):
1339         (JSC::JSValue::makeInt32Fast):
1340         (JSC::JSValue::areBothInt32Fast):
1341         (JSC::JSFastMath::canDoFastBitwiseOperations):
1342         (JSC::JSFastMath::equal):
1343         (JSC::JSFastMath::notEqual):
1344         (JSC::JSFastMath::andImmediateNumbers):
1345         (JSC::JSFastMath::xorImmediateNumbers):
1346         (JSC::JSFastMath::orImmediateNumbers):
1347         (JSC::JSFastMath::canDoFastRshift):
1348         (JSC::JSFastMath::canDoFastUrshift):
1349         (JSC::JSFastMath::rightShiftImmediateNumbers):
1350         (JSC::JSFastMath::canDoFastAdditiveOperations):
1351         (JSC::JSFastMath::addImmediateNumbers):
1352         (JSC::JSFastMath::subImmediateNumbers):
1353         (JSC::JSFastMath::incImmediateNumber):
1354         (JSC::JSFastMath::decImmediateNumber):
1355         * runtime/JSNotAnObject.cpp:
1356         (JSC::JSNotAnObject::toPrimitive):
1357         (JSC::JSNotAnObject::getPrimitiveNumber):
1358         (JSC::JSNotAnObject::put):
1359         * runtime/JSNotAnObject.h:
1360         (JSC::JSNotAnObject::createStructure):
1361         * runtime/JSNumberCell.cpp:
1362         (JSC::JSNumberCell::toPrimitive):
1363         (JSC::JSNumberCell::getPrimitiveNumber):
1364         (JSC::JSNumberCell::getJSNumber):
1365         (JSC::jsNumberCell):
1366         * runtime/JSNumberCell.h:
1367         (JSC::JSNumberCell::createStructure):
1368         (JSC::isNumberCell):
1369         (JSC::asNumberCell):
1370         (JSC::jsNumber):
1371         (JSC::JSValue::isDoubleNumber):
1372         (JSC::JSValue::getDoubleNumber):
1373         (JSC::JSValue::isNumber):
1374         (JSC::JSValue::uncheckedGetNumber):
1375         (JSC::jsNaN):
1376         (JSC::JSValue::toJSNumber):
1377         (JSC::JSValue::getNumber):
1378         (JSC::JSValue::numberToInt32):
1379         (JSC::JSValue::numberToUInt32):
1380         * runtime/JSObject.cpp:
1381         (JSC::JSObject::mark):
1382         (JSC::JSObject::put):
1383         (JSC::JSObject::putWithAttributes):
1384         (JSC::callDefaultValueFunction):
1385         (JSC::JSObject::getPrimitiveNumber):
1386         (JSC::JSObject::defaultValue):
1387         (JSC::JSObject::defineGetter):
1388         (JSC::JSObject::defineSetter):
1389         (JSC::JSObject::lookupGetter):
1390         (JSC::JSObject::lookupSetter):
1391         (JSC::JSObject::hasInstance):
1392         (JSC::JSObject::toNumber):
1393         (JSC::JSObject::toString):
1394         (JSC::JSObject::fillGetterPropertySlot):
1395         * runtime/JSObject.h:
1396         (JSC::JSObject::getDirect):
1397         (JSC::JSObject::getDirectLocation):
1398         (JSC::JSObject::offsetForLocation):
1399         (JSC::JSObject::locationForOffset):
1400         (JSC::JSObject::getDirectOffset):
1401         (JSC::JSObject::putDirectOffset):
1402         (JSC::JSObject::createStructure):
1403         (JSC::asObject):
1404         (JSC::JSObject::prototype):
1405         (JSC::JSObject::setPrototype):
1406         (JSC::JSValue::isObject):
1407         (JSC::JSObject::inlineGetOwnPropertySlot):
1408         (JSC::JSObject::getOwnPropertySlotForWrite):
1409         (JSC::JSObject::getPropertySlot):
1410         (JSC::JSObject::get):
1411         (JSC::JSObject::putDirect):
1412         (JSC::JSObject::putDirectWithoutTransition):
1413         (JSC::JSObject::toPrimitive):
1414         (JSC::JSValue::get):
1415         (JSC::JSValue::put):
1416         (JSC::JSObject::allocatePropertyStorageInline):
1417         * runtime/JSPropertyNameIterator.cpp:
1418         (JSC::JSPropertyNameIterator::toPrimitive):
1419         (JSC::JSPropertyNameIterator::getPrimitiveNumber):
1420         * runtime/JSPropertyNameIterator.h:
1421         (JSC::JSPropertyNameIterator::create):
1422         (JSC::JSPropertyNameIterator::next):
1423         * runtime/JSStaticScopeObject.cpp:
1424         (JSC::JSStaticScopeObject::put):
1425         (JSC::JSStaticScopeObject::putWithAttributes):
1426         * runtime/JSStaticScopeObject.h:
1427         (JSC::JSStaticScopeObject::JSStaticScopeObject):
1428         (JSC::JSStaticScopeObject::createStructure):
1429         * runtime/JSString.cpp:
1430         (JSC::JSString::toPrimitive):
1431         (JSC::JSString::getPrimitiveNumber):
1432         (JSC::JSString::getOwnPropertySlot):
1433         * runtime/JSString.h:
1434         (JSC::JSString::createStructure):
1435         (JSC::asString):
1436         (JSC::isJSString):
1437         (JSC::JSValue::toThisJSString):
1438         * runtime/JSValue.cpp:
1439         (JSC::JSValue::toInteger):
1440         (JSC::JSValue::toIntegerPreserveNaN):
1441         * runtime/JSValue.h:
1442         (JSC::JSValue::makeImmediate):
1443         (JSC::JSValue::asValue):
1444         (JSC::noValue):
1445         (JSC::jsImpossibleValue):
1446         (JSC::jsNull):
1447         (JSC::jsUndefined):
1448         (JSC::jsBoolean):
1449         (JSC::operator==):
1450         (JSC::operator!=):
1451         (JSC::JSValue::encode):
1452         (JSC::JSValue::decode):
1453         (JSC::JSValue::JSValue):
1454         (JSC::JSValue::operator bool):
1455         (JSC::JSValue::operator==):
1456         (JSC::JSValue::operator!=):
1457         (JSC::JSValue::isUndefined):
1458         (JSC::JSValue::isNull):
1459         * runtime/JSVariableObject.h:
1460         (JSC::JSVariableObject::symbolTablePut):
1461         (JSC::JSVariableObject::symbolTablePutWithAttributes):
1462         * runtime/JSWrapperObject.h:
1463         (JSC::JSWrapperObject::internalValue):
1464         (JSC::JSWrapperObject::setInternalValue):
1465         * runtime/Lookup.cpp:
1466         (JSC::setUpStaticFunctionSlot):
1467         * runtime/Lookup.h:
1468         (JSC::lookupPut):
1469         * runtime/MathObject.cpp:
1470         (JSC::mathProtoFuncAbs):
1471         (JSC::mathProtoFuncACos):
1472         (JSC::mathProtoFuncASin):
1473         (JSC::mathProtoFuncATan):
1474         (JSC::mathProtoFuncATan2):
1475         (JSC::mathProtoFuncCeil):
1476         (JSC::mathProtoFuncCos):
1477         (JSC::mathProtoFuncExp):
1478         (JSC::mathProtoFuncFloor):
1479         (JSC::mathProtoFuncLog):
1480         (JSC::mathProtoFuncMax):
1481         (JSC::mathProtoFuncMin):
1482         (JSC::mathProtoFuncPow):
1483         (JSC::mathProtoFuncRandom):
1484         (JSC::mathProtoFuncRound):
1485         (JSC::mathProtoFuncSin):
1486         (JSC::mathProtoFuncSqrt):
1487         (JSC::mathProtoFuncTan):
1488         * runtime/MathObject.h:
1489         (JSC::MathObject::createStructure):
1490         * runtime/NativeErrorConstructor.cpp:
1491         (JSC::callNativeErrorConstructor):
1492         * runtime/NumberConstructor.cpp:
1493         (JSC::numberConstructorNaNValue):
1494         (JSC::numberConstructorNegInfinity):
1495         (JSC::numberConstructorPosInfinity):
1496         (JSC::numberConstructorMaxValue):
1497         (JSC::numberConstructorMinValue):
1498         (JSC::callNumberConstructor):
1499         * runtime/NumberConstructor.h:
1500         (JSC::NumberConstructor::createStructure):
1501         * runtime/NumberObject.cpp:
1502         (JSC::NumberObject::getJSNumber):
1503         (JSC::constructNumber):
1504         * runtime/NumberObject.h:
1505         * runtime/NumberPrototype.cpp:
1506         (JSC::numberProtoFuncToString):
1507         (JSC::numberProtoFuncToLocaleString):
1508         (JSC::numberProtoFuncValueOf):
1509         (JSC::numberProtoFuncToFixed):
1510         (JSC::numberProtoFuncToExponential):
1511         (JSC::numberProtoFuncToPrecision):
1512         * runtime/ObjectConstructor.cpp:
1513         (JSC::constructObject):
1514         (JSC::callObjectConstructor):
1515         * runtime/ObjectPrototype.cpp:
1516         (JSC::objectProtoFuncValueOf):
1517         (JSC::objectProtoFuncHasOwnProperty):
1518         (JSC::objectProtoFuncIsPrototypeOf):
1519         (JSC::objectProtoFuncDefineGetter):
1520         (JSC::objectProtoFuncDefineSetter):
1521         (JSC::objectProtoFuncLookupGetter):
1522         (JSC::objectProtoFuncLookupSetter):
1523         (JSC::objectProtoFuncPropertyIsEnumerable):
1524         (JSC::objectProtoFuncToLocaleString):
1525         (JSC::objectProtoFuncToString):
1526         * runtime/ObjectPrototype.h:
1527         * runtime/Operations.cpp:
1528         (JSC::JSValue::equalSlowCase):
1529         (JSC::JSValue::strictEqualSlowCase):
1530         (JSC::throwOutOfMemoryError):
1531         (JSC::jsAddSlowCase):
1532         (JSC::jsTypeStringForValue):
1533         (JSC::jsIsObjectType):
1534         (JSC::jsIsFunctionType):
1535         * runtime/Operations.h:
1536         (JSC::JSValue::equal):
1537         (JSC::JSValue::equalSlowCaseInline):
1538         (JSC::JSValue::strictEqual):
1539         (JSC::JSValue::strictEqualSlowCaseInline):
1540         (JSC::jsLess):
1541         (JSC::jsLessEq):
1542         (JSC::jsAdd):
1543         (JSC::countPrototypeChainEntriesAndCheckForProxies):
1544         (JSC::resolveBase):
1545         * runtime/PropertySlot.cpp:
1546         (JSC::PropertySlot::functionGetter):
1547         * runtime/PropertySlot.h:
1548         (JSC::PropertySlot::PropertySlot):
1549         (JSC::PropertySlot::getValue):
1550         (JSC::PropertySlot::putValue):
1551         (JSC::PropertySlot::setValueSlot):
1552         (JSC::PropertySlot::setValue):
1553         (JSC::PropertySlot::setCustom):
1554         (JSC::PropertySlot::setCustomIndex):
1555         (JSC::PropertySlot::slotBase):
1556         (JSC::PropertySlot::setBase):
1557         (JSC::PropertySlot::):
1558         * runtime/Protect.h:
1559         (JSC::gcProtect):
1560         (JSC::gcUnprotect):
1561         (JSC::ProtectedPtr::operator JSValue):
1562         (JSC::ProtectedJSValue::ProtectedJSValue):
1563         (JSC::ProtectedJSValue::get):
1564         (JSC::ProtectedJSValue::operator JSValue):
1565         (JSC::ProtectedJSValue::operator->):
1566         (JSC::ProtectedJSValue::~ProtectedJSValue):
1567         (JSC::ProtectedJSValue::operator=):
1568         (JSC::operator==):
1569         (JSC::operator!=):
1570         * runtime/RegExpConstructor.cpp:
1571         (JSC::RegExpConstructor::getBackref):
1572         (JSC::RegExpConstructor::getLastParen):
1573         (JSC::RegExpConstructor::getLeftContext):
1574         (JSC::RegExpConstructor::getRightContext):
1575         (JSC::regExpConstructorDollar1):
1576         (JSC::regExpConstructorDollar2):
1577         (JSC::regExpConstructorDollar3):
1578         (JSC::regExpConstructorDollar4):
1579         (JSC::regExpConstructorDollar5):
1580         (JSC::regExpConstructorDollar6):
1581         (JSC::regExpConstructorDollar7):
1582         (JSC::regExpConstructorDollar8):
1583         (JSC::regExpConstructorDollar9):
1584         (JSC::regExpConstructorInput):
1585         (JSC::regExpConstructorMultiline):
1586         (JSC::regExpConstructorLastMatch):
1587         (JSC::regExpConstructorLastParen):
1588         (JSC::regExpConstructorLeftContext):
1589         (JSC::regExpConstructorRightContext):
1590         (JSC::RegExpConstructor::put):
1591         (JSC::setRegExpConstructorInput):
1592         (JSC::setRegExpConstructorMultiline):
1593         (JSC::constructRegExp):
1594         (JSC::callRegExpConstructor):
1595         * runtime/RegExpConstructor.h:
1596         (JSC::RegExpConstructor::createStructure):
1597         (JSC::asRegExpConstructor):
1598         * runtime/RegExpMatchesArray.h:
1599         (JSC::RegExpMatchesArray::put):
1600         * runtime/RegExpObject.cpp:
1601         (JSC::regExpObjectGlobal):
1602         (JSC::regExpObjectIgnoreCase):
1603         (JSC::regExpObjectMultiline):
1604         (JSC::regExpObjectSource):
1605         (JSC::regExpObjectLastIndex):
1606         (JSC::RegExpObject::put):
1607         (JSC::setRegExpObjectLastIndex):
1608         (JSC::RegExpObject::test):
1609         (JSC::RegExpObject::exec):
1610         (JSC::callRegExpObject):
1611         * runtime/RegExpObject.h:
1612         (JSC::RegExpObject::createStructure):
1613         (JSC::asRegExpObject):
1614         * runtime/RegExpPrototype.cpp:
1615         (JSC::regExpProtoFuncTest):
1616         (JSC::regExpProtoFuncExec):
1617         (JSC::regExpProtoFuncCompile):
1618         (JSC::regExpProtoFuncToString):
1619         * runtime/StringConstructor.cpp:
1620         (JSC::stringFromCharCodeSlowCase):
1621         (JSC::stringFromCharCode):
1622         (JSC::callStringConstructor):
1623         * runtime/StringObject.cpp:
1624         (JSC::StringObject::put):
1625         * runtime/StringObject.h:
1626         (JSC::StringObject::createStructure):
1627         (JSC::asStringObject):
1628         * runtime/StringObjectThatMasqueradesAsUndefined.h:
1629         (JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
1630         * runtime/StringPrototype.cpp:
1631         (JSC::stringProtoFuncReplace):
1632         (JSC::stringProtoFuncToString):
1633         (JSC::stringProtoFuncCharAt):
1634         (JSC::stringProtoFuncCharCodeAt):
1635         (JSC::stringProtoFuncConcat):
1636         (JSC::stringProtoFuncIndexOf):
1637         (JSC::stringProtoFuncLastIndexOf):
1638         (JSC::stringProtoFuncMatch):
1639         (JSC::stringProtoFuncSearch):
1640         (JSC::stringProtoFuncSlice):
1641         (JSC::stringProtoFuncSplit):
1642         (JSC::stringProtoFuncSubstr):
1643         (JSC::stringProtoFuncSubstring):
1644         (JSC::stringProtoFuncToLowerCase):
1645         (JSC::stringProtoFuncToUpperCase):
1646         (JSC::stringProtoFuncLocaleCompare):
1647         (JSC::stringProtoFuncBig):
1648         (JSC::stringProtoFuncSmall):
1649         (JSC::stringProtoFuncBlink):
1650         (JSC::stringProtoFuncBold):
1651         (JSC::stringProtoFuncFixed):
1652         (JSC::stringProtoFuncItalics):
1653         (JSC::stringProtoFuncStrike):
1654         (JSC::stringProtoFuncSub):
1655         (JSC::stringProtoFuncSup):
1656         (JSC::stringProtoFuncFontcolor):
1657         (JSC::stringProtoFuncFontsize):
1658         (JSC::stringProtoFuncAnchor):
1659         (JSC::stringProtoFuncLink):
1660         * runtime/Structure.cpp:
1661         (JSC::Structure::Structure):
1662         (JSC::Structure::changePrototypeTransition):
1663         * runtime/Structure.h:
1664         (JSC::Structure::create):
1665         (JSC::Structure::setPrototypeWithoutTransition):
1666         (JSC::Structure::storedPrototype):
1667
1668 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
1669
1670         Reviewed by Sam "That doesn't look like what I thought it looks like" Weinig.
1671         
1672         Beefed up the JSValuePtr class and removed some non-JSValuePtr dependencies
1673         on JSImmediate, in prepapration for making JSImmediate an implementation
1674         detail of JSValuePtr.
1675         
1676         SunSpider reports no change.
1677
1678         * interpreter/Interpreter.cpp:
1679         (JSC::Interpreter::privateExecute):
1680         * jit/JIT.cpp:
1681         (JSC::JIT::privateCompileMainPass):
1682         * jit/JITArithmetic.cpp:
1683         (JSC::JIT::compileFastArith_op_mod):
1684         * runtime/JSGlobalObjectFunctions.cpp:
1685         (JSC::globalFuncParseInt): Updated for interface changes.
1686
1687         * runtime/JSImmediate.h:
1688         (JSC::JSValuePtr::JSValuePtr):
1689         * runtime/JSValue.h:
1690         (JSC::JSValuePtr::):
1691         (JSC::jsImpossibleValue):
1692         (JSC::jsNull):
1693         (JSC::jsUndefined):
1694         (JSC::jsBoolean):
1695         (JSC::JSValuePtr::encode):
1696         (JSC::JSValuePtr::decode):
1697         (JSC::JSValuePtr::JSValuePtr):
1698         (JSC::JSValuePtr::operator bool):
1699         (JSC::JSValuePtr::operator==):
1700         (JSC::JSValuePtr::operator!=):
1701         (JSC::JSValuePtr::isUndefined):
1702         (JSC::JSValuePtr::isNull): Changed jsImpossibleValue(), jsNull(),
1703         jsUndefined(), and jsBoolean() to operate in terms of JSValuePtr instead
1704         of JSImmediate.
1705
1706         * wtf/StdLibExtras.h:
1707         (WTF::bitwise_cast): Fixed up for clarity.
1708
1709 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
1710
1711         Reviewed by Geoff Garen.
1712
1713         Bug fix for rdar:/68455379.  If a case-insensitive regex contains
1714         a character class containing a range with an upper bound of \uFFFF
1715         the parser will infinite-loop whist adding other-case characters
1716         for characters in the range that do have another case.
1717
1718         * yarr/RegexCompiler.cpp:
1719         (JSC::Yarr::CharacterClassConstructor::putRange):
1720
1721 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
1722
1723         Reviewed by Oliver Hunt.
1724
1725         OPCODE_SAMPLING without CODEBLOCK_SAMPLING is currently broken,
1726         since SamplingTool::Sample::isNull() checks the m_codeBlock
1727         member (which is always null without CODEBLOCK_SAMPLING).
1728
1729         Restructure the checks so make this work again.
1730
1731         * bytecode/SamplingTool.cpp:
1732         (JSC::SamplingTool::doRun):
1733         * bytecode/SamplingTool.h:
1734         (JSC::SamplingTool::Sample::isNull):
1735
1736 2009-04-30  Maciej Stachowiak  <mjs@apple.com>
1737
1738         Reviewed by Gavin Barraclough.
1739
1740         - Concatenate final three strings in simple replace case at one go
1741
1742         ~0.2% SunSpider speedup
1743
1744         * runtime/StringPrototype.cpp:
1745         (JSC::stringProtoFuncReplace): Use new replaceRange helper instead of
1746         taking substrings and concatenating three strings.
1747         * runtime/UString.cpp:
1748         (JSC::UString::replaceRange): New helper function.
1749         * runtime/UString.h:
1750
1751 2009-04-30  Geoffrey Garen  <ggaren@apple.com>
1752
1753         Rubber Stamped by Gavin Barraclough.
1754         
1755         Changed JSValueEncodedAsPtr* => EncodedJSValuePtr to support a non-pointer
1756         encoding for JSValuePtrs.
1757
1758         * API/APICast.h:
1759         (toJS):
1760         * bytecompiler/BytecodeGenerator.h:
1761         (JSC::BytecodeGenerator::JSValueHashTraits::constructDeletedValue):
1762         (JSC::BytecodeGenerator::JSValueHashTraits::isDeletedValue):
1763         * interpreter/Register.h:
1764         (JSC::Register::):
1765         * jit/JIT.cpp:
1766         (JSC::):
1767         * jit/JIT.h:
1768         * jit/JITCode.h:
1769         (JSC::):
1770         * jit/JITStubs.cpp:
1771         (JSC::JITStubs::cti_op_add):
1772         (JSC::JITStubs::cti_op_pre_inc):
1773         (JSC::JITStubs::cti_op_get_by_id_generic):
1774         (JSC::JITStubs::cti_op_get_by_id):
1775         (JSC::JITStubs::cti_op_get_by_id_second):
1776         (JSC::JITStubs::cti_op_get_by_id_self_fail):
1777         (JSC::JITStubs::cti_op_get_by_id_proto_list):
1778         (JSC::JITStubs::cti_op_get_by_id_proto_list_full):
1779         (JSC::JITStubs::cti_op_get_by_id_proto_fail):
1780         (JSC::JITStubs::cti_op_get_by_id_array_fail):
1781         (JSC::JITStubs::cti_op_get_by_id_string_fail):
1782         (JSC::JITStubs::cti_op_instanceof):
1783         (JSC::JITStubs::cti_op_del_by_id):
1784         (JSC::JITStubs::cti_op_mul):
1785         (JSC::JITStubs::cti_op_call_NotJSFunction):
1786         (JSC::JITStubs::cti_op_resolve):
1787         (JSC::JITStubs::cti_op_construct_NotJSConstruct):
1788         (JSC::JITStubs::cti_op_get_by_val):
1789         (JSC::JITStubs::cti_op_get_by_val_string):
1790         (JSC::JITStubs::cti_op_get_by_val_byte_array):
1791         (JSC::JITStubs::cti_op_sub):
1792         (JSC::JITStubs::cti_op_lesseq):
1793         (JSC::JITStubs::cti_op_negate):
1794         (JSC::JITStubs::cti_op_resolve_base):
1795         (JSC::JITStubs::cti_op_resolve_skip):
1796         (JSC::JITStubs::cti_op_resolve_global):
1797         (JSC::JITStubs::cti_op_div):
1798         (JSC::JITStubs::cti_op_pre_dec):
1799         (JSC::JITStubs::cti_op_not):
1800         (JSC::JITStubs::cti_op_eq):
1801         (JSC::JITStubs::cti_op_lshift):
1802         (JSC::JITStubs::cti_op_bitand):
1803         (JSC::JITStubs::cti_op_rshift):
1804         (JSC::JITStubs::cti_op_bitnot):
1805         (JSC::JITStubs::cti_op_mod):
1806         (JSC::JITStubs::cti_op_less):
1807         (JSC::JITStubs::cti_op_neq):
1808         (JSC::JITStubs::cti_op_urshift):
1809         (JSC::JITStubs::cti_op_bitxor):
1810         (JSC::JITStubs::cti_op_bitor):
1811         (JSC::JITStubs::cti_op_call_eval):
1812         (JSC::JITStubs::cti_op_throw):
1813         (JSC::JITStubs::cti_op_next_pname):
1814         (JSC::JITStubs::cti_op_typeof):
1815         (JSC::JITStubs::cti_op_is_undefined):
1816         (JSC::JITStubs::cti_op_is_boolean):
1817         (JSC::JITStubs::cti_op_is_number):
1818         (JSC::JITStubs::cti_op_is_string):
1819         (JSC::JITStubs::cti_op_is_object):
1820         (JSC::JITStubs::cti_op_is_function):
1821         (JSC::JITStubs::cti_op_stricteq):
1822         (JSC::JITStubs::cti_op_nstricteq):
1823         (JSC::JITStubs::cti_op_to_jsnumber):
1824         (JSC::JITStubs::cti_op_in):
1825         (JSC::JITStubs::cti_op_del_by_val):
1826         (JSC::JITStubs::cti_vm_throw):
1827         * jit/JITStubs.h:
1828         * runtime/JSValue.h:
1829         (JSC::JSValuePtr::encode):
1830         (JSC::JSValuePtr::decode):
1831
1832 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
1833
1834         Reviewed by Oliver "Abandon Ship!" Hunt.
1835
1836         Fix a leak in Yarr.
1837
1838         All Disjunctions should be recorded in RegexPattern::m_disjunctions,
1839         so that they can be freed at the end of compilation - copyDisjunction
1840         is failing to do so.
1841
1842         * yarr/RegexCompiler.cpp:
1843         (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
1844
1845 2009-04-30  Oliver Hunt  <oliver@apple.com>
1846
1847         Reviewed by Gavin Barraclough.
1848
1849         Add function to CallFrame for dumping the current JS caller
1850
1851         Added debug only method CallFrame::dumpCaller() that provide the call location
1852         of the deepest currently executing JS function.
1853
1854         * interpreter/CallFrame.cpp:
1855         (JSC::CallFrame::dumpCaller):
1856         * interpreter/CallFrame.h:
1857
1858 2009-04-30  Maciej Stachowiak  <mjs@apple.com>
1859
1860         Reviewed by Geoff Garen.
1861
1862         - make BaseStrings have themselves as a base, instead of nothing, to remove common branches
1863
1864         ~0.7% SunSpider speedup
1865
1866         * runtime/UString.h:
1867         (JSC::UString::Rep::Rep): For the constructor without a base, set self as base instead of null.
1868         (JSC::UString::Rep::baseString): Just read m_baseString - no more branching.
1869
1870 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
1871
1872         Reviewed by Oliver Hunt.
1873
1874         Two quick improvements to SamplingFlags mechanism.
1875
1876         SamplingFlags::ScopedFlag class to provide support for automagically
1877         clearing a flag as it goes out of scope, and add a little more detail
1878         to the output generated by the tool.
1879
1880         * bytecode/SamplingTool.cpp:
1881         (JSC::SamplingFlags::stop):
1882         * bytecode/SamplingTool.h:
1883         (JSC::SamplingFlags::ScopedFlag::ScopedFlag):
1884         (JSC::SamplingFlags::ScopedFlag::~ScopedFlag):
1885
1886 2009-04-30  Adam Roben  <aroben@apple.com>
1887
1888         Restore build event steps that were truncated in r43082
1889
1890         Rubber-stamped by Steve Falkenburg.
1891
1892         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
1893         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
1894         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops:
1895         Re-copied the command lines for the build events from the pre-r43082
1896         .vcproj files.
1897
1898         * JavaScriptCore.vcproj/jsc/jsc.vcproj: Removed an unnecessary
1899         attribute.
1900
1901 2009-04-30  Adam Roben  <aroben@apple.com>
1902
1903         Move settings from .vcproj files to .vsprops files within the
1904         JavaScriptCore directory
1905
1906         Moving the settings to a .vsprops file means that we will only have to
1907         change a single setting to affect all configurations, instead of one
1908         setting per configuration.
1909
1910         Reviewed by Steve Falkenburg.
1911
1912         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
1913         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
1914         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
1915         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
1916         Moved settings from these files to the new .vsprops files. Note that
1917         testapi.vcproj had a lot of overrides of default settings that were
1918         the same as the defaults, which I've removed.
1919
1920         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Added.
1921         * JavaScriptCore.vcproj/WTF/WTFCommon.vsprops: Added.
1922         * JavaScriptCore.vcproj/jsc/jscCommon.vsprops: Added.
1923         * JavaScriptCore.vcproj/testapi/testapiCommon.vsprops: Added.
1924
1925 2009-04-30  Dimitri Glazkov  <dglazkov@chromium.org>
1926
1927         Reviewed by Timothy Hatcher.
1928
1929         https://bugs.webkit.org/show_bug.cgi?id=25470
1930         Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler.
1931
1932         * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define.
1933
1934 2009-04-30  Maciej Stachowiak  <mjs@apple.com>
1935
1936         Reviewed by Alexey Proskuryakov.
1937
1938         - speed up string concatenation by reorganizing some simple cases
1939
1940         0.7% SunSpider speedup
1941
1942         * runtime/UString.cpp:
1943         (JSC::concatenate): Put fast case for appending a single character
1944         before the empty string special cases; streamline code a bit to
1945         delay computing values that are not needed in the fast path.
1946
1947 2009-04-30  Gavin Barraclough  <barraclough@apple.com>
1948
1949         Reviewed by Maciej Stachowiak.
1950
1951         Add SamplingFlags mechanism.
1952
1953         This mechanism allows fine-grained JSC and JavaScript program aware
1954         performance measurement.  The mechanism provides a set of 32 flags,
1955         numbered #1..#32.  Flag #16 is initially set, and all other flags
1956         are cleared.  Flags may be set and cleared from within
1957
1958         Enable by setting ENABLE_SAMPLING_FLAGS to 1 in wtf/Platform.h.
1959         Disabled by default, no performance impact.  Flags may be modified
1960         by calling SamplingFlags::setFlag() and SamplingFlags::clearFlag()
1961         from within JSC implementation, or by calling setSamplingFlag() and
1962         clearSamplingFlag() from JavaScript.
1963
1964         The flags are sampled with a frequency of 10000Hz, and the highest
1965         set flag in recorded, allowing multiple events to be measured (with
1966         the highest flag number representing the highest priority).
1967
1968         Disabled by default; no performance impact.
1969
1970         * JavaScriptCore.exp:
1971         * bytecode/SamplingTool.cpp:
1972         (JSC::SamplingFlags::sample):
1973         (JSC::SamplingFlags::start):
1974         (JSC::SamplingFlags::stop):
1975         (JSC::SamplingThread::threadStartFunc):
1976         (JSC::SamplingThread::start):
1977         (JSC::SamplingThread::stop):
1978         (JSC::ScopeSampleRecord::sample):
1979         (JSC::SamplingTool::doRun):
1980         (JSC::SamplingTool::sample):
1981         (JSC::SamplingTool::start):
1982         (JSC::SamplingTool::stop):
1983         * bytecode/SamplingTool.h:
1984         (JSC::SamplingFlags::setFlag):
1985         (JSC::SamplingFlags::clearFlag):
1986         (JSC::SamplingTool::SamplingTool):
1987         * jsc.cpp:
1988         (GlobalObject::GlobalObject):
1989         (functionSetSamplingFlag):
1990         (functionClearSamplingFlag):
1991         (runWithScripts):
1992         * wtf/Platform.h:
1993
1994 2009-04-29  Sam Weinig  <sam@webkit.org>
1995
1996         Another attempt to fix the windows build.
1997
1998         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
1999         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2000
2001 2009-04-29  Sam Weinig  <sam@webkit.org>
2002
2003         Try and fix the windows build.
2004
2005         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2006         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2007
2008 2009-04-29  Gavin Barraclough  <barraclough@apple.com>
2009
2010         Reviewed by Oliver "Peg-Leg" Hunt.
2011
2012         Coallesce input checking and reduce futzing with the index position
2013         between alternatives and iterations of the main loop of a regex,
2014         when run in YARR.
2015
2016         Consider the following regex:  /foo|bar/
2017         
2018         Prior to this patch, this will be implemented something like this pseudo-code description:
2019         
2020         loop:
2021             check_for_available_input(3) // this increments the index by 3, for the first alterantive.
2022                 if (available) { test "foo" }
2023             decrement_index(3)
2024             check_for_available_input(3) // this increments the index by 3, for the second alterantive.
2025                 if (available) { test "bar" }
2026             decrement_index(3)
2027             check_for_available_input(1) // can we loop again?
2028                 if (available) { goto loop }
2029
2030         With these changes it will look more like this:
2031
2032             check_for_available_input(3) // this increments the index by 3, for the first alterantive.
2033             if (!available) { goto fail }
2034         loop:
2035             test "foo"
2036             test "bar"
2037             check_for_available_input(1) // can we loop again?
2038                 if (available) { goto loop }
2039         fail:
2040
2041
2042         This gives about a 5% gain on v8-regex, no change on Sunspider.
2043
2044         * yarr/RegexJIT.cpp:
2045         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracksTo):
2046         (JSC::Yarr::RegexGenerator::generateDisjunction):
2047
2048 2009-04-29  Oliver Hunt  <oliver@apple.com>
2049
2050         Reviewed by Gavin Barraclough.
2051
2052         Clean up ArgList to be a trivial type
2053
2054         Separate out old ArgList logic to handle buffering and marking arguments
2055         into a distinct MarkedArgumentBuffer type.  ArgList becomes a trivial
2056         struct of a pointer and length.
2057
2058         * API/JSObjectRef.cpp:
2059         (JSObjectMakeFunction):
2060         (JSObjectMakeArray):
2061         (JSObjectMakeDate):
2062         (JSObjectMakeError):
2063         (JSObjectMakeRegExp):
2064         (JSObjectCallAsFunction):
2065         (JSObjectCallAsConstructor):
2066         * JavaScriptCore.exp:
2067         * interpreter/CallFrame.h:
2068         (JSC::ExecState::emptyList):
2069         * runtime/ArgList.cpp:
2070         (JSC::ArgList::getSlice):
2071         (JSC::MarkedArgumentBuffer::markLists):
2072         (JSC::MarkedArgumentBuffer::slowAppend):
2073         * runtime/ArgList.h:
2074         (JSC::MarkedArgumentBuffer::MarkedArgumentBuffer):
2075         (JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer):
2076         (JSC::ArgList::ArgList):
2077         (JSC::ArgList::at):
2078         (JSC::ArgList::isEmpty):
2079         (JSC::ArgList::size):
2080         (JSC::ArgList::begin):
2081         (JSC::ArgList::end):
2082         * runtime/Arguments.cpp:
2083         (JSC::Arguments::fillArgList):
2084         * runtime/Arguments.h:
2085         * runtime/ArrayPrototype.cpp:
2086         (JSC::arrayProtoFuncConcat):
2087         (JSC::arrayProtoFuncPush):
2088         (JSC::arrayProtoFuncSort):
2089         (JSC::arrayProtoFuncFilter):
2090         (JSC::arrayProtoFuncMap):
2091         (JSC::arrayProtoFuncEvery):
2092         (JSC::arrayProtoFuncForEach):
2093         (JSC::arrayProtoFuncSome):
2094         (JSC::arrayProtoFuncReduce):
2095         (JSC::arrayProtoFuncReduceRight):
2096         * runtime/Collector.cpp:
2097         (JSC::Heap::collect):
2098         * runtime/Collector.h:
2099         (JSC::Heap::markListSet):
2100         * runtime/CommonIdentifiers.h:
2101         * runtime/Error.cpp:
2102         (JSC::Error::create):
2103         * runtime/FunctionPrototype.cpp:
2104         (JSC::functionProtoFuncApply):
2105         * runtime/JSArray.cpp:
2106         (JSC::JSArray::JSArray):
2107         (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
2108         (JSC::JSArray::fillArgList):
2109         (JSC::constructArray):
2110         * runtime/JSArray.h:
2111         * runtime/JSGlobalData.cpp:
2112         (JSC::JSGlobalData::JSGlobalData):
2113         * runtime/JSGlobalData.h:
2114         * runtime/JSObject.cpp:
2115         (JSC::JSObject::put):
2116         * runtime/StringConstructor.cpp:
2117         (JSC::stringFromCharCodeSlowCase):
2118         * runtime/StringPrototype.cpp:
2119         (JSC::stringProtoFuncReplace):
2120         (JSC::stringProtoFuncConcat):
2121         (JSC::stringProtoFuncMatch):
2122
2123 2009-04-29  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2124
2125         Reviewed by Sam Weinig.
2126
2127         https://bugs.webkit.org/show_bug.cgi?id=25334
2128
2129         Fix Qt build when ENABLE_JIT is explicitly set to 1
2130         to overrule defaults.
2131
2132         * JavaScriptCore.pri:
2133
2134 2009-04-29  Oliver Hunt  <oliver@apple.com>
2135
2136         Reviewed by Steve Falkenburg.
2137
2138         Crash in profiler due to incorrect assuming displayName would be a string.
2139
2140         Fixed by adding a type guard.
2141
2142         * runtime/InternalFunction.cpp:
2143         (JSC::InternalFunction::displayName):
2144
2145 2009-04-28  Geoffrey Garen  <ggaren@apple.com>
2146
2147         Rubber stamped by Beth Dakin.
2148         
2149         Removed scaffolding supporting dynamically converting between 32bit and
2150         64bit value representations. 
2151
2152         * API/JSCallbackConstructor.cpp:
2153         (JSC::constructJSCallback):
2154         * API/JSCallbackFunction.cpp:
2155         (JSC::JSCallbackFunction::call):
2156         * API/JSCallbackObjectFunctions.h:
2157         (JSC::::construct):
2158         (JSC::::call):
2159         * bytecode/CodeBlock.cpp:
2160         (JSC::CodeBlock::dump):
2161         * bytecode/CodeBlock.h:
2162         (JSC::CodeBlock::getConstant):
2163         * bytecompiler/BytecodeGenerator.cpp:
2164         (JSC::BytecodeGenerator::emitEqualityOp):
2165         * interpreter/CallFrame.cpp:
2166         (JSC::CallFrame::thisValue):
2167         * interpreter/Interpreter.cpp:
2168         (JSC::Interpreter::callEval):
2169         (JSC::Interpreter::throwException):
2170         (JSC::Interpreter::createExceptionScope):
2171         (JSC::Interpreter::privateExecute):
2172         (JSC::Interpreter::retrieveArguments):
2173         * interpreter/Register.h:
2174         (JSC::Register::):
2175         (JSC::Register::Register):
2176         (JSC::Register::jsValue):
2177         (JSC::Register::marked):
2178         (JSC::Register::mark):
2179         (JSC::Register::i):
2180         (JSC::Register::activation):
2181         (JSC::Register::arguments):
2182         (JSC::Register::callFrame):
2183         (JSC::Register::codeBlock):
2184         (JSC::Register::function):
2185         (JSC::Register::propertyNameIterator):
2186         (JSC::Register::scopeChain):
2187         (JSC::Register::vPC):
2188         * jit/JITStubs.cpp:
2189         (JSC::JITStubs::cti_op_call_NotJSFunction):
2190         (JSC::JITStubs::cti_op_load_varargs):
2191         (JSC::JITStubs::cti_op_call_eval):
2192         * jsc.cpp:
2193         (functionPrint):
2194         (functionDebug):
2195         (functionRun):
2196         (functionLoad):
2197         * runtime/ArgList.h:
2198         (JSC::ArgList::at):
2199         * runtime/Arguments.cpp:
2200         (JSC::Arguments::copyToRegisters):
2201         (JSC::Arguments::fillArgList):
2202         (JSC::Arguments::getOwnPropertySlot):
2203         * runtime/ArrayConstructor.cpp:
2204         (JSC::constructArrayWithSizeQuirk):
2205         * runtime/ArrayPrototype.cpp:
2206         (JSC::arrayProtoFuncJoin):
2207         (JSC::arrayProtoFuncConcat):
2208         (JSC::arrayProtoFuncPush):
2209         (JSC::arrayProtoFuncSlice):
2210         (JSC::arrayProtoFuncSort):
2211         (JSC::arrayProtoFuncSplice):
2212         (JSC::arrayProtoFuncUnShift):
2213         (JSC::arrayProtoFuncFilter):
2214         (JSC::arrayProtoFuncMap):
2215         (JSC::arrayProtoFuncEvery):
2216         (JSC::arrayProtoFuncForEach):
2217         (JSC::arrayProtoFuncSome):
2218         (JSC::arrayProtoFuncReduce):
2219         (JSC::arrayProtoFuncReduceRight):
2220         (JSC::arrayProtoFuncIndexOf):
2221         (JSC::arrayProtoFuncLastIndexOf):
2222         * runtime/BooleanConstructor.cpp:
2223         (JSC::constructBoolean):
2224         (JSC::callBooleanConstructor):
2225         * runtime/DateConstructor.cpp:
2226         (JSC::constructDate):
2227         (JSC::dateParse):
2228         (JSC::dateUTC):
2229         * runtime/DatePrototype.cpp:
2230         (JSC::formatLocaleDate):
2231         (JSC::fillStructuresUsingTimeArgs):
2232         (JSC::fillStructuresUsingDateArgs):
2233         (JSC::dateProtoFuncSetTime):
2234         (JSC::dateProtoFuncSetYear):
2235         * runtime/ErrorConstructor.cpp:
2236         (JSC::constructError):
2237         * runtime/FunctionConstructor.cpp:
2238         (JSC::constructFunction):
2239         * runtime/FunctionPrototype.cpp:
2240         (JSC::functionProtoFuncApply):
2241         (JSC::functionProtoFuncCall):
2242         * runtime/JSArray.cpp:
2243         (JSC::JSArray::JSArray):
2244         (JSC::constructArray):
2245         * runtime/JSArray.h:
2246         * runtime/JSGlobalObjectFunctions.cpp:
2247         (JSC::encode):
2248         (JSC::decode):
2249         (JSC::globalFuncEval):
2250         (JSC::globalFuncParseInt):
2251         (JSC::globalFuncParseFloat):
2252         (JSC::globalFuncIsNaN):
2253         (JSC::globalFuncIsFinite):
2254         (JSC::globalFuncEscape):
2255         (JSC::globalFuncUnescape):
2256         (JSC::globalFuncJSCPrint):
2257         * runtime/MathObject.cpp:
2258         (JSC::mathProtoFuncAbs):
2259         (JSC::mathProtoFuncACos):
2260         (JSC::mathProtoFuncASin):
2261         (JSC::mathProtoFuncATan):
2262         (JSC::mathProtoFuncATan2):
2263         (JSC::mathProtoFuncCeil):
2264         (JSC::mathProtoFuncCos):
2265         (JSC::mathProtoFuncExp):
2266         (JSC::mathProtoFuncFloor):
2267         (JSC::mathProtoFuncLog):
2268         (JSC::mathProtoFuncMax):
2269         (JSC::mathProtoFuncMin):
2270         (JSC::mathProtoFuncPow):
2271         (JSC::mathProtoFuncRound):
2272         (JSC::mathProtoFuncSin):
2273         (JSC::mathProtoFuncSqrt):
2274         (JSC::mathProtoFuncTan):
2275         * runtime/NativeErrorConstructor.cpp:
2276         (JSC::NativeErrorConstructor::construct):
2277         * runtime/NumberConstructor.cpp:
2278         (JSC::constructWithNumberConstructor):
2279         (JSC::callNumberConstructor):
2280         * runtime/NumberPrototype.cpp:
2281         (JSC::numberProtoFuncToString):
2282         (JSC::numberProtoFuncToFixed):
2283         (JSC::numberProtoFuncToExponential):
2284         (JSC::numberProtoFuncToPrecision):
2285         * runtime/ObjectConstructor.cpp:
2286         (JSC::constructObject):
2287         * runtime/ObjectPrototype.cpp:
2288         (JSC::objectProtoFuncHasOwnProperty):
2289         (JSC::objectProtoFuncIsPrototypeOf):
2290         (JSC::objectProtoFuncDefineGetter):
2291         (JSC::objectProtoFuncDefineSetter):
2292         (JSC::objectProtoFuncLookupGetter):
2293         (JSC::objectProtoFuncLookupSetter):
2294         (JSC::objectProtoFuncPropertyIsEnumerable):
2295         * runtime/PropertySlot.h:
2296         (JSC::PropertySlot::getValue):
2297         * runtime/RegExpConstructor.cpp:
2298         (JSC::constructRegExp):
2299         * runtime/RegExpObject.cpp:
2300         (JSC::RegExpObject::match):
2301         * runtime/RegExpPrototype.cpp:
2302         (JSC::regExpProtoFuncCompile):
2303         * runtime/StringConstructor.cpp:
2304         (JSC::stringFromCharCodeSlowCase):
2305         (JSC::stringFromCharCode):
2306         (JSC::constructWithStringConstructor):
2307         (JSC::callStringConstructor):
2308         * runtime/StringPrototype.cpp:
2309         (JSC::stringProtoFuncReplace):
2310         (JSC::stringProtoFuncCharAt):
2311         (JSC::stringProtoFuncCharCodeAt):
2312         (JSC::stringProtoFuncConcat):
2313         (JSC::stringProtoFuncIndexOf):
2314         (JSC::stringProtoFuncLastIndexOf):
2315         (JSC::stringProtoFuncMatch):
2316         (JSC::stringProtoFuncSearch):
2317         (JSC::stringProtoFuncSlice):
2318         (JSC::stringProtoFuncSplit):
2319         (JSC::stringProtoFuncSubstr):
2320         (JSC::stringProtoFuncSubstring):
2321         (JSC::stringProtoFuncLocaleCompare):
2322         (JSC::stringProtoFuncFontcolor):
2323         (JSC::stringProtoFuncFontsize):
2324         (JSC::stringProtoFuncAnchor):
2325         (JSC::stringProtoFuncLink):
2326
2327 2009-04-28  David Kilzer  <ddkilzer@apple.com>
2328
2329         A little more hardening for UString
2330
2331         Reviewed by Maciej Stachowiak.
2332
2333         Revised fix for <rdar://problem/5861045> in r42644.
2334
2335         * runtime/UString.cpp:
2336         (JSC::newCapacityWithOverflowCheck): Added.
2337         (JSC::concatenate): Used newCapacityWithOverflowCheck().
2338         (JSC::UString::append): Ditto.
2339
2340 2009-04-28  Oliver Hunt  <oliver@apple.com>
2341
2342         Reviewed by Gavin Barraclough.
2343
2344         Bring back r42969, this time with correct codegen
2345
2346         Add logic to the codegen for right shift to avoid jumping to a helper function
2347         when shifting a small floating point value.
2348
2349         * jit/JITArithmetic.cpp:
2350         (isSSE2Present):
2351         (JSC::JIT::compileFastArith_op_rshift):
2352         (JSC::JIT::compileFastArithSlow_op_rshift):
2353
2354 2009-04-28  Kevin Ollivier <kevino@theolliviers.com>
2355
2356         wxMSW build fix. Switch JSCore build back to static. 
2357
2358         * API/JSBase.h:
2359         * config.h:
2360         * jscore.bkl:
2361
2362 2009-04-28  Oliver Hunt  <oliver@apple.com>
2363
2364         Reviewed by NOBODY (Build fix).
2365
2366         Roll out r42969, due to hangs in build bot.
2367
2368         * jit/JITArithmetic.cpp:
2369         (JSC::JIT::compileFastArith_op_rshift):
2370         (JSC::JIT::compileFastArithSlow_op_rshift):
2371         (JSC::isSSE2Present):
2372
2373 2009-04-28  Xan Lopez  <xlopez@igalia.com>
2374
2375         Unreviewed: fix distcheck build, add (even more) missing files to list.
2376
2377         * GNUmakefile.am:
2378
2379 2009-04-28  Oliver Hunt  <oliver@apple.com>
2380
2381         Reviewed by Geoff Garen.
2382
2383         Improve performance of string indexing
2384
2385         Add a cti_get_by_val_string function to specialise indexing into a string object.
2386         This gives us a slight performance win on a number of string tests.
2387
2388         * jit/JITStubs.cpp:
2389         (JSC::JITStubs::cti_op_get_by_val):
2390         (JSC::JITStubs::cti_op_get_by_val_string):
2391         * jit/JITStubs.h:
2392
2393 2009-04-28  Oliver Hunt  <oliver@apple.com>
2394
2395         Reviewed by Geoff Garen.
2396
2397         Improve performance of right shifts of large or otherwise floating point values.
2398
2399         Add logic to the codegen for right shift to avoid jumping to a helper function
2400         when shifting a small floating point value.
2401
2402         * jit/JITArithmetic.cpp:
2403         (isSSE2Present): Moved to the head of file.
2404         (JSC::JIT::compileFastArith_op_rshift):
2405         (JSC::JIT::compileFastArithSlow_op_rshift):
2406
2407 2009-04-28  Xan Lopez  <xlopez@igalia.com>
2408
2409         Unreviewed: fix distcheck build, add (more) missing files to list.
2410
2411         * GNUmakefile.am:
2412
2413 2009-04-28  Xan Lopez  <xlopez@igalia.com>
2414
2415         Unreviewed: fix distcheck build, add missing header to file list.
2416
2417         * GNUmakefile.am:
2418
2419 2009-04-28  Gavin Barraclough  <barraclough@apple.com>
2420
2421         Rubber stamped by Maciej "Henry Morgan" Stachowiak.
2422
2423         Enable YARR.
2424         (Again.)
2425
2426         * wtf/Platform.h:
2427
2428 2009-04-27  Gavin Barraclough  <barraclough@apple.com>
2429
2430         Reviewed by Maciej Stachowiak.
2431
2432         Tweak a loop condition to keep GCC happy,
2433         some GCCs seem to be having issues with this. :-/
2434
2435         * bytecompiler/BytecodeGenerator.cpp:
2436         (JSC::BytecodeGenerator::breakTarget):
2437         * wtf/Platform.h:
2438
2439 2009-04-27  Adam Roben  <aroben@apple.com>
2440
2441         Windows Debug build fix
2442
2443         Not sure why the buildbots weren't affected by this problem.
2444
2445         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Let VS
2446         re-order the file list, and added JavaScriptCore[_debug].def to the
2447         project. This was not necessary for the fix, but made making the fix
2448         easier.
2449
2450         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2451         Removed a function that no longer exists.
2452
2453 2009-04-26  Gavin Barraclough  <barraclough@apple.com>
2454
2455         Reviewed by Weinig Sam.
2456
2457         Fix for https://bugs.webkit.org/show_bug.cgi?id=25416
2458         "Cached prototype accesses unsafely hoist property storage load above structure checks."
2459         
2460         Do not hoist the load of the pointer to the property storage array.
2461
2462         No performance impact.
2463
2464         * jit/JITPropertyAccess.cpp:
2465         (JSC::JIT::privateCompileGetByIdProto):
2466         (JSC::JIT::privateCompileGetByIdProtoList):
2467
2468 2009-04-26  Gavin Barraclough  <barraclough@apple.com>
2469
2470         Reviewed by Geoffrey "Gaffe or energy?" Garen.
2471
2472         Randomize address requested by ExecutableAllocatorFixedVMPool.
2473
2474         * jit/ExecutableAllocatorFixedVMPool.cpp:
2475         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2476
2477 2009-04-26  Sam Weinig  <sam@webkit.org>
2478
2479         Reviewed by Eric Seidel.
2480
2481         Remove scons-based build system.
2482
2483         * JavaScriptCore.scons: Removed.
2484
2485 2009-04-25  Oliver Hunt  <oliver@apple.com>
2486
2487         Reviewed by NOBODY (Buildfix).
2488
2489         Make HAVE_MADV_FREE darwin only for now
2490
2491         * wtf/Platform.h:
2492
2493 2009-04-25  Jan Michael Alonzo  <jmalonzo@webkit.org>
2494
2495         Reviewed by Oliver Hunt.
2496
2497         Gtk build fix - check if we have MADV_FREE before using it.
2498
2499         * interpreter/RegisterFile.cpp:
2500         (JSC::RegisterFile::releaseExcessCapacity):
2501         * wtf/Platform.h:
2502
2503 2009-04-24  Kevin Ollivier  <kevino@theolliviers.com>
2504
2505         wx build fix. Switching JSCore from a static lib to a dynamic lib
2506         to match the Apple build and fix symbol exports.
2507
2508         * jscore.bkl:
2509
2510 2009-04-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2511
2512         Rubber-stamped by Mark Rowe.
2513
2514         https://bugs.webkit.org/show_bug.cgi?id=25337
2515         Move ThreadingQt.cpp under the qt directory.
2516
2517         * JavaScriptCore.pri:
2518         * wtf/ThreadingQt.cpp: Removed.
2519         * wtf/qt/ThreadingQt.cpp: Copied from JavaScriptCore/wtf/ThreadingQt.cpp.
2520
2521 2009-04-24  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2522
2523         Rubber-stamped by Mark Rowe.
2524
2525         https://bugs.webkit.org/show_bug.cgi?id=25338
2526         Move ThreadingGtk.cpp under the gtk directory.
2527
2528         * GNUmakefile.am:
2529         * wtf/ThreadingGtk.cpp: Removed.
2530         * wtf/gtk/ThreadingGtk.cpp: Copied from JavaScriptCore/wtf/ThreadingGtk.cpp.
2531
2532 2009-04-24  Gavin Barraclough  <barraclough@apple.com>
2533
2534         Reviewed by Sam "Wesley" Weinig.
2535
2536         Improve performance to YARR interpreter.
2537         (From about 3x slower than PCRE on regex-dna to about 30% slower).
2538
2539         * yarr/RegexCompiler.cpp:
2540         (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
2541         * yarr/RegexInterpreter.cpp:
2542         (JSC::Yarr::Interpreter::checkCharacter):
2543         (JSC::Yarr::Interpreter::checkCasedCharacter):
2544         (JSC::Yarr::Interpreter::backtrackPatternCharacter):
2545         (JSC::Yarr::Interpreter::backtrackPatternCasedCharacter):
2546         (JSC::Yarr::Interpreter::matchParentheticalAssertionBegin):
2547         (JSC::Yarr::Interpreter::matchParentheticalAssertionEnd):
2548         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionBegin):
2549         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionEnd):
2550         (JSC::Yarr::Interpreter::matchDisjunction):
2551         (JSC::Yarr::Interpreter::interpret):
2552         (JSC::Yarr::ByteCompiler::atomPatternCharacter):
2553         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
2554         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
2555         (JSC::Yarr::ByteCompiler::closeAlternative):
2556         (JSC::Yarr::ByteCompiler::closeBodyAlternative):
2557         (JSC::Yarr::ByteCompiler::atomParenthesesEnd):
2558         (JSC::Yarr::ByteCompiler::regexBegin):
2559         (JSC::Yarr::ByteCompiler::regexEnd):
2560         (JSC::Yarr::ByteCompiler::alterantiveBodyDisjunction):
2561         (JSC::Yarr::ByteCompiler::alterantiveDisjunction):
2562         (JSC::Yarr::ByteCompiler::emitDisjunction):
2563         * yarr/RegexInterpreter.h:
2564         (JSC::Yarr::ByteTerm::):
2565         (JSC::Yarr::ByteTerm::ByteTerm):
2566         (JSC::Yarr::ByteTerm::BodyAlternativeBegin):
2567         (JSC::Yarr::ByteTerm::BodyAlternativeDisjunction):
2568         (JSC::Yarr::ByteTerm::BodyAlternativeEnd):
2569         (JSC::Yarr::ByteTerm::AlternativeBegin):
2570         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
2571         (JSC::Yarr::ByteTerm::AlternativeEnd):
2572         (JSC::Yarr::ByteTerm::SubpatternBegin):
2573         (JSC::Yarr::ByteTerm::SubpatternEnd):
2574         * yarr/RegexJIT.cpp:
2575         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
2576         * yarr/RegexPattern.h:
2577
2578 2009-04-24  Rob Raguet-Schofield  <ragfield@gmail.com>
2579
2580         Rubber-stamped by Mark Rowe.
2581
2582         * wtf/CurrentTime.h: Fix a typo in a comment.
2583
2584 2009-04-24  Oliver Hunt  <oliver@apple.com>
2585
2586         Reviewed by NOBODY (Build fix).
2587
2588         Add reinterpret_cast
2589
2590         * interpreter/RegisterFile.cpp:
2591         (JSC::RegisterFile::releaseExcessCapacity):
2592
2593 2009-04-23  Oliver Hunt  <oliver@apple.com>
2594
2595         Reviewed by Geoff Garen.
2596
2597         <rdar://problem/6050421> JavaScript register file should remap to release physical pages accumulated during deep recursion
2598
2599         We now track the maximum extent of the RegisterFile, and when we reach the final
2600         return from JS (so the stack portion of the registerfile becomes empty) we see
2601         if that extent is greater than maxExcessCapacity.  If it is we use madvise or
2602         VirtualFree to release the physical pages that were backing the excess.
2603
2604         * interpreter/RegisterFile.cpp:
2605         (JSC::RegisterFile::releaseExcessCapacity):
2606         * interpreter/RegisterFile.h:
2607         (JSC::RegisterFile::RegisterFile):
2608         (JSC::RegisterFile::shrink):
2609         (JSC::RegisterFile::grow):
2610
2611 2009-04-23  Mark Rowe  <mrowe@apple.com>
2612
2613         With great sadness and a heavy heart I switch us back from YARR to WREC in
2614         order to restore greenness to the world once more.
2615
2616         * wtf/Platform.h:
2617
2618 2009-04-23  Mark Rowe  <mrowe@apple.com>
2619
2620         More Windows build fixage.
2621
2622         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2623         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
2624
2625 2009-04-23  Mark Rowe  <mrowe@apple.com>
2626
2627         Attempt to fix the Windows build.
2628
2629         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:  Remove a symbol that no longer exists.
2630
2631 2009-04-23  Francisco Tolmasky  <francisco@280north.com>
2632
2633         BUG 24604: WebKit profiler reports incorrect total times
2634         <https://bugs.webkit.org/show_bug.cgi?id=24604>
2635
2636         Reviewed by Timothy Hatcher and Kevin McCullough.
2637
2638         * JavaScriptCore.exp:
2639         * JavaScriptCore.xcodeproj/project.pbxproj:
2640         * profiler/CallIdentifier.h:
2641         (JSC::CallIdentifier::Hash::hash):
2642         (JSC::CallIdentifier::Hash::equal):
2643         (JSC::CallIdentifier::hash):
2644         (WTF::):
2645         * profiler/HeavyProfile.cpp: Removed.
2646         * profiler/HeavyProfile.h: Removed.
2647         * profiler/Profile.cpp: No more need for TreeProfile/HeavyProfile
2648         (JSC::Profile::create):
2649         * profiler/Profile.h:
2650         * profiler/ProfileNode.cpp:
2651         * profiler/ProfileNode.h:
2652         * profiler/TreeProfile.cpp: Removed.
2653         * profiler/TreeProfile.h: Removed.
2654
2655 2009-04-23  Gavin Barraclough  <barraclough@apple.com>
2656
2657         Not Reviewed.
2658
2659         Speculative Windows build fix II.
2660
2661         * yarr/RegexInterpreter.cpp:
2662
2663 2009-04-23  Gavin Barraclough  <barraclough@apple.com>
2664
2665         Not Reviewed.
2666
2667         Speculative Windows build fix.
2668
2669         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2670         * runtime/RegExp.cpp:
2671
2672 2009-04-23  Gavin Barraclough  <barraclough@apple.com>
2673
2674         Rubber stamped by salty sea dogs Sam & Geoff.
2675
2676         Enable YARR_JIT by default (where supported), replacing WREC.
2677
2678         * wtf/Platform.h:
2679
2680 2009-04-23  Gavin Barraclough  <barraclough@apple.com>
2681
2682         Reviewed by Geoff "Dread Pirate Roberts" Garen.
2683
2684         Various small fixes to YARR JIT, in preparation for enabling it by default.
2685
2686         * Correctly index into the callframe when storing restart addresses for
2687           nested alternatives.
2688         * Allow backtracking back into matched alternatives of parentheses.
2689         * Fix callframe offset calculation for parenthetical assertions.
2690         * When a set of parenthese are quantified with a fixed and variable portion,
2691           and the variable portion is quantified once, this should not reset the
2692           pattern match on failure to match (the last match from the firxed portion
2693           should be preserved).
2694         * Up the pattern size limit to match PCRE's new limit.
2695         * Unlclosed parentheses should be reported with the message "missing )".
2696
2697         * wtf/Platform.h:
2698         * yarr/RegexCompiler.cpp:
2699         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
2700         (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
2701         * yarr/RegexInterpreter.cpp:
2702         (JSC::Yarr::Interpreter::matchParentheses):
2703         (JSC::Yarr::Interpreter::backtrackParentheses):
2704         (JSC::Yarr::ByteCompiler::emitDisjunction):
2705         * yarr/RegexJIT.cpp:
2706         (JSC::Yarr::RegexGenerator::loadFromFrameAndJump):
2707         (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
2708         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
2709         (JSC::Yarr::RegexGenerator::generateTerm):
2710         (JSC::Yarr::executeRegex):
2711         * yarr/RegexParser.h:
2712         (JSC::Yarr::Parser::):
2713         (JSC::Yarr::Parser::parseTokens):
2714         (JSC::Yarr::Parser::parse):
2715         * yarr/RegexPattern.h:
2716         (JSC::Yarr::PatternTerm::):
2717         (JSC::Yarr::PatternTerm::PatternTerm):
2718
2719 2009-04-22  Mark Rowe  <mrowe@apple.com>
2720
2721         Rubber-stamped by Gavin Barraclough.
2722
2723         Add the m_ prefix on FixedVMPoolAllocator's member variables, and fix typos in a few comments.
2724
2725         * jit/ExecutableAllocatorFixedVMPool.cpp:
2726         (JSC::FixedVMPoolAllocator::addToFreeList):
2727         (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
2728         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2729         (JSC::FixedVMPoolAllocator::alloc):
2730         (JSC::FixedVMPoolAllocator::free):
2731         (JSC::FixedVMPoolAllocator::isWithinVMPool):
2732
2733 2009-04-22  Mark Rowe  <mrowe@apple.com>
2734
2735         Rubber-stamped by Gavin Barraclough.
2736
2737         Add some assertions to FixedVMPoolAllocator to guard against cases where we
2738         attempt to free memory that didn't originate from the pool, or we attempt to
2739         hand out a bogus address from alloc.
2740
2741         * jit/ExecutableAllocatorFixedVMPool.cpp:
2742         (JSC::FixedVMPoolAllocator::release):
2743         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2744         (JSC::FixedVMPoolAllocator::alloc):
2745         (JSC::FixedVMPoolAllocator::free):
2746         (JSC::FixedVMPoolAllocator::isWithinVMPool):
2747
2748 2009-04-22  Gavin Barraclough  <barraclough@apple.com>
2749
2750         Rubber stamped by Sam "Blackbeard" Weinig.
2751
2752         Although pirates do spell the word 'generate' as 'genertate',
2753         webkit developers do not.  Fixertate.
2754
2755         * yarr/RegexJIT.cpp:
2756         (JSC::Yarr::RegexGenerator::generateAssertionBOL):
2757         (JSC::Yarr::RegexGenerator::generateAssertionEOL):
2758         (JSC::Yarr::RegexGenerator::generateAssertionWordBoundary):
2759         (JSC::Yarr::RegexGenerator::generatePatternCharacterSingle):
2760         (JSC::Yarr::RegexGenerator::generatePatternCharacterPair):
2761         (JSC::Yarr::RegexGenerator::generatePatternCharacterFixed):
2762         (JSC::Yarr::RegexGenerator::generatePatternCharacterGreedy):
2763         (JSC::Yarr::RegexGenerator::generatePatternCharacterNonGreedy):
2764         (JSC::Yarr::RegexGenerator::generateCharacterClassSingle):
2765         (JSC::Yarr::RegexGenerator::generateCharacterClassFixed):
2766         (JSC::Yarr::RegexGenerator::generateCharacterClassGreedy):
2767         (JSC::Yarr::RegexGenerator::generateCharacterClassNonGreedy):
2768         (JSC::Yarr::RegexGenerator::generateTerm):
2769
2770 2009-04-22  Gavin Barraclough  <barraclough@apple.com>
2771
2772         Reviewed by Sam "Blackbeard" Weinig.
2773
2774         Improvements to YARR JIT.  This patch expands support in three key areas:
2775             * Add (temporary) support for falling back to PCRE for expressions not supported.
2776             * Add support for x86_64 and Windows.
2777             * Add support for singly quantified parentheses (? and ??), alternatives within
2778               parentheses, and parenthetical assertions.
2779
2780         * runtime/RegExp.cpp:
2781         (JSC::RegExp::match):
2782         * yarr/RegexJIT.cpp:
2783         (JSC::Yarr::RegexGenerator::storeToFrame):
2784         (JSC::Yarr::RegexGenerator::storeToFrameWithPatch):
2785         (JSC::Yarr::RegexGenerator::loadFromFrameAndJump):
2786         (JSC::Yarr::RegexGenerator::AlternativeBacktrackRecord::AlternativeBacktrackRecord):
2787         (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
2788         (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm):
2789         (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
2790         (JSC::Yarr::RegexGenerator::TermGenerationState::plantJumpToBacktrackIfExists):
2791         (JSC::Yarr::RegexGenerator::TermGenerationState::addBacktrackJump):
2792         (JSC::Yarr::RegexGenerator::TermGenerationState::linkAlternativeBacktracks):
2793         (JSC::Yarr::RegexGenerator::TermGenerationState::propagateBacktrackingFrom):
2794         (JSC::Yarr::RegexGenerator::genertateAssertionBOL):
2795         (JSC::Yarr::RegexGenerator::genertateAssertionEOL):
2796         (JSC::Yarr::RegexGenerator::matchAssertionWordchar):
2797         (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary):
2798         (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle):
2799         (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair):
2800         (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed):
2801         (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy):
2802         (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy):
2803         (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle):
2804         (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed):
2805         (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy):
2806         (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy):
2807         (JSC::Yarr::RegexGenerator::generateParenthesesDisjunction):
2808         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
2809         (JSC::Yarr::RegexGenerator::generateParentheticalAssertion):
2810         (JSC::Yarr::RegexGenerator::generateTerm):
2811         (JSC::Yarr::RegexGenerator::generateDisjunction):
2812         (JSC::Yarr::RegexGenerator::generateEnter):
2813         (JSC::Yarr::RegexGenerator::generateReturn):
2814         (JSC::Yarr::RegexGenerator::RegexGenerator):
2815         (JSC::Yarr::RegexGenerator::generate):
2816         (JSC::Yarr::RegexGenerator::compile):
2817         (JSC::Yarr::RegexGenerator::generationFailed):
2818         (JSC::Yarr::jitCompileRegex):
2819         (JSC::Yarr::executeRegex):
2820         * yarr/RegexJIT.h:
2821         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
2822         (JSC::Yarr::RegexCodeBlock::~RegexCodeBlock):
2823
2824 2009-04-22  Sam Weinig  <sam@webkit.org>
2825
2826         Rubber-stamped by Darin Adler.
2827
2828         Fix for <rdar://problem/6816957>
2829         Turn off Geolocation by default
2830
2831         * Configurations/FeatureDefines.xcconfig:
2832
2833 2009-04-22  Oliver Hunt  <oliver@apple.com>
2834
2835         Reviewed by NOBODY (Buildfix).
2836
2837         * interpreter/CachedCall.h:
2838
2839 2009-04-21  Oliver Hunt  <oliver@apple.com>
2840
2841         Reviewed by NOBODY (Build fix).
2842
2843         * runtime/StringPrototype.cpp:
2844
2845 2009-04-21  Oliver Hunt  <oliver@apple.com>
2846
2847         Reviewed by Maciej Stachowiak.
2848
2849         Improve String.replace performance slightly
2850
2851         Apply our vm reentry caching logic to String.replace with global
2852         regexes.
2853
2854         * runtime/StringPrototype.cpp:
2855         (JSC::stringProtoFuncReplace):
2856
2857 2009-04-21  Geoffrey Garen  <ggaren@apple.com>
2858
2859         Reviewed by Cameron Zwarich and Oliver Hunt.
2860         
2861         Re-Fixed <rdar://problem/6406045> REGRESSION: Stack overflow on PowerPC on
2862         fast/workers/use-machine-stack.html (22531)
2863         
2864         SunSpider reports no change.
2865         
2866         Use a larger recursion limit on the main thread (because we can, and
2867         there's some evidence that it may improve compatibility), and a smaller
2868         recursion limit on secondary threads (because they tend to have smaller
2869         stacks).
2870
2871         * interpreter/Interpreter.cpp:
2872         (JSC::Interpreter::execute):
2873         (JSC::Interpreter::prepareForRepeatCall):
2874         * interpreter/Interpreter.h:
2875         (JSC::): Ditto. I wrote the recursion test slightly funny, so that the
2876         common case remains a simple compare to constant.
2877
2878         * runtime/ArrayPrototype.cpp:
2879         (JSC::arrayProtoFuncToString):
2880         (JSC::arrayProtoFuncToLocaleString):
2881         (JSC::arrayProtoFuncJoin): Conservatively, set the array recursion limits
2882         to the lower, secondary thread limit. We can do something fancier if
2883         compatibility moves us, but this seems sufficient for now.
2884
2885 2009-04-21  Geoffrey Garen  <ggaren@apple.com>
2886
2887         Rubber-stamped by Adam Roben.
2888         
2889         Disabled one more Mozilla JS test because it fails intermittently on Windows.
2890         (See https://bugs.webkit.org/show_bug.cgi?id=25160.)
2891
2892         * tests/mozilla/expected.html:
2893
2894 2009-04-21  Adam Roben  <aroben@apple.com>
2895
2896         Rename JavaScriptCore_debug.dll to JavaScriptCore.dll in the Debug
2897         configuration
2898
2899         This matches the naming scheme for WebKit.dll, and will be necessary
2900         once Safari links against JavaScriptCore.dll. This change also causes
2901         run-safari not to fail (because the launcher printed by FindSafari was
2902         always looking for JavaScriptCore.dll, never
2903         JavaScriptCore_debug.dll).
2904
2905         Part of Bug 25305: can't run safari or drt on windows
2906         <https://bugs.webkit.org/show_bug.cgi?id=25305>
2907
2908         Reviewed by Steve Falkenburg and Sam Weinig.
2909
2910         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2911         * JavaScriptCore.vcproj/jsc/jsc.vcproj:
2912         * JavaScriptCore.vcproj/testapi/testapi.vcproj:
2913         Use $(WebKitDLLConfigSuffix) for naming JavaScriptCore.{dll,lib}.
2914
2915 2009-04-21  Adam Roben  <aroben@apple.com>
2916
2917         Fix JavaScriptCore build on VC++ Express
2918
2919         Reviewed by Steve Falkenburg and Sam Weinig.
2920
2921         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Link
2922         explicitly against gdi32.lib and oleaut32.lib.
2923
2924 2009-04-21  Geoffrey Garen  <ggaren@apple.com>
2925
2926         Reviewed by Mark Rowe.
2927         
2928         Tiger crash fix: Put VM tags in their own header file, and fixed up the
2929         #ifdefs so they're not used on Tiger.
2930
2931         * JavaScriptCore.xcodeproj/project.pbxproj:
2932         * interpreter/RegisterFile.h:
2933         (JSC::RegisterFile::RegisterFile):
2934         * jit/ExecutableAllocatorFixedVMPool.cpp:
2935         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2936         * jit/ExecutableAllocatorPosix.cpp:
2937         (JSC::ExecutablePool::systemAlloc):
2938         * runtime/Collector.cpp:
2939         (JSC::allocateBlock):
2940         * wtf/VMTags.h: Added.
2941
2942 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
2943
2944         More Windows build fixes.
2945
2946         * JavaScriptCore.vcproj/JavaScriptCore.make: Copy DLLs, PDBs.
2947         * JavaScriptCore.vcproj/JavaScriptCore.resources: Added.
2948         * JavaScriptCore.vcproj/JavaScriptCore.resources/Info.plist: Added.
2949         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.rc: Added.
2950         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Add version stamping, resource copying.
2951
2952 2009-04-20  Steve Falkenburg  <sfalken@apple.com>
2953
2954         Separate JavaScriptCore.dll from WebKit.dll.
2955         Slight performance improvement or no change on benchmarks.
2956         
2957         Allows us to break a circular dependency between CFNetwork and WebKit on Windows,
2958         and simplifies standalone JavaScriptCore builds.
2959
2960         Reviewed by Oliver Hunt.
2961
2962         * API/JSBase.h: Export symbols with JS_EXPORT when using MSVC.
2963         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2964         * JavaScriptCore.vcproj/WTF/WTF.vcproj: Build JavaScriptCore as a DLL instead of a static library.
2965         * config.h: Specify __declspec(dllexport/dllimport) appropriately when exporting data.
2966         * runtime/InternalFunction.h: Specify JS_EXPORTDATA on exported data.
2967         * runtime/JSArray.h: Specify JS_EXPORTDATA on exported data.
2968         * runtime/JSFunction.h: Specify JS_EXPORTDATA on exported data.
2969         * runtime/StringObject.h: Specify JS_EXPORTDATA on exported data.
2970         * runtime/UString.h: Specify JS_EXPORTDATA on exported data.
2971
2972 2009-04-20  Sam Weinig  <sam@webkit.org>
2973
2974         Reviewed by Kevin McCullough.
2975
2976         Always tag mmaped memory on darwin and clean up #defines
2977         now that they are a little bigger.
2978
2979         * interpreter/RegisterFile.h:
2980         (JSC::RegisterFile::RegisterFile):
2981         * jit/ExecutableAllocatorFixedVMPool.cpp:
2982         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
2983         * jit/ExecutableAllocatorPosix.cpp:
2984         (JSC::ExecutablePool::systemAlloc):
2985         * runtime/Collector.cpp:
2986         (JSC::allocateBlock):
2987
2988 2009-04-20  Sam Weinig  <sam@webkit.org>
2989
2990         Rubber-stamped by Tim Hatcher.
2991
2992         Add licenses for xcconfig files.
2993
2994         * Configurations/Base.xcconfig:
2995         * Configurations/DebugRelease.xcconfig:
2996         * Configurations/FeatureDefines.xcconfig:
2997         * Configurations/JavaScriptCore.xcconfig:
2998         * Configurations/Version.xcconfig:
2999
3000 2009-04-20  Ariya Hidayat  <ariya.hidayat@nokia.com>
3001
3002         Build fix for Qt port (after r42646). Not reviewed.
3003
3004         * wtf/unicode/qt4/UnicodeQt4.h: Added U16_PREV.
3005
3006 2009-04-19  Sam Weinig  <sam@webkit.org>
3007
3008         Reviewed by Darin Adler.
3009
3010         Better fix for JSStringCreateWithCFString hardening.
3011
3012         * API/JSStringRefCF.cpp:
3013         (JSStringCreateWithCFString):
3014
3015 2009-04-19  Sam Weinig  <sam@webkit.org>
3016
3017         Reviewed by Dan Bernstein.
3018
3019         Fix for <rdar://problem/5860954>
3020         Harden JSStringCreateWithCFString against malformed CFStringRefs.
3021
3022         * API/JSStringRefCF.cpp:
3023         (JSStringCreateWithCFString):
3024
3025 2009-04-19  David Kilzer  <ddkilzer@apple.com>
3026
3027         Make FEATURE_DEFINES completely dynamic
3028
3029         Reviewed by Darin Adler.
3030
3031         Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
3032         variables for each feature, making it possible to remove all
3033         knowledge of FEATURE_DEFINES from build-webkit.
3034
3035         * Configurations/FeatureDefines.xcconfig: Extract a variable
3036         from FEATURE_DEFINES for each feature setting.
3037
3038 2009-04-18  Sam Weinig  <sam@webkit.org>
3039
3040         Reviewed by Dan Bernstein.
3041
3042         Fix typo.  s/VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE/VM_MEMORY_JAVASCRIPT_CORE/
3043
3044         * runtime/Collector.cpp:
3045         (JSC::allocateBlock): Fix bozo typo.
3046
3047 2009-04-18  Sam Weinig  <sam@webkit.org>
3048
3049         Reviewed by Anders Carlsson.
3050
3051         Fix for <rdar://problem/6801555> Tag JavaScript memory on SnowLeopard
3052
3053         * interpreter/RegisterFile.h:
3054         (JSC::RegisterFile::RegisterFile):
3055         * jit/ExecutableAllocatorFixedVMPool.cpp:
3056         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3057         * jit/ExecutableAllocatorPosix.cpp:
3058         (JSC::ExecutablePool::systemAlloc):
3059         * runtime/Collector.cpp:
3060         (JSC::allocateBlock):
3061
3062 2009-04-18  Drew Wilson  <amw@apple.com>
3063
3064         <rdar://problem/6781407> VisiblePosition.characterAfter should return UChar32
3065
3066         Reviewed by Dan Bernstein.
3067
3068         * wtf/unicode/icu/UnicodeIcu.h:
3069         (WTF::Unicode::hasLineBreakingPropertyComplexContextOrIdeographic): Added.
3070
3071 2009-04-18  Sam Weinig  <sam@webkit.org>
3072
3073         Reviewed by Mark Rowe.
3074
3075         Fix for <rdar://problem/5861045>
3076         A little bit of hardening for UString.
3077
3078         * runtime/UString.cpp:
3079         (JSC::concatenate):
3080         (JSC::UString::append):
3081
3082 2009-04-18  Sam Weinig  <sam@webkit.org>
3083
3084         Reviewed by Mark Rowe and Dan Bernstein.
3085
3086         Fix for <rdar://problem/5861188>
3087         A little bit of hardening for Vector.
3088
3089         * wtf/Vector.h:
3090         (WTF::Vector<T, inlineCapacity>::append):
3091         (WTF::Vector<T, inlineCapacity>::insert):
3092
3093 2009-04-17  Gavin Barraclough  <barraclough@apple.com>
3094
3095         Reviewed by Geoff Garen.
3096
3097         On x86_64, make all JIT-code allocations from a new heap, managed
3098         by FixedVMPoolAllocator.  This class allocates a single large (2Gb)
3099         pool of virtual memory from which all further allocations take place.
3100         Since all JIT code is allocated from this pool, we can continue to
3101         safely assume (as is already asserted) that it will always be possible
3102         to link any JIT-code to JIT-code jumps and calls.
3103
3104         * JavaScriptCore.xcodeproj/project.pbxproj:
3105             Add new file.
3106         * jit/ExecutableAllocatorFixedVMPool.cpp: Added.
3107         (JSC::FreeListEntry::FreeListEntry):
3108         (JSC::AVLTreeAbstractorForFreeList::get_less):
3109         (JSC::AVLTreeAbstractorForFreeList::set_less):
3110         (JSC::AVLTreeAbstractorForFreeList::get_greater):
3111         (JSC::AVLTreeAbstractorForFreeList::set_greater):
3112         (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
3113         (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
3114         (JSC::AVLTreeAbstractorForFreeList::null):
3115         (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
3116         (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
3117         (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
3118         (JSC::sortFreeListEntriesByPointer):
3119         (JSC::sortCommonSizedAllocations):
3120         (JSC::FixedVMPoolAllocator::release):
3121         (JSC::FixedVMPoolAllocator::reuse):
3122         (JSC::FixedVMPoolAllocator::addToFreeList):
3123         (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
3124         (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
3125         (JSC::FixedVMPoolAllocator::alloc):
3126         (JSC::FixedVMPoolAllocator::free):
3127         (JSC::ExecutableAllocator::intializePageSize):
3128         (JSC::ExecutablePool::systemAlloc):
3129         (JSC::ExecutablePool::systemRelease):
3130             The new 2Gb heap class!
3131         * jit/ExecutableAllocatorPosix.cpp:
3132             Disable use of this implementation on x86_64.
3133         * wtf/AVLTree.h:
3134             Add missing variable initialization.
3135         (WTF::::remove):
3136
3137 2009-04-17  Oliver Hunt  <oliver@apple.com>
3138
3139         Reviewed by Darin Adler.
3140
3141         Fix bug where the VM reentry cache would not correctly unroll the cached callframe
3142
3143         Fix a check that was intended to mark a cached call as invalid when the callframe could
3144         not be constructed.  Instead it was just checking that there was a place to put the
3145         exception.  This eventually results in a non-recoverable RegisterFile starvation.
3146
3147         * interpreter/CachedCall.h:
3148         (JSC::CachedCall::CachedCall):
3149         (JSC::CachedCall::call): add assertion to ensure we don't use a bad callframe
3150
3151 2009-04-17  David Kilzer  <ddkilzer@apple.com>
3152
3153         Simplify FEATURE_DEFINES definition
3154
3155         Reviewed by Darin Adler.
3156
3157         This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
3158         variables to their own FeatureDefines.xcconfig file.  It also
3159         extracts a new ENABLE_GEOLOCATION variable so that
3160         FEATURE_DEFINES only needs to be defined once.
3161
3162         * Configurations/FeatureDefines.xcconfig: Added.
3163         * Configurations/JavaScriptCore.xcconfig: Removed definition of
3164         ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES.  Added include
3165         of FeatureDefines.xcconfig.
3166         * JavaScriptCore.xcodeproj/project.pbxproj: Added
3167         FeatureDefines.xcconfig file.
3168
3169 2009-04-08  Mihnea Ovidenie  <mihnea@adobe.com>
3170
3171         Reviewed by Oliver Hunt.
3172
3173         Bug 25027: JavaScript parseInt wrong on negative numbers
3174         <https://bugs.webkit.org/show_bug.cgi?id=25027>
3175
3176         When dealing with negative numbers, parseInt should use ceil instead of floor.
3177
3178         * runtime/JSGlobalObjectFunctions.cpp:
3179         (JSC::globalFuncParseInt):
3180
3181 2009-04-16  Stephanie Lewis  <slewis@apple.com>
3182
3183         Reviewed by Oliver Hunt.
3184
3185         <rdar://problem/6744652> 32-bit to 64-bit: Javascript hash tables double in size
3186
3187         Remove perfect hash optimization which removes 1 MB of overhead on 32-bit and almost 2 MB on 64-bit.  Removing the optimization was not a regression on SunSpider and the acid 3 test still passes.
3188
3189         * create_hash_table:
3190         * runtime/Lookup.cpp:
3191         (JSC::HashTable::createTable):
3192         (JSC::HashTable::deleteTable):
3193         * runtime/Lookup.h:
3194         (JSC::HashEntry::initialize):
3195         (JSC::HashEntry::next):
3196         (JSC::HashTable::entry):
3197         * runtime/Structure.cpp:
3198         (JSC::Structure::getEnumerableNamesFromClassInfoTable):
3199
3200 2009-04-16  Oliver Hunt  <oliver@apple.com>
3201
3202         Reviewed by Gavin Barraclough.
3203
3204         Fix subtle error in optimised VM reentry in Array.sort
3205
3206         Basically to ensure we don't accidentally invalidate the cached callframe
3207         we should be using the cached callframe rather than our own exec state.
3208         While the old behaviour was wrong i have been unable to actually create a
3209         test case where anything actually ends up going wrong.
3210
3211         * interpreter/CachedCall.h:
3212         (JSC::CachedCall::newCallFrame):
3213         * runtime/JSArray.cpp:
3214         (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
3215
3216 2009-04-16  Oliver Hunt  <oliver@apple.com>
3217
3218         Reviewed by Gavin Barraclough.
3219
3220         Optimise op_resolve_base
3221
3222         If we can statically find a property we are trying to resolve
3223         the base of, the base is guaranteed to be the global object.
3224
3225         * bytecompiler/BytecodeGenerator.cpp:
3226         (JSC::BytecodeGenerator::emitResolveBase):
3227
3228 2009-04-16  Oliver Hunt  <oliver@apple.com>
3229
3230         Reviewed by Gavin Barraclough.
3231
3232         Improve performance of read-write-modify operators
3233
3234         Implement cross scope optimisation for read-write-modify
3235         operators, to avoid unnecessary calls to property resolve
3236         helper functions.
3237
3238         * bytecompiler/BytecodeGenerator.cpp:
3239         (JSC::BytecodeGenerator::BytecodeGenerator):
3240         (JSC::BytecodeGenerator::emitLoadGlobalObject):
3241         (JSC::BytecodeGenerator::emitResolveWithBase):
3242         * bytecompiler/BytecodeGenerator.h:
3243
3244 2009-04-16  Oliver Hunt  <oliver@apple.com>
3245
3246         Reviewed by Gavin Barraclough.
3247
3248         Improve performance of remaining array enumeration functions
3249
3250         Make use of function entry cache for remaining Array enumeration functions.
3251
3252         * runtime/ArrayPrototype.cpp:
3253         (JSC::arrayProtoFuncMap):
3254         (JSC::arrayProtoFuncEvery):
3255         (JSC::arrayProtoFuncForEach):
3256         (JSC::arrayProtoFuncSome):
3257
3258 2009-04-15  Oliver Hunt  <oliver@apple.com>
3259
3260         Reviewed by Gavin Barraclough.
3261
3262         Improve performance of Array.sort
3263
3264         Cache the VM entry for Array.sort when using a JS comparison function.
3265
3266         * runtime/JSArray.cpp:
3267         (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key):
3268         (JSC::JSArray::sort):
3269
3270 2009-04-15  Oliver Hunt  <oliver@apple.com>
3271
3272         Reviewed by Gavin Barraclough.
3273
3274         Bug 25229: Need support for Array.prototype.reduceRight
3275         <https://bugs.webkit.org/show_bug.cgi?id=25229>
3276
3277         Implement Array.reduceRight
3278
3279         * runtime/ArrayPrototype.cpp:
3280         (JSC::arrayProtoFuncReduceRight):
3281
3282 2009-04-15  Oliver Hunt  <oliver@apple.com>
3283
3284         Reviewed by Gavin Barraclough.
3285
3286         Bug 25227: Array.filter triggers an assertion when the target array shrinks while being filtered
3287         <https://bugs.webkit.org/show_bug.cgi?id=25227>
3288
3289         We correct this simply by making the fast array path fall back on the slow path if
3290         we ever discover the fast access is unsafe.
3291
3292         * runtime/ArrayPrototype.cpp:
3293         (JSC::arrayProtoFuncFilter):
3294
3295 2009-04-13  Oliver Hunt  <oliver@apple.com>
3296
3297         Reviewed by Gavin Barraclough.
3298
3299         Bug 25159: Support Array.prototype.reduce
3300         <https://bugs.webkit.org/show_bug.cgi?id=25159>
3301
3302         Implement Array.prototype.reduce
3303
3304         * runtime/ArrayPrototype.cpp:
3305         (JSC::arrayProtoFuncReduce):
3306
3307 2009-04-15  Oliver Hunt  <oliver@apple.com>
3308
3309         Reviewed by NOBODY (Build fix).
3310
3311         Move CallFrameClosure from inside the Interpreter class to its own file.
3312
3313         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3314         * JavaScriptCore.xcodeproj/project.pbxproj:
3315         * interpreter/CachedCall.h:
3316         * interpreter/CallFrameClosure.h: Copied from JavaScriptCore/yarr/RegexJIT.h.
3317         (JSC::CallFrameClosure::setArgument):
3318         (JSC::CallFrameClosure::resetCallFrame):
3319         * interpreter/Interpreter.cpp:
3320         (JSC::Interpreter::prepareForRepeatCall):
3321         * interpreter/Interpreter.h:
3322
3323 2009-04-14  Oliver Hunt  <oliver@apple.com>
3324
3325         Reviewed by Cameron Zwarich.
3326
3327         Bug 25202: Improve performance of repeated callbacks into the VM
3328
3329         Add the concept of a CachedCall to native code for use in Array
3330         prototype and similar functions where a single callback function
3331         is called repeatedly with the same number of arguments.
3332
3333         Used Array.prototype.filter as the test function and got a 50% win
3334         over a naive non-caching specialised version.  This makes the native
3335         implementation of Array.prototype.filter faster than the JS one once
3336         more.
3337
3338         * JavaScriptCore.vcproj/JavaScriptCore.sln:
3339         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3340         * JavaScriptCore.xcodeproj/project.pbxproj:
3341         * interpreter/CachedCall.h: Added.
3342         (JSC::CachedCall::CachedCall):
3343         (JSC::CachedCall::call):
3344         (JSC::CachedCall::setThis):
3345         (JSC::CachedCall::setArgument):
3346         (JSC::CachedCall::~CachedCall):
3347            CachedCall is a wrapper that automates the calling and teardown
3348            for a CallFrameClosure
3349         * interpreter/CallFrame.h:
3350         * interpreter/Interpreter.cpp:
3351         (JSC::Interpreter::prepareForRepeatCall):
3352            Create the basic entry closure for a function
3353         (JSC::Interpreter::execute):
3354            A new ::execute method to enter the interpreter from a closure
3355         (JSC::Interpreter::endRepeatCall):
3356            Clear the entry closure
3357         * interpreter/Interpreter.h:
3358         (JSC::Interpreter::CallFrameClosure::setArgument):
3359         (JSC::Interpreter::CallFrameClosure::resetCallFrame):
3360            Helper functions to simplify setting up the closure's callframe
3361         * runtime/ArrayPrototype.cpp:
3362         (JSC::arrayProtoFuncFilter):
3363
3364 2009-04-14  Xan Lopez  <xlopez@igalia.com>
3365
3366         Fix the build.
3367
3368         Add the yarr headers (and only the headers) to the build, so that
3369         RegExp.cpp can compile. The headers are ifdefed out with yarr
3370         disabled, so we don't need anything else for now.
3371
3372         * GNUmakefile.am:
3373
3374 2009-04-14  Adam Roben  <aroben@apple.com>
3375
3376         Remove support for profile-guided optimization on Windows
3377
3378         Rubber-stamped by Steve Falkenburg.
3379
3380         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed
3381         the Release_PGO configuration. Also let VS re-order the source files
3382         list.
3383
3384 2009-04-14  Xan Lopez  <xlopez@igalia.com>
3385
3386         Unreviewed build fix.
3387
3388         * GNUmakefile.am:
3389
3390 2009-04-14  Jan Michael Alonzo  <jmalonzo@webkit.org>
3391
3392         Gtk build fix when building minidom. Not reviewed.
3393
3394         Use C-style comment instead of C++ style since autotools builds
3395         minidom using gcc and not g++.
3396
3397         * wtf/Platform.h:
3398
3399 2009-04-14  Gavin Barraclough  <barraclough@apple.com>
3400
3401         Reviewed by NOBODY - speculative build fix.
3402
3403         * runtime/RegExp.h:
3404
3405 2009-04-13  Gavin Barraclough  <barraclough@apple.com>
3406
3407         Reviewed by Cap'n Geoff Garen.
3408
3409         Yarr!
3410         (Yet another regex runtime).
3411
3412         Currently disabled by default since the interpreter, whilst awesomely
3413         functional, has not been optimized and is likely slower than PCRE, and
3414         the JIT, whilst faster than WREC, is presently incomplete and does not
3415         fallback to using an interpreter for the cases it cannot handle.
3416
3417         * JavaScriptCore.xcodeproj/project.pbxproj:
3418         * assembler/MacroAssemblerX86Common.h:
3419         (JSC::MacroAssemblerX86Common::move):
3420         (JSC::MacroAssemblerX86Common::swap):
3421         (JSC::MacroAssemblerX86Common::signExtend32ToPtr):
3422         (JSC::MacroAssemblerX86Common::zeroExtend32ToPtr):
3423         (JSC::MacroAssemblerX86Common::branch32):
3424         (JSC::MacroAssemblerX86Common::branch16):
3425         * assembler/X86Assembler.h:
3426         (JSC::X86Assembler::cmpw_im):
3427         (JSC::X86Assembler::testw_rr):
3428         (JSC::X86Assembler::X86InstructionFormatter::immediate16):
3429         * runtime/RegExp.cpp:
3430         (JSC::RegExp::RegExp):
3431         (JSC::RegExp::~RegExp):
3432         (JSC::RegExp::create):
3433         (JSC::RegExp::compile):
3434         (JSC::RegExp::match):
3435         * runtime/RegExp.h:
3436         * wtf/Platform.h:
3437         * yarr: Added.
3438         * yarr/RegexCompiler.cpp: Added.
3439         (JSC::Yarr::CharacterClassConstructor::CharacterClassConstructor):
3440         (JSC::Yarr::CharacterClassConstructor::reset):
3441         (JSC::Yarr::CharacterClassConstructor::append):
3442         (JSC::Yarr::CharacterClassConstructor::putChar):
3443         (JSC::Yarr::CharacterClassConstructor::isUnicodeUpper):
3444         (JSC::Yarr::CharacterClassConstructor::isUnicodeLower):
3445         (JSC::Yarr::CharacterClassConstructor::putRange):
3446         (JSC::Yarr::CharacterClassConstructor::charClass):
3447         (JSC::Yarr::CharacterClassConstructor::addSorted):
3448         (JSC::Yarr::CharacterClassConstructor::addSortedRange):
3449         (JSC::Yarr::newlineCreate):
3450         (JSC::Yarr::digitsCreate):
3451         (JSC::Yarr::spacesCreate):
3452         (JSC::Yarr::wordcharCreate):
3453         (JSC::Yarr::nondigitsCreate):
3454         (JSC::Yarr::nonspacesCreate):
3455         (JSC::Yarr::nonwordcharCreate):
3456         (JSC::Yarr::RegexPatternConstructor::RegexPatternConstructor):
3457         (JSC::Yarr::RegexPatternConstructor::~RegexPatternConstructor):
3458         (JSC::Yarr::RegexPatternConstructor::reset):
3459         (JSC::Yarr::RegexPatternConstructor::assertionBOL):
3460         (JSC::Yarr::RegexPatternConstructor::assertionEOL):
3461         (JSC::Yarr::RegexPatternConstructor::assertionWordBoundary):
3462         (JSC::Yarr::RegexPatternConstructor::atomPatternCharacter):
3463         (JSC::Yarr::RegexPatternConstructor::atomBuiltInCharacterClass):
3464         (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBegin):
3465         (JSC::Yarr::RegexPatternConstructor::atomCharacterClassAtom):
3466         (JSC::Yarr::RegexPatternConstructor::atomCharacterClassRange):
3467         (JSC::Yarr::RegexPatternConstructor::atomCharacterClassBuiltIn):
3468         (JSC::Yarr::RegexPatternConstructor::atomCharacterClassEnd):
3469         (JSC::Yarr::RegexPatternConstructor::atomParenthesesSubpatternBegin):
3470         (JSC::Yarr::RegexPatternConstructor::atomParentheticalAssertionBegin):
3471         (JSC::Yarr::RegexPatternConstructor::atomParenthesesEnd):
3472         (JSC::Yarr::RegexPatternConstructor::atomBackReference):
3473         (JSC::Yarr::RegexPatternConstructor::copyDisjunction):
3474         (JSC::Yarr::RegexPatternConstructor::copyTerm):
3475         (JSC::Yarr::RegexPatternConstructor::quantifyAtom):
3476         (JSC::Yarr::RegexPatternConstructor::disjunction):
3477         (JSC::Yarr::RegexPatternConstructor::regexBegin):
3478         (JSC::Yarr::RegexPatternConstructor::regexEnd):
3479         (JSC::Yarr::RegexPatternConstructor::regexError):
3480         (JSC::Yarr::RegexPatternConstructor::setupAlternativeOffsets):
3481         (JSC::Yarr::RegexPatternConstructor::setupDisjunctionOffsets):
3482         (JSC::Yarr::RegexPatternConstructor::setupOffsets):
3483         (JSC::Yarr::compileRegex):
3484         * yarr/RegexCompiler.h: Added.
3485         * yarr/RegexInterpreter.cpp: Added.
3486         (JSC::Yarr::Interpreter::appendParenthesesDisjunctionContext):
3487         (JSC::Yarr::Interpreter::popParenthesesDisjunctionContext):
3488         (JSC::Yarr::Interpreter::DisjunctionContext::DisjunctionContext):
3489         (JSC::Yarr::Interpreter::DisjunctionContext::operator new):
3490         (JSC::Yarr::Interpreter::allocDisjunctionContext):
3491         (JSC::Yarr::Interpreter::freeDisjunctionContext):
3492         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::ParenthesesDisjunctionContext):
3493         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::operator new):
3494         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::restoreOutput):
3495         (JSC::Yarr::Interpreter::ParenthesesDisjunctionContext::getDisjunctionContext):
3496         (JSC::Yarr::Interpreter::allocParenthesesDisjunctionContext):
3497         (JSC::Yarr::Interpreter::freeParenthesesDisjunctionContext):
3498         (JSC::Yarr::Interpreter::InputStream::InputStream):
3499         (JSC::Yarr::Interpreter::InputStream::next):
3500         (JSC::Yarr::Interpreter::InputStream::rewind):
3501         (JSC::Yarr::Interpreter::InputStream::read):
3502         (JSC::Yarr::Interpreter::InputStream::readChecked):
3503         (JSC::Yarr::Interpreter::InputStream::reread):
3504         (JSC::Yarr::Interpreter::InputStream::prev):
3505         (JSC::Yarr::Interpreter::InputStream::getPos):
3506         (JSC::Yarr::Interpreter::InputStream::setPos):
3507         (JSC::Yarr::Interpreter::InputStream::atStart):
3508         (JSC::Yarr::Interpreter::InputStream::atEnd):
3509         (JSC::Yarr::Interpreter::InputStream::checkInput):
3510         (JSC::Yarr::Interpreter::InputStream::uncheckInput):
3511         (JSC::Yarr::Interpreter::testCharacterClass):
3512         (JSC::Yarr::Interpreter::tryConsumeCharacter):
3513         (JSC::Yarr::Interpreter::checkCharacter):
3514         (JSC::Yarr::Interpreter::tryConsumeCharacterClass):
3515         (JSC::Yarr::Interpreter::checkCharacterClass):
3516         (JSC::Yarr::Interpreter::tryConsumeBackReference):
3517         (JSC::Yarr::Interpreter::matchAssertionBOL):
3518         (JSC::Yarr::Interpreter::matchAssertionEOL):
3519         (JSC::Yarr::Interpreter::matchAssertionWordBoundary):
3520         (JSC::Yarr::Interpreter::matchPatternCharacter):
3521         (JSC::Yarr::Interpreter::backtrackPatternCharacter):
3522         (JSC::Yarr::Interpreter::matchCharacterClass):
3523         (JSC::Yarr::Interpreter::backtrackCharacterClass):
3524         (JSC::Yarr::Interpreter::matchBackReference):
3525         (JSC::Yarr::Interpreter::backtrackBackReference):
3526         (JSC::Yarr::Interpreter::recordParenthesesMatch):
3527         (JSC::Yarr::Interpreter::resetMatches):
3528         (JSC::Yarr::Interpreter::resetAssertionMatches):
3529         (JSC::Yarr::Interpreter::parenthesesDoBacktrack):
3530         (JSC::Yarr::Interpreter::matchParenthesesOnceBegin):
3531         (JSC::Yarr::Interpreter::matchParenthesesOnceEnd):
3532         (JSC::Yarr::Interpreter::backtrackParenthesesOnceBegin):
3533         (JSC::Yarr::Interpreter::backtrackParenthesesOnceEnd):
3534         (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceBegin):
3535         (JSC::Yarr::Interpreter::matchParentheticalAssertionOnceEnd):
3536         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceBegin):
3537         (JSC::Yarr::Interpreter::backtrackParentheticalAssertionOnceEnd):
3538         (JSC::Yarr::Interpreter::matchParentheses):
3539         (JSC::Yarr::Interpreter::backtrackParentheses):
3540         (JSC::Yarr::Interpreter::matchTerm):
3541         (JSC::Yarr::Interpreter::backtrackTerm):
3542         (JSC::Yarr::Interpreter::matchAlternative):
3543         (JSC::Yarr::Interpreter::matchDisjunction):
3544         (JSC::Yarr::Interpreter::matchNonZeroDisjunction):
3545         (JSC::Yarr::Interpreter::interpret):
3546         (JSC::Yarr::Interpreter::Interpreter):
3547         (JSC::Yarr::ByteCompiler::ParenthesesStackEntry::ParenthesesStackEntry):
3548         (JSC::Yarr::ByteCompiler::ByteCompiler):
3549         (JSC::Yarr::ByteCompiler::compile):
3550         (JSC::Yarr::ByteCompiler::checkInput):
3551         (JSC::Yarr::ByteCompiler::assertionBOL):
3552         (JSC::Yarr::ByteCompiler::assertionEOL):
3553         (JSC::Yarr::ByteCompiler::assertionWordBoundary):
3554         (JSC::Yarr::ByteCompiler::atomPatternCharacter):
3555         (JSC::Yarr::ByteCompiler::atomCharacterClass):
3556         (JSC::Yarr::ByteCompiler::atomBackReference):
3557         (JSC::Yarr::ByteCompiler::atomParenthesesSubpatternBegin):
3558         (JSC::Yarr::ByteCompiler::atomParentheticalAssertionBegin):
3559         (JSC::Yarr::ByteCompiler::popParenthesesStack):
3560         (JSC::Yarr::ByteCompiler::dumpDisjunction):
3561         (JSC::Yarr::ByteCompiler::closeAlternative):
3562         (JSC::Yarr::ByteCompiler::atomParenthesesEnd):
3563         (JSC::Yarr::ByteCompiler::regexBegin):
3564         (JSC::Yarr::ByteCompiler::regexEnd):
3565         (JSC::Yarr::ByteCompiler::alterantiveDisjunction):
3566         (JSC::Yarr::ByteCompiler::emitDisjunction):
3567         (JSC::Yarr::byteCompileRegex):
3568         (JSC::Yarr::interpretRegex):
3569         * yarr/RegexInterpreter.h: Added.
3570         (JSC::Yarr::ByteTerm::):
3571         (JSC::Yarr::ByteTerm::ByteTerm):
3572         (JSC::Yarr::ByteTerm::BOL):
3573         (JSC::Yarr::ByteTerm::CheckInput):
3574         (JSC::Yarr::ByteTerm::EOL):
3575         (JSC::Yarr::ByteTerm::WordBoundary):
3576         (JSC::Yarr::ByteTerm::BackReference):
3577         (JSC::Yarr::ByteTerm::AlternativeBegin):
3578         (JSC::Yarr::ByteTerm::AlternativeDisjunction):
3579         (JSC::Yarr::ByteTerm::AlternativeEnd):
3580         (JSC::Yarr::ByteTerm::PatternEnd):
3581         (JSC::Yarr::ByteTerm::invert):
3582         (JSC::Yarr::ByteTerm::capture):
3583         (JSC::Yarr::ByteDisjunction::ByteDisjunction):
3584         (JSC::Yarr::BytecodePattern::BytecodePattern):
3585         (JSC::Yarr::BytecodePattern::~BytecodePattern):
3586         * yarr/RegexJIT.cpp: Added.
3587         (JSC::Yarr::RegexGenerator::optimizeAlternative):
3588         (JSC::Yarr::RegexGenerator::matchCharacterClassRange):
3589         (JSC::Yarr::RegexGenerator::matchCharacterClass):
3590         (JSC::Yarr::RegexGenerator::jumpIfNoAvailableInput):
3591         (JSC::Yarr::RegexGenerator::jumpIfAvailableInput):
3592         (JSC::Yarr::RegexGenerator::checkInput):
3593         (JSC::Yarr::RegexGenerator::atEndOfInput):
3594         (JSC::Yarr::RegexGenerator::notAtEndOfInput):
3595         (JSC::Yarr::RegexGenerator::jumpIfCharEquals):
3596         (JSC::Yarr::RegexGenerator::jumpIfCharNotEquals):
3597         (JSC::Yarr::RegexGenerator::readCharacter):
3598         (JSC::Yarr::RegexGenerator::storeToFrame):
3599         (JSC::Yarr::RegexGenerator::loadFromFrame):
3600         (JSC::Yarr::RegexGenerator::TermGenerationState::TermGenerationState):
3601         (JSC::Yarr::RegexGenerator::TermGenerationState::resetAlternative):
3602         (JSC::Yarr::RegexGenerator::TermGenerationState::alternativeValid):
3603         (JSC::Yarr::RegexGenerator::TermGenerationState::nextAlternative):
3604         (JSC::Yarr::RegexGenerator::TermGenerationState::alternative):
3605         (JSC::Yarr::RegexGenerator::TermGenerationState::resetTerm):
3606         (JSC::Yarr::RegexGenerator::TermGenerationState::termValid):
3607         (JSC::Yarr::RegexGenerator::TermGenerationState::nextTerm):
3608         (JSC::Yarr::RegexGenerator::TermGenerationState::term):
3609         (JSC::Yarr::RegexGenerator::TermGenerationState::lookaheadTerm):
3610         (JSC::Yarr::RegexGenerator::TermGenerationState::isSinglePatternCharacterLookaheadTerm):
3611         (JSC::Yarr::RegexGenerator::TermGenerationState::inputOffset):
3612         (JSC::Yarr::RegexGenerator::TermGenerationState::jumpToBacktrack):
3613         (JSC::Yarr::RegexGenerator::TermGenerationState::setBacktrackGenerated):
3614         (JSC::Yarr::RegexGenerator::jumpToBacktrackCheckEmitPending):
3615         (JSC::Yarr::RegexGenerator::genertateAssertionBOL):
3616         (JSC::Yarr::RegexGenerator::genertateAssertionEOL):
3617         (JSC::Yarr::RegexGenerator::matchAssertionWordchar):
3618         (JSC::Yarr::RegexGenerator::genertateAssertionWordBoundary):
3619         (JSC::Yarr::RegexGenerator::genertatePatternCharacterSingle):
3620         (JSC::Yarr::RegexGenerator::genertatePatternCharacterPair):
3621         (JSC::Yarr::RegexGenerator::genertatePatternCharacterFixed):
3622         (JSC::Yarr::RegexGenerator::genertatePatternCharacterGreedy):
3623         (JSC::Yarr::RegexGenerator::genertatePatternCharacterNonGreedy):
3624         (JSC::Yarr::RegexGenerator::genertateCharacterClassSingle):
3625         (JSC::Yarr::RegexGenerator::genertateCharacterClassFixed):
3626         (JSC::Yarr::RegexGenerator::genertateCharacterClassGreedy):
3627         (JSC::Yarr::RegexGenerator::genertateCharacterClassNonGreedy):
3628         (JSC::Yarr::RegexGenerator::generateParenthesesSingleDisjunctionOneAlternative):
3629         (JSC::Yarr::RegexGenerator::generateParenthesesSingle):
3630         (JSC::Yarr::RegexGenerator::generateTerm):
3631         (JSC::Yarr::RegexGenerator::generateDisjunction):
3632         (JSC::Yarr::RegexGenerator::RegexGenerator):
3633         (JSC::Yarr::RegexGenerator::generate):
3634         (JSC::Yarr::jitCompileRegex):
3635         (JSC::Yarr::executeRegex):
3636         * yarr/RegexJIT.h: Added.
3637         (JSC::Yarr::RegexCodeBlock::RegexCodeBlock):
3638         * yarr/RegexParser.h: Added.
3639         (JSC::Yarr::):
3640         (JSC::Yarr::Parser::):
3641         (JSC::Yarr::Parser::CharacterClassParserDelegate::CharacterClassParserDelegate):
3642         (JSC::Yarr::Parser::CharacterClassParserDelegate::begin):
3643         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacterUnescaped):
3644         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomPatternCharacter):
3645         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBuiltInCharacterClass):
3646         (JSC::Yarr::Parser::CharacterClassParserDelegate::end):
3647         (JSC::Yarr::Parser::CharacterClassParserDelegate::assertionWordBoundary):
3648         (JSC::Yarr::Parser::CharacterClassParserDelegate::atomBackReference):
3649         (JSC::Yarr::Parser::CharacterClassParserDelegate::flush):
3650         (JSC::Yarr::Parser::CharacterClassParserDelegate::):
3651         (JSC::Yarr::Parser::Parser):
3652         (JSC::Yarr::Parser::parseEscape):
3653         (JSC::Yarr::Parser::parseAtomEscape):
3654         (JSC::Yarr::Parser::parseCharacterClassEscape):
3655         (JSC::Yarr::Parser::parseCharacterClass):
3656         (JSC::Yarr::Parser::parseParenthesesBegin):
3657         (JSC::Yarr::Parser::parseParenthesesEnd):
3658         (JSC::Yarr::Parser::parseQuantifier):
3659         (JSC::Yarr::Parser::parseTokens):
3660         (JSC::Yarr::Parser::parse):
3661         (JSC::Yarr::Parser::saveState):
3662         (JSC::Yarr::Parser::restoreState):
3663         (JSC::Yarr::Parser::atEndOfPattern):
3664         (JSC::Yarr::Parser::peek):
3665         (JSC::Yarr::Parser::peekIsDigit):
3666         (JSC::Yarr::Parser::peekDigit):
3667         (JSC::Yarr::Parser::consume):
3668         (JSC::Yarr::Parser::consumeDigit):
3669         (JSC::Yarr::Parser::consumeNumber):
3670         (JSC::Yarr::Parser::consumeOctal):
3671         (JSC::Yarr::Parser::tryConsume):
3672         (JSC::Yarr::Parser::tryConsumeHex):
3673         (JSC::Yarr::parse):
3674         * yarr/RegexPattern.h: Added.
3675         (JSC::Yarr::CharacterRange::CharacterRange):
3676         (JSC::Yarr::):
3677         (JSC::Yarr::PatternTerm::):
3678         (JSC::Yarr::PatternTerm::PatternTerm):
3679         (JSC::Yarr::PatternTerm::BOL):
3680         (JSC::Yarr::PatternTerm::EOL):
3681         (JSC::Yarr::PatternTerm::WordBoundary):
3682         (JSC::Yarr::PatternTerm::invert):
3683         (JSC::Yarr::PatternTerm::capture):
3684         (JSC::Yarr::PatternTerm::quantify):
3685         (JSC::Yarr::PatternAlternative::PatternAlternative):
3686         (JSC::Yarr::PatternAlternative::lastTerm):
3687         (JSC::Yarr::PatternAlternative::removeLastTerm):
3688         (JSC::Yarr::PatternDisjunction::PatternDisjunction):
3689         (JSC::Yarr::PatternDisjunction::~PatternDisjunction):
3690         (JSC::Yarr::PatternDisjunction::addNewAlternative):
3691         (JSC::Yarr::RegexPattern::RegexPattern):
3692         (JSC::Yarr::RegexPattern::~RegexPattern):
3693         (JSC::Yarr::RegexPattern::reset):
3694         (JSC::Yarr::RegexPattern::containsIllegalBackReference):
3695         (JSC::Yarr::RegexPattern::newlineCharacterClass):
3696         (JSC::Yarr::RegexPattern::digitsCharacterClass):
3697         (JSC::Yarr::RegexPattern::spacesCharacterClass):
3698         (JSC::Yarr::RegexPattern::wordcharCharacterClass):
3699         (JSC::Yarr::RegexPattern::nondigitsCharacterClass):
3700         (JSC::Yarr::RegexPattern::nonspacesCharacterClass):
3701         (JSC::Yarr::RegexPattern::nonwordcharCharacterClass):
3702
3703 2009-04-13  Oliver Hunt  <oliver@apple.com>
3704
3705         Reviewed by NOBODY (Missed code from last patch).
3706
3707         * runtime/InternalFunction.cpp:
3708         (JSC::InternalFunction::displayName):
3709         (JSC::InternalFunction::calculatedDisplayName):
3710         * runtime/InternalFunction.h:
3711
3712 2009-04-13  Francisco Tolmasky  <francisco@280north.com>
3713
3714         Reviewed by Oliver Hunt.
3715         
3716         BUG 25171: It should be possible to manually set the name of an anonymous function
3717         <https://bugs.webkit.org/show_bug.cgi?id=25171>
3718
3719         This change adds the displayName property to functions, which when set overrides the 
3720         normal name when appearing in the console.
3721
3722         * profiler/Profiler.cpp:
3723         (JSC::createCallIdentifierFromFunctionImp): Changed call to InternalFunction::name to InternalFunction::calculatedDisplayName
3724         * runtime/CommonIdentifiers.h: Added displayName common identifier.
3725         * runtime/InternalFunction.cpp:
3726         (JSC::InternalFunction::displayName): Access to user settable displayName property
3727         (JSC::InternalFunction::calculatedDisplayName): Returns displayName if it exists, if not then the natural name
3728
3729 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3730
3731         Reviewed by Sam Weinig.
3732
3733         Disabled another JavaScriptCore test because it fails on Windows but
3734         not Mac, so it makes the bots red.
3735
3736         * tests/mozilla/expected.html:
3737
3738 2009-04-13  Geoffrey Garen  <ggaren@apple.com>
3739
3740         Reviewed by Sam Weinig.
3741         
3742         Disabled two JavaScriptCore tests because they fail on Window or Mac but
3743         not both, so they make the bots red.
3744
3745         * tests/mozilla/expected.html: Updated expected results.
3746
3747 2009-04-09  Ben Murdoch  <benm@google.com>
3748
3749         Reviewed by Alexey Proskuryakov.
3750
3751         https://bugs.webkit.org/show_bug.cgi?id=25091
3752         The Android platform requires threads to be registered with the VM.
3753         This patch implements this behaviour inside ThreadingPthreads.cpp.
3754
3755         * wtf/ThreadingPthreads.cpp: Add a level above threadEntryPoint that takes care of (un)registering threads with the VM.
3756         (WTF::runThreadWithRegistration): register the thread and run entryPoint. Unregister the thread afterwards.
3757         (WTF::createThreadInternal): call runThreadWithRegistration instead of entryPoint directly.
3758
3759 2009-04-09  David Kilzer  <ddkilzer@apple.com>
3760
3761         Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
3762
3763         Rolled r42345 back in.  The build failure was caused by an
3764         internal script which had not been updated the same way that
3765         build-webkit was updated.
3766
3767         * Configurations/JavaScriptCore.xcconfig:
3768
3769 2009-04-09  Alexey Proskuryakov  <ap@webkit.org>
3770
3771         Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
3772         It broke Mac build, and I don't know how to fix it.
3773
3774         * Configurations/JavaScriptCore.xcconfig:
3775
3776 2009-04-09  Xan Lopez  <xlopez@igalia.com>
3777
3778         Unreviewed build fix.
3779
3780         Checking for __GLIBCXX__ being bigger than some date is not enough
3781         to get std::tr1, C++0x has to be in use too. Add another check for
3782         __GXX_EXPERIMENTAL_CXX0X__.
3783
3784         * wtf/TypeTraits.h:
3785
3786 2009-04-08  Oliver Hunt  <oliver@apple.com>
3787
3788         Reviewed by Adam Roben.
3789
3790         Fix assertion failure in function.apply
3791
3792         The result of excess arguments to function.apply is irrelevant
3793         so we don't need to provide a result register.  We were providing
3794         temporary result register but not ref'ing it resulting in an
3795         assertion failure.
3796
3797         * parser/Nodes.cpp:
3798         (JSC::ApplyFunctionCallDotNode::emitBytecode):
3799
3800 2009-04-08  David Kilzer  <ddkilzer@apple.com>
3801
3802         <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
3803
3804         Reviewed by Darin Adler and Maciej Stachowiak.
3805
3806         Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
3807         that SVG DOM Objective-C bindings may be optionally disabled.
3808
3809         * Configurations/JavaScriptCore.xcconfig: Added
3810         ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
3811         FEATURE_DEFINES.
3812
3813 2009-04-08  Paul Pedriana <ppedriana@ea.com>
3814
3815         Reviewed by Darin Adler.
3816
3817         https://bugs.webkit.org/show_bug.cgi?id=20422
3818         Allow custom memory allocation control.
3819         
3820         * wtf/FastAllocBase.h:
3821         New added file. Implements allocation base class.
3822         * wtf/TypeTraits.h:
3823         Augments existing type traits support as needed by FastAllocBase.
3824         * wtf/FastMalloc.h:
3825         Changed to support FastMalloc match validation.
3826         * wtf/FastMalloc.cpp:
3827         Changed to support FastMalloc match validation.
3828         * wtf/Platform.h:
3829         Added ENABLE_FAST_MALLOC_MATCH_VALIDATION; defaults to 0.
3830         * GNUmakefile.am:
3831         Updated to include added FastAllocBase.h.
3832         * JavaScriptCore.xcodeproj/project.pbxproj:
3833         Updated to include added FastAllocBase.h.
3834         * JavaScriptCore.vcproj/WTF/WTF.vcproj:
3835         Updated to include added FastAllocBase.h.
3836
3837 2009-04-07  Oliver Hunt  <oliver@apple.com>
3838
3839         Reviewed by Geoff Garen.
3840
3841         Improve function.apply performance
3842
3843         Jump through a few hoops to improve performance of function.apply in the general case.
3844
3845         In the case of zero or one arguments, or if there are only two arguments and the
3846         second is an array literal we treat function.apply as function.call.
3847
3848         Otherwise we use the new opcodes op_load_varargs and op_call_varargs to do the .apply call
3849         without re-entering the virtual machine.
3850
3851         * bytecode/CodeBlock.cpp:
3852         (JSC::CodeBlock::dump):
3853         * bytecode/Opcode.h:
3854         * bytecompiler/BytecodeGenerator.cpp:
3855         (JSC::BytecodeGenerator::emitJumpIfNotFunctionApply):
3856         (JSC::BytecodeGenerator::emitLoadVarargs):
3857         (JSC::BytecodeGenerator::emitCallVarargs):
3858         * bytecompiler/BytecodeGenerator.h:
3859         * interpreter/Interpreter.cpp:
3860         (JSC::Interpreter::privateExecute):
3861         * jit/JIT.cpp:
3862         (JSC::JIT::privateCompileMainPass):
3863         (JSC::JIT::privateCompileSlowCases):
3864         * jit/JIT.h:
3865         * jit/JITCall.cpp:
3866         (JSC::JIT::compileOpCallSetupArgs):
3867         (JSC::JIT::compileOpCallVarargsSetupArgs):
3868         (JSC::JIT::compileOpCallVarargs):
3869         (JSC::JIT::compileOpCallVarargsSlowCase):
3870         * jit/JITStubs.cpp:
3871         (JSC::JITStubs::cti_op_load_varargs):
3872         * jit/JITStubs.h:
3873         * parser/Grammar.y:
3874         * parser/Nodes.cpp:
3875         (JSC::ArrayNode::isSimpleArray):
3876         (JSC::ArrayNode::toArgumentList):
3877         (JSC::CallFunctionCallDotNode::emitBytecode):
3878         (JSC::ApplyFunctionCallDotNode::emitBytecode):
3879         * parser/Nodes.h:
3880         (JSC::ExpressionNode::):
3881         (JSC::ApplyFunctionCallDotNode::):
3882         * runtime/Arguments.cpp:
3883         (JSC::Arguments::copyToRegisters):
3884         (JSC::Arguments::fillArgList):
3885         * runtime/Arguments.h:
3886         (JSC::Arguments::numProvidedArguments):
3887         * runtime/FunctionPrototype.cpp:
3888         (JSC::FunctionPrototype::addFunctionProperties):
3889         * runtime/FunctionPrototype.h:
3890         * runtime/JSArray.cpp:
3891         (JSC::JSArray::copyToRegisters):
3892         * runtime/JSArray.h:
3893         * runtime/JSGlobalObject.cpp:
3894         (JSC::JSGlobalObject::reset):
3895         (JSC::JSGlobalObject::mark):
3896         * runtime/JSGlobalObject.h:
3897
3898 2009-04-08  Alexey Proskuryakov  <ap@webkit.org>
3899
3900         Reviewed by Darin Adler.
3901
3902         https://bugs.webkit.org/show_bug.cgi?id=25073
3903         JavaScriptCore tests don't run if time zone is not PST
3904
3905         * API/tests/testapi.c:
3906         (timeZoneIsPST): Added a function that checks whether the time zone is PST, using the same
3907         method as functions in DateMath.cpp do for formatting the result.
3908         (main): Skip date string format test if the time zone is not PST.
3909
3910 2009-04-07  David Levin  <levin@chromium.org>
3911
3912         Reviewed by Sam Weinig and Geoff Garen.
3913
3914         https://bugs.webkit.org/show_bug.cgi?id=25039
3915         UString refactoring to support UChar* sharing.
3916
3917         No change in sunspider perf.
3918
3919         * runtime/SmallStrings.cpp:
3920         (JSC::SmallStringsStorage::SmallStringsStorage):
3921         * runtime/UString.cpp:
3922         (JSC::initializeStaticBaseString):
3923         (JSC::initializeUString):
3924         (JSC::UString::BaseString::isShared):
3925         Encapsulate the meaning behind the refcount == 1 checks because
3926         this needs to do slightly more when sharing is added.
3927         (JSC::concatenate):
3928         (JSC::UString::append):
3929         (JSC::UString::operator=):
3930         * runtime/UString.h:
3931         Make m_baseString part of a union to get rid of casts, but make it protected because
3932         it is tricky to use it correctly since it is only valid when the Rep is not a BaseString.
3933         The void* will be filled in when sharing is added.
3934
3935         Add constructors due to the making members protected and it make ensuring proper
3936         initialization work better (like in SmallStringsStorage).
3937         (JSC::UString::Rep::create):
3938         (JSC::UString::Rep::Rep):
3939         (JSC::UString::Rep::):
3940         (JSC::UString::BaseString::BaseString):
3941         (JSC::UString::Rep::setBaseString):
3942         (JSC::UString::Rep::baseString):
3943
3944 2009-04-04  Xan Lopez  <xlopez@igalia.com>
3945
3946         Reviewed by Alexey Proskuryakov.
3947
3948         https://bugs.webkit.org/show_bug.cgi?id=25033
3949         dtoa.cpp segfaults with g++ 4.4.0
3950
3951         g++ 4.4.0 seems to be more strict about aliasing rules, so it
3952         produces incorrect code if dtoa.cpp is compiled with
3953         -fstrict-aliasing (it also emits a ton of warnings, so fair enough
3954         I guess). The problem was that we were only casting variables to
3955         union types in order to do type punning, but GCC and the C
3956         standard require that we actually use a union to store the value.
3957
3958         This patch does just that, the code is mostly copied from the dtoa
3959         version in GCC:
3960         http://gcc.gnu.org/viewcvs/trunk/libjava/classpath/native/fdlibm/dtoa.c?view=markup.
3961
3962         * wtf/dtoa.cpp:
3963         (WTF::ulp):
3964         (WTF::b2d):
3965         (WTF::ratio):
3966         (WTF::hexnan):
3967         (WTF::strtod):
3968         (WTF::dtoa):
3969
3970 2009-04-04  Kevin Ollivier  <kevino@theolliviers.com>
3971
3972         wx build fix for Win port. Build the assembler sources to get missing functions.
3973
3974         * JavaScriptCoreSources.bkl:
3975         * jscore.bkl:
3976         * wtf/Platform.h:
3977
3978 2009-04-02  Darin Adler  <darin@apple.com>
3979
3980         Reviewed by Kevin Decker.
3981
3982         <rdar://problem/6744471> crash in GC due to uninitialized callFunction pointer
3983
3984         * runtime/JSGlobalObject.h:
3985         (JSC::JSGlobalObject::JSGlobalObjectData::JSGlobalObjectData): Initialize
3986         callFunction as we do the other data members that are used in the mark function.
3987
3988 2009-04-02  Yael Aharon  <yael.aharon@nokia.com>
3989
3990         Reviewed by Simon Hausmann
3991
3992         https://bugs.webkit.org/show_bug.cgi?id=24490
3993
3994         Implement WTF::ThreadSpecific in the Qt build using
3995         QThreadStorage.
3996
3997         * wtf/ThreadSpecific.h:
3998
3999 2009-04-01  Greg Bolsinga  <bolsinga@apple.com>
4000
4001         Reviewed by Mark Rowe.
4002
4003         https://bugs.webkit.org/show_bug.cgi?id=24990
4004         Put SECTORDER_FLAGS into xcconfig files.
4005
4006         * Configurations/Base.xcconfig:
4007         * Configurations/DebugRelease.xcconfig:
4008         * JavaScriptCore.xcodeproj/project.pbxproj:
4009
4010 2009-03-27  Oliver Hunt  <oliver@apple.com>
4011
4012         Reviewed by NOBODY (Build fix).
4013
4014         Fix non-AllInOneFile builds.
4015
4016         * bytecompiler/BytecodeGenerator.cpp:
4017
4018 2009-03-27  Oliver Hunt  <oliver@apple.com>
4019
4020         Reviewed by Gavin Barraclough.
4021
4022         Improve performance of Function.prototype.call
4023         <https://bugs.webkit.org/show_bug.cgi?id=24907>
4024
4025         Optimistically assume that expression.call(..) is going to be a call to
4026         Function.prototype.call, and handle it specially to attempt to reduce the
4027         degree of VM reentrancy.
4028
4029         When everything goes right this removes the vm reentry improving .call()
4030         by around a factor of 10.
4031
4032         * JavaScriptCore.xcodeproj/project.pbxproj:
4033         * bytecode/CodeBlock.cpp:
4034         (JSC::CodeBlock::dump):
4035         * bytecode/Opcode.h:
4036         * bytecompiler/BytecodeGenerator.cpp:
4037         (JSC::BytecodeGenerator::emitJumpIfNotFunctionCall):
4038         * bytecompiler/BytecodeGenerator.h:
4039         * interpreter/Interpreter.cpp:
4040         (JSC::Interpreter::privateExecute):
4041         * jit/JIT.cpp:
4042         (JSC::JIT::privateCompileMainPass):
4043         * parser/Grammar.y:
4044         * parser/Nodes.cpp:
4045         (JSC::CallFunctionCallDotNode::emitBytecode):
4046         * parser/Nodes.h:
4047         (JSC::CallFunctionCallDotNode::):
4048         * runtime/FunctionPrototype.cpp:
4049         (JSC::FunctionPrototype::addFunctionProperties):
4050         * runtime/FunctionPrototype.h:
4051         * runtime/JSGlobalObject.cpp:
4052         (JSC::JSGlobalObject::reset):
4053         (JSC::JSGlobalObject::mark):
4054         * runtime/JSGlobalObject.h:
4055
4056 2009-03-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
4057
4058         Reviewed by Darin Adler.
4059
4060         Bug 24884: Include strings.h for strcasecmp()
4061         https://bugs.webkit.org/show_bug.cgi?id=24884
4062
4063         * runtime/DateMath.cpp: Reversed previous change including strings.h
4064         * wtf/StringExtras.h: Include strings.h here is available
4065
4066 2009-03-26  Adam Roben  <aroben@apple.com>
4067
4068         Copy testapi.js to $WebKitOutputDir on Windows
4069
4070         Part of Bug 24856: run-javascriptcore-tests should run testapi on
4071         Windows
4072         <https://bugs.webkit.org/show_bug.cgi?id=24856>
4073
4074         This matches what Mac does, which will help once we enable running
4075         testapi from run-javascriptcore-tests on Windows.
4076
4077         Reviewed by Steve Falkenburg.
4078
4079         * JavaScriptCore.vcproj/testapi/testapi.vcproj: Copy testapi.js next
4080         to testapi.exe.
4081
4082 2009-03-25  Oliver Hunt  <oliver@apple.com>
4083
4084         Reviewed by Geoff Garen.
4085
4086         Fix exception handling for instanceof in the interpreter.
4087
4088         * interpreter/Interpreter.cpp:
4089         (JSC::Interpreter::privateExecute):
4090
4091 2009-03-25  Geoffrey Garen  <ggaren@apple.com>
4092
4093         Reviewed by Cameron Zwarich.
4094         
4095         Fixed <rdar://problem/6724011> Write to freed memory in JSC::Label::deref
4096         when reloading http://helpme.att.net/speedtest/
4097
4098         * bytecompiler/BytecodeGenerator.h: Reversed the declaration order for
4099         m_labelScopes and m_labels to reverse their destruction order.
4100         m_labelScopes has references to memory within m_labels, so its destructor
4101         needs to run first.
4102
4103 2009-03-24  Eli Fidler  <eli.fidler@torchmobile.com>
4104
4105         Reviewed by George Staikos.
4106
4107         Correct warnings which in some environments are treated as errors.
4108
4109         * wtf/dtoa.cpp:
4110         (WTF::b2d):
4111         (WTF::d2b):
4112         (WTF::strtod):
4113         (WTF::dtoa):
4114
4115 2009-03-24  Kevin Ollivier  <kevino@theolliviers.com>
4116
4117         Reviewed by Darin Adler.
4118         
4119         Explicitly define HAVE_LANGINFO_H on Darwin. Fixes the wx build bot jscore 
4120         test failure. 
4121         
4122         https://bugs.webkit.org/show_bug.cgi?id=24780
4123
4124         * wtf/Platform.h:
4125
4126 2009-03-23  Oliver Hunt  <oliver@apple.com>
4127
4128         Reviewed by Cameron Zwarich.
4129
4130         Fix className() for API defined class
4131
4132         * API/JSCallbackObjectFunctions.h:
4133         (JSC::::className):
4134         * API/tests/testapi.c:
4135         (EmptyObject_class):
4136         (main):
4137         * API/tests/testapi.js:
4138
4139 2009-03-23  Oliver Hunt  <oliver@apple.com>
4140
4141         Reviewed by Geoff Garen.
4142
4143         Make testapi assertions run in release builds, so that testapi actually
4144         works in a release build.
4145
4146         Many of the testapi assertions have side effects that are necessary, and
4147         given testapi is a testing program, perf impact of an assertion is not
4148         important, so it makes sense to apply the assertions in release builds
4149         anyway.
4150
4151         * API/tests/testapi.c:
4152         (EvilExceptionObject_hasInstance):
4153
4154 2009-03-23  David Kilzer  <ddkilzer@apple.com>
4155
4156         Provide JavaScript exception information after slow script timeout
4157
4158         Reviewed by Oliver Hunt.
4159
4160         * runtime/Completion.cpp:
4161         (JSC::evaluate): Set the exception object as the Completion
4162         object's value for slow script timeouts.  This is used in
4163         WebCore when reporting the exception.
4164         * runtime/ExceptionHelpers.cpp:
4165         (JSC::InterruptedExecutionError::toString): Added.  Provides a
4166         description message for the exception when it is reported.
4167
4168 2009-03-23  Gustavo Noronha Silva  <gns@gnome.org> and Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
4169
4170         Reviewed by Adam Roben.
4171
4172         https://bugs.webkit.org/show_bug.cgi?id=24674
4173         Crashes in !PLATFORM(MAC)'s formatLocaleDate, in very specific situations
4174
4175         Make sure strftime never returns 2-digits years to avoid ambiguity
4176         and a crash. We wrap this new code option in HAVE_LANGINFO_H,
4177         since it is apparently not available in all platforms.
4178
4179         * runtime/DatePrototype.cpp:
4180         (JSC::formatLocaleDate):
4181         * wtf/Platform.h:
4182
4183 2009-03-22  Oliver Hunt  <oliver@apple.com>
4184
4185         Reviewed by Cameron Zwarich.
4186
4187         Fix exception handling in API
4188
4189         We can't just use the ExecState exception slot for returning exceptions
4190         from class introspection functions provided through the API as many JSC
4191         functions will explicitly clear the ExecState exception when returning.
4192
4193         * API/JSCallbackObjectFunctions.h:
4194         (JSC::JSCallbackObject<Base>::getOwnPropertySlot):
4195         (JSC::JSCallbackObject<Base>::put):
4196         (JSC::JSCallbackObject<Base>::deleteProperty):