ChangeLog 1010 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
2008-06-27  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver Hunt.

        Fix platforms that don't use AllInOne.cpp

        * kjs/BooleanConstructor.h:
        * kjs/BooleanPrototype.h:
        * kjs/FunctionPrototype.cpp:

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
2008-06-27  Sam Weinig  <sam@webkit.org>

        Rubber-stamped by Oliver Hunt.

        Splits ArrayConstructor out of ArrayPrototype.h/cpp
        Splits BooleanConstructor and BooleanPrototype out of BooleanObject.h/cpp

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * VM/Machine.cpp:
        * kjs/AllInOneFile.cpp:
        * kjs/ArrayConstructor.cpp: Copied from kjs/ArrayPrototype.cpp.
        * kjs/ArrayConstructor.h: Copied from kjs/ArrayPrototype.h.
        * kjs/ArrayPrototype.cpp:
        * kjs/ArrayPrototype.h:
        * kjs/BooleanConstructor.cpp: Copied from kjs/BooleanObject.cpp.
        * kjs/BooleanConstructor.h: Copied from kjs/BooleanObject.h.
        * kjs/BooleanObject.cpp:
        * kjs/BooleanObject.h:
        * kjs/BooleanPrototype.cpp: Copied from kjs/BooleanObject.cpp.
        * kjs/BooleanPrototype.h: Copied from kjs/BooleanObject.h.
        * kjs/CommonIdentifiers.h:
        * kjs/FunctionPrototype.cpp:
        * kjs/JSArray.cpp:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSImmediate.cpp:
        * kjs/Shell.cpp:
        * kjs/internal.cpp:
        * kjs/nodes.cpp:
        * kjs/string_object.cpp:

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
2008-06-27  Oliver Hunt  <oliver@apple.com>

        Reviewed by Sam.

        Bug 18626: SQUIRRELFISH: support the "slow script" dialog <https://bugs.webkit.org/show_bug.cgi?id=18626>
        <rdar://problem/5973931> Slow script dialog needs to be reimplemented for squirrelfish

        Adds support for the slow script dialog in squirrelfish.  This requires the addition
        of three new op codes, op_loop, op_loop_if_true, and op_loop_if_less which have the
        same behaviour as their simple jump equivalents but have an additional time out check.

        Additional assertions were added to other jump instructions to prevent accidentally
        creating loops with jump types that do not support time out checks.

        Sunspider does not report a regression, however this appears very sensitive to code
        layout and hardware, so i would expect up to a 1% regression on other systems.

        Part of this required moving the old timeout logic from JSGlobalObject and into Machine
        which is the cause of a number of the larger diff blocks.

        * JavaScriptCore.exp:
        * VM/CodeBlock.cpp:
        (KJS::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitJumpIfTrue):
        (KJS::CodeGenerator::emitJumpScopes):
        * VM/ExceptionHelpers.cpp:
        (KJS::InterruptedExecutionError::isWatchdogException):
        (KJS::createInterruptedExecutionException):
        * VM/ExceptionHelpers.h:
        * VM/LabelID.h:
        * VM/Machine.cpp:
        (KJS::Machine::Machine):
        (KJS::Machine::throwException):
        (KJS::Machine::resetTimeoutCheck):
        (KJS::getCurrentTime):
        (KJS::Machine::checkTimeout):
        (KJS::Machine::privateExecute):
        * VM/Machine.h:
        (KJS::Machine::setTimeoutTime):
        (KJS::Machine::startTimeoutCheck):
        (KJS::Machine::stopTimeoutCheck):
        (KJS::Machine::initTimeout):
        * VM/Opcode.cpp:
        (KJS::):
        * VM/Opcode.h:
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::init):
        (KJS::JSGlobalObject::setTimeoutTime):
        (KJS::JSGlobalObject::startTimeoutCheck):
        * kjs/JSGlobalObject.h:
        * kjs/JSObject.h:
        * kjs/interpreter.cpp:
        (KJS::Interpreter::evaluate):

100
101
102
103
104
105
106
107
2008-06-27  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Gtk and Qt build fix: Remove RegisterFileStack from the build
        scripts.

        * GNUmakefile.am:
        * JavaScriptCore.pri:

108
109
110
111
112
113
114
115
116
117
118
119
2008-06-27  Adele Peterson  <adele@apple.com>

        Reviewed by Geoff.

        Build fixes. 

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * VM/RegisterFile.h:
        (KJS::RegisterFile::RegisterFile):
        * kjs/JSGlobalObject.cpp:
        * kjs/collector.cpp:

ggaren@apple.com's avatar
ggaren@apple.com committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
2008-06-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        One RegisterFile to rule them all!
        
        SunSpider reports a 0.2% speedup.

        This patch removes the RegisterFileStack abstraction and replaces it with
        a single register file that
        
        (a) allocates a fixed storage area, including a fixed area for global
        vars, so that no operation may cause the register file to reallocate
        
        and

        (b) swaps between global storage areas when executing code in different 
        global objects.
        
        This patch also changes the layout of the register file so that all call
        frames, including call frames for global code, get a header. This is
        required to support re-entrant global code. It also just makes things simpler.
        
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::addGlobalVar): New function. Differs from addVar in
        that
        
        (a) global vars don't contribute to a CodeBlock's numLocals count, since
        global storage is fixed and allocated at startup
        
        and
        
        (b) references to global vars get shifted to elide intermediate stack
        between "r" and the global storage area.
        
        * VM/Machine.cpp:
        (KJS::Machine::dumpRegisters): Updated this function to match the new
        register file layout, and added the ability to dump exact identifiers
        for the different parts of a call frame.
        
        (KJS::Machine::unwindCallFrame): Updated this function to match the new
        register file layout.
         
        (KJS::Machine::execute): Updated this function to initialize a call frame
        header for global code, and to swap global storage areas when switching
        to execution in a new global object.
        
        (KJS::Machine::privateExecute): Got rid of "safeForReentry" and re-reading
        of registerBase because the register file is always safe for reentry now,
        and registerBase never changes.
        
        * VM/Machine.h: Moved the call frame header enum from Machine to RegisterFile,
        to resolve a header dependency problem (a good sign that the enum belonged
        in RegisterFile all along!)

        * VM/RegisterFile.cpp:
        * VM/RegisterFile.h: Changed RegisterFile to mmap a fixed size register
        area. This allows us to avoid re-allocting the register file later on.
        Instead, we rely on the OS to allocate physical pages to the register
        file as necessary.

        * VM/RegisterFileStack.cpp: Removed. Tada!
        * VM/RegisterFileStack.h: Removed. Tada!

        * kjs/DebuggerCallFrame.cpp: Updated this class to match the new
        register file layout, greatly simplifying it in the process.

        * kjs/JSActivation.h:
        * kjs/JSActivation.cpp: Moved some of this logic up to JSVariableObject,
        since the global object now needs to be able to tear off its registers
        just like the activation object.

        * kjs/JSFunction.cpp: No need to fiddle with the register file anymore.

        * kjs/JSGlobalObject.h:
        * kjs/JSGlobalObject.cpp: Updated JSGlobalObject to support moving its
        global storage area into and out of the register file.

        * kjs/PropertySlot.cpp: No need to fiddle with the register file anymore.

        * kjs/collector.cpp: Renamed markStackObjectConservatively to
        markConservatively, since we don't just mark stack objects this way.
        
        Also, added code to mark the machine's register file.

        * kjs/config.h: Moved some platforms #defines from here...
        * wtf/Platform.h: ...to here, to support mmap/VirtualAlloc detection
        in RegisterFile.h.

209
210
211
212
213
214
2008-06-26  Mark Rowe  <mrowe@apple.com>

        Speculative fix for the Windows build.

        * kjs/JSImmediate.cpp:

215
216
217
218
219
220
221
222
223
224
225
226
227
2008-06-26  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin Adler and Geoff Garen.

        Fix the malloc zone introspection functions so that malloc_zone_statistics does not give
        bogus output in an application that uses JavaScriptCore.

        * kjs/CollectorHeapIntrospector.cpp:
        (KJS::CollectorHeapIntrospector::statistics): Return statistics about memory allocated by the collector.
        * kjs/CollectorHeapIntrospector.h:
        * wtf/FastMalloc.cpp: Zero out the statistics.  FastMalloc doesn't track this information at present.
        Returning zero for all values is preferable to returning bogus data.

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
2008-06-26  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - https://bugs.webkit.org/show_bug.cgi?id=19721
          speed up JavaScriptCore by not wrapping strings in objects just
          to call functions on them

        - optimize UString append and the replace function a bit

        SunSpider says 1.8% faster.

        * JavaScriptCore.exp: Updated.

        * VM/JSPropertyNameIterator.cpp: Added include of JSString.h, now needed
        because jsString returns a JSString*.

        * VM/Machine.cpp:
        (KJS::Machine::privateExecute): Removed the toObject call from native
        function calls. Also removed code to put the this value into a register.

        * kjs/BooleanObject.cpp:
        (KJS::booleanProtoFuncToString): Rewrite to handle false and true
        separately.

        * kjs/FunctionPrototype.cpp:
        (KJS::constructFunction): Use single-character append rather than building
        a string for each character.
        * kjs/JSFunction.cpp:
        (KJS::globalFuncUnescape): Ditto.

        * kjs/JSImmediate.cpp:
        (KJS::JSImmediate::prototype): Added. Gets the appropriate prototype for
        use with an immediate value. To be used instead of toObject when doing a
        get on an immediate value.
        * kjs/JSImmediate.h: Added prototype.

        * kjs/JSObject.cpp:
        (KJS::JSObject::toString): Tweaked formatting.

        * kjs/JSObject.h:
        (KJS::JSValue::get): Use prototype instead of toObject to avoid creating
        an object wrapper just to search for properties. This also saves an
        unnecessary hash table lookup since the object wrappers themselves don't
        have any properties.

        * kjs/JSString.h: Added toThisString and toThisJSString.

        * kjs/JSValue.cpp:
        (KJS::JSCell::toThisString): Added.
        (KJS::JSCell::toThisJSString): Added.
        (KJS::JSCell::getJSNumber): Added.
        (KJS::jsString): Changed return type to JSString*.
        (KJS::jsOwnedString): Ditto.

        * kjs/JSValue.h:
        (KJS::JSValue::toThisString): Added.
        (KJS::JSValue::toThisJSString): Added.
        (KJS::JSValue::getJSNumber): Added.

        * kjs/NumberObject.cpp:
        (KJS::NumberObject::getJSNumber): Added.
        (KJS::integer_part_noexp): Append C string directly rather than first
        turning it into a UString.
        (KJS::numberProtoFuncToString): Use getJSNumber to check if the value
        is a number rather than isObject(&NumberObject::info). This works for
        immediate numbers, number cells, and NumberObject instances.
        (KJS::numberProtoFuncToLocaleString): Ditto.
        (KJS::numberProtoFuncValueOf): Ditto.
        (KJS::numberProtoFuncToFixed): Ditto.
        (KJS::numberProtoFuncToExponential): Ditto.
        (KJS::numberProtoFuncToPrecision): Ditto.
        * kjs/NumberObject.h: Added getJSNumber.

        * kjs/PropertySlot.cpp: Tweaked comment.

        * kjs/internal.cpp:
        (KJS::JSString::toThisString): Added.
        (KJS::JSString::toThisJSString): Added.
        (KJS::JSString::getOwnPropertySlot): Changed code that searches the
        prototype chain to start with the string prototype and not create a
        string object.
        (KJS::JSNumberCell::toThisString): Added.
        (KJS::JSNumberCell::getJSNumber): Added.

        * kjs/lookup.cpp:
        (KJS::staticFunctionGetter): Moved here, because there's no point in
        having a function that's only used for a function pointer be inline.
        (KJS::setUpStaticFunctionSlot): New function for getStaticFunctionSlot.

        * kjs/lookup.h:
        (KJS::staticValueGetter): Don't mark this inline. It doesn't make sense
        to have a function that's only used for a function pointer be inline.
        (KJS::getStaticFunctionSlot): Changed to get properties from the parent
        first before doing any handling of functions. This is the fastest way
        to return the function once the initial setup is done.

        * kjs/string_object.cpp:
        (KJS::StringObject::getPropertyNames): Call value() instead of getString(),
        avoiding an unnecessary virtual function call (the call to the type()
        function in the implementation of the isString() function).
        (KJS::StringObject::toString): Added.
        (KJS::StringObject::toThisString): Added.
        (KJS::StringObject::toThisJSString): Added.
        (KJS::substituteBackreferences): Rewrote to use a appending algorithm
        instead of a the old one that tried to replace in place.
        (KJS::stringProtoFuncReplace): Merged this function and the replace function.
        Replaced the hand-rolled dynamic arrays for source ranges and replacements
        with Vector.
        (KJS::stringProtoFuncToString): Handle JSString as well as StringObject.
        Removed the separate valueOf implementation, since it can just share this.
        (KJS::stringProtoFuncCharAt): Use toThisString, which handles JSString as
        well as StringObject, and is slightly more efficient than the old code too.
        (KJS::stringProtoFuncCharCodeAt): Ditto.
        (KJS::stringProtoFuncConcat): Ditto.
        (KJS::stringProtoFuncIndexOf): Ditto.
        (KJS::stringProtoFuncLastIndexOf): Ditto.
        (KJS::stringProtoFuncMatch): Ditto.
        (KJS::stringProtoFuncSearch): Ditto.
        (KJS::stringProtoFuncSlice): Ditto.
        (KJS::stringProtoFuncSplit): Ditto.
        (KJS::stringProtoFuncSubstr): Ditto.
        (KJS::stringProtoFuncSubstring): Ditto.
        (KJS::stringProtoFuncToLowerCase): Use toThisJSString.
        (KJS::stringProtoFuncToUpperCase): Ditto.
        (KJS::stringProtoFuncToLocaleLowerCase): Ditto.
        (KJS::stringProtoFuncToLocaleUpperCase): Ditto.
        (KJS::stringProtoFuncLocaleCompare): Ditto.
        (KJS::stringProtoFuncBig): Use toThisString.
        (KJS::stringProtoFuncSmall): Ditto.
        (KJS::stringProtoFuncBlink): Ditto.
        (KJS::stringProtoFuncBold): Ditto.
        (KJS::stringProtoFuncFixed): Ditto.
        (KJS::stringProtoFuncItalics): Ditto.
        (KJS::stringProtoFuncStrike): Ditto.
        (KJS::stringProtoFuncSub): Ditto.
        (KJS::stringProtoFuncSup): Ditto.
        (KJS::stringProtoFuncFontcolor): Ditto.
        (KJS::stringProtoFuncFontsize): Ditto.
        (KJS::stringProtoFuncAnchor): Ditto.
        (KJS::stringProtoFuncLink): Ditto.

        * kjs/string_object.h: Added toString, toThisString, and toThisJSString.

        * kjs/ustring.cpp:
        (KJS::UString::append): Added a version that takes a character pointer and
        size, so we don't have to create a UString just to append to another UString.
        * kjs/ustring.h:

ap@webkit.org's avatar
ap@webkit.org committed
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
2008-06-26  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Maciej.

        Make JSGlobalData per-thread.

        No change on SunSpider total.

        * wtf/ThreadSpecific.h: Re-enabled the actual implementation.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::~JSGlobalObject): Re-added a JSLock-related assertion. We'll probably
        want to preserve these somehow to keep legacy behavior in working condition.
        (KJS::JSGlobalObject::init): Initialize globalData pointer earlier, so that it is ready
        when updating JSGlobalObject linked list.

        * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::head): Changed head() to be non-static, and
        to use JSGlobalData associated with the current object.

        * kjs/InitializeThreading.cpp: (KJS::initializeThreadingOnce): Removed a no longer needed
        Heap::registerAsMainThread() call.

        * kjs/JSGlobalData.h: Removed a lying lie comment - parserObjectExtraRefCounts is not
        transient, and while newParserObjects may conceptually be such, there is still some node
        manipulation going on outside Parser::parse which touches it.

        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::~JSGlobalData): Delete recently added members.
        (KJS::JSGlobalData::sharedInstance): Actually use a separate instance.

        * kjs/collector.cpp:
        (KJS::Heap::Heap):
        (KJS::Heap::~Heap): Added a destructor, which unconditionally deletes everything.
        (KJS::Heap::sweep): Removed code related to "collect on main thread only" logic.
        (KJS::Heap::collect): Ditto.
        (KJS::Heap::globalObjectCount): Explicitly use per-thread instance of JSGlobalObject linked
        list now that JSGlobalObject::head() is not static. Curently, WebCoreStatistics methods only
        work with the main thread currently anyway.
        (KJS::Heap::protectedGlobalObjectCount): Ditto.

        * kjs/collector.h: Removed code related to "collect on main thread only" logic.

        * JavaScriptCore.exp: Removed Heap::collectOnMainThreadOnly.

ap@webkit.org's avatar
ap@webkit.org committed
421
422
423
424
425
426
427
428
429
430
431
432
433
2008-06-26  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        https://bugs.webkit.org/show_bug.cgi?id=19767
        REGRESSION: Crash in sort() when visiting http://www.onnyturf.com/subway/

        * kjs/JSArray.cpp: (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor):
        Made changing balance factor from -1 to +1 work correctly.

        * wtf/AVLTree.h: (KJS::AVLTreeDefaultBSet::operator[]): Added an assertion that catches
        this slightly earlier.

434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
2008-06-25  Timothy Hatcher  <timothy@apple.com>

        Fixes an ASSERT in the profiler when starting multiple profiles
        with the same name inside the same function/program.

        Reviewed by Kevin McCullough.

        * profiler/Profile.cpp:
        (KJS::Profile::Profile): Initialize m_stoppedCallDepth to zero.
        (KJS::Profile::stopProfiling): Set the current node to the parent,
        because we are in a call that will not get a didExecute call.
        (KJS::Profile::removeProfile): Increment m_stoppedCallDepth to
        account for didExecute not being called for profile.
        (KJS::Profile::willExecute): Increment m_stoppedCallDepth if stopped.
        (KJS::Profile::didExecute): Decrement m_stoppedCallDepth if stopped and
        greater than zero, and return early.
        * profiler/Profile.h: Added stoppedProfiling().
        * profiler/Profiler.cpp:
        (KJS::Profiler::findProfile): Removed.
        (KJS::Profiler::startProfiling): Don't return early for stopped profiles.
        (KJS::Profiler::stopProfiling): Skipp stopped profiles.
        (KJS::Profiler::didFinishAllExecution): Code clean-up.
        * profiler/Profiler.h: Removed findProfile.

458
459
460
461
462
463
464
465
466
467
468
469
2008-06-25  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Alexey Proskuryakov.

        Attempt to fix Windows debug build. The compiler gives a warning when
        Structured Exception Handling and destructors are used in the same
        function. Using manual locking and unlocking instead of constructors
        and destructors should fix the warning.

        * kjs/Shell.cpp:
        (main):

470
471
472
473
474
475
476
477
478
479
480
481
482
483
2008-06-25  Alexey Proskuryakov  <ap@webkit.org>

        Forgot to address a review comment about better names for tracked objects, doing it now.

        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData):
        * kjs/JSGlobalData.h:
        * kjs/nodes.cpp:
        (KJS::ParserRefCounted::ParserRefCounted):
        (KJS::ParserRefCounted::ref):
        (KJS::ParserRefCounted::deref):
        (KJS::ParserRefCounted::hasOneRef):
        (KJS::ParserRefCounted::deleteNewObjects):

ap@webkit.org's avatar
ap@webkit.org committed
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
2008-06-25  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        Remove more threadInstance() calls.

        * kjs/JSFunction.cpp:
        (KJS::JSFunction::getParameterName):
        (KJS::IndexToNameMap::unMap):
        (KJS::Arguments::deleteProperty):
        * kjs/JSFunction.h:
        Access nullIdentifier without going to thread specific storage.

        * JavaScriptCore.exp:
        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData):
        * kjs/JSGlobalData.h:
        * kjs/Parser.cpp:
        (KJS::Parser::parse):
        * kjs/Parser.h:
        (KJS::ParserRefCountedData::ParserRefCountedData):
        (KJS::Parser::parse):
        * kjs/grammar.y:
        * kjs/nodes.cpp:
        (KJS::ParserRefCounted::ParserRefCounted):
        (KJS::ParserRefCounted::ref):
        (KJS::ParserRefCounted::deref):
        (KJS::ParserRefCounted::hasOneRef):
        (KJS::ParserRefCounted::deleteNewObjects):
        (KJS::Node::Node):
        (KJS::StatementNode::StatementNode):
        (KJS::BreakpointCheckStatement::BreakpointCheckStatement):
        (KJS::ConstDeclNode::ConstDeclNode):
        (KJS::BlockNode::BlockNode):
        (KJS::ForInNode::ForInNode):
        (KJS::ScopeNode::ScopeNode):
        (KJS::ProgramNode::ProgramNode):
        (KJS::ProgramNode::create):
        (KJS::EvalNode::EvalNode):
        (KJS::EvalNode::create):
        (KJS::FunctionBodyNode::FunctionBodyNode):
        (KJS::FunctionBodyNode::create):
        * kjs/nodes.h:
        (KJS::ExpressionNode::):
        (KJS::NullNode::):
        (KJS::BooleanNode::):
        (KJS::NumberNode::):
        (KJS::ImmediateNumberNode::):
        (KJS::StringNode::):
        (KJS::RegExpNode::):
        (KJS::ThisNode::):
        (KJS::ResolveNode::):
        (KJS::ElementNode::):
        (KJS::ArrayNode::):
        (KJS::PropertyNode::):
        (KJS::PropertyListNode::):
        (KJS::ObjectLiteralNode::):
        (KJS::BracketAccessorNode::):
        (KJS::DotAccessorNode::):
        (KJS::ArgumentListNode::):
        (KJS::ArgumentsNode::):
        (KJS::NewExprNode::):
        (KJS::EvalFunctionCallNode::):
        (KJS::FunctionCallValueNode::):
        (KJS::FunctionCallResolveNode::):
        (KJS::FunctionCallBracketNode::):
        (KJS::FunctionCallDotNode::):
        (KJS::PrePostResolveNode::):
        (KJS::PostIncResolveNode::):
        (KJS::PostDecResolveNode::):
        (KJS::PostfixBracketNode::):
        (KJS::PostIncBracketNode::):
        (KJS::PostDecBracketNode::):
        (KJS::PostfixDotNode::):
        (KJS::PostIncDotNode::):
        (KJS::PostDecDotNode::):
        (KJS::PostfixErrorNode::):
        (KJS::DeleteResolveNode::):
        (KJS::DeleteBracketNode::):
        (KJS::DeleteDotNode::):
        (KJS::DeleteValueNode::):
        (KJS::VoidNode::):
        (KJS::TypeOfResolveNode::):
        (KJS::TypeOfValueNode::):
        (KJS::PreIncResolveNode::):
        (KJS::PreDecResolveNode::):
        (KJS::PrefixBracketNode::):
        (KJS::PreIncBracketNode::):
        (KJS::PreDecBracketNode::):
        (KJS::PrefixDotNode::):
        (KJS::PreIncDotNode::):
        (KJS::PreDecDotNode::):
        (KJS::PrefixErrorNode::):
        (KJS::UnaryOpNode::UnaryOpNode):
        (KJS::UnaryPlusNode::):
        (KJS::NegateNode::):
        (KJS::BitwiseNotNode::):
        (KJS::LogicalNotNode::):
        (KJS::BinaryOpNode::BinaryOpNode):
        (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode):
        (KJS::MultNode::):
        (KJS::DivNode::):
        (KJS::ModNode::):
        (KJS::AddNode::):
        (KJS::SubNode::):
        (KJS::LeftShiftNode::):
        (KJS::RightShiftNode::):
        (KJS::UnsignedRightShiftNode::):
        (KJS::LessNode::):
        (KJS::GreaterNode::):
        (KJS::LessEqNode::):
        (KJS::GreaterEqNode::):
        (KJS::InstanceOfNode::):
        (KJS::InNode::):
        (KJS::EqualNode::):
        (KJS::NotEqualNode::):
        (KJS::StrictEqualNode::):
        (KJS::NotStrictEqualNode::):
        (KJS::BitAndNode::):
        (KJS::BitOrNode::):
        (KJS::BitXOrNode::):
        (KJS::LogicalAndNode::):
        (KJS::LogicalOrNode::):
        (KJS::ConditionalNode::):
        (KJS::ReadModifyResolveNode::):
        (KJS::AssignResolveNode::):
        (KJS::ReadModifyBracketNode::):
        (KJS::AssignBracketNode::):
        (KJS::AssignDotNode::):
        (KJS::ReadModifyDotNode::):
        (KJS::AssignErrorNode::):
        (KJS::CommaNode::):
        (KJS::VarDeclCommaNode::):
        (KJS::ConstStatementNode::):
        (KJS::SourceElements::SourceElements):
        (KJS::EmptyStatementNode::):
        (KJS::DebuggerStatementNode::):
        (KJS::ExprStatementNode::):
        (KJS::VarStatementNode::):
        (KJS::IfNode::):
        (KJS::IfElseNode::):
        (KJS::DoWhileNode::):
        (KJS::WhileNode::):
        (KJS::ForNode::):
        (KJS::ContinueNode::):
        (KJS::BreakNode::):
        (KJS::ReturnNode::):
        (KJS::WithNode::):
        (KJS::LabelNode::):
        (KJS::ThrowNode::):
        (KJS::TryNode::):
        (KJS::ParameterNode::):
        (KJS::FuncExprNode::):
        (KJS::FuncDeclNode::):
        (KJS::CaseClauseNode::):
        (KJS::ClauseListNode::):
        (KJS::CaseBlockNode::):
        (KJS::SwitchNode::):
        Changed ParserRefCounted to hold a JSGlobalData pointer, and used it to replace
        threadInstance calls.

645
646
647
648
649
650
651
652
653
654
655
2008-06-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Alexey Proskuryakov.

        Make the JavaScript shell collect the heap from main() instead of
        jscmain() to suppress leak messages in debug builds.

        * kjs/Shell.cpp:
        (main):
        (jscmain):

656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
2008-06-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Make the conversion of the pair (less, jtrue) to jless use register
        reference counting information for safety instead of requiring callers
        to decide whether it is safe.

        No changes on SunSpider codegen.

        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitJumpIfTrue):
        * VM/CodeGenerator.h:
        * kjs/nodes.cpp:
        (KJS::DoWhileNode::emitCode):
        (KJS::WhileNode::emitCode):
        (KJS::ForNode::emitCode):
        (KJS::CaseBlockNode::emitCodeForBlock):

675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
2008-06-24  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim.

        <rdar://problem/6031594> JSProfiler: Profiler goes into an infinite
        loop sometimes.
        <rdar://problem/6031603> JSProfiler: Profiler asserts in debug and
        give the wrong times in release

        Fixed two issues found by Tim in the same test.

        * profiler/Profile.cpp:
        (KJS::Profile::removeProfileStart): No longer take profile's time from
        all ancestors, but instead attribute it to its parent.  Also add an
        Assert to ensure we only delete the child we mean to.
        (KJS::Profile::removeProfileEnd): Ditto for profileEnd.
        (KJS::Profile::didExecute): Cleaned up the execution order and correctly
        attribute all of the parent's time to the new node.
        * profiler/ProfileNode.cpp: If this node does not have a startTime it
        should not get a giant total time, but instead be 0.
        (KJS::ProfileNode::endAndRecordCall):
        * profiler/ProfileNode.h:
        (KJS::ProfileNode::removeChild): Should reset the sibling pointers since
        one of them has been removed.

700
701
702
703
704
705
706
707
708
709
710
711
2008-06-24  Darin Adler  <darin@apple.com>

        Reviewed by Cameron.

        - fix https://bugs.webkit.org/show_bug.cgi?id=19739
          REGRESSION: fast/js/property-getters-and-setters.html fails

        * kjs/JSObject.cpp:
        (KJS::JSObject::put): Remove an untested optimization I checked in by accident.
        The two loops up the prototype chain both need to start from this; instead the
        second loop was starting where the first loop left off.

sfalken@apple.com's avatar
sfalken@apple.com committed
712
713
714
715
716
717
2008-06-24  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * kjs/nodes.cpp:

718
719
720
721
722
723
724
725
726
727
728
729
730
731
2008-06-24  Joerg Bornemann  <joerg.bornemann@trolltech.com>

        Reviewed by Simon.

        For the Qt build on Windows don't depend on the presence of GNU CPP
        but use MSVC's preprocessor instead.
        dftables accepts a --preprocessor option which is set in pcre.pri for MSVC platforms.

        * pcre/dftables: Added support for specifying the preprocessor command
        to use via --preprocessor, similar to
        WebCore/bindings/scripts/generate-bindings.pl.
        * pcre/pcre.pri: Pass --preprocessor='cl /e' to dftables, or more
        generally speaking QMAKE_CC /E for the win32-msvc buildspecs.

732
733
734
735
736
737
2008-06-24  Simon Hausmann  <hausmann@webkit.org>

        Fix the Qt build, added missing include.

        * kjs/PropertySlot.cpp:

738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
2008-06-24  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Cameron Zwarich.

        Make ParserRefCountedCounter actually perform a leak check.

        * kjs/nodes.cpp:
        (KJS::ParserRefCountedCounter::~ParserRefCountedCounter): Check for leaks in destructor,
        not in constructor.
        (KJS::ParserRefCountedCounter::increment):
        (KJS::ParserRefCountedCounter::decrement):
        (KJS::ParserRefCounted::ParserRefCounted):
        (KJS::ParserRefCounted::~ParserRefCounted):
        While at it, also made counting thread-safe.

753
754
755
756
757
758
759
760
761
762
763
764
765
766
2008-06-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver.

        Bug 19730: REGRESSION (r34497): Text in alerts in "Leisure suit Larry" is not wrapped
        <https://bugs.webkit.org/show_bug.cgi?id=19730>

        Do not convert the pair (less, jtrue) to jless when jtrue is a jump
        target. An example of this is when the condition of a while loop is a
        LogicalOrNode.

        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitLabel):

767
768
769
770
771
772
773
774
775
776
777
2008-06-20  Ariya Hidayat  <ariya.hidayat@trolltech.com>

        Reviewed by Adam Roben.

        Fix compile with MinGW.

        * kjs/Shell.cpp:
        * wtf/Threading.h:
        (WTF::atomicIncrement):
        (WTF::atomicDecrement):

778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
2008-06-23  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        Prepration for returning memory to the OS on Windows.  Track whether a portion of a span of memory was returned to the OS.
        If it was, ask that it be recommitted before returning it to the application as an allocated region.

        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::New):  If the span was decommitted, ask that it be recommitted before returning it.
        (WTF::TCMalloc_PageHeap::AllocLarge):  Ditto.
        (WTF::TCMalloc_PageHeap::Carve):  When splitting a span, ensure that the decommitted state propogates to the two new spans.
        (WTF::TCMalloc_PageHeap::Delete):  When merging a span, ensure that the resulting span is marked as decommitted if any of the
        spans being merged were marked as decommitted.
        (WTF::TCMalloc_PageHeap::IncrementalScavenge):  Mark as decommitted after releasing the span.
        (WTF::TCMalloc_Central_FreeList::FetchFromSpans): Add an assertion to catch a decommitted span being returned to the application
        without first being recommitted.
        (WTF::TCMalloc_Central_FreeList::Populate): Ditto.
        * wtf/TCSystemAlloc.cpp: Stub out TCMalloc_SystemCommit.
        * wtf/TCSystemAlloc.h:

798
799
800
801
802
803
804
805
806
807
2008-06-23  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Remove the sample member of Span when NO_TCMALLOC_SAMPLES is defined.

        * wtf/FastMalloc.cpp:
        (WTF::TCMalloc_PageHeap::Delete): Only update Span::sample if NO_TCMALLOC_SAMPLES is not defined.
        (WTF::TCMallocStats::do_free):  Ditto.

darin@apple.com's avatar
darin@apple.com committed
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
2008-06-23  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - work toward https://bugs.webkit.org/show_bug.cgi?id=19721

        More preparation toward making functions work on primitive types without
        creating wrapper objects. No speedup this time, but prepares for a future
        speedup without slowing things down.

        SunSpider reports no change.

        - Eliminated the implementsCall, callAsFunction and construct virtual
          functions from JSObject. Instead, the CallData and ConstructData for
          a native function includes a function pointer that the caller can use
          directly. Changed all call sites to use CallData and ConstructData.

        - Changed the "this" argument to native functions to be a JSValue rather
          than a JSObject. This prepares us for passing primitives into these
          functions. The conversion to an object now must be done inside the
          function. Critically, if it's a function that can be called on a DOM
          window object, then we have to be sure to call toThisObject on the
          argument before we use it for anything even if it's already an object.

        - Eliminated the practice of using constructor objects in the global
          object to make objects of the various basic types. Since these
          constructors can't be replaced by script, there's no reason to involve
          a constructor object at all. Added functions to do the construction
          directly.

        - Made some more class members private and protected, including virtual
          function overrides. This can catch code using unnecessarily slow virtual
          function code paths when the type of an object is known statically. If we
          later find a new reason use the members outside the class it's easy to
          make them public again.

        - Moved the declarations of the native implementations for functions out
          of header files. These can have internal linkage and be declared inside
          the source file.

        - Changed PrototypeFunction to take function pointers with the right
          arguments to be put directly into CallData. This eliminates the
          need to have a separate PrototypeReflexiveFunction, and reveals that the
          real purpose of that class included something else specific to eval --
          storage of a cached global object. So renamed PrototypeReflexiveFunction
          to GlobalEvalFunction.

        * API/JSCallbackConstructor.cpp:
        (KJS::constructJSCallback):
        (KJS::JSCallbackConstructor::getConstructData):
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::implementsHasInstance):
        (KJS::JSCallbackFunction::call):
        (KJS::JSCallbackFunction::getCallData):
        * API/JSCallbackFunction.h:
        (KJS::JSCallbackFunction::classInfo):
        * API/JSCallbackObject.h:
        (KJS::JSCallbackObject::classRef):
        (KJS::JSCallbackObject::classInfo):
        * API/JSCallbackObjectFunctions.h:
        (KJS::::getConstructData):
        (KJS::::construct):
        (KJS::::getCallData):
        (KJS::::call):
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunction):
        (JSObjectIsFunction):
        (JSObjectCallAsFunction):
        (JSObjectCallAsConstructor):
        * JavaScriptCore.exp:
        * VM/Machine.cpp:
        (KJS::jsTypeStringForValue):
        (KJS::Machine::privateExecute):
        * kjs/ArrayPrototype.cpp:
        (KJS::arrayProtoFuncToString):
        (KJS::arrayProtoFuncToLocaleString):
        (KJS::arrayProtoFuncJoin):
        (KJS::arrayProtoFuncConcat):
        (KJS::arrayProtoFuncPop):
        (KJS::arrayProtoFuncPush):
        (KJS::arrayProtoFuncReverse):
        (KJS::arrayProtoFuncShift):
        (KJS::arrayProtoFuncSlice):
        (KJS::arrayProtoFuncSort):
        (KJS::arrayProtoFuncSplice):
        (KJS::arrayProtoFuncUnShift):
        (KJS::arrayProtoFuncFilter):
        (KJS::arrayProtoFuncMap):
        (KJS::arrayProtoFuncEvery):
        (KJS::arrayProtoFuncForEach):
        (KJS::arrayProtoFuncSome):
        (KJS::arrayProtoFuncIndexOf):
        (KJS::arrayProtoFuncLastIndexOf):
        (KJS::ArrayConstructor::ArrayConstructor):
        (KJS::constructArrayWithSizeQuirk):
        (KJS::constructWithArrayConstructor):
        (KJS::ArrayConstructor::getConstructData):
        (KJS::callArrayConstructor):
        (KJS::ArrayConstructor::getCallData):
        * kjs/ArrayPrototype.h:
        * kjs/BooleanObject.cpp:
        (KJS::booleanProtoFuncToString):
        (KJS::booleanProtoFuncValueOf):
        (KJS::constructBoolean):
        (KJS::constructWithBooleanConstructor):
        (KJS::BooleanConstructor::getConstructData):
        (KJS::callBooleanConstructor):
        (KJS::BooleanConstructor::getCallData):
        (KJS::constructBooleanFromImmediateBoolean):
        * kjs/BooleanObject.h:
        * kjs/CallData.h:
        (KJS::):
        * kjs/ConstructData.h:
        (KJS::):
        * kjs/FunctionPrototype.cpp:
        (KJS::callFunctionPrototype):
        (KJS::FunctionPrototype::getCallData):
        (KJS::functionProtoFuncToString):
        (KJS::functionProtoFuncApply):
        (KJS::functionProtoFuncCall):
        (KJS::constructWithFunctionConstructor):
        (KJS::FunctionConstructor::getConstructData):
        (KJS::callFunctionConstructor):
        (KJS::FunctionConstructor::getCallData):
        (KJS::constructFunction):
        * kjs/FunctionPrototype.h:
        * kjs/JSArray.cpp:
        (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key):
        (KJS::JSArray::sort):
        (KJS::constructEmptyArray):
        (KJS::constructArray):
        * kjs/JSArray.h:
        (KJS::JSArray::classInfo):
        * kjs/JSFunction.cpp:
        (KJS::JSFunction::call):
        (KJS::globalFuncEval):
        (KJS::globalFuncParseInt):
        (KJS::globalFuncParseFloat):
        (KJS::globalFuncIsNaN):
        (KJS::globalFuncIsFinite):
        (KJS::globalFuncDecodeURI):
        (KJS::globalFuncDecodeURIComponent):
        (KJS::globalFuncEncodeURI):
        (KJS::globalFuncEncodeURIComponent):
        (KJS::globalFuncEscape):
        (KJS::globalFuncUnescape):
        (KJS::globalFuncKJSPrint):
        (KJS::PrototypeFunction::PrototypeFunction):
        (KJS::PrototypeFunction::getCallData):
        (KJS::GlobalEvalFunction::GlobalEvalFunction):
        (KJS::GlobalEvalFunction::mark):
        * kjs/JSFunction.h:
        (KJS::InternalFunction::classInfo):
        (KJS::InternalFunction::functionName):
        (KJS::JSFunction::classInfo):
        (KJS::GlobalEvalFunction::cachedGlobalObject):
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        (KJS::JSGlobalObject::mark):
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::JSGlobalObject):
        (KJS::JSGlobalObject::evalFunction):
        * kjs/JSImmediate.cpp:
        (KJS::JSImmediate::toObject):
        * kjs/JSNotAnObject.cpp:
        * kjs/JSNotAnObject.h:
        * kjs/JSObject.cpp:
        (KJS::JSObject::put):
        (KJS::callDefaultValueFunction):
        (KJS::JSObject::defaultValue):
        (KJS::JSObject::lookupGetter):
        (KJS::JSObject::lookupSetter):
        (KJS::JSObject::hasInstance):
        (KJS::JSObject::fillGetterPropertySlot):
        (KJS::Error::create):
        (KJS::constructEmptyObject):
        * kjs/JSObject.h:
        (KJS::GetterSetter::GetterSetter):
        (KJS::GetterSetter::getter):
        (KJS::GetterSetter::setGetter):
        (KJS::GetterSetter::setter):
        (KJS::GetterSetter::setSetter):
        * kjs/JSValue.cpp:
        (KJS::JSCell::deleteProperty):
        (KJS::call):
        (KJS::construct):
        * kjs/JSValue.h:
        * kjs/MathObject.cpp:
        (KJS::mathProtoFuncAbs):
        (KJS::mathProtoFuncACos):
        (KJS::mathProtoFuncASin):
        (KJS::mathProtoFuncATan):
        (KJS::mathProtoFuncATan2):
        (KJS::mathProtoFuncCeil):
        (KJS::mathProtoFuncCos):
        (KJS::mathProtoFuncExp):
        (KJS::mathProtoFuncFloor):
        (KJS::mathProtoFuncLog):
        (KJS::mathProtoFuncMax):
        (KJS::mathProtoFuncMin):
        (KJS::mathProtoFuncPow):
        (KJS::mathProtoFuncRandom):
        (KJS::mathProtoFuncRound):
        (KJS::mathProtoFuncSin):
        (KJS::mathProtoFuncSqrt):
        (KJS::mathProtoFuncTan):
        * kjs/MathObject.h:
        * kjs/NumberObject.cpp:
        (KJS::numberProtoFuncToString):
        (KJS::numberProtoFuncToLocaleString):
        (KJS::numberProtoFuncValueOf):
        (KJS::numberProtoFuncToFixed):
        (KJS::numberProtoFuncToExponential):
        (KJS::numberProtoFuncToPrecision):
        (KJS::NumberConstructor::NumberConstructor):
        (KJS::constructWithNumberConstructor):
        (KJS::NumberConstructor::getConstructData):
        (KJS::callNumberConstructor):
        (KJS::NumberConstructor::getCallData):
        (KJS::constructNumber):
        (KJS::constructNumberFromImmediateNumber):
        * kjs/NumberObject.h:
        (KJS::NumberObject::classInfo):
        (KJS::NumberConstructor::classInfo):
        * kjs/PropertySlot.cpp:
        (KJS::PropertySlot::functionGetter):
        * kjs/RegExpObject.cpp:
        (KJS::regExpProtoFuncTest):
        (KJS::regExpProtoFuncExec):
        (KJS::regExpProtoFuncCompile):
        (KJS::regExpProtoFuncToString):
        (KJS::callRegExpObject):
        (KJS::RegExpObject::getCallData):
        (KJS::constructRegExp):
        (KJS::constructWithRegExpConstructor):
        (KJS::RegExpConstructor::getConstructData):
        (KJS::callRegExpConstructor):
        (KJS::RegExpConstructor::getCallData):
        * kjs/RegExpObject.h:
        (KJS::RegExpConstructor::classInfo):
        * kjs/Shell.cpp:
        (GlobalObject::GlobalObject):
        (functionPrint):
        (functionDebug):
        (functionGC):
        (functionVersion):
        (functionRun):
        (functionLoad):
        (functionReadline):
        (functionQuit):
        * kjs/date_object.cpp:
        (KJS::gmtoffset):
        (KJS::formatLocaleDate):
        (KJS::fillStructuresUsingDateArgs):
        (KJS::DateInstance::getTime):
        (KJS::DateInstance::getUTCTime):
        (KJS::DateConstructor::DateConstructor):
        (KJS::constructDate):
        (KJS::DateConstructor::getConstructData):
        (KJS::callDate):
        (KJS::DateConstructor::getCallData):
        (KJS::dateParse):
        (KJS::dateNow):
        (KJS::dateUTC):
        (KJS::dateProtoFuncToString):
        (KJS::dateProtoFuncToUTCString):
        (KJS::dateProtoFuncToDateString):
        (KJS::dateProtoFuncToTimeString):
        (KJS::dateProtoFuncToLocaleString):
        (KJS::dateProtoFuncToLocaleDateString):
        (KJS::dateProtoFuncToLocaleTimeString):
        (KJS::dateProtoFuncValueOf):
        (KJS::dateProtoFuncGetTime):
        (KJS::dateProtoFuncGetFullYear):
        (KJS::dateProtoFuncGetUTCFullYear):
        (KJS::dateProtoFuncToGMTString):
        (KJS::dateProtoFuncGetMonth):
        (KJS::dateProtoFuncGetUTCMonth):
        (KJS::dateProtoFuncGetDate):
        (KJS::dateProtoFuncGetUTCDate):
        (KJS::dateProtoFuncGetDay):
        (KJS::dateProtoFuncGetUTCDay):
        (KJS::dateProtoFuncGetHours):
        (KJS::dateProtoFuncGetUTCHours):
        (KJS::dateProtoFuncGetMinutes):
        (KJS::dateProtoFuncGetUTCMinutes):
        (KJS::dateProtoFuncGetSeconds):
        (KJS::dateProtoFuncGetUTCSeconds):
        (KJS::dateProtoFuncGetMilliSeconds):
        (KJS::dateProtoFuncGetUTCMilliseconds):
        (KJS::dateProtoFuncGetTimezoneOffset):
        (KJS::dateProtoFuncSetTime):
        (KJS::setNewValueFromTimeArgs):
        (KJS::setNewValueFromDateArgs):
        (KJS::dateProtoFuncSetMilliSeconds):
        (KJS::dateProtoFuncSetUTCMilliseconds):
        (KJS::dateProtoFuncSetSeconds):
        (KJS::dateProtoFuncSetUTCSeconds):
        (KJS::dateProtoFuncSetMinutes):
        (KJS::dateProtoFuncSetUTCMinutes):
        (KJS::dateProtoFuncSetHours):
        (KJS::dateProtoFuncSetUTCHours):
        (KJS::dateProtoFuncSetDate):
        (KJS::dateProtoFuncSetUTCDate):
        (KJS::dateProtoFuncSetMonth):
        (KJS::dateProtoFuncSetUTCMonth):
        (KJS::dateProtoFuncSetFullYear):
        (KJS::dateProtoFuncSetUTCFullYear):
        (KJS::dateProtoFuncSetYear):
        (KJS::dateProtoFuncGetYear):
        * kjs/date_object.h:
        (KJS::DateInstance::internalNumber):
        (KJS::DateInstance::classInfo):
        * kjs/error_object.cpp:
        (KJS::errorProtoFuncToString):
        (KJS::constructError):
        (KJS::constructWithErrorConstructor):
        (KJS::ErrorConstructor::getConstructData):
        (KJS::callErrorConstructor):
        (KJS::ErrorConstructor::getCallData):
        (KJS::NativeErrorConstructor::construct):
        (KJS::constructWithNativeErrorConstructor):
        (KJS::NativeErrorConstructor::getConstructData):
        (KJS::callNativeErrorConstructor):
        (KJS::NativeErrorConstructor::getCallData):
        * kjs/error_object.h:
        (KJS::NativeErrorConstructor::classInfo):
        * kjs/internal.cpp:
        (KJS::JSNumberCell::toObject):
        (KJS::JSNumberCell::toThisObject):
        (KJS::GetterSetter::mark):
        (KJS::GetterSetter::toPrimitive):
        (KJS::GetterSetter::toBoolean):
        (KJS::GetterSetter::toNumber):
        (KJS::GetterSetter::toString):
        (KJS::GetterSetter::toObject):
        (KJS::InternalFunction::InternalFunction):
        (KJS::InternalFunction::implementsHasInstance):
        * kjs/lookup.h:
        (KJS::HashEntry::):
        * kjs/nodes.cpp:
        (KJS::FuncDeclNode::makeFunction):
        (KJS::FuncExprNode::makeFunction):
        * kjs/object_object.cpp:
        (KJS::objectProtoFuncValueOf):
        (KJS::objectProtoFuncHasOwnProperty):
        (KJS::objectProtoFuncIsPrototypeOf):
        (KJS::objectProtoFuncDefineGetter):
        (KJS::objectProtoFuncDefineSetter):
        (KJS::objectProtoFuncLookupGetter):
        (KJS::objectProtoFuncLookupSetter):
        (KJS::objectProtoFuncPropertyIsEnumerable):
        (KJS::objectProtoFuncToLocaleString):
        (KJS::objectProtoFuncToString):
        (KJS::ObjectConstructor::ObjectConstructor):
        (KJS::constructObject):
        (KJS::constructWithObjectConstructor):
        (KJS::ObjectConstructor::getConstructData):
        (KJS::callObjectConstructor):
        (KJS::ObjectConstructor::getCallData):
        * kjs/object_object.h:
        * kjs/string_object.cpp:
        (KJS::replace):
        (KJS::stringProtoFuncToString):
        (KJS::stringProtoFuncValueOf):
        (KJS::stringProtoFuncCharAt):
        (KJS::stringProtoFuncCharCodeAt):
        (KJS::stringProtoFuncConcat):
        (KJS::stringProtoFuncIndexOf):
        (KJS::stringProtoFuncLastIndexOf):
        (KJS::stringProtoFuncMatch):
        (KJS::stringProtoFuncSearch):
        (KJS::stringProtoFuncReplace):
        (KJS::stringProtoFuncSlice):
        (KJS::stringProtoFuncSplit):
        (KJS::stringProtoFuncSubstr):
        (KJS::stringProtoFuncSubstring):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        (KJS::stringProtoFuncLocaleCompare):
        (KJS::stringProtoFuncBig):
        (KJS::stringProtoFuncSmall):
        (KJS::stringProtoFuncBlink):
        (KJS::stringProtoFuncBold):
        (KJS::stringProtoFuncFixed):
        (KJS::stringProtoFuncItalics):
        (KJS::stringProtoFuncStrike):
        (KJS::stringProtoFuncSub):
        (KJS::stringProtoFuncSup):
        (KJS::stringProtoFuncFontcolor):
        (KJS::stringProtoFuncFontsize):
        (KJS::stringProtoFuncAnchor):
        (KJS::stringProtoFuncLink):
        (KJS::stringFromCharCode):
        (KJS::StringConstructor::StringConstructor):
        (KJS::constructWithStringConstructor):
        (KJS::StringConstructor::getConstructData):
        (KJS::callStringConstructor):
        (KJS::StringConstructor::getCallData):
        * kjs/string_object.h:

1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
2008-06-23  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver.

        Bug 19716: REGRESSION (SquirrelFish): Reproducible crash after entering a username at mint.com
        <https://bugs.webkit.org/show_bug.cgi?id=19716>

        When unwinding callframes for exceptions, check whether the callframe
        was created by a reentrant native call to JavaScript after tearing off
        the local variables instead of before.

        * VM/Machine.cpp:
        (KJS::Machine::unwindCallFrame):

1226
1227
1228
1229
1230
1231
1232
1233
1234
2008-06-23  Mark Rowe  <mrowe@apple.com>

        Reviewed by Oliver Hunt.

        Get testapi passing again in a debug build.

        * API/testapi.c:
        (main): Update the expected output of calling JSValueMakeString on a function object.

1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
2008-06-21  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Print a blank line when exiting the jsc interactive mode to ensure that the shell
        prompt will start on a new line.

        * kjs/Shell.cpp:
        (runInteractive):

1245
1246
1247
1248
1249
1250
1251
1252
2008-06-21  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Sam Weinig.

        Tweak the paths of the items in the "tests" group to clean things up a little.

        * JavaScriptCore.xcodeproj/project.pbxproj:

1253
1254
1255
1256
1257
1258
1259
1260
2008-06-21  Mark Rowe  <mrowe@apple.com>

        Rubber-stamped by Sam Weinig.

        Fix jsc to link against libedit.dylib rather than libedit.2.dylib.

        * JavaScriptCore.xcodeproj/project.pbxproj:

1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
2008-06-21  Mark Rowe  <mrowe@apple.com>

        Reviewed by Sam Weinig.

        Copy the JavaScriptCore shell (jsc) into JavaScriptCore.framework so that it will
        be included in nightly builds.
        https://bugs.webkit.org/show_bug.cgi?id=19691

        * JavaScriptCore.xcodeproj/project.pbxproj:

1271
1272
1273
1274
1275
1276
1277
1278
1279
2008-06-21  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Mark Rowe.

        Fix the build for non-Mac Darwin platforms by disabling their support
        for readline in the JavaScript shell.

        * kjs/config.h:

1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
2008-06-20  Timothy Hatcher  <timothy@apple.com>

        Use member function pointers for the Profile::forEach function.
        Eliminating a few static functions and simplified things a little.

        Reviewed by Alexey Proskuryakov.

        * JavaScriptCore.exp: Change the symbol for forEach.
        * profiler/Profile.cpp:
        (KJS::Profile::forEach): Use a member function pointer.
        * profiler/Profile.h:
        (KJS::Profile::sortTotalTimeDescending): Pass a function pointer.
        (KJS::Profile::sortTotalTimeAscending): Ditto.
        (KJS::Profile::sortSelfTimeDescending): Ditto.
        (KJS::Profile::sortSelfTimeAscending): Ditto.
        (KJS::Profile::sortCallsDescending): Ditto.
        * profiler/ProfileNode.h:
        (KJS::ProfileNode::sortTotalTimeDescending): No longer static.
        (KJS::ProfileNode::sortTotalTimeAscending): Ditto.
        (KJS::ProfileNode::sortSelfTimeDescending): Ditto.
        (KJS::ProfileNode::sortSelfTimeAscending): Ditto.
        (KJS::ProfileNode::sortCallsDescending): Ditto.

1303
1304
1305
1306
1307
1308
1309
1310
1311
2008-06-20  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver.

        Remove unused destructors.

        * kjs/nodes.cpp:
        * kjs/nodes.h:

1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
2008-06-20  Timothy Hatcher  <timothy@apple.com>

        Fixed an ASSERT(m_actualSelfTime <= m_actualTotalTime) when starting
        and stopping a profile from the Develop menu. Also prevents
        inserting an incorrect parent node as the new head after profiling
        is stopped from the Develop menu.

        Reviewed by Dan Bernstein.

        * profiler/Profile.cpp:
        (KJS::Profile::stopProfiling): If the current node is already the head
        then there is no more need to record future nodes in didExecute.
        (KJS::Profile::didExecute): Move the code of setupCurrentNodeAsStopped
        into here since this was the only caller. When setting the total time
        keep any current total time while adding the self time of the head.
        (KJS::Profile::setupCurrentNodeAsStopped): Removed.
        * profiler/Profile.h: Removed setupCurrentNodeAsStopped.

1330
1331
1332
1333
1334
1335
1336
1337
2008-06-20  Kevin Ollivier  <kevino@theolliviers.com>

        !USE(MULTIPLE_THREADS) on Darwin build fix

        * kjs/InitializeThreading.cpp:
        (KJS::initializeThreading):
        * kjs/collector.h:

1338
1339
1340
1341
1342
1343
1344
1345
2008-06-20  Kevin McCullough  <kmccullough@apple.com>

        -Leopard Build Fix.

        * profiler/Profile.cpp:
        (KJS::Profile::removeProfileStart):
        (KJS::Profile::removeProfileEnd):

1346
1347
2008-06-20  Kevin McCullough  <kmccullough@apple.com>

1348
1349
1350
1351
1352
1353
1354
        Just giving credit.

        * ChangeLog:

2008-06-20  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim and Dan.
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364

        <rdar://problem/6024846> JSProfiler: ASSERT hit in Profiler.
        - Because InspectorController can call startProfiling() and
        stopProfiling() we cannot assert that console.profile() and
        console.profileEnd() will be in the profile tree.

        * profiler/Profile.cpp:
        (KJS::Profile::removeProfileStart):
        (KJS::Profile::removeProfileEnd):

kmccullough@apple.com's avatar
kmccullough@apple.com committed
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
2008-06-20  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Tim.

        <rdar://problem/5958770> JSProfiler: Time incorrectly given to (idle)
        if profiling is started and finished within the same function. (19230)
        - Now we profile one more stack frame up from the last frame to allocate
        the time spent in it, if it exists.

        * JavaScriptCore.exp:
        * VM/Machine.cpp: We need to let the profiler know when the JS program 
        has finished since that is what will actually stop the profiler instead
        of just calling stopProfiling().
        (KJS::Machine::execute):
        * profiler/Profile.cpp:
        (KJS::Profile::create): Moved from Profile.h since it was getting pretty
        long.
        (KJS::Profile::Profile): We now have a client, which is a listener who
        we will return this profile to, once it has actually finished.
        (KJS::Profile::stopProfiling): Instead of fully stopping the profiler
        here, we set the flag and keep it profiling in the background.
        (KJS::Profile::didFinishAllExecution): This is where the profiler
        actually finishes and creates the (idle) node if one should be made.
        (KJS::Profile::removeProfileStart): Don't use m_currentNode since it is
        needed by the profiler as it runs silently in the background.
        (KJS::Profile::removeProfileEnd): Ditto.
        (KJS::Profile::willExecute): Don't profile new functions if we have
        stopped profiling.
        (KJS::Profile::didExecute): Only record one more return as all the
        remaining time will be attributed to that function.
        (KJS::Profile::setupCurrentNodeAsStopped): Sets the current node's time.
        * profiler/Profile.h: Added functions and variables for the above
        changes.
        (KJS::Profile::client):
        * profiler/ProfileNode.h:
        (KJS::CallIdentifier::toString): Debug method.
        * profiler/Profiler.cpp: Added support for the ProfilerClient.
        (KJS::Profiler::startProfiling):
        (KJS::Profiler::stopProfiling): No longer return sthe profile.
        (KJS::Profiler::didFinishAllExecution): Now returns the profile to the
        client instead of stopProfiling.
        * profiler/Profiler.h:
        (KJS::ProfilerClient::~ProfilerClient): Clients will implement this
        interface.

1410
1411
1412
1413
1414
1415
1416
1417
1418
2008-06-19  Ariya Hidayat  <ariya.hidayat@trolltech.com>

        Reviewed by Simon.

        Surpress compiler warning (int vs unsigned comparison).

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):

1419
1420
1421
1422
1423
1424
1425
1426
2008-06-19  Ariya Hidayat  <ariya.hidayat@trolltech.com>

        Reviewed by Timothy Hatcher.

        Introduce compiler define for MinGW, to have COMPILER(MINGW).

        * wtf/Platform.h:

ap@webkit.org's avatar
ap@webkit.org committed
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
2008-06-19  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        Make Machine per-JSGlobalData.

        * VM/CodeBlock.cpp:
        (KJS::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitOpcode):
        * VM/Machine.cpp:
        (KJS::callEval):
        (KJS::Machine::unwindCallFrame):
        (KJS::Machine::throwException):
        (KJS::Machine::execute):
        (KJS::Machine::debug):
        * VM/Machine.h:
        * kjs/DebuggerCallFrame.cpp:
        (KJS::DebuggerCallFrame::evaluate):
        * kjs/DebuggerCallFrame.h:
        (KJS::DebuggerCallFrame::DebuggerCallFrame):
        * kjs/ExecState.cpp:
        (KJS::ExecState::ExecState):
        * kjs/ExecState.h:
        (KJS::ExecState::machine):
        * kjs/JSFunction.cpp:
        (KJS::JSFunction::callAsFunction):
        (KJS::JSFunction::argumentsGetter):
        (KJS::JSFunction::callerGetter):
        (KJS::JSFunction::construct):
        (KJS::globalFuncEval):
        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData):
        * kjs/JSGlobalData.h:
        * kjs/interpreter.cpp:
        (KJS::Interpreter::evaluate):

1464
1465
1466
1467
1468
1469
1470
2008-06-19  Alp Toker  <alp@nuanti.com>

        GTK+/autotools build fix. JSGlobalObject.cpp in now in
        AllInOneFile.cpp and shouldn't be built separately.

        * GNUmakefile.am:

ap@webkit.org's avatar
ap@webkit.org committed
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
2008-06-19  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Get rid of some threadInstance calls.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::init):
        * kjs/Parser.cpp:
        (KJS::Parser::parse):
        * kjs/Shell.cpp:
        (jscmain):

ap@webkit.org's avatar
ap@webkit.org committed
1484
1485
1486
1487
1488
1489
1490
1491
1492
2008-06-19  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Sam.

        Fix an assertion failure at startup.

        * kjs/JSObject.h: (KJS::JSObject::JSObject): Allow jsNull prototype in an assertion (I had
        it fixed in a wrong copy of the file, so I wasn't getting the failure).

ap@webkit.org's avatar
ap@webkit.org committed
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
2008-06-19  Alexey Proskuryakov  <ap@webkit.org>

        Build fix.

        * kjs/collector.cpp:
        (KJS::Heap::Heap):
        (KJS::allocateBlock):
        * kjs/collector.h:
        No, #if PLATFORM(UNIX) was not right. I've just moved the unsafe initialization back for now,
        as the platforms that use that code path do not use multiple threads yet.

ap@webkit.org's avatar
ap@webkit.org committed
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
2008-06-19  Alexey Proskuryakov  <ap@webkit.org>

        Windows and Qt build fixes.

        * kjs/collector.h: 
        * kjs/collector.cpp:
        (KJS::Heap::Heap):
        Wrapped m_pagesize in #if PLATFORM(UNIX), which should better match the sequence of #elifs
        in allocateBlock(). Changed MIN_ARRAY_SIZE to be explicitly size_t, as this type is different
        on different platforms.

ap@webkit.org's avatar
ap@webkit.org committed
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
2008-06-17  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Prepare JavaScript heap for being per-thread.

        * kjs/ExecState.h: Shuffle includes, making it possible to include ExecState.h in JSValue.h.
        (KJS::ExecState::heap): Added an accessor.

        * API/JSBase.cpp: (JSGarbageCollect): Collect both shared and per-thread heaps.

        * API/JSContextRef.cpp: (JSGlobalContextCreate): When allocating JSGlobalObject, indicate
        that it belongs to a shared heap.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/AllInOneFile.cpp:
        Moved JSGlobalObject.cpp to AllInOneFile, as a build fix for inlineAllocate magic.

        * VM/CodeGenerator.h: (KJS::CodeGenerator::globalExec): Added an accessor (working via
        m_scopeChain).

        * VM/RegisterFile.h:
        (KJS::RegisterFile::mark):
        * VM/RegisterFileStack.h:
        (KJS::RegisterFileStack::mark):
        Made these pseudo-mark functions take Heap*.

        * kjs/InitializeThreading.cpp:
        (KJS::initializeThreading): Initialize heap introspector.

        * kjs/JSGlobalData.h: Added Heap to the structure.

        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData): Initialize Heap.
        (KJS::JSGlobalData::sharedInstance): Added a method to access shared global data instance
        for legacy clients.

        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::~JSGlobalObject): Changed to work with per-thread head; fixed list
        maintenance logic.
        (KJS::JSGlobalObject::init): Changed to work with per-thread head.
        (KJS::JSGlobalObject::put): Assert that a cross-heap operation is not being attempted.
        (KJS::JSGlobalObject::reset): Pass ExecState* where now required.
        (KJS::JSGlobalObject::mark): Pass the current heap to RegisterFileStack::mark.
        (KJS::JSGlobalObject::operator new): Overload operator new to use per-thread or shared heap.
        * kjs/JSGlobalObject.h: Removed static s_head member.

        * kjs/PropertyMap.h: (KJS::PropertyMap::PropertyMap): Removed unused SavedProperty.

        * kjs/collector.h: Turned Collector into an actual object with its own data, renamed to Heap.
        (KJS::Heap::initializeHeapIntrospector): Added.
        (KJS::Heap::heap): Added a method to determine which heap a JSValue is in, if any.
        (KJS::Heap::allocate): Made non-static.
        (KJS::Heap::inlineAllocateNumber): Ditto.
        (KJS::Heap::markListSet): Ditto.
        (KJS::Heap::cellBlock): Ditto.
        (KJS::Heap::cellOffset): Ditto.
        (KJS::Heap::isCellMarked): Ditto.
        (KJS::Heap::markCell): Ditto.
        (KJS::Heap::reportExtraMemoryCost): Ditto.
        (KJS::CollectorBlock): Added a back-reference to Heap for Heap::heap() method.
        (KJS::SmallCellCollectorBlock): Ditto.

        * kjs/collector.cpp: Changed MIN_ARRAY_SIZE to a #define to avoid a PIC branch. Removed
        main thread related machinery.
        (KJS::Heap::Heap): Initialize the newly added data members.
        (KJS::allocateBlock): Marked NEVER_INLINE, as this is a rare case that uses a PIC branch.
        Moved static pagesize to the class to make it safely initialized.
        (KJS::Heap::heapAllocate): Initialize heap back reference after a new block is allocated.
        (KJS::Heap::registerThread): Removed introspector initialization, as it is now performed
        in InitializeThreading.cpp.
        (KJS::Heap::markOtherThreadConservatively): Assert that the "other thread" case only occurs
        for legacy clients using a shared heap.
        (KJS::Heap::markStackObjectsConservatively): Moved fastMallocForbid/Allow down here, since
        it doesn't need to be forbidden during other GC phases.

        * kjs/JSImmediate.h:
        (KJS::jsUndefined):
        (KJS::jsNull):
        (KJS::jsBoolean):
        Moved from JSvalue.h, to make these usable in files that cannot include JSValue.h (such
        as list.h).

        * API/JSCallbackObjectFunctions.h:
        (KJS::::staticFunctionGetter):
        * API/JSClassRef.cpp:
        (OpaqueJSClass::prototype):
        * API/JSObjectRef.cpp:
        (JSObjectMake):
        (JSObjectMakeFunctionWithCallback):
        (JSObjectMakeConstructor):
        (JSObjectMakeFunction):
        * API/JSValueRef.cpp:
        (JSValueMakeNumber):
        (JSValueMakeString):
        * JavaScriptCore.exp:
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitLoad):
        * VM/JSPropertyNameIterator.cpp:
        (KJS::JSPropertyNameIterator::create):
        (KJS::JSPropertyNameIterator::next):
        * VM/Machine.cpp:
        (KJS::jsAddSlowCase):
        (KJS::jsAdd):
        (KJS::jsTypeStringForValue):
        (KJS::scopeChainForCall):
        (KJS::Machine::throwException):
        (KJS::Machine::execute):
        (KJS::Machine::privateExecute):
        (KJS::Machine::retrieveArguments):
        * kjs/ArrayPrototype.cpp:
        (KJS::arrayProtoFuncToString):
        (KJS::arrayProtoFuncToLocaleString):
        (KJS::arrayProtoFuncJoin):
        (KJS::arrayProtoFuncConcat):
        (KJS::arrayProtoFuncPop):
        (KJS::arrayProtoFuncPush):
        (KJS::arrayProtoFuncShift):
        (KJS::arrayProtoFuncSlice):
        (KJS::arrayProtoFuncSplice):
        (KJS::arrayProtoFuncUnShift):
        (KJS::arrayProtoFuncFilter):
        (KJS::arrayProtoFuncMap):
        (KJS::arrayProtoFuncEvery):
        (KJS::arrayProtoFuncForEach):
        (KJS::arrayProtoFuncSome):
        (KJS::arrayProtoFuncIndexOf):
        (KJS::arrayProtoFuncLastIndexOf):
        (KJS::ArrayConstructor::ArrayConstructor):
        (KJS::ArrayConstructor::construct):
        (KJS::ArrayConstructor::callAsFunction):
        * kjs/BooleanObject.cpp:
        (KJS::BooleanPrototype::BooleanPrototype):
        (KJS::booleanProtoFuncToString):
        (KJS::BooleanConstructor::BooleanConstructor):
        (KJS::BooleanConstructor::construct):
        * kjs/FunctionPrototype.cpp:
        (KJS::FunctionPrototype::FunctionPrototype):
        (KJS::functionProtoFuncToString):
        (KJS::FunctionConstructor::FunctionConstructor):
        (KJS::FunctionConstructor::construct):
        * kjs/JSActivation.cpp:
        (KJS::JSActivation::createArgumentsObject):
        * kjs/JSArray.cpp:
        (KJS::JSArray::JSArray):
        (KJS::JSArray::lengthGetter):
        * kjs/JSFunction.cpp:
        (KJS::JSFunction::lengthGetter):
        (KJS::JSFunction::construct):
        (KJS::Arguments::Arguments):
        (KJS::encode):
        (KJS::decode):
        (KJS::globalFuncParseInt):
        (KJS::globalFuncParseFloat):
        (KJS::globalFuncEscape):
        (KJS::globalFuncUnescape):
        (KJS::PrototypeFunction::PrototypeFunction):
        (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction):
        * kjs/JSImmediate.cpp:
        (KJS::JSImmediate::toObject):
        * kjs/JSLock.cpp:
        (KJS::JSLock::registerThread):
        * kjs/JSObject.cpp:
        (KJS::JSObject::put):
        (KJS::JSObject::defineGetter):
        (KJS::JSObject::defineSetter):
        (KJS::Error::create):
        * kjs/JSObject.h:
        (KJS::JSObject::putDirect):
        * kjs/JSString.h:
        (KJS::JSString::JSString):
        * kjs/JSValue.cpp:
        (KJS::JSCell::operator new):
        (KJS::jsString):
        (KJS::jsOwnedString):
        * kjs/JSValue.h:
        (KJS::JSNumberCell::operator new):
        (KJS::jsNumberCell):
        (KJS::jsNaN):
        (KJS::jsNumber):
        (KJS::JSCell::marked):
        (KJS::JSCell::mark):
        (KJS::JSValue::toJSNumber):
        * kjs/MathObject.cpp:
        (KJS::MathObject::getValueProperty):
        (KJS::mathProtoFuncAbs):
        (KJS::mathProtoFuncACos):
        (KJS::mathProtoFuncASin):
        (KJS::mathProtoFuncATan):
        (KJS::mathProtoFuncATan2):
        (KJS::mathProtoFuncCeil):
        (KJS::mathProtoFuncCos):
        (KJS::mathProtoFuncExp):
        (KJS::mathProtoFuncFloor):
        (KJS::mathProtoFuncLog):
        (KJS::mathProtoFuncMax):
        (KJS::mathProtoFuncMin):
        (KJS::mathProtoFuncPow):
        (KJS::mathProtoFuncRandom):
        (KJS::mathProtoFuncRound):
        (KJS::mathProtoFuncSin):
        (KJS::mathProtoFuncSqrt):
        (KJS::mathProtoFuncTan):
        * kjs/NumberObject.cpp:
        (KJS::NumberPrototype::NumberPrototype):
        (KJS::numberProtoFuncToString):
        (KJS::numberProtoFuncToLocaleString):
        (KJS::numberProtoFuncToFixed):
        (KJS::numberProtoFuncToExponential):
        (KJS::numberProtoFuncToPrecision):
        (KJS::NumberConstructor::NumberConstructor):
        (KJS::NumberConstructor::getValueProperty):
        (KJS::NumberConstructor::construct):
        (KJS::NumberConstructor::callAsFunction):
        * kjs/RegExpObject.cpp:
        (KJS::RegExpPrototype::RegExpPrototype):
        (KJS::regExpProtoFuncToString):
        (KJS::RegExpObject::getValueProperty):
        (KJS::RegExpConstructor::RegExpConstructor):
        (KJS::RegExpMatchesArray::fillArrayInstance):
        (KJS::RegExpConstructor::arrayOfMatches):
        (KJS::RegExpConstructor::getBackref):
        (KJS::RegExpConstructor::getLastParen):
        (KJS::RegExpConstructor::getLeftContext):
        (KJS::RegExpConstructor::getRightContext):
        (KJS::RegExpConstructor::getValueProperty):
        (KJS::RegExpConstructor::construct):
        * kjs/RegExpObject.h:
        * kjs/Shell.cpp:
        (GlobalObject::GlobalObject):
        (functionGC):
        (functionRun):
        (functionReadline):
        (jscmain):
        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):
        (KJS::DatePrototype::DatePrototype):
        (KJS::DateConstructor::DateConstructor):
        (KJS::DateConstructor::construct):
        (KJS::DateConstructor::callAsFunction):
        (KJS::DateFunction::DateFunction):
        (KJS::DateFunction::callAsFunction):
        (KJS::dateProtoFuncToString):
        (KJS::dateProtoFuncToUTCString):
        (KJS::dateProtoFuncToDateString):
        (KJS::dateProtoFuncToTimeString):
        (KJS::dateProtoFuncToLocaleString):
        (KJS::dateProtoFuncToLocaleDateString):
        (KJS::dateProtoFuncToLocaleTimeString):
        (KJS::dateProtoFuncValueOf):
        (KJS::dateProtoFuncGetTime):
        (KJS::dateProtoFuncGetFullYear):
        (KJS::dateProtoFuncGetUTCFullYear):
        (KJS::dateProtoFuncToGMTString):
        (KJS::dateProtoFuncGetMonth):
        (KJS::dateProtoFuncGetUTCMonth):
        (KJS::dateProtoFuncGetDate):
        (KJS::dateProtoFuncGetUTCDate):
        (KJS::dateProtoFuncGetDay):
        (KJS::dateProtoFuncGetUTCDay):
        (KJS::dateProtoFuncGetHours):
        (KJS::dateProtoFuncGetUTCHours):
        (KJS::dateProtoFuncGetMinutes):
        (KJS::dateProtoFuncGetUTCMinutes):
        (KJS::dateProtoFuncGetSeconds):
        (KJS::dateProtoFuncGetUTCSeconds):
        (KJS::dateProtoFuncGetMilliSeconds):
        (KJS::dateProtoFuncGetUTCMilliseconds):
        (KJS::dateProtoFuncGetTimezoneOffset):
        (KJS::dateProtoFuncSetTime):
        (KJS::setNewValueFromTimeArgs):
        (KJS::setNewValueFromDateArgs):
        (KJS::dateProtoFuncSetYear):
        (KJS::dateProtoFuncGetYear):
        * kjs/error_object.cpp:
        (KJS::ErrorPrototype::ErrorPrototype):
        (KJS::errorProtoFuncToString):
        (KJS::ErrorConstructor::ErrorConstructor):
        (KJS::ErrorConstructor::construct):
        (KJS::NativeErrorPrototype::NativeErrorPrototype):
        (KJS::NativeErrorConstructor::NativeErrorConstructor):
        (KJS::NativeErrorConstructor::construct):
        * kjs/identifier.h:
        * kjs/internal.cpp:
        (KJS::StringObject::create):
        (KJS::JSString::lengthGetter):
        (KJS::JSString::indexGetter):
        (KJS::JSString::indexNumericPropertyGetter):
        * kjs/interpreter.cpp:
        * kjs/list.cpp:
        (KJS::ArgList::slowAppend):
        * kjs/list.h:
        * kjs/lookup.h:
        (KJS::staticFunctionGetter):
        (KJS::cacheGlobalObject):
        * kjs/nodes.cpp:
        (KJS::Node::emitThrowError):
        (KJS::StringNode::emitCode):
        (KJS::ArrayNode::emitCode):
        (KJS::FuncDeclNode::makeFunction):
        (KJS::FuncExprNode::makeFunction):
        * kjs/nodes.h:
        * kjs/object_object.cpp:
        (KJS::ObjectPrototype::ObjectPrototype):
        (KJS::objectProtoFuncToLocaleString):
        (KJS::objectProtoFuncToString):
        (KJS::ObjectConstructor::ObjectConstructor):
        (KJS::ObjectConstructor::construct):
        * kjs/protect.h:
        (KJS::gcProtect):
        (KJS::gcUnprotect):
        * kjs/string_object.cpp:
        (KJS::StringObject::StringObject):
        (KJS::StringPrototype::StringPrototype):
        (KJS::replace):
        (KJS::stringProtoFuncCharAt):
        (KJS::stringProtoFuncCharCodeAt):
        (KJS::stringProtoFuncConcat):
        (KJS::stringProtoFuncIndexOf):
        (KJS::stringProtoFuncLastIndexOf):
        (KJS::stringProtoFuncMatch):
        (KJS::stringProtoFuncSearch):
        (KJS::stringProtoFuncReplace):
        (KJS::stringProtoFuncSlice):
        (KJS::stringProtoFuncSplit):
        (KJS::stringProtoFuncSubstr):
        (KJS::stringProtoFuncSubstring):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        (KJS::stringProtoFuncLocaleCompare):
        (KJS::stringProtoFuncBig):
        (KJS::stringProtoFuncSmall):
        (KJS::stringProtoFuncBlink):
        (KJS::stringProtoFuncBold):
        (KJS::stringProtoFuncFixed):
        (KJS::stringProtoFuncItalics):
        (KJS::stringProtoFuncStrike):
        (KJS::stringProtoFuncSub):
        (KJS::stringProtoFuncSup):
        (KJS::stringProtoFuncFontcolor):
        (KJS::stringProtoFuncFontsize):
        (KJS::stringProtoFuncAnchor):
        (KJS::stringProtoFuncLink):
        (KJS::StringConstructor::StringConstructor):
        (KJS::StringConstructor::construct):
        (KJS::StringConstructor::callAsFunction):
        (KJS::StringConstructorFunction::StringConstructorFunction):
        (KJS::StringConstructorFunction::callAsFunction):
        * kjs/string_object.h:
        (KJS::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
        * kjs/ustring.h:
        Updated for the above changes.

1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
2008-06-17  Timothy Hatcher  <timothy@apple.com>

        Added a type to DebuggerCallFrame so the under interface can
        distinguish anonymous functions and program call frames.

        https://bugs.webkit.org/show_bug.cgi?id=19585

        Reviewed by Geoff Garen.

        * JavaScriptCore.exp: Export the DebuggerCallFrame::type symbol.
        * kjs/DebuggerCallFrame.cpp:
        (KJS::DebuggerCallFrame::type): Added.
        * kjs/DebuggerCallFrame.h:

eric@webkit.org's avatar
eric@webkit.org committed
1884
1885
1886
1887
1888
1889
1890
1891
1892
2008-06-17  Eric Seidel  <eric@webkit.org>

        Reviewed by Tim H.
        
        Remove bogus ASSERT which tripped every time for those who use PAC files.

        * kjs/Parser.cpp:
        (KJS::Parser::parse):

1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
2008-06-17  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geoff.

        <rdar://problem/5951534> JSProfiler: Don't profile console.profile()
        or console.profileEnd()

        * profiler/Profile.cpp:
        (KJS::Profile::stopProfiling): Moved the creation of the (idle) node to
        the Profile (not ProfileNode).  This makes sense since the Profile
        should be the one to modify the profile tree.  Also each stopProfiling()
        does not need to check if it's the head node anymore.  Also fixed an
        oddity where I was using willExecute to create the node.
        (KJS::Profile::removeProfileStart): Removes the call to console.profile
        that started this profile.
        (KJS::Profile::removeProfileEnd): Removes the call to console.profileEnd
        that ended this profile.
        * profiler/Profile.h:
        * profiler/ProfileNode.cpp: Moved the creation of the (idle) node to
        the Profile object.
        (KJS::ProfileNode::stopProfiling):
        * profiler/ProfileNode.h: Added some helper functions and whitespace to
        facilitate readability and the removal of profile() and profileEnd()
        from the Profile tree.
        (KJS::CallIdentifier::operator const char* ):
        (KJS::ProfileNode::firstChild):
        (KJS::ProfileNode::lastChild):
        (KJS::ProfileNode::removeChild):
        (KJS::ProfileNode::toString):

1923
1924
2008-06-17  Ariya Hidayat  <ariya.hidayat@trolltech.com>

mitz@apple.com's avatar
mitz@apple.com committed
1925
        Rubber stamped by Adam Roben.
1926
1927
1928
1929
1930

        Include JSGlobalObject.h to fix the build.

        * kjs/ScopeChain.cpp:

1931
1932
1933
1934
1935
1936
1937
1938
1939
2008-06-17  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver.

        Reduce code duplication in emitReadModifyAssignment().

        * kjs/nodes.cpp:
        (KJS::emitReadModifyAssignment):

1940
1941
1942
1943
1944
1945
1946
1947
2008-06-17  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Oliver.

        Sort includes alphabetically.

        * kjs/nodes.cpp:

1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
2008-06-16  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Bug 19596: LEAK: Gmail leaks SegmentedVector<RegisterID>
        <https://bugs.webkit.org/show_bug.cgi?id=19596>

        When growing SegmentedVector, we start adding segments at the position
        of the last segment, overwriting it. The destructor frees allocated
        segments starting at the segment of index 1, because the segment of
        index 0 is assumed to be the initial inline segment. This causes a leak
        of the segment that is referenced by index 0. Modifying grow() so that
        it starts adding segments at the position after the last segment fixes
        the leak.

        Since the initial segment is a special case in the lookup code, this
        bug never manifested itself via incorrect results.

        * VM/SegmentedVector.h:
        (KJS::SegmentedVector::grow):

mjs@apple.com's avatar
mjs@apple.com committed
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
2008-06-16  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Alexey.
        
        - removed nearly unused types.h and LocalStorageEntry.h headers

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/ExecState.h:
        * kjs/LocalStorageEntry.h: Removed.
        * kjs/RegExpObject.cpp:
        * kjs/error_object.cpp:
        * kjs/grammar.y:
        * kjs/nodes.cpp:
        * kjs/types.h: Removed.

1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
2008-06-16  Alp Toker  <alp@nuanti.com>

        Rubber-stamped by Geoff.

        Change c++ to c in minidom and testapi emacs mode line comments.

        * API/Node.h:
        * API/NodeList.c:
        * API/NodeList.h:
        * API/testapi.c:

1996
>>>>>>> .r34623
1997
1998
1999
2000
2001
2002
2003
2004
2008-06-16  Alexey Proskuryakov  <ap@webkit.org>

        Trying to fix Windows build.

        * kjs/PropertyNameArray.h:
        * kjs/identifier.cpp:
        Include ExecState.h

2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2008-06-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Slight cleanup to the SymbolTableEntry class.
        
        Renamed isEmpty to isNull, since we usually use "empty" to mean "holds
        the valid, empty value", and "null" to mean "holds no value".
        
        Changed an "== 0" to a "!", to match our style guidelines.
        
        Added some ASSERTs to verify the (possibly questionable) assumption that
        all register indexes will have their high two bits set. Also clarified a
        comment to make that assumption clear.

ap@webkit.org's avatar
ap@webkit.org committed
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2008-06-16  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        Initialize functionQueueMutex in a safe manner.

        * wtf/MainThread.cpp:
        (WTF::functionQueueMutex): Made it an AtomicallyInitializedStatic.

        (WTF::dispatchFunctionsFromMainThread):
        (WTF::setMainThreadCallbacksPaused):
        Assert that the current thread is main, meaning that the callbacksPaused static can be
        accessed.

ap@webkit.org's avatar
ap@webkit.org committed
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2008-06-16  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff Garen.

        Make Identifier construction use an explicitly passed IdentifierTable.

        No change on SunSpider total.

        * API/JSCallbackObjectFunctions.h:
        (KJS::::getOwnPropertySlot):
        (KJS::::put):
        (KJS::::deleteProperty):
        (KJS::::getPropertyNames):
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunctionWithCallback):
        (JSObjectMakeFunction):
        (JSObjectHasProperty):
        (JSObjectGetProperty):
        (JSObjectSetProperty):
        (JSObjectDeleteProperty):
        (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
        (JSObjectCopyPropertyNames):
        * JavaScriptCore.exp:
        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::CodeGenerator):
        (KJS::CodeGenerator::registerForLocal):
        (KJS::CodeGenerator::isLocal):
        (KJS::CodeGenerator::addConstant):
        (KJS::CodeGenerator::findScopedProperty):
        * VM/CodeGenerator.h:
        (KJS::CodeGenerator::globalData):
        (KJS::CodeGenerator::propertyNames):
        * VM/JSPropertyNameIterator.cpp:
        (KJS::JSPropertyNameIterator::create):
        * VM/Machine.cpp:
        (KJS::Machine::throwException):
        (KJS::Machine::privateExecute):
        * kjs/ArrayPrototype.cpp:
        (KJS::ArrayConstructor::ArrayConstructor):
        * kjs/BooleanObject.cpp:
        (KJS::BooleanConstructor::BooleanConstructor):
        * kjs/FunctionPrototype.cpp:
        (KJS::FunctionConstructor::FunctionConstructor):
        (KJS::FunctionConstructor::construct):
        * kjs/JSArray.cpp:
        (KJS::JSArray::inlineGetOwnPropertySlot):
        (KJS::JSArray::put):
        (KJS::JSArray::deleteProperty):
        (KJS::JSArray::getPropertyNames):
        * kjs/JSFunction.cpp:
        (KJS::Arguments::Arguments):
        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData):
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        * kjs/JSObject.cpp:
        (KJS::JSObject::getOwnPropertySlot):
        (KJS::JSObject::put):
        (KJS::JSObject::putWithAttributes):
        (KJS::JSObject::deleteProperty):
        (KJS::JSObject::findPropertyHashEntry):
        (KJS::JSObject::getPropertyNames):
        (KJS::Error::create):
        * kjs/JSVariableObject.cpp:
        (KJS::JSVariableObject::getPropertyNames):
        * kjs/NumberObject.cpp:
        (KJS::NumberConstructor::NumberConstructor):
        * kjs/PropertyNameArray.cpp:
        (KJS::PropertyNameArray::add):
        * kjs/PropertyNameArray.h:
        (KJS::PropertyNameArray::PropertyNameArray):
        (KJS::PropertyNameArray::addKnownUnique):
        * kjs/PropertySlot.h:
        (KJS::PropertySlot::getValue):
        * kjs/RegExpObject.cpp:
        (KJS::RegExpConstructor::RegExpConstructor):
        * kjs/ScopeChain.cpp:
        (KJS::ScopeChainNode::print):
        * kjs/Shell.cpp:
        (GlobalObject::GlobalObject):
        * kjs/date_object.cpp:
        (KJS::DateConstructor::DateConstructor):
        * kjs/error_object.cpp:
        (KJS::ErrorConstructor::ErrorConstructor):
        (KJS::NativeErrorConstructor::NativeErrorConstructor):
        * kjs/grammar.y:
        * kjs/identifier.cpp:
        (KJS::Identifier::add):
        (KJS::Identifier::addSlowCase):
        * kjs/identifier.h:
        (KJS::Identifier::Identifier):
        (KJS::Identifier::from):
        (KJS::Identifier::equal):
        (KJS::Identifier::add):
        (KJS::operator==):
        (KJS::operator!=):
        * kjs/internal.cpp:
        (KJS::JSString::getOwnPropertySlot):
        * kjs/lexer.cpp:
        (KJS::Lexer::Lexer):
        (KJS::Lexer::lex):
        (KJS::Lexer::makeIdentifier):
        * kjs/lexer.h:
        * kjs/lookup.cpp:
        (KJS::HashTable::createTable):
        * kjs/lookup.h:
        (KJS::HashTable::initializeIfNeeded):
        (KJS::HashTable::entry):
        (KJS::getStaticPropertySlot):
        (KJS::getStaticFunctionSlot):
        (KJS::getStaticValueSlot):
        (KJS::lookupPut):
        * kjs/object_object.cpp:
        (KJS::objectProtoFuncHasOwnProperty):
        (KJS::objectProtoFuncDefineGetter):
        (KJS::objectProtoFuncDefineSetter):
        (KJS::objectProtoFuncLookupGetter):
        (KJS::objectProtoFuncLookupSetter):
        (KJS::objectProtoFuncPropertyIsEnumerable):
        (KJS::ObjectConstructor::ObjectConstructor):
        * kjs/string_object.cpp:
        (KJS::StringObject::getOwnPropertySlot):
        (KJS::StringObject::getPropertyNames):
        (KJS::StringConstructor::StringConstructor):
        Just pass ExecState or JSGlobalData everywhere. Identifier construction is now always
        explicit.

        * kjs/nodes.cpp: (KJS::RegExpNode::emitCode): Here, Identifier was created from a non-literal
        char*, which was incorrect, as that uses the pointer value as a key.

2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2008-06-16  Thiago Macieira  <tjmaciei@trolltech.com>

        Reviewed by Darin.

        https://bugs.webkit.org/show_bug.cgi?id=19577

        Fix compilation in C++ environments where C99 headers are not present

        The stdbool.h header is a C99 feature, defining the "_Bool" type as well as the
        "true" and "false" constants. But it's completely unnecessary in C++ as the
        language already defines the "bool" type and its two values.

        * API/JSBase.h:
        * API/JSContextRef.h:
        * API/JSObjectRef.h:
        * API/JSStringRef.h:
        * API/JSValueRef.h:

2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2008-06-16  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by John.

        <rdar://problem/6012509> JSProfiler: %s are incorrect if you exclude a
        top level node like (idle)

        * profiler/Profile.cpp:
        (KJS::Profile::focus):
        (KJS::Profile::exclude): Subtract the selfTime from the totalTime of the
        head since its self time will only be non-zero when one of its children
        were excluded. Since the head's totalTime is used to calculate %s when
        its totalTime is the same as the sum of all its visible childrens' times
        their %s will sum to 100%.

2197
2198
2199
2200
2201
2202
2203
2204
2205
2008-06-16  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam Weinig.

        <rdar://problem/5969992> JSProfiler: Remove the recursion limit in the profiler.

        * profiler/Profile.cpp:
        (KJS::Profile::willExecute):

2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2008-06-16  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Sam.

        <rdar://problem/5969992> JSProfiler: Remove the recursion limit in the
        profiler.
        - Remove the last of the uses of recursion in the profiler.

        * JavaScriptCore.exp: Export the new function's signature.
        * profiler/Profile.cpp: 
        (KJS::calculateVisibleTotalTime): Added a new static method for
        recalculating the visibleTotalTime of methods after focus has changed
        which are visible.
        (KJS::stopProfiling): 
        (KJS::Profile::focus): Implemented focus without recursion.
        * profiler/Profile.h: Moved implementation into the definition file.
        * profiler/ProfileNode.cpp:
        (KJS::ProfileNode::traverseNextNodePreOrder): Added an argument for
        whether or not to process the children nodes, this allows focus to skip
        sub trees which have been set as not visible.
        (KJS::ProfileNode::calculateVisibleTotalTime): This function set's a
        node's total visible time to the sum of its self time and its children's
        total times.
        (KJS::ProfileNode::focus): Implemented focus without recursion.
        * profiler/ProfileNode.h:
        (KJS::CallIdentifier::operator!= ):
        (KJS::ProfileNode::setActualTotalTime): Expanded setting the total time
        so that focus could modify only the visible total time.
        (KJS::ProfileNode::setVisibleTotalTime):

2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2008-06-16  Christian Dywan  <christian@twotoasts.de>

        Reviewed by Sam.

        https://bugs.webkit.org/show_bug.cgi?id=19552
        JavaScriptCore headers use C++ style comments

        Replace all C++ style comments with C style multiline
        comments and remove all "mode" lines.

        * API/JSBase.h:
        * API/JSClassRef.h:
        * API/JSContextRef.h:
        * API/JSObjectRef.h:
        * API/JSStringRef.h:
        * API/JSStringRefBSTR.h:
        * API/JSStringRefCF.h:
        * API/JSValueRef.h:
        * API/JavaScript.h:
        * API/JavaScriptCore.h:

2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2008-06-16  Christian Dywan  <christian@twotoasts.de>

        Reviewed by Sam.

        https://bugs.webkit.org/show_bug.cgi?id=19557
        (JavaScriptCore) minidom uses C++ style comments

        Use only C style comments in minidom sources

        * API/JSNode.c:
        (JSNode_appendChild):
        (JSNode_removeChild):
        * API/JSNode.h:
        * API/JSNodeList.c:
        (JSNodeList_getProperty):
        * API/JSNodeList.h:
        * API/Node.c:
        * API/Node.h:
        * API/NodeList.c:
        (NodeList_new):
        (NodeList_item):
        * API/NodeList.h:
        * API/minidom.c:
        (createStringWithContentsOfFile):
        * wtf/Assertions.h:
        * wtf/UnusedParam.h:

2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2008-06-16  Adriaan de Groot  <groot@kde.org>

        Reviewed by Simon.

        Fix compilation on Solaris

        On some systems, munmap takes a char* instead of a void* (contrary to POSIX and
        Single Unix Specification). Since you can always convert from char* to void*
        but not vice-versa, do the casting to char*.

        * kjs/collector.cpp:
        (KJS::allocateBlock):
        (KJS::freeBlock):

2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2008-06-16  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Make a UnaryOpNode class to reduce boilerplate code for UnaryPlusNode,
        NegateNode, BitwiseNotNode, and LogicalNotNode.

        * VM/CodeGenerator.h:
        (KJS::CodeGenerator::emitToJSNumber):
        * kjs/nodes.cpp:
        (KJS::UnaryOpNode::emitCode):
        * kjs/nodes.h:
        (KJS::UnaryOpNode::UnaryOpNode):
        (KJS::UnaryPlusNode::):
        (KJS::NegateNode::):
        (KJS::NegateNode::precedence):
        (KJS::BitwiseNotNode::):
        (KJS::BitwiseNotNode::precedence):
        (KJS::LogicalNotNode::):
        (KJS::LogicalNotNode::precedence):

2319
2320
2321
2322
2323
2324
2008-06-16  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Gtk build fix

        * GNUmakefile.am:

darin@apple.com's avatar
darin@apple.com committed
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2008-06-15  Darin Adler  <darin@apple.com>

        - rename KJS::List to KJS::ArgList

        * API/JSCallbackConstructor.cpp:
        (KJS::JSCallbackConstructor::construct):
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::callAsFunction):
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        (KJS::::construct):
        (KJS::::callAsFunction):
        * API/JSObjectRef.cpp:
        (JSObjectMakeFunction):
        (JSObjectCallAsFunction):
        (JSObjectCallAsConstructor):
        * JavaScriptCore.exp:
        * VM/Machine.cpp:
        (KJS::Machine::execute):
        (KJS::Machine::privateExecute):
        * VM/Machine.h:
        * kjs/ArrayPrototype.cpp:
        (KJS::arrayProtoFuncToString):
        (KJS::arrayProtoFuncToLocaleString):
        (KJS::arrayProtoFuncJoin):
        (KJS::arrayProtoFuncConcat):
        (KJS::arrayProtoFuncPop):
        (KJS::arrayProtoFuncPush):
        (KJS::arrayProtoFuncReverse):
        (KJS::arrayProtoFuncShift):
        (KJS::arrayProtoFuncSlice):
        (KJS::arrayProtoFuncSort):
        (KJS::arrayProtoFuncSplice):
        (KJS::arrayProtoFuncUnShift):
        (KJS::arrayProtoFuncFilter):
        (KJS::arrayProtoFuncMap):
        (KJS::arrayProtoFuncEvery):
        (KJS::arrayProtoFuncForEach):
        (KJS::arrayProtoFuncSome):
        (KJS::arrayProtoFuncIndexOf):
        (KJS::arrayProtoFuncLastIndexOf):
        (KJS::ArrayConstructor::construct):
        (KJS::ArrayConstructor::callAsFunction):
        * kjs/ArrayPrototype.h:
        * kjs/BooleanObject.cpp:
        (KJS::booleanProtoFuncToString):
        (KJS::booleanProtoFuncValueOf):
        (KJS::BooleanConstructor::construct):
        (KJS::BooleanConstructor::callAsFunction):
        * kjs/BooleanObject.h:
        * kjs/CommonIdentifiers.h:
        * kjs/ExecState.h:
        (KJS::ExecState::emptyList):
        * kjs/FunctionPrototype.cpp:
        (KJS::FunctionPrototype::callAsFunction):
        (KJS::functionProtoFuncToString):
        (KJS::functionProtoFuncApply):
        (KJS::functionProtoFuncCall):
        (KJS::FunctionConstructor::construct):
        (KJS::FunctionConstructor::callAsFunction):
        * kjs/FunctionPrototype.h:
        * kjs/JSActivation.cpp:
        (KJS::JSActivation::createArgumentsObject):
        * kjs/JSArray.cpp:
        (KJS::JSArray::JSArray):
        (KJS::AVLTreeAbstractorForArrayCompare::compare_key_key):
        * kjs/JSArray.h:
        * kjs/JSFunction.cpp:
        (KJS::JSFunction::callAsFunction):
        (KJS::JSFunction::construct):
        (KJS::IndexToNameMap::IndexToNameMap):
        (KJS::Arguments::Arguments):
        (KJS::encode):
        (KJS::decode):
        (KJS::globalFuncEval):
        (KJS::globalFuncParseInt):
        (KJS::globalFuncParseFloat):
        (KJS::globalFuncIsNaN):
        (KJS::globalFuncIsFinite):
        (KJS::globalFuncDecodeURI):
        (KJS::globalFuncDecodeURIComponent):
        (KJS::globalFuncEncodeURI):
        (KJS::globalFuncEncodeURIComponent):
        (KJS::globalFuncEscape):
        (KJS::globalFuncUnescape):
        (KJS::globalFuncKJSPrint):
        (KJS::PrototypeFunction::callAsFunction):
        (KJS::PrototypeReflexiveFunction::callAsFunction):
        * kjs/JSFunction.h:
        * kjs/JSGlobalData.h:
        * kjs/JSImmediate.cpp:
        (KJS::JSImmediate::toObject):
        * kjs/JSNotAnObject.cpp:
        (KJS::JSNotAnObject::construct):
        (KJS::JSNotAnObject::callAsFunction):
        * kjs/JSNotAnObject.h:
        * kjs/JSObject.cpp:
        (KJS::JSObject::put):
        (KJS::JSObject::construct):
        (KJS::JSObject::callAsFunction):
        (KJS::Error::create):
        * kjs/JSObject.h:
        * kjs/MathObject.cpp:
        (KJS::mathProtoFuncAbs):
        (KJS::mathProtoFuncACos):
        (KJS::mathProtoFuncASin):
        (KJS::mathProtoFuncATan):
        (KJS::mathProtoFuncATan2):
        (KJS::mathProtoFuncCeil):
        (KJS::mathProtoFuncCos):
        (KJS::mathProtoFuncExp):
        (KJS::mathProtoFuncFloor):
        (KJS::mathProtoFuncLog):
        (KJS::mathProtoFuncMax):
        (KJS::mathProtoFuncMin):
        (KJS::mathProtoFuncPow):
        (KJS::mathProtoFuncRandom):
        (KJS::mathProtoFuncRound):
        (KJS::mathProtoFuncSin):
        (KJS::mathProtoFuncSqrt):
        (KJS::mathProtoFuncTan):
        * kjs/MathObject.h:
        * kjs/NumberObject.cpp:
        (KJS::numberProtoFuncToString):
        (KJS::numberProtoFuncToLocaleString):
        (KJS::numberProtoFuncValueOf):
        (KJS::numberProtoFuncToFixed):
        (KJS::numberProtoFuncToExponential):
        (KJS::numberProtoFuncToPrecision):
        (KJS::NumberConstructor::construct):
        (KJS::NumberConstructor::callAsFunction):
        * kjs/NumberObject.h:
        * kjs/RegExpObject.cpp:
        (KJS::regExpProtoFuncTest):
        (KJS::regExpProtoFuncExec):
        (KJS::regExpProtoFuncCompile):
        (KJS::regExpProtoFuncToString):
        (KJS::RegExpObject::match):
        (KJS::RegExpObject::test):
        (KJS::RegExpObject::exec):
        (KJS::RegExpObject::callAsFunction):
        (KJS::RegExpConstructor::construct):
        (KJS::RegExpConstructor::callAsFunction):
        * kjs/RegExpObject.h:
        * kjs/Shell.cpp:
        (functionPrint):
        (functionDebug):
        (functionGC):
        (functionVersion):
        (functionRun):
        (functionLoad):
        (functionReadline):
        (functionQuit):
        * kjs/collector.cpp:
        (KJS::Collector::collect):
        * kjs/collector.h:
        (KJS::Collector::markListSet):
        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):
        (KJS::fillStructuresUsingTimeArgs):
        (KJS::fillStructuresUsingDateArgs):
        (KJS::DateConstructor::construct):
        (KJS::DateConstructor::callAsFunction):
        (KJS::DateFunction::callAsFunction):
        (KJS::dateProtoFuncToString):
        (KJS::dateProtoFuncToUTCString):
        (KJS::dateProtoFuncToDateString):
        (KJS::dateProtoFuncToTimeString):
        (KJS::dateProtoFuncToLocaleString):
        (KJS::dateProtoFuncToLocaleDateString):
        (KJS::dateProtoFuncToLocaleTimeString):
        (KJS::dateProtoFuncValueOf):
        (KJS::dateProtoFuncGetTime):
        (KJS::dateProtoFuncGetFullYear):
        (KJS::dateProtoFuncGetUTCFullYear):
        (KJS::dateProtoFuncToGMTString):
        (KJS::dateProtoFuncGetMonth):
        (KJS::dateProtoFuncGetUTCMonth):
        (KJS::dateProtoFuncGetDate):
        (KJS::dateProtoFuncGetUTCDate):
        (KJS::dateProtoFuncGetDay):
        (KJS::dateProtoFuncGetUTCDay):
        (KJS::dateProtoFuncGetHours):
        (KJS::dateProtoFuncGetUTCHours):
        (KJS::dateProtoFuncGetMinutes):
        (KJS::dateProtoFuncGetUTCMinutes):
        (KJS::dateProtoFuncGetSeconds):
        (KJS::dateProtoFuncGetUTCSeconds):
        (KJS::dateProtoFuncGetMilliSeconds):
        (KJS::dateProtoFuncGetUTCMilliseconds):
        (KJS::dateProtoFuncGetTimezoneOffset):
        (KJS::dateProtoFuncSetTime):
        (KJS::setNewValueFromTimeArgs):
        (KJS::setNewValueFromDateArgs):
        (KJS::dateProtoFuncSetMilliSeconds):
        (KJS::dateProtoFuncSetUTCMilliseconds):
        (KJS::dateProtoFuncSetSeconds):
        (KJS::dateProtoFuncSetUTCSeconds):
        (KJS::dateProtoFuncSetMinutes):
        (KJS::dateProtoFuncSetUTCMinutes):
        (KJS::dateProtoFuncSetHours):
        (KJS::dateProtoFuncSetUTCHours):
        (KJS::dateProtoFuncSetDate):
        (KJS::dateProtoFuncSetUTCDate):
        (KJS::dateProtoFuncSetMonth):
        (KJS::dateProtoFuncSetUTCMonth):
        (KJS::dateProtoFuncSetFullYear):
        (KJS::dateProtoFuncSetUTCFullYear):
        (KJS::dateProtoFuncSetYear):
        (KJS::dateProtoFuncGetYear):
        * kjs/date_object.h:
        * kjs/debugger.h:
        * kjs/error_object.cpp:
        (KJS::errorProtoFuncToString):
        (KJS::ErrorConstructor::construct):
        (KJS::ErrorConstructor::callAsFunction):
        (KJS::NativeErrorConstructor::construct):
        (KJS::NativeErrorConstructor::callAsFunction):
        * kjs/error_object.h:
        * kjs/internal.cpp:
        (KJS::JSNumberCell::toObject):
        (KJS::JSNumberCell::toThisObject):
        * kjs/list.cpp:
        (KJS::ArgList::getSlice):
        (KJS::ArgList::markLists):
        (KJS::ArgList::slowAppend):
        * kjs/list.h:
        (KJS::ArgList::ArgList):
        (KJS::ArgList::~ArgList):
        * kjs/object_object.cpp:
        (KJS::objectProtoFuncValueOf):
        (KJS::objectProtoFuncHasOwnProperty):
        (KJS::objectProtoFuncIsPrototypeOf):
        (KJS::objectProtoFuncDefineGetter):
        (KJS::objectProtoFuncDefineSetter):
        (KJS::objectProtoFuncLookupGetter):
        (KJS::objectProtoFuncLookupSetter):
        (KJS::objectProtoFuncPropertyIsEnumerable):
        (KJS::objectProtoFuncToLocaleString):
        (KJS::objectProtoFuncToString):
        (KJS::ObjectConstructor::construct):
        (KJS::ObjectConstructor::callAsFunction):
        * kjs/object_object.h:
        * kjs/string_object.cpp:
        (KJS::replace):
        (KJS::stringProtoFuncToString):
        (KJS::stringProtoFuncValueOf):
        (KJS::stringProtoFuncCharAt):
        (KJS::stringProtoFuncCharCodeAt):
        (KJS::stringProtoFuncConcat):
        (KJS::stringProtoFuncIndexOf):
        (KJS::stringProtoFuncLastIndexOf):
        (KJS::stringProtoFuncMatch):
        (KJS::stringProtoFuncSearch):
        (KJS::stringProtoFuncReplace):
        (KJS::stringProtoFuncSlice):
        (KJS::stringProtoFuncSplit):
        (KJS::stringProtoFuncSubstr):
        (KJS::stringProtoFuncSubstring):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        (KJS::stringProtoFuncLocaleCompare):
        (KJS::stringProtoFuncBig):
        (KJS::stringProtoFuncSmall):
        (KJS::stringProtoFuncBlink):
        (KJS::stringProtoFuncBold):
        (KJS::stringProtoFuncFixed):
        (KJS::stringProtoFuncItalics):
        (KJS::stringProtoFuncStrike):
        (KJS::stringProtoFuncSub):
        (KJS::stringProtoFuncSup):
        (KJS::stringProtoFuncFontcolor):
        (KJS::stringProtoFuncFontsize):
        (KJS::stringProtoFuncAnchor):
        (KJS::stringProtoFuncLink):
        (KJS::StringConstructor::construct):
        (KJS::StringConstructor::callAsFunction):
        (KJS::StringConstructorFunction::callAsFunction):
        * kjs/string_object.h:

darin@apple.com's avatar
darin@apple.com committed
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2008-06-15  Darin Adler  <darin@apple.com>

        - new names for more JavaScriptCore files

        * API/JSCallbackFunction.cpp:
        * API/JSObjectRef.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * VM/Machine.cpp:
        * kjs/AllInOneFile.cpp:
        * kjs/ArrayPrototype.cpp: Copied from JavaScriptCore/kjs/array_object.cpp.
        * kjs/ArrayPrototype.h: Copied from JavaScriptCore/kjs/array_object.h.
        * kjs/BooleanObject.cpp: Copied from JavaScriptCore/kjs/bool_object.cpp.
        * kjs/BooleanObject.h: Copied from JavaScriptCore/kjs/bool_object.h.
        * kjs/ExecState.cpp:
        * kjs/ExecState.h:
        * kjs/FunctionPrototype.cpp: Copied from JavaScriptCore/kjs/function_object.cpp.
        * kjs/FunctionPrototype.h: Copied from JavaScriptCore/kjs/function_object.h.
        * kjs/JSArray.cpp: Copied from JavaScriptCore/kjs/array_instance.cpp.
        * kjs/JSArray.h: Copied from JavaScriptCore/kjs/array_instance.h.
        * kjs/JSFunction.cpp:
        * kjs/JSFunction.h:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSImmediate.cpp:
        * kjs/JSObject.h:
        * kjs/JSString.h:
        * kjs/JSValue.h:
        * kjs/JSVariableObject.cpp:
        * kjs/MathObject.cpp: Copied from JavaScriptCore/kjs/math_object.cpp.
        * kjs/MathObject.h: Copied from JavaScriptCore/kjs/math_object.h.
        * kjs/NumberObject.cpp: Copied from JavaScriptCore/kjs/number_object.cpp.
        * kjs/NumberObject.h: Copied from JavaScriptCore/kjs/number_object.h.
        * kjs/PropertyMap.cpp: Copied from JavaScriptCore/kjs/property_map.cpp.
        * kjs/PropertyMap.h: Copied from JavaScriptCore/kjs/property_map.h.
        * kjs/PropertySlot.cpp: Copied from JavaScriptCore/kjs/property_slot.cpp.
        * kjs/PropertySlot.h: Copied from JavaScriptCore/kjs/property_slot.h.
        * kjs/RegExpObject.cpp: Copied from JavaScriptCore/kjs/regexp_object.cpp.
        * kjs/RegExpObject.h: Copied from JavaScriptCore/kjs/regexp_object.h.
        * kjs/ScopeChain.cpp: Copied from JavaScriptCore/kjs/scope_chain.cpp.
        * kjs/ScopeChain.h: Copied from JavaScriptCore/kjs/scope_chain.h.
        * kjs/ScopeChainMark.h: Copied from JavaScriptCore/kjs/scope_chain_mark.h.
        * kjs/Shell.cpp:
        * kjs/array_instance.cpp: Removed.
        * kjs/array_instance.h: Removed.
        * kjs/array_object.cpp: Removed.
        * kjs/array_object.h: Removed.
        * kjs/bool_object.cpp: Removed.
        * kjs/bool_object.h: Removed.
        * kjs/error_object.h:
        * kjs/function_object.cpp: Removed.
        * kjs/function_object.h: Removed.
        * kjs/internal.cpp:
        * kjs/math_object.cpp: Removed.
        * kjs/math_object.h: Removed.
        * kjs/nodes.cpp:
        * kjs/number_object.cpp: Removed.
        * kjs/number_object.h: Removed.
        * kjs/object_object.cpp:
        * kjs/property_map.cpp: Removed.
        * kjs/property_map.h: Removed.
        * kjs/property_slot.cpp: Removed.
        * kjs/property_slot.h: Removed.
        * kjs/regexp_object.cpp: Removed.
        * kjs/regexp_object.h: Removed.
        * kjs/scope_chain.cpp: Removed.
        * kjs/scope_chain.h: Removed.
        * kjs/scope_chain_mark.h: Removed.
        * kjs/string_object.cpp:
        * kjs/string_object.h:

darin@apple.com's avatar
darin@apple.com committed
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2008-06-15  Darin Adler  <darin@apple.com>

        - new names for a few key JavaScriptCore files

        * API/JSBase.cpp:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        * API/JSClassRef.h:
        * API/JSContextRef.cpp:
        * API/JSObjectRef.cpp:
        * API/JSStringRef.cpp:
        * API/JSStringRefCF.cpp:
        * API/JSValueRef.cpp:
        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * VM/CodeBlock.cpp:
        * VM/CodeGenerator.cpp:
        * VM/ExceptionHelpers.cpp:
        * VM/ExceptionHelpers.h:
        * VM/JSPropertyNameIterator.cpp:
        * VM/JSPropertyNameIterator.h:
        * VM/Machine.cpp:
        * kjs/AllInOneFile.cpp:
        * kjs/DateMath.cpp:
        * kjs/DebuggerCallFrame.cpp:
        * kjs/ExecState.cpp:
        * kjs/JSActivation.cpp:
        * kjs/JSFunction.cpp: Copied from JavaScriptCore/kjs/function.cpp.
        * kjs/JSFunction.h: Copied from JavaScriptCore/kjs/function.h.
        * kjs/JSImmediate.cpp:
        * kjs/JSNotAnObject.h:
        * kjs/JSObject.cpp: Copied from JavaScriptCore/kjs/object.cpp.
        * kjs/JSObject.h: Copied from JavaScriptCore/kjs/object.h.
        * kjs/JSString.h: Copied from JavaScriptCore/kjs/internal.h.
        * kjs/JSValue.cpp: Copied from JavaScriptCore/kjs/value.cpp.
        * kjs/JSValue.h: Copied from JavaScriptCore/kjs/value.h.
        * kjs/JSVariableObject.h:
        * kjs/JSWrapperObject.h:
        * kjs/Shell.cpp:
        * kjs/SymbolTable.h:
        * kjs/array_instance.h:
        * kjs/collector.cpp:
        * kjs/date_object.cpp:
        * kjs/date_object.h:
        * kjs/error_object.cpp:
        * kjs/function.cpp: Removed.
        * kjs/function.h: Removed.
        * kjs/function_object.cpp:
        * kjs/function_object.h:
        * kjs/grammar.y:
        * kjs/internal.cpp:
        * kjs/internal.h: Removed.
        * kjs/lexer.cpp:
        * kjs/list.h:
        * kjs/lookup.h:
        * kjs/nodes.h:
        * kjs/object.cpp: Removed.
        * kjs/object.h: Removed.
        * kjs/object_object.h:
        * kjs/operations.cpp:
        * kjs/property_map.cpp:
        * kjs/property_slot.cpp:
        * kjs/property_slot.h:
        * kjs/protect.h:
        * kjs/regexp_object.cpp:
        * kjs/scope_chain.cpp:
        * kjs/string_object.h:
        * kjs/ustring.cpp:
        * kjs/value.cpp: Removed.
        * kjs/value.h: Removed.
        * profiler/Profile.cpp:
        * profiler/Profiler.cpp:

darin@apple.com's avatar
darin@apple.com committed
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2008-06-15  Darin Adler  <darin@apple.com>

        Rubber stamped by Sam.

        - cut down on confusing uses of "Object" and "Imp" in
          JavaScriptCore class names

        * API/JSCallbackFunction.cpp:
        (KJS::JSCallbackFunction::JSCallbackFunction):
        * API/JSCallbackFunction.h:
        * VM/Machine.cpp:
        (KJS::Machine::privateExecute):
        * kjs/ExecState.h:
        (KJS::ExecState::regExpTable):
        (KJS::ExecState::regExpConstructorTable):
        * kjs/JSGlobalData.cpp:
        (KJS::JSGlobalData::JSGlobalData):
        (KJS::JSGlobalData::~JSGlobalData):
        * kjs/JSGlobalData.h:
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        * kjs/JSGlobalObject.h:
        (KJS::JSGlobalObject::objectConstructor):
        (KJS::JSGlobalObject::functionConstructor):
        (KJS::JSGlobalObject::arrayConstructor):
        (KJS::JSGlobalObject::booleanConstructor):
        (KJS::JSGlobalObject::stringConstructor):
        (KJS::JSGlobalObject::numberConstructor):
        (KJS::JSGlobalObject::dateConstructor):
        (KJS::JSGlobalObject::regExpConstructor):
        (KJS::JSGlobalObject::errorConstructor):
        (KJS::JSGlobalObject::evalErrorConstructor):
        (KJS::JSGlobalObject::rangeErrorConstructor):
        (KJS::JSGlobalObject::referenceErrorConstructor):
        (KJS::JSGlobalObject::syntaxErrorConstructor):
        (KJS::JSGlobalObject::typeErrorConstructor):
        (KJS::JSGlobalObject::URIErrorConstructor):
        * kjs/array_object.cpp:
        (KJS::ArrayConstructor::ArrayConstructor):
        (KJS::ArrayConstructor::getConstructData):
        (KJS::ArrayConstructor::construct):
        (KJS::ArrayConstructor::callAsFunction):
        * kjs/array_object.h:
        * kjs/bool_object.cpp:
        (KJS::BooleanObject::BooleanObject):
        (KJS::BooleanPrototype::BooleanPrototype):
        (KJS::booleanProtoFuncToString):
        (KJS::booleanProtoFuncValueOf):
        (KJS::BooleanConstructor::BooleanConstructor):
        (KJS::BooleanConstructor::getConstructData):
        (KJS::BooleanConstructor::construct):
        (KJS::BooleanConstructor::callAsFunction):
        * kjs/bool_object.h:
        * kjs/date_object.cpp:
        (KJS::DatePrototype::DatePrototype):
        (KJS::DateConstructor::DateConstructor):
        (KJS::DateConstructor::getConstructData):
        (KJS::DateConstructor::construct):
        (KJS::DateConstructor::callAsFunction):
        (KJS::DateFunction::DateFunction):
        (KJS::DateFunction::callAsFunction):
        * kjs/date_object.h:
        * kjs/error_object.cpp:
        (KJS::ErrorPrototype::ErrorPrototype):
        (KJS::ErrorConstructor::ErrorConstructor):
        (KJS::ErrorConstructor::getConstructData):
        (KJS::ErrorConstructor::construct):
        (KJS::ErrorConstructor::callAsFunction):
        (KJS::NativeErrorConstructor::NativeErrorConstructor):
        (KJS::NativeErrorConstructor::getConstructData):
        (KJS::NativeErrorConstructor::construct):
        (KJS::NativeErrorConstructor::callAsFunction):
        (KJS::NativeErrorConstructor::mark):
        * kjs/error_object.h:
        * kjs/function.cpp:
        (KJS::JSFunction::JSFunction):
        (KJS::JSFunction::mark):
        (KJS::JSFunction::getOwnPropertySlot):
        (KJS::JSFunction::put):
        (KJS::JSFunction::deleteProperty):
        (KJS::PrototypeFunction::PrototypeFunction):
        (KJS::PrototypeReflexiveFunction::PrototypeReflexiveFunction):
        (KJS::PrototypeReflexiveFunction::mark):
        * kjs/function.h:
        * kjs/function_object.cpp:
        (KJS::functionProtoFuncToString):
        (KJS::FunctionConstructor::FunctionConstructor):
        (KJS::FunctionConstructor::getConstructData):
        (KJS::FunctionConstructor::construct):
        (KJS::FunctionConstructor::callAsFunction):
        * kjs/function_object.h:
        * kjs/internal.cpp:
        (KJS::StringObject::create):
        (KJS::JSString::toObject):
        (KJS::JSString::toThisObject):
        (KJS::JSString::getOwnPropertySlot):
        (KJS::InternalFunction::InternalFunction):
        (KJS::InternalFunction::getCallData):
        (KJS::InternalFunction::implementsHasInstance):
        * kjs/math_object.cpp:
        (KJS::MathObject::MathObject):
        (KJS::MathObject::getOwnPropertySlot):
        (KJS::MathObject::getValueProperty):
        * kjs/math_object.h:
        * kjs/number_object.cpp:
        (KJS::NumberObject::NumberObject):
        (KJS::NumberPrototype::NumberPrototype):
        (KJS::numberProtoFuncToString):
        (KJS::numberProtoFuncToLocaleString):
        (KJS::numberProtoFuncValueOf):
        (KJS::numberProtoFuncToFixed):
        (KJS::numberProtoFuncToExponential):
        (KJS::numberProtoFuncToPrecision):
        (KJS::NumberConstructor::NumberConstructor):
        (KJS::NumberConstructor::getOwnPropertySlot):
        (KJS::NumberConstructor::getValueProperty):
        (KJS::NumberConstructor::getConstructData):
        (KJS::NumberConstructor::construct):
        (KJS::NumberConstructor::callAsFunction):
        * kjs/number_object.h:
        * kjs/object.cpp:
        (KJS::JSObject::putDirectFunction):
        * kjs/object.h:
        * kjs/object_object.cpp:
        (KJS::ObjectConstructor::ObjectConstructor):
        (KJS::ObjectConstructor::getConstructData):
        (KJS::ObjectConstructor::construct):
        (KJS::ObjectConstructor::callAsFunction):
        * kjs/object_object.h:
        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp):
        * kjs/regexp_object.cpp:
        (KJS::regExpProtoFuncTest):
        (KJS::regExpProtoFuncExec):
        (KJS::regExpProtoFuncCompile):
        (KJS::regExpProtoFuncToString):
        (KJS::RegExpObject::RegExpObject):
        (KJS::RegExpObject::~RegExpObject):
        (KJS::RegExpObject::getOwnPropertySlot):
        (KJS::RegExpObject::getValueProperty):
        (KJS::RegExpObject::put):
        (KJS::RegExpObject::putValueProperty):
        (KJS::RegExpObject::match):
        (KJS::RegExpObject::test):
        (KJS::RegExpObject::exec):
        (KJS::RegExpObject::getCallData):
        (KJS::RegExpObject::callAsFunction):
        (KJS::RegExpConstructorPrivate::RegExpConstructorPrivate):
        (KJS::RegExpConstructor::RegExpConstructor):
        (KJS::RegExpConstructor::performMatch):
        (KJS::RegExpMatchesArray::RegExpMatchesArray):
        (KJS::RegExpMatchesArray::~RegExpMatchesArray):
        (KJS::RegExpMatchesArray::fillArrayInstance):
        (KJS::RegExpConstructor::arrayOfMatches):
        (KJS::RegExpConstructor::getBackref):
        (KJS::RegExpConstructor::getLastParen):
        (KJS::RegExpConstructor::getLeftContext):
        (KJS::RegExpConstructor::getRightContext):
        (KJS::RegExpConstructor::getOwnPropertySlot):
        (KJS::RegExpConstructor::getValueProperty):
        (KJS::RegExpConstructor::put):
        (KJS::RegExpConstructor::putValueProperty):
        (KJS::RegExpConstructor::getConstructData):
        (KJS::RegExpConstructor::construct):
        (KJS::RegExpConstructor::callAsFunction):
        (KJS::RegExpConstructor::input):
        * kjs/regexp_object.h:
        * kjs/string_object.cpp:
        (KJS::StringObject::StringObject):
        (KJS::StringObject::getOwnPropertySlot):
        (KJS::StringObject::put):
        (KJS::StringObject::deleteProperty):
        (KJS::StringObject::getPropertyNames):
        (KJS::StringPrototype::StringPrototype):
        (KJS::StringPrototype::getOwnPropertySlot):
        (KJS::replace):
        (KJS::stringProtoFuncToString):
        (KJS::stringProtoFuncValueOf):
        (KJS::stringProtoFuncCharAt):
        (KJS::stringProtoFuncCharCodeAt):
        (KJS::stringProtoFuncConcat):
        (KJS::stringProtoFuncIndexOf):
        (KJS::stringProtoFuncLastIndexOf):
        (KJS::stringProtoFuncMatch):
        (KJS::stringProtoFuncSearch):
        (KJS::stringProtoFuncReplace):
        (KJS::stringProtoFuncSlice):
        (KJS::stringProtoFuncSplit):
        (KJS::stringProtoFuncSubstr):
        (KJS::stringProtoFuncSubstring):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        (KJS::stringProtoFuncLocaleCompare):
        (KJS::stringProtoFuncBig):
        (KJS::stringProtoFuncSmall):
        (KJS::stringProtoFuncBlink):
        (KJS::stringProtoFuncBold):
        (KJS::stringProtoFuncFixed):
        (KJS::stringProtoFuncItalics):
        (KJS::stringProtoFuncStrike):
        (KJS::stringProtoFuncSub):
        (KJS::stringProtoFuncSup):
        (KJS::stringProtoFuncFontcolor):
        (KJS::stringProtoFuncFontsize):
        (KJS::stringProtoFuncAnchor):
        (KJS::stringProtoFuncLink):
        (KJS::StringConstructor::StringConstructor):
        (KJS::StringConstructor::getConstructData):
        (KJS::StringConstructor::construct):
        (KJS::StringConstructor::callAsFunction):
        (KJS::StringConstructorFunction::StringConstructorFunction):
        (KJS::StringConstructorFunction::callAsFunction):
        * kjs/string_object.h:
        (KJS::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
        * profiler/Profiler.cpp:
        (KJS::createCallIdentifier):

darin@apple.com's avatar
darin@apple.com committed
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
2008-06-15  Darin Adler  <darin@apple.com>

        Rubber stamped by Sam.

        - use JS prefix and simpler names for basic JavaScriptCore types,
          to complement JSValue and JSObject

        * JavaScriptCore.exp:
        * VM/Machine.cpp:
        (KJS::jsLess):
        (KJS::jsLessEq):
        (KJS::jsAdd):
        (KJS::callEval):
        (KJS::Machine::execute):
        (KJS::Machine::retrieveArguments):
        (KJS::Machine::retrieveCaller):
        (KJS::Machine::getCallFrame):
        (KJS::Machine::getFunctionAndArguments):
        * VM/Machine.h:
        * VM/Register.h:
        * kjs/DebuggerCallFrame.cpp:
        (KJS::DebuggerCallFrame::functionName):
        * kjs/ExecState.h:
        * kjs/JSActivation.cpp:
        (KJS::JSActivation::createArgumentsObject):
        * kjs/array_instance.cpp:
        (KJS::JSArray::checkConsistency):
        (KJS::JSArray::JSArray):
        (KJS::JSArray::~JSArray):
        (KJS::JSArray::getItem):
        (KJS::JSArray::lengthGetter):
        (KJS::JSArray::inlineGetOwnPropertySlot):
        (KJS::JSArray::getOwnPropertySlot):
        (KJS::JSArray::put):
        (KJS::JSArray::deleteProperty):
        (KJS::JSArray::getPropertyNames):
        (KJS::JSArray::increaseVectorLength):
        (KJS::JSArray::setLength):
        (KJS::JSArray::mark):
        (KJS::JSArray::sort):
        (KJS::JSArray::compactForSorting):
        (KJS::JSArray::lazyCreationData):
        (KJS::JSArray::setLazyCreationData):
        * kjs/array_instance.h:
        * kjs/array_object.cpp:
        (KJS::ArrayPrototype::ArrayPrototype):
        (KJS::ArrayPrototype::getOwnPropertySlot):
        (KJS::arrayProtoFuncToString):
        (KJS::arrayProtoFuncToLocaleString):
        (KJS::arrayProtoFuncConcat):
        (KJS::arrayProtoFuncSort):
        (KJS::ArrayObjectImp::construct):
        * kjs/array_object.h:
        * kjs/completion.h:
        * kjs/function.cpp:
        (KJS::JSFunction::JSFunction):
        (KJS::JSFunction::mark):
        (KJS::JSFunction::getCallData):
        (KJS::JSFunction::callAsFunction):
        (KJS::JSFunction::argumentsGetter):
        (KJS::JSFunction::callerGetter):
        (KJS::JSFunction::lengthGetter):
        (KJS::JSFunction::getOwnPropertySlot):
        (KJS::JSFunction::put):
        (KJS::JSFunction::deleteProperty):
        (KJS::JSFunction::getParameterName):
        (KJS::JSFunction::getConstructData):
        (KJS::JSFunction::construct):
        (KJS::IndexToNameMap::IndexToNameMap):
        (KJS::Arguments::Arguments):
        * kjs/function.h:
        * kjs/function_object.cpp:
        (KJS::functionProtoFuncToString):
        (KJS::functionProtoFuncApply):
        (KJS::FunctionObjectImp::construct):
        * kjs/internal.cpp:
        (KJS::JSString::toPrimitive):
        (KJS::JSString::getPrimitiveNumber):
        (KJS::JSString::toBoolean):
        (KJS::JSString::toNumber):
        (KJS::JSString::toString):
        (KJS::StringInstance::create):
        (KJS::JSString::toObject):
        (KJS::JSString::toThisObject):
        (KJS::JSString::lengthGetter):
        (KJS::JSString::indexGetter):
        (KJS::JSString::indexNumericPropertyGetter):
        (KJS::JSString::getOwnPropertySlot):
        (KJS::JSNumberCell::type):
        (KJS::JSNumberCell::toPrimitive):
        (KJS::JSNumberCell::getPrimitiveNumber):
        (KJS::JSNumberCell::toBoolean):
        (KJS::JSNumberCell::toNumber):
        (KJS::JSNumberCell::toString):
        (KJS::JSNumberCell::toObject):
        (KJS::JSNumberCell::toThisObject):
        (KJS::JSNumberCell::getUInt32):
        (KJS::JSNumberCell::getTruncatedInt32):
        (KJS::JSNumberCell::getTruncatedUInt32):
        (KJS::GetterSetter::mark):
        (KJS::GetterSetter::toPrimitive):
        (KJS::GetterSetter::getPrimitiveNumber):
        (KJS::GetterSetter::toBoolean):
        (KJS::GetterSetter::toNumber):
        (KJS::GetterSetter::toString):
        (KJS::GetterSetter::toObject):
        (KJS::GetterSetter::getOwnPropertySlot):
        (KJS::GetterSetter::put):
        (KJS::GetterSetter::toThisObject):
        * kjs/internal.h:
        (KJS::JSString::JSString):
        (KJS::JSString::getStringPropertySlot):
        * kjs/nodes.cpp:
        (KJS::FuncDeclNode::makeFunction):
        (KJS::FuncExprNode::makeFunction):
        * kjs/nodes.h:
        * kjs/object.cpp:
        (KJS::JSObject::put):
        (KJS::JSObject::deleteProperty):
        (KJS::JSObject::defineGetter):
        (KJS::JSObject::defineSetter):
        (KJS::JSObject::lookupGetter):
        (KJS::JSObject::lookupSetter):
        (KJS::JSObject::fillGetterPropertySlot):
        * kjs/object.h:
        (KJS::GetterSetter::GetterSetter):
        * kjs/operations.cpp:
        (KJS::equal):
        (KJS::strictEqual):
        * kjs/property_map.cpp:
        (KJS::PropertyMap::containsGettersOrSetters):
        * kjs/regexp_object.cpp:
        (KJS::RegExpMatchesArray::getOwnPropertySlot):
        (KJS::RegExpMatchesArray::put):
        (KJS::RegExpMatchesArray::deleteProperty):
        (KJS::RegExpMatchesArray::getPropertyNames):
        (KJS::RegExpMatchesArray::RegExpMatchesArray):
        (KJS::RegExpMatchesArray::fillArrayInstance):
        * kjs/string_object.cpp:
        (KJS::StringInstance::StringInstance):
        (KJS::replace):
        (KJS::stringProtoFuncReplace):
        (KJS::stringProtoFuncToLowerCase):
        (KJS::stringProtoFuncToUpperCase):
        (KJS::stringProtoFuncToLocaleLowerCase):
        (KJS::stringProtoFuncToLocaleUpperCase):
        * kjs/string_object.h:
        (KJS::StringInstance::internalValue):
        * kjs/value.cpp:
        (KJS::JSCell::getNumber):
        (KJS::JSCell::getString):
        (KJS::JSCell::getObject):
        (KJS::jsString):
        (KJS::jsOwnedString):
        * kjs/value.h:
        (KJS::JSNumberCell::JSNumberCell):
        (KJS::jsNumberCell):
        (KJS::JSValue::uncheckedGetNumber):
        * profiler/Profiler.cpp:
        (KJS::createCallIdentifier):
        (KJS::createCallIdentifierFromFunctionImp):

3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
2008-06-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Alexey.
        
        - add emitUnaryOp, emitNullaryOp and emitUnaryOpNoDst; use them
        
        This removes some boilerplate code and also reduces the number of
        places that will need to be changed to do on-demand emit of
        loads (and thus support k operands).

        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitUnaryOp):
        (KJS::CodeGenerator::emitNullaryOp):
        (KJS::CodeGenerator::emitUnaryOpNoDst):
        (KJS::CodeGenerator::emitPushScope):
        * VM/CodeGenerator.h:
        (KJS::CodeGenerator::emitNewObject):
        (KJS::CodeGenerator::emitNewArray):
        (KJS::CodeGenerator::emitNot):
        (KJS::CodeGenerator::emitBitNot):
        (KJS::CodeGenerator::emitToJSNumber):
        (KJS::CodeGenerator::emitNegate):
        (KJS::CodeGenerator::emitInstanceOf):
        (KJS::CodeGenerator::emitTypeOf):
        (KJS::CodeGenerator::emitIn):
        (KJS::CodeGenerator::emitReturn):
        (KJS::CodeGenerator::emitEnd):
        (KJS::CodeGenerator::emitGetPropertyNames):

3173
3174
3175
3176
3177
3178
3179
3180
2008-06-15  Alp Toker  <alp@nuanti.com>

        Rubber-stamped by Maciej.

        Install 'jsc' application by default.

        * GNUmakefile.am:

mjs@apple.com's avatar
mjs@apple.com committed
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
2008-06-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver.
        
        - rename testkjs to jsc

        * GNUmakefile.am:
        * JavaScriptCore.vcproj/JavaScriptCore.sln:
        * JavaScriptCore.vcproj/jsc: Added.
        * JavaScriptCore.vcproj/jsc/jsc.vcproj: Copied from JavaScriptCore.vcproj/testkjs/testkjs.vcproj.
        * JavaScriptCore.vcproj/testkjs: Removed.
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Removed.
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * jscore.bkl:
        * kjs/Shell.cpp: Copied from kjs/testkjs.cpp.
        (main):
        (printUsageStatement):
        (jscmain):
        * kjs/jsc.pro: Copied from kjs/testkjs.pro.
        * kjs/testkjs.cpp: Removed.
        * kjs/testkjs.pro: Removed.
        * tests/mozilla/expected.html:
        * tests/mozilla/js1_2/Array/tostring_1.js:
        * tests/mozilla/js1_2/Array/tostring_2.js:
        * tests/mozilla/jsDriver.pl:

3207
3208
3209
3210
3211
3212
3213
3214
3215
2008-06-15  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Mac build fix.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/nodes.h:

3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
2008-06-15  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Change the spelling of PrecMultiplicitave to PrecMultiplicative.

        * kjs/nodes.h:
        (KJS::MultNode::precedence):
        (KJS::DivNode::precedence):
        (KJS::ModNode::precedence):

3227
3228
3229
3230
3231
3232
3233
3234
3235
2008-06-15  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Remove unused preprocessor macros related to exceptions in the old
        interpreter.

        * kjs/nodes.cpp:

3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
2008-06-15  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Maciej.

        Bug 19484: More instructions needs to use temporary registers
        <https://bugs.webkit.org/show_bug.cgi?id=19484>

        Fix codegen for all binary operations so that temporaries are used if
        necessary. This was done by making BinaryOpNode and ReverseBinaryOpNode
        subclasses of ExpressionNode, and eliminating the custom emitCode()
        methods for the individual node classes.

        This only adds 3 new instructions to SunSpider code, and there is no
        difference in SunSpider execution time.

        * VM/CodeGenerator.cpp:
        (KJS::CodeGenerator::emitBitNot):
        (KJS::CodeGenerator::emitBinaryOp):
        * VM/CodeGenerator.h:
        * kjs/grammar.y:
        * kjs/nodes.cpp:
        (KJS::PreIncResolveNode::emitCode):
        (KJS::PreDecResolveNode::emitCode):
        (KJS::BinaryOpNode::emitCode):
        (KJS::ReverseBinaryOpNode::emitCode):
        (KJS::emitReadModifyAssignment):
        (KJS::CaseBlockNode::emitCodeForBlock):
        * kjs/nodes.h:
        (KJS::BinaryOpNode::BinaryOpNode):
        (KJS::ReverseBinaryOpNode::ReverseBinaryOpNode):
        (KJS::MultNode::):
        (KJS::DivNode::):
        (KJS::DivNode::precedence):
        (KJS::ModNode::):
        (KJS::ModNode::precedence):
        (KJS::AddNode::):
        (KJS::AddNode::precedence):
        (KJS::SubNode::):
        (KJS::SubNode::precedence):
        (KJS::LeftShiftNode::):
        (KJS::LeftShiftNode::precedence):
        (KJS::RightShiftNode::):
        (KJS::RightShiftNode::precedence):
        (KJS::UnsignedRightShiftNode::):
        (KJS::UnsignedRightShiftNode::precedence):
        (KJS::LessNode::):
        (KJS::LessNode::precedence):
        (KJS::GreaterNode::):
        (KJS::GreaterNode::precedence):
        (KJS::LessEqNode::):
        (KJS::LessEqNode::precedence):
        (KJS::GreaterEqNode::):
        (KJS::GreaterEqNode::precedence):
        (KJS::InstanceOfNode::):
        (KJS::InstanceOfNode::precedence):
        (KJS::InNode::):
        (KJS::InNode::precedence):
        (KJS::EqualNode::):
        (KJS::EqualNode::precedence):
        (KJS::NotEqualNode::):
        (KJS::NotEqualNode::precedence):
        (KJS::StrictEqualNode::):
        (KJS::StrictEqualNode::precedence):
        (KJS::NotStrictEqualNode::):
        (KJS::NotStrictEqualNode::precedence):
        (KJS::BitAndNode::):
        (KJS::BitAndNode::precedence):
        (KJS::BitOrNode::):
        (KJS::BitOrNode::precedence):
        (KJS::BitXOrNode::):
        (KJS::BitXOrNode::precedence):
        * kjs/nodes2string.cpp:
        (KJS::LessNode::streamTo):
        (KJS::GreaterNode::streamTo):
        (KJS::LessEqNode::streamTo):
        (KJS::GreaterEqNode::streamTo):
        (KJS::InstanceOfNode::streamTo):
        (KJS::InNode::streamTo):
        (KJS::EqualNode::streamTo):
        (KJS::NotEqualNode::streamTo):
        (KJS::StrictEqualNode::streamTo):
        (KJS::NotStrictEqualNode::streamTo):
        (KJS::BitAndNode::streamTo):
        (KJS::BitXOrNode::streamTo):
        (KJS::BitOrNode::streamTo):

3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
2008-06-14  Darin Adler  <darin@apple.com>

        Rubber stamped by Sam.

        - rename a bunch of local symbols within the regular expression code to
          follow our usual coding style, and do a few other name tweaks

        * pcre/pcre_compile.cpp:
        (CompileData::CompileData):
        (checkEscape):
        (readRepeatCounts):
        (compileBranch):
        (compileBracket):
        (calculateCompiledPatternLength):
        (returnError):
        (jsRegExpCompile):
        * pcre/pcre_exec.cpp:
        (MatchStack::MatchStack):
        (MatchStack::canUseStackBufferForNextFrame):
        (MatchStack::popCurrentFrame):
        (match):
        (tryFirstByteOptimization):
        (tryRequiredByteOptimization):
        (jsRegExpExecute):
        * pcre/pcre_internal.h:

3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
2008-06-14  Cameron Zwarich  <cwzwarich@uwaterloo.ca>

        Reviewed by Darin.

        Remove redundant uses of get().

        * kjs/nodes.cpp:
        (KJS::BracketAccessorNode::emitCode):
        (KJS::AddNode::emitCode):
        (KJS::SubNode::emitCode):
        (KJS::ReadModifyResolveNode::emitCode):
        (KJS::AssignDotNode::emitCode):
        (KJS::ReadModifyDotNode::emitCode):
        (KJS::AssignBracketNode::emitCode):
        (KJS::ReadModifyBracketNode::emitCode):

cwzwarich@webkit.org's avatar