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