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