ChangeLog 538 KB
Newer Older
1
2
3
4
5
6
2008-11-04  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        * wtf/ThreadingNone.cpp: Tweak formatting.

7
8
9
10
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
45
46
47
2008-11-03  Darin Adler  <darin@apple.com>

        Reviewed by Tim Hatcher.

        - https://bugs.webkit.org/show_bug.cgi?id=22061
          create script to check for exit-time destructors

        * JavaScriptCore.exp: Changed to export functions rather than
        a global for the atomically initialized static mutex.

        * JavaScriptCore.xcodeproj/project.pbxproj: Added a script
        phase that runs the check-for-exit-time-destructors script.

        * wtf/MainThread.cpp:
        (WTF::mainThreadFunctionQueueMutex): Changed to leak an object
        rather than using an exit time destructor.
        (WTF::functionQueue): Ditto.
        * wtf/unicode/icu/CollatorICU.cpp:
        (WTF::cachedCollatorMutex): Ditto.

        * wtf/Threading.h: Changed other platforms to share the Windows
        approach where the mutex is internal and the functions are exported.
        * wtf/ThreadingGtk.cpp:
        (WTF::lockAtomicallyInitializedStaticMutex): Ditto.
        (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
        * wtf/ThreadingNone.cpp:
        (WTF::lockAtomicallyInitializedStaticMutex): Ditto.
        (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
        * wtf/ThreadingPthreads.cpp:
        (WTF::threadMapMutex): Changed to leak an object rather than using
        an exit time destructor.
        (WTF::lockAtomicallyInitializedStaticMutex): Mutex change.
        (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
        (WTF::threadMap): Changed to leak an object rather than using
        an exit time destructor.
        * wtf/ThreadingQt.cpp:
        (WTF::lockAtomicallyInitializedStaticMutex): Mutex change.
        (WTF::unlockAtomicallyInitializedStaticMutex): Ditto.
        * wtf/ThreadingWin.cpp:
        (WTF::lockAtomicallyInitializedStaticMutex): Added an assertion.

aroben@apple.com's avatar
aroben@apple.com committed
48
49
50
51
52
53
54
2008-11-04  Adam Roben  <aroben@apple.com>

        Windows build fix

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Update
        the location of JSStaticScopeObject.{cpp,h}.

55
56
57
58
59
60
61
62
63
64
65
2008-11-04  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Alexey Proskuryakov.

        Move AllInOneFile.cpp to the top level of JavaScriptCore.

        * AllInOneFile.cpp: Copied from kjs/AllInOneFile.cpp.
        * GNUmakefile.am:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/AllInOneFile.cpp: Removed.

66
67
68
69
70
71
72
73
2008-11-04  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Alexey Proskuryakov.

        Add NodeInfo.h to the JavaScriptCore Xcode project.

        * JavaScriptCore.xcodeproj/project.pbxproj:

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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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
2008-11-03  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Maciej Stachowiak.

        Move more files into the runtime subdirectory of JavaScriptCore.

        * API/JSBase.cpp:
        * API/JSCallbackConstructor.cpp:
        * API/JSCallbackFunction.cpp:
        * API/JSClassRef.cpp:
        * API/OpaqueJSString.cpp:
        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * kjs/AllInOneFile.cpp:
        * kjs/ArgList.cpp: Removed.
        * kjs/ArgList.h: Removed.
        * kjs/Arguments.cpp: Removed.
        * kjs/Arguments.h: Removed.
        * kjs/BatchedTransitionOptimizer.h: Removed.
        * kjs/CollectorHeapIterator.h: Removed.
        * kjs/CommonIdentifiers.cpp: Removed.
        * kjs/CommonIdentifiers.h: Removed.
        * kjs/ExecState.cpp: Removed.
        * kjs/ExecState.h: Removed.
        * kjs/GetterSetter.cpp: Removed.
        * kjs/GetterSetter.h: Removed.
        * kjs/InitializeThreading.cpp: Removed.
        * kjs/InitializeThreading.h: Removed.
        * kjs/JSActivation.cpp: Removed.
        * kjs/JSActivation.h: Removed.
        * kjs/JSGlobalData.cpp: Removed.
        * kjs/JSGlobalData.h: Removed.
        * kjs/JSLock.cpp: Removed.
        * kjs/JSLock.h: Removed.
        * kjs/JSStaticScopeObject.cpp: Removed.
        * kjs/JSStaticScopeObject.h: Removed.
        * kjs/JSType.h: Removed.
        * kjs/PropertyNameArray.cpp: Removed.
        * kjs/PropertyNameArray.h: Removed.
        * kjs/ScopeChain.cpp: Removed.
        * kjs/ScopeChain.h: Removed.
        * kjs/ScopeChainMark.h: Removed.
        * kjs/SymbolTable.h: Removed.
        * kjs/Tracing.d: Removed.
        * kjs/Tracing.h: Removed.
        * runtime/ArgList.cpp: Copied from kjs/ArgList.cpp.
        * runtime/ArgList.h: Copied from kjs/ArgList.h.
        * runtime/Arguments.cpp: Copied from kjs/Arguments.cpp.
        * runtime/Arguments.h: Copied from kjs/Arguments.h.
        * runtime/BatchedTransitionOptimizer.h: Copied from kjs/BatchedTransitionOptimizer.h.
        * runtime/CollectorHeapIterator.h: Copied from kjs/CollectorHeapIterator.h.
        * runtime/CommonIdentifiers.cpp: Copied from kjs/CommonIdentifiers.cpp.
        * runtime/CommonIdentifiers.h: Copied from kjs/CommonIdentifiers.h.
        * runtime/ExecState.cpp: Copied from kjs/ExecState.cpp.
        * runtime/ExecState.h: Copied from kjs/ExecState.h.
        * runtime/GetterSetter.cpp: Copied from kjs/GetterSetter.cpp.
        * runtime/GetterSetter.h: Copied from kjs/GetterSetter.h.
        * runtime/InitializeThreading.cpp: Copied from kjs/InitializeThreading.cpp.
        * runtime/InitializeThreading.h: Copied from kjs/InitializeThreading.h.
        * runtime/JSActivation.cpp: Copied from kjs/JSActivation.cpp.
        * runtime/JSActivation.h: Copied from kjs/JSActivation.h.
        * runtime/JSGlobalData.cpp: Copied from kjs/JSGlobalData.cpp.
        * runtime/JSGlobalData.h: Copied from kjs/JSGlobalData.h.
        * runtime/JSLock.cpp: Copied from kjs/JSLock.cpp.
        * runtime/JSLock.h: Copied from kjs/JSLock.h.
        * runtime/JSStaticScopeObject.cpp: Copied from kjs/JSStaticScopeObject.cpp.
        * runtime/JSStaticScopeObject.h: Copied from kjs/JSStaticScopeObject.h.
        * runtime/JSType.h: Copied from kjs/JSType.h.
        * runtime/PropertyNameArray.cpp: Copied from kjs/PropertyNameArray.cpp.
        * runtime/PropertyNameArray.h: Copied from kjs/PropertyNameArray.h.
        * runtime/ScopeChain.cpp: Copied from kjs/ScopeChain.cpp.
        * runtime/ScopeChain.h: Copied from kjs/ScopeChain.h.
        * runtime/ScopeChainMark.h: Copied from kjs/ScopeChainMark.h.
        * runtime/SymbolTable.h: Copied from kjs/SymbolTable.h.
        * runtime/Tracing.d: Copied from kjs/Tracing.d.
        * runtime/Tracing.h: Copied from kjs/Tracing.h.

154
155
156
157
158
159
160
161
162
163
164
2008-11-03  Sam Weinig  <sam@webkit.org>

        Reviewed by Mark Rowe.

        Move #define to turn on dumping StructureID statistics to StructureID.cpp so that
        turning it on does not require a full rebuild. 

        * runtime/StructureID.cpp:
        (JSC::StructureID::dumpStatistics):
        * runtime/StructureID.h:

165
166
167
168
169
170
171
172
173
2008-11-03  Alp Toker  <alp@nuanti.com>

        Reviewed by Geoffrey Garen.

        Fix warning when building on Darwin without JSC_MULTIPLE_THREADS
        enabled.

        * kjs/InitializeThreading.cpp:

174
175
176
177
178
179
180
181
182
183
184
185
186
187
2008-11-02  Matt Lilek  <webkit@mattlilek.com>

        Reviewed by Cameron Zwarich.

        Bug 22042: REGRESSION(r38066): ASSERTION FAILED: source in CodeBlock
        <https://bugs.webkit.org/show_bug.cgi?id=22042>

        Rename parameter name to avoid ASSERT.

        * VM/CodeBlock.h:
        (JSC::CodeBlock::CodeBlock):
        (JSC::ProgramCodeBlock::ProgramCodeBlock):
        (JSC::EvalCodeBlock::EvalCodeBlock):

188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
2008-11-02  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Oliver Hunt.

        Bug 22035: Remove the '_' suffix on constructor parameter names for structs
        <https://bugs.webkit.org/show_bug.cgi?id=22035>

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObject::JSCallbackObjectData::JSCallbackObjectData):
        * VM/CodeBlock.h:
        (JSC::CodeBlock::CodeBlock):
        (JSC::ProgramCodeBlock::ProgramCodeBlock):
        (JSC::EvalCodeBlock::EvalCodeBlock):
        * wrec/WREC.h:
        (JSC::Quantifier::Quantifier):

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Geoff Garen.

        Rename SourceRange.h to SourceCode.h.

        * API/JSBase.cpp:
        * GNUmakefile.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * VM/CodeBlock.h:
        * kjs/SourceCode.h: Copied from kjs/SourceRange.h.
        * kjs/SourceRange.h: Removed.
        * kjs/grammar.y:
        * kjs/lexer.h:
        * kjs/nodes.cpp:
        (JSC::ForInNode::ForInNode):
        * kjs/nodes.h:
        (JSC::ThrowableExpressionData::setExceptionSourceCode):

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Darin Adler.

        Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
        <https://bugs.webkit.org/show_bug.cgi?id=22019>

        The JSC::Interpreter::shouldPrintExceptions() function is not used at
        all in JavaScriptCore, so it should be moved to WebCore::Console, its
        only user.

        * JavaScriptCore.exp:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:

239
240
241
242
243
244
245
246
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Windows build fix.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

247
248
249
250
251
252
253
254
255
256
257
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Sam Weinig.

        Remove the call to Interpreter::setShouldPrintExceptions() from the
        GlobalObject constructor in the shell. The shouldPrintExceptions()
        information is not used anywhere in JavaScriptCore, only in WebCore.

        * kjs/Shell.cpp:
        (GlobalObject::GlobalObject):

258
259
260
261
262
263
2008-10-31  Kevin Ollivier  <kevino@theolliviers.com>

        wxMSW build fix.

        * wtf/Threading.h:

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
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Sam Weinig.

        Move more files from the kjs subdirectory of JavaScriptCore to the
        runtime subdirectory.

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * kjs/AllInOneFile.cpp:
        * kjs/RegExpConstructor.cpp: Removed.
        * kjs/RegExpConstructor.h: Removed.
        * kjs/RegExpMatchesArray.h: Removed.
        * kjs/RegExpObject.cpp: Removed.
        * kjs/RegExpObject.h: Removed.
        * kjs/RegExpPrototype.cpp: Removed.
        * kjs/RegExpPrototype.h: Removed.
        * runtime/RegExpConstructor.cpp: Copied from kjs/RegExpConstructor.cpp.
        * runtime/RegExpConstructor.h: Copied from kjs/RegExpConstructor.h.
        * runtime/RegExpMatchesArray.h: Copied from kjs/RegExpMatchesArray.h.
        * runtime/RegExpObject.cpp: Copied from kjs/RegExpObject.cpp.
        * runtime/RegExpObject.h: Copied from kjs/RegExpObject.h.
        * runtime/RegExpPrototype.cpp: Copied from kjs/RegExpPrototype.cpp.
        * runtime/RegExpPrototype.h: Copied from kjs/RegExpPrototype.h.

291
292
293
294
295
296
2008-10-31  Mark Rowe  <mrowe@apple.com>

        Revert an incorrect portion of r38034.

        * profiler/ProfilerServer.mm:

mrowe@apple.com's avatar
mrowe@apple.com committed
297
298
299
300
301
302
303
304
305
2008-10-31  Mark Rowe  <mrowe@apple.com>

        Fix the 64-bit build.

        Disable strict aliasing in ProfilerServer.mm as it leads to the compiler being unhappy
        with the common Obj-C idiom self = [super init];

        * JavaScriptCore.xcodeproj/project.pbxproj:

306
307
308
309
310
311
312
313
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Alexey Proskuryakov.

        Change a header guard to match our coding style.

        * kjs/InitializeThreading.h:

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
377
378
379
380
381
2008-10-30  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Fixed a small bit of https://bugs.webkit.org/show_bug.cgi?id=21962
        AST uses way too much memory
        
        Removed a word from StatementNode by nixing LabelStack and turning it
        into a compile-time data structure managed by CodeGenerator.
        
        v8 tests and SunSpider, run by Gavin, report no change.

        * GNUmakefile.am:
        * JavaScriptCore.order:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/AllInOneFile.cpp:
        * JavaScriptCoreSources.bkl: I sure hope this builds!
        
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::CodeGenerator):
        (JSC::CodeGenerator::newLabelScope):
        (JSC::CodeGenerator::breakTarget):
        (JSC::CodeGenerator::continueTarget):
        * VM/CodeGenerator.h: Nixed the JumpContext system because it depended
        on a LabelStack in the AST, and it was a little cumbersome on the client
        side. Replaced with LabelScope, which tracks all break / continue
        information in the CodeGenerator, just like we track LabelIDs and other
        stacks of compile-time data.

        * kjs/LabelScope.h: Added.
        (JSC::LabelScope::):
        (JSC::LabelScope::LabelScope):
        (JSC::LabelScope::ref):
        (JSC::LabelScope::deref):
        (JSC::LabelScope::refCount):
        (JSC::LabelScope::breakTarget):
        (JSC::LabelScope::continueTarget):
        (JSC::LabelScope::type):
        (JSC::LabelScope::name):
        (JSC::LabelScope::scopeDepth): Simple abstraction for holding everything
        you might want to know about a break-able / continue-able scope.

        * kjs/LabelStack.cpp: Removed.
        * kjs/LabelStack.h: Removed.

        * kjs/grammar.y: No need to push labels at parse time -- we don't store
        LabelStacks in the AST anymore.

        * kjs/nodes.cpp:
        (JSC::DoWhileNode::emitCode):
        (JSC::WhileNode::emitCode):
        (JSC::ForNode::emitCode):
        (JSC::ForInNode::emitCode):
        (JSC::ContinueNode::emitCode):
        (JSC::BreakNode::emitCode):
        (JSC::SwitchNode::emitCode):
        (JSC::LabelNode::emitCode):
        * kjs/nodes.h:
        (JSC::StatementNode::):
        (JSC::LabelNode::): Use LabelScope where we used to use JumpContext.
        Simplified a bunch of code. Touched up label-related error messages a
        bit.

        * kjs/nodes2string.cpp:
        (JSC::LabelNode::streamTo): Updated for rename.

382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Darin Adler.

        Bug 22005: Move StructureIDChain into its own file
        <https://bugs.webkit.org/show_bug.cgi?id=22005>

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * runtime/StructureID.cpp:
        * runtime/StructureID.h:
        * runtime/StructureIDChain.cpp: Copied from runtime/StructureID.cpp.
        * runtime/StructureIDChain.h: Copied from runtime/StructureID.h.

399
400
401
402
403
404
2008-10-31  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/jsc/jsc.vcproj:

405
406
407
408
409
410
2008-10-31  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
2008-10-31  Darin Adler  <darin@apple.com>

        Reviewed by Dan Bernstein.

        - fix storage leak seen on buildbot

        Some other cleanup too. The storage leak was caused by the fact
        that HashTraits<CallIdentifier>::needsDestruction was false, so
        the call identifier objects didn't get deleted.

        * profiler/CallIdentifier.h:
        
        Added a default constructor to create empty call identifiers.

        Changed the normal constructor to use const UString&
        to avoid extra copying and reference count thrash.
        
        Removed the explicit copy constructor definition, since it's what
        the compiler will automatically generate. (Rule of thumb: Either
        you need both a custom copy constructor and a custom assignment
        operator, or neither.)

        Moved the CallIdentifier hash function out of the WTF namespace;
        there's no reason to put it there.

        Changed the CallIdentifier hash function to be a struct rather than
        a specialization of the IntHash struct template. Having it be
        a specialization made no sense, since CallIdentifier is not an integer,
        and did no good.

        Removed explicit definition of emptyValueIsZero in the hash traits,
        since inheriting from GenericHashTraits already makes that false.

        Removed explicit definition of emptyValue, instead relying on the
        default constructor and GenericHashTraits.

        Removed explicit definition of needsDestruction, because we want it
        to have its default value: true, not false. This fixes the leak!

        Changed constructDeletedValue and isDeletedValue to use a line number
        of numeric_limits<unsigned>::max() to indicate a value is deleted.
        Previously this used empty strings for the empty value and null strings
        for the deleted value, but it's more efficient to use null for both.

455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
2008-10-31  Timothy Hatcher  <timothy@apple.com>

        Emit the WillExecuteStatement debugger hook before the for loop body
        when the statement node for the body isn't a block. This allows
        breakpoints on those statements in the Web Inspector.

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

        Reviewed by Darin Adler.

        * kjs/nodes.cpp:
        (JSC::ForNode::emitCode): Emit the WillExecuteStatement
        debugger hook before the statement node if isn't a block.
        Also emit the WillExecuteStatement debugger hook for the
        loop as the first op-code.
        (JSC::ForInNode::emitCode): Ditto.

472
473
474
475
476
477
478
479
480
481
482
483
484
2008-10-31  Timothy Hatcher  <timothy@apple.com>

        Fixes console warnings about not having an autorelease pool.
        Also fixes the build for Snow Leopard, by including individual
        Foundation headers instead of Foundation.h.

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

        Reviewed by Oliver Hunt.

        * profiler/ProfilerServer.mm:
        (-[ProfilerServer init]): Create a NSAutoreleasePool and drain it.

485
486
487
488
489
490
491
492
493
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Speculative wxWindows build fix.

        * JavaScriptCoreSources.bkl:
        * jscore.bkl:

494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Maciej Stachowiak.

        Move VM/JSPropertyNameIterator.cpp and VM/JSPropertyNameIterator.h to
        the runtime directory.

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * VM/JSPropertyNameIterator.cpp: Removed.
        * VM/JSPropertyNameIterator.h: Removed.
        * runtime/JSPropertyNameIterator.cpp: Copied from VM/JSPropertyNameIterator.cpp.
        * runtime/JSPropertyNameIterator.h: Copied from VM/JSPropertyNameIterator.h.

511
512
513
514
515
516
517
518
2008-10-31  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Speculative wxWindows build fix.

        * jscore.bkl:

519
520
521
522
523
524
525
526
2008-10-30  Mark Rowe  <mrowe@apple.com>

        Reviewed by Jon Homeycutt.

        Explicitly default to building for only the native architecture in debug and release builds.

        * Configurations/DebugRelease.xcconfig:

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
2008-10-30  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Sam Weinig.

        Create a debugger directory in JavaScriptCore and move the relevant
        files to it.

        * GNUmakefile.am:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * VM/CodeBlock.cpp:
        * VM/CodeGenerator.h:
        * VM/Machine.cpp:
        * debugger: Added.
        * debugger/Debugger.cpp: Copied from kjs/debugger.cpp.
        * debugger/Debugger.h: Copied from kjs/debugger.h.
        * debugger/DebuggerCallFrame.cpp: Copied from kjs/DebuggerCallFrame.cpp.
        * debugger/DebuggerCallFrame.h: Copied from kjs/DebuggerCallFrame.h.
        * kjs/AllInOneFile.cpp:
        * kjs/DebuggerCallFrame.cpp: Removed.
        * kjs/DebuggerCallFrame.h: Removed.
        * kjs/Parser.cpp:
        * kjs/Parser.h:
        * kjs/debugger.cpp: Removed.
        * kjs/debugger.h: Removed.
        * kjs/interpreter.cpp:
        * kjs/nodes.cpp:
        * runtime/FunctionConstructor.cpp:
        * runtime/JSGlobalObject.cpp:

558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
2008-10-30  Benjamin K. Stuhl  <bks24@cornell.edu>

        gcc 4.3.3/linux-x86 generates "suggest parentheses around && within ||"
        warnings; add some parentheses to disambiguate things. No functional
        changes, so no tests.

        https://bugs.webkit.org/show_bug.cgi?id=21973
        Add parentheses to clean up some gcc warnings

        Reviewed by Dan Bernstein.

        * wtf/ASCIICType.h:
        (WTF::isASCIIAlphanumeric):
        (WTF::isASCIIHexDigit):

573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
2008-10-30  Kevin Lindeman  <klindeman@apple.com>

        Adds ProfilerServer, which is a distributed notification listener
        that allows starting and stopping the profiler remotely for use
        in conjunction with the profiler's DTace probes.

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

        Reviewed by Timothy Hatcher.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData): Calls startProfilerServerIfNeeded.
        * profiler/ProfilerServer.h: Added.
        * profiler/ProfilerServer.mm: Added.
        (+[ProfilerServer sharedProfileServer]):
        (-[ProfilerServer init]):
        (-[ProfilerServer startProfiling]):
        (-[ProfilerServer stopProfiling]):
        (JSC::startProfilerServerIfNeeded):

594
595
596
597
598
599
2008-10-30  Kevin Ollivier  <kevino@theolliviers.com>

        wx build fix after PropertyMap and StructureID merge.

        * JavaScriptCoreSources.bkl:

600
601
602
603
604
605
606
607
608
2008-10-30  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Mark Rowe.

        Change the JavaScriptCore Xcode project to use relative paths for the
        PCRE source files.

        * JavaScriptCore.xcodeproj/project.pbxproj:

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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
2008-10-30  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich and Geoffrey Garen.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=21989
        Merge PropertyMap and StructureID

        - Move PropertyMap code into StructureID in preparation for lazily
          creating the map on gets.
        - Make remove with transition explicit by adding removePropertyTransition.
        - Make the put/remove without transition explicit.
        - Make cache invalidation part of put/remove without transition.

        1% speedup on SunSpider; 0.5% speedup on v8 suite.

        * GNUmakefile.am:
        * JavaScriptCore.exp:
        * JavaScriptCore.pri:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * JavaScriptCoreSources.bkl:
        * kjs/AllInOneFile.cpp:
        * kjs/identifier.h:
        * runtime/JSObject.cpp:
        (JSC::JSObject::removeDirect):
        * runtime/JSObject.h:
        (JSC::JSObject::putDirect):
        * runtime/PropertyMap.cpp: Removed.
        * runtime/PropertyMap.h: Removed.
        * runtime/PropertyMapHashTable.h: Copied from runtime/PropertyMap.h.
        * runtime/StructureID.cpp:
        (JSC::StructureID::dumpStatistics):
        (JSC::StructureID::StructureID):
        (JSC::StructureID::~StructureID):
        (JSC::StructureID::getEnumerablePropertyNames):
        (JSC::StructureID::addPropertyTransition):
        (JSC::StructureID::removePropertyTransition):
        (JSC::StructureID::toDictionaryTransition):
        (JSC::StructureID::changePrototypeTransition):
        (JSC::StructureID::getterSetterTransition):
        (JSC::StructureID::addPropertyWithoutTransition):
        (JSC::StructureID::removePropertyWithoutTransition):
        (JSC::PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger):
        (JSC::StructureID::checkConsistency):
        (JSC::StructureID::copyPropertyTable):
        (JSC::StructureID::get):
        (JSC::StructureID::put):
        (JSC::StructureID::remove):
        (JSC::StructureID::insertIntoPropertyMapHashTable):
        (JSC::StructureID::expandPropertyMapHashTable):
        (JSC::StructureID::createPropertyMapHashTable):
        (JSC::StructureID::rehashPropertyMapHashTable):
        (JSC::comparePropertyMapEntryIndices):
        (JSC::StructureID::getEnumerablePropertyNamesInternal):
        * runtime/StructureID.h:
        (JSC::StructureID::propertyStorageSize):
        (JSC::StructureID::isEmpty):
        (JSC::StructureID::get):

668
669
670
671
672
673
674
675
676
677
678
679
680
681
2008-10-30  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Oliver Hunt.

        Bug 21987: CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result register
        <https://bugs.webkit.org/show_bug.cgi?id=21987>

        CTI::putDoubleResultToJSNumberCellOrJSImmediate() hardcodes its result
        register as ecx, but it should be tempReg1, which is ecx at all of its
        callsites.

        * VM/CTI.cpp:
        (JSC::CTI::putDoubleResultToJSNumberCellOrJSImmediate):

682
683
684
685
686
687
688
689
690
691
692
693
694
695
2008-10-30  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Sam Weinig.

        Bug 21985: Opcodes should use eax as their destination register whenever possible
        <https://bugs.webkit.org/show_bug.cgi?id=21985>

        Change more opcodes to use eax as the register for their final result,
        and change calls to emitPutResult() that pass eax to rely on the default
        value of eax.

        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass):

696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
2008-10-30  Alp Toker  <alp@nuanti.com>

        Build fix attempt for older gcc on the trunk-mac-intel build bot
        (error: initializer for scalar variable requires one element).

        Modify the initializer syntax slightly with an additional comma.

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_call_JSFunction):
        (JSC::Machine::cti_op_construct_JSConstruct):
        (JSC::Machine::cti_op_resolve_func):
        (JSC::Machine::cti_op_post_inc):
        (JSC::Machine::cti_op_resolve_with_base):
        (JSC::Machine::cti_op_post_dec):

711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
2008-10-30  Alp Toker  <alp@nuanti.com>

        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=21571
        VoidPtrPair breaks CTI on Linux

        The VoidPtrPair return change made in r37457 does not work on Linux
        since POD structs aren't passed in registers.

        This patch uses a union to vectorize VoidPtrPair to a uint64_t and
        matches Darwin/MSVC fixing CTI/WREC on Linux.

        Alexey reports no measurable change in Mac performance with this fix.

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_call_JSFunction):
        (JSC::Machine::cti_op_construct_JSConstruct):
        (JSC::Machine::cti_op_resolve_func):
        (JSC::Machine::cti_op_post_inc):
        (JSC::Machine::cti_op_resolve_with_base):
        (JSC::Machine::cti_op_post_dec):
        * VM/Machine.h:
        (JSC::):

736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
2008-10-29  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoff Garen.

        Initial work to reduce cost of JSNumberCell allocation

        This does the initial work needed to bring more of number
        allocation into CTI code directly, rather than just falling
        back onto the slow paths if we can't guarantee that a number
        cell can be reused.

        Initial implementation only used by op_negate to make sure
        it all works.  In a negate heavy (though not dominated) test
        it results in a 10% win in the non-reusable cell case.

        * VM/CTI.cpp:
        (JSC::):
        (JSC::CTI::emitAllocateNumber):
        (JSC::CTI::emitNakedFastCall):
        (JSC::CTI::emitArithIntToImmWithJump):
        (JSC::CTI::privateCompileMainPass):
        (JSC::CTI::privateCompileSlowCases):
        * VM/CTI.h:
        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::emitUnaryOp):
        * VM/CodeGenerator.h:
        (JSC::CodeGenerator::emitToJSNumber):
        (JSC::CodeGenerator::emitTypeOf):
        (JSC::CodeGenerator::emitGetPropertyNames):
        * VM/Machine.cpp:
        (JSC::Machine::privateExecute):
        * VM/Machine.h:
        * kjs/ResultType.h:
        (JSC::ResultType::isReusableNumber):
        (JSC::ResultType::toInt):
        * kjs/nodes.cpp:
        (JSC::UnaryOpNode::emitCode):
        (JSC::BinaryOpNode::emitCode):
        (JSC::EqualNode::emitCode):
        * masm/X86Assembler.h:
        (JSC::X86Assembler::):
        (JSC::X86Assembler::negl_r):
        (JSC::X86Assembler::xorpd_mr):
        * runtime/JSNumberCell.h:
        (JSC::JSNumberCell::JSNumberCell):

sfalken@apple.com's avatar
sfalken@apple.com committed
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
2008-10-29  Steve Falkenburg  <sfalken@apple.com>

        <rdar://problem/6326563> Crash on launch

        For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex.
        
        Exporting data from a DLL on Windows requires specifying __declspec(dllimport) in the header used by
        callers, but __declspec(dllexport) when defined in the DLL implementation. By instead exporting
        the explicit lock/unlock functions, we can avoid this.
        
        Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function.
        
        Reviewed by Darin Adler.

        * wtf/Threading.h:
        (WTF::lockAtomicallyInitializedStaticMutex):
        (WTF::unlockAtomicallyInitializedStaticMutex):
        * wtf/ThreadingWin.cpp:
        (WTF::lockAtomicallyInitializedStaticMutex):
        (WTF::unlockAtomicallyInitializedStaticMutex):

805
806
807
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
2008-10-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Oliver Hunt.

        Remove direct use of PropertyMap.

        * JavaScriptCore.exp:
        * runtime/JSObject.cpp:
        (JSC::JSObject::mark):
        (JSC::JSObject::put):
        (JSC::JSObject::deleteProperty):
        (JSC::JSObject::getPropertyAttributes):
        (JSC::JSObject::removeDirect):
        * runtime/JSObject.h:
        (JSC::JSObject::getDirect):
        (JSC::JSObject::getDirectLocation):
        (JSC::JSObject::hasCustomProperties):
        (JSC::JSObject::JSObject):
        (JSC::JSObject::putDirect):
        * runtime/PropertyMap.cpp:
        (JSC::PropertyMap::get):
        * runtime/PropertyMap.h:
        (JSC::PropertyMap::isEmpty):
        (JSC::PropertyMap::get):
        * runtime/StructureID.cpp:
        (JSC::StructureID::dumpStatistics):
        * runtime/StructureID.h:
        (JSC::StructureID::propertyStorageSize):
        (JSC::StructureID::get):
        (JSC::StructureID::put):
        (JSC::StructureID::remove):
        (JSC::StructureID::isEmpty):

838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
2008-10-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Rename and move the StructureID transition table to its own file.

        * GNUmakefile.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * runtime/StructureID.cpp:
        (JSC::StructureID::addPropertyTransition):
        * runtime/StructureID.h:
        (JSC::StructureID::):
        * runtime/StructureIDTransitionTable.h: Copied from runtime/StructureID.h.
        (JSC::StructureIDTransitionTableHash::hash):
        (JSC::StructureIDTransitionTableHash::equal):

855
856
857
858
859
860
861
862
863
864
865
866
867
868
2008-10-29  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=21958
        Pack bits in StructureID to reduce the size of each StructureID by 2 words.

        * runtime/PropertyMap.h:
        (JSC::PropertyMap::propertyMapSize):
        * runtime/StructureID.cpp:
        (JSC::StructureID::dumpStatistics): Add additional size statistics when dumping.
        (JSC::StructureID::StructureID):
        * runtime/StructureID.h:

869
870
871
872
873
874
875
2008-10-29  Kevin Ollivier  <kevino@theolliviers.com>

        wx build fixes after addition of runtime and ImageBuffer changes.

        * JavaScriptCoreSources.bkl:
        * jscore.bkl:

876
877
878
879
880
881
882
883
884
885
886
887
888
889
2008-10-29  Timothy Hatcher  <timothy@apple.com>

        Emit the WillExecuteStatement debugger hook before the "else" body
        when there is no block for the "else" body. This allows breakpoints
        on those statements in the Web Inspector.

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

        Reviewed by Maciej Stachowiak.

        * kjs/nodes.cpp:
        (JSC::IfElseNode::emitCode): Emit the WillExecuteStatement
        debugger hook before the else node if isn't a block.

ap@webkit.org's avatar
ap@webkit.org committed
890
891
892
893
894
895
2008-10-29  Alexey Proskuryakov  <ap@webkit.org>

        Build fix.

        * JavaScriptCore.exp: Export HashTable::deleteTable().

896
897
898
899
900
901
902
903
904
2008-10-28  Alp Toker  <alp@nuanti.com>

        Fix builddir != srcdir builds after kjs -> runtime breakage. Sources
        may now be generated in both kjs/ and runtime/.

        Also sort the sources list for readability.

        * GNUmakefile.am:

905
906
907
908
909
910
911
912
2008-10-28  Alp Toker  <alp@nuanti.com>

        Reviewed by Cameron Zwarich.

        Build fix attempt after kjs -> runtime rename.

        * GNUmakefile.am:

913
914
915
916
917
918
919
920
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Remove a duplicate includes directory.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

921
922
923
924
925
926
927
928
929
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Attempt to fix the Windows build.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/jsc/jsc.vcproj:

mitz@apple.com's avatar
mitz@apple.com committed
930
931
932
933
934
935
936
937
2008-10-28  Dan Bernstein  <mitz@apple.com>

        Reviewed by Mark Rowe.

        - export WTF::atomicallyInitializedStaticMutex

        * JavaScriptCore.exp:

938
939
940
941
942
943
944
945
946
2008-10-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Cameron Zwarich.
        
        Fixed CodeBlock dumping to accurately report constant register indices.

        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):

947
948
949
950
951
952
953
954
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        More Qt build fixes.

        * JavaScriptCore.pri:

955
956
957
958
959
960
961
962
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Fix the Qt build, hopefully for real this time.

        * JavaScriptCore.pri:

963
964
965
966
967
968
969
970
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Fix the Qt build.

        * JavaScriptCore.pri:

971
972
973
974
975
976
977
978
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Not reviewed.

        Fix the Windows build.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:

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
2008-10-28  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Sam Weinig.

        Create a runtime directory in JavaScriptCore and begin moving files to
        it. This is the first step towards removing the kjs directory and
        placing files in more meaningful subdirectories of JavaScriptCore.

        * API/JSBase.cpp:
        * API/JSCallbackConstructor.cpp:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        * API/JSClassRef.cpp:
        * API/JSClassRef.h:
        * API/JSStringRefCF.cpp:
        * API/JSValueRef.cpp:
        * API/OpaqueJSString.cpp:
        * DerivedSources.make:
        * GNUmakefile.am:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/AllInOneFile.cpp:
        * kjs/ArrayConstructor.cpp: Removed.
        * kjs/ArrayConstructor.h: Removed.
        * kjs/ArrayPrototype.cpp: Removed.
        * kjs/ArrayPrototype.h: Removed.
        * kjs/BooleanConstructor.cpp: Removed.
        * kjs/BooleanConstructor.h: Removed.
        * kjs/BooleanObject.cpp: Removed.
        * kjs/BooleanObject.h: Removed.
        * kjs/BooleanPrototype.cpp: Removed.
        * kjs/BooleanPrototype.h: Removed.
        * kjs/CallData.cpp: Removed.
        * kjs/CallData.h: Removed.
        * kjs/ClassInfo.h: Removed.
        * kjs/ConstructData.cpp: Removed.
        * kjs/ConstructData.h: Removed.
        * kjs/DateConstructor.cpp: Removed.
        * kjs/DateConstructor.h: Removed.
        * kjs/DateInstance.cpp: Removed.
        * kjs/DateInstance.h: Removed.
        * kjs/DateMath.cpp: Removed.
        * kjs/DateMath.h: Removed.
        * kjs/DatePrototype.cpp: Removed.
        * kjs/DatePrototype.h: Removed.
        * kjs/Error.cpp: Removed.
        * kjs/Error.h: Removed.
        * kjs/ErrorConstructor.cpp: Removed.
        * kjs/ErrorConstructor.h: Removed.
        * kjs/ErrorInstance.cpp: Removed.
        * kjs/ErrorInstance.h: Removed.
        * kjs/ErrorPrototype.cpp: Removed.
        * kjs/ErrorPrototype.h: Removed.
        * kjs/FunctionConstructor.cpp: Removed.
        * kjs/FunctionConstructor.h: Removed.
        * kjs/FunctionPrototype.cpp: Removed.
        * kjs/FunctionPrototype.h: Removed.
        * kjs/GlobalEvalFunction.cpp: Removed.
        * kjs/GlobalEvalFunction.h: Removed.
        * kjs/InternalFunction.cpp: Removed.
        * kjs/InternalFunction.h: Removed.
        * kjs/JSArray.cpp: Removed.
        * kjs/JSArray.h: Removed.
        * kjs/JSCell.cpp: Removed.
        * kjs/JSCell.h: Removed.
        * kjs/JSFunction.cpp: Removed.
        * kjs/JSFunction.h: Removed.
        * kjs/JSGlobalObject.cpp: Removed.
        * kjs/JSGlobalObject.h: Removed.
        * kjs/JSGlobalObjectFunctions.cpp: Removed.
        * kjs/JSGlobalObjectFunctions.h: Removed.
        * kjs/JSImmediate.cpp: Removed.
        * kjs/JSImmediate.h: Removed.
        * kjs/JSNotAnObject.cpp: Removed.
        * kjs/JSNotAnObject.h: Removed.
        * kjs/JSNumberCell.cpp: Removed.
        * kjs/JSNumberCell.h: Removed.
        * kjs/JSObject.cpp: Removed.
        * kjs/JSObject.h: Removed.
        * kjs/JSString.cpp: Removed.
        * kjs/JSString.h: Removed.
        * kjs/JSValue.cpp: Removed.
        * kjs/JSValue.h: Removed.
        * kjs/JSVariableObject.cpp: Removed.
        * kjs/JSVariableObject.h: Removed.
        * kjs/JSWrapperObject.cpp: Removed.
        * kjs/JSWrapperObject.h: Removed.
        * kjs/MathObject.cpp: Removed.
        * kjs/MathObject.h: Removed.
        * kjs/NativeErrorConstructor.cpp: Removed.
        * kjs/NativeErrorConstructor.h: Removed.
        * kjs/NativeErrorPrototype.cpp: Removed.
        * kjs/NativeErrorPrototype.h: Removed.
        * kjs/NumberConstructor.cpp: Removed.
        * kjs/NumberConstructor.h: Removed.
        * kjs/NumberObject.cpp: Removed.
        * kjs/NumberObject.h: Removed.
        * kjs/NumberPrototype.cpp: Removed.
        * kjs/NumberPrototype.h: Removed.
        * kjs/ObjectConstructor.cpp: Removed.
        * kjs/ObjectConstructor.h: Removed.
        * kjs/ObjectPrototype.cpp: Removed.
        * kjs/ObjectPrototype.h: Removed.
        * kjs/PropertyMap.cpp: Removed.
        * kjs/PropertyMap.h: Removed.
        * kjs/PropertySlot.cpp: Removed.
        * kjs/PropertySlot.h: Removed.
        * kjs/PrototypeFunction.cpp: Removed.
        * kjs/PrototypeFunction.h: Removed.
        * kjs/PutPropertySlot.h: Removed.
        * kjs/SmallStrings.cpp: Removed.
        * kjs/SmallStrings.h: Removed.
        * kjs/StringConstructor.cpp: Removed.
        * kjs/StringConstructor.h: Removed.
        * kjs/StringObject.cpp: Removed.
        * kjs/StringObject.h: Removed.
        * kjs/StringObjectThatMasqueradesAsUndefined.h: Removed.
        * kjs/StringPrototype.cpp: Removed.
        * kjs/StringPrototype.h: Removed.
        * kjs/StructureID.cpp: Removed.
        * kjs/StructureID.h: Removed.
        * kjs/completion.h:
        * kjs/interpreter.h:
        * runtime: Added.
        * runtime/ArrayConstructor.cpp: Copied from kjs/ArrayConstructor.cpp.
        * runtime/ArrayConstructor.h: Copied from kjs/ArrayConstructor.h.
        * runtime/ArrayPrototype.cpp: Copied from kjs/ArrayPrototype.cpp.
        * runtime/ArrayPrototype.h: Copied from kjs/ArrayPrototype.h.
        * runtime/BooleanConstructor.cpp: Copied from kjs/BooleanConstructor.cpp.
        * runtime/BooleanConstructor.h: Copied from kjs/BooleanConstructor.h.
        * runtime/BooleanObject.cpp: Copied from kjs/BooleanObject.cpp.
        * runtime/BooleanObject.h: Copied from kjs/BooleanObject.h.
        * runtime/BooleanPrototype.cpp: Copied from kjs/BooleanPrototype.cpp.
        * runtime/BooleanPrototype.h: Copied from kjs/BooleanPrototype.h.
        * runtime/CallData.cpp: Copied from kjs/CallData.cpp.
        * runtime/CallData.h: Copied from kjs/CallData.h.
        * runtime/ClassInfo.h: Copied from kjs/ClassInfo.h.
        * runtime/ConstructData.cpp: Copied from kjs/ConstructData.cpp.
        * runtime/ConstructData.h: Copied from kjs/ConstructData.h.
        * runtime/DateConstructor.cpp: Copied from kjs/DateConstructor.cpp.
        * runtime/DateConstructor.h: Copied from kjs/DateConstructor.h.
        * runtime/DateInstance.cpp: Copied from kjs/DateInstance.cpp.
        * runtime/DateInstance.h: Copied from kjs/DateInstance.h.
        * runtime/DateMath.cpp: Copied from kjs/DateMath.cpp.
        * runtime/DateMath.h: Copied from kjs/DateMath.h.
        * runtime/DatePrototype.cpp: Copied from kjs/DatePrototype.cpp.
        * runtime/DatePrototype.h: Copied from kjs/DatePrototype.h.
        * runtime/Error.cpp: Copied from kjs/Error.cpp.
        * runtime/Error.h: Copied from kjs/Error.h.
        * runtime/ErrorConstructor.cpp: Copied from kjs/ErrorConstructor.cpp.
        * runtime/ErrorConstructor.h: Copied from kjs/ErrorConstructor.h.
        * runtime/ErrorInstance.cpp: Copied from kjs/ErrorInstance.cpp.
        * runtime/ErrorInstance.h: Copied from kjs/ErrorInstance.h.
        * runtime/ErrorPrototype.cpp: Copied from kjs/ErrorPrototype.cpp.
        * runtime/ErrorPrototype.h: Copied from kjs/ErrorPrototype.h.
        * runtime/FunctionConstructor.cpp: Copied from kjs/FunctionConstructor.cpp.
        * runtime/FunctionConstructor.h: Copied from kjs/FunctionConstructor.h.
        * runtime/FunctionPrototype.cpp: Copied from kjs/FunctionPrototype.cpp.
        * runtime/FunctionPrototype.h: Copied from kjs/FunctionPrototype.h.
        * runtime/GlobalEvalFunction.cpp: Copied from kjs/GlobalEvalFunction.cpp.
        * runtime/GlobalEvalFunction.h: Copied from kjs/GlobalEvalFunction.h.
        * runtime/InternalFunction.cpp: Copied from kjs/InternalFunction.cpp.
        * runtime/InternalFunction.h: Copied from kjs/InternalFunction.h.
        * runtime/JSArray.cpp: Copied from kjs/JSArray.cpp.
        * runtime/JSArray.h: Copied from kjs/JSArray.h.
        * runtime/JSCell.cpp: Copied from kjs/JSCell.cpp.
        * runtime/JSCell.h: Copied from kjs/JSCell.h.
        * runtime/JSFunction.cpp: Copied from kjs/JSFunction.cpp.
        * runtime/JSFunction.h: Copied from kjs/JSFunction.h.
        * runtime/JSGlobalObject.cpp: Copied from kjs/JSGlobalObject.cpp.
        * runtime/JSGlobalObject.h: Copied from kjs/JSGlobalObject.h.
        * runtime/JSGlobalObjectFunctions.cpp: Copied from kjs/JSGlobalObjectFunctions.cpp.
        * runtime/JSGlobalObjectFunctions.h: Copied from kjs/JSGlobalObjectFunctions.h.
        * runtime/JSImmediate.cpp: Copied from kjs/JSImmediate.cpp.
        * runtime/JSImmediate.h: Copied from kjs/JSImmediate.h.
        * runtime/JSNotAnObject.cpp: Copied from kjs/JSNotAnObject.cpp.
        * runtime/JSNotAnObject.h: Copied from kjs/JSNotAnObject.h.
        * runtime/JSNumberCell.cpp: Copied from kjs/JSNumberCell.cpp.
        * runtime/JSNumberCell.h: Copied from kjs/JSNumberCell.h.
        * runtime/JSObject.cpp: Copied from kjs/JSObject.cpp.
        * runtime/JSObject.h: Copied from kjs/JSObject.h.
        * runtime/JSString.cpp: Copied from kjs/JSString.cpp.
        * runtime/JSString.h: Copied from kjs/JSString.h.
        * runtime/JSValue.cpp: Copied from kjs/JSValue.cpp.
        * runtime/JSValue.h: Copied from kjs/JSValue.h.
        * runtime/JSVariableObject.cpp: Copied from kjs/JSVariableObject.cpp.
        * runtime/JSVariableObject.h: Copied from kjs/JSVariableObject.h.
        * runtime/JSWrapperObject.cpp: Copied from kjs/JSWrapperObject.cpp.
        * runtime/JSWrapperObject.h: Copied from kjs/JSWrapperObject.h.
        * runtime/MathObject.cpp: Copied from kjs/MathObject.cpp.
        * runtime/MathObject.h: Copied from kjs/MathObject.h.
        * runtime/NativeErrorConstructor.cpp: Copied from kjs/NativeErrorConstructor.cpp.
        * runtime/NativeErrorConstructor.h: Copied from kjs/NativeErrorConstructor.h.
        * runtime/NativeErrorPrototype.cpp: Copied from kjs/NativeErrorPrototype.cpp.
        * runtime/NativeErrorPrototype.h: Copied from kjs/NativeErrorPrototype.h.
        * runtime/NumberConstructor.cpp: Copied from kjs/NumberConstructor.cpp.
        * runtime/NumberConstructor.h: Copied from kjs/NumberConstructor.h.
        * runtime/NumberObject.cpp: Copied from kjs/NumberObject.cpp.
        * runtime/NumberObject.h: Copied from kjs/NumberObject.h.
        * runtime/NumberPrototype.cpp: Copied from kjs/NumberPrototype.cpp.
        * runtime/NumberPrototype.h: Copied from kjs/NumberPrototype.h.
        * runtime/ObjectConstructor.cpp: Copied from kjs/ObjectConstructor.cpp.
        * runtime/ObjectConstructor.h: Copied from kjs/ObjectConstructor.h.
        * runtime/ObjectPrototype.cpp: Copied from kjs/ObjectPrototype.cpp.
        * runtime/ObjectPrototype.h: Copied from kjs/ObjectPrototype.h.
        * runtime/PropertyMap.cpp: Copied from kjs/PropertyMap.cpp.
        * runtime/PropertyMap.h: Copied from kjs/PropertyMap.h.
        * runtime/PropertySlot.cpp: Copied from kjs/PropertySlot.cpp.
        * runtime/PropertySlot.h: Copied from kjs/PropertySlot.h.
        * runtime/PrototypeFunction.cpp: Copied from kjs/PrototypeFunction.cpp.
        * runtime/PrototypeFunction.h: Copied from kjs/PrototypeFunction.h.
        * runtime/PutPropertySlot.h: Copied from kjs/PutPropertySlot.h.
        * runtime/SmallStrings.cpp: Copied from kjs/SmallStrings.cpp.
        * runtime/SmallStrings.h: Copied from kjs/SmallStrings.h.
        * runtime/StringConstructor.cpp: Copied from kjs/StringConstructor.cpp.
        * runtime/StringConstructor.h: Copied from kjs/StringConstructor.h.
        * runtime/StringObject.cpp: Copied from kjs/StringObject.cpp.
        * runtime/StringObject.h: Copied from kjs/StringObject.h.
        * runtime/StringObjectThatMasqueradesAsUndefined.h: Copied from kjs/StringObjectThatMasqueradesAsUndefined.h.
        * runtime/StringPrototype.cpp: Copied from kjs/StringPrototype.cpp.
        * runtime/StringPrototype.h: Copied from kjs/StringPrototype.h.
        * runtime/StructureID.cpp: Copied from kjs/StructureID.cpp.
        * runtime/StructureID.h: Copied from kjs/StructureID.h.

1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
2008-10-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Fixed https://bugs.webkit.org/show_bug.cgi?id=21919
        Sampler reports bogus time in op_enter during 3d-raytrace.js
        
        Fixed a bug where we would pass the incorrect Instruction* during some
        parts of CTI codegen.

        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass):
        (JSC::CTI::privateCompileSlowCases):
        * VM/SamplingTool.cpp:
        (JSC::SamplingTool::run):
        * wtf/Platform.h:

1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
2008-10-28  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Dan Bernstein.

        -Removed unused includes.
        Apparent .4% speedup in Sunspider

        * kjs/JSObject.cpp:
        * kjs/interpreter.cpp:

1230
1231
1232
1233
1234
1235
1236
1237
2008-10-28  Alp Toker  <alp@nuanti.com>

        Include copyright license files in the autotools dist target.

        Change suggested by Mike Hommey.

        * GNUmakefile.am:

1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
2008-10-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Stop discarding CodeBlock samples that can't be charged to a specific
        opcode. Instead, charge the relevant CodeBlock, and provide a footnote
        explaining the situation.
        
        This will help us tell which CodeBlocks are hot, even if we can't
        identify specific lines of code within the CodeBlocks.

        * VM/SamplingTool.cpp:
        (JSC::ScopeSampleRecord::sample):
        (JSC::compareScopeSampleRecords):
        (JSC::SamplingTool::dump):

        * VM/SamplingTool.h:
        (JSC::ScopeSampleRecord::ScopeSampleRecord):
        (JSC::ScopeSampleRecord::~ScopeSampleRecord):

1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
2008-10-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig.
        
        Added a mutex around the SamplingTool's ScopeNode* map, to solve a crash
        when sampling the v8 tests.

        * VM/SamplingTool.cpp:
        (JSC::SamplingTool::run):
        (JSC::SamplingTool::notifyOfScope):
        * VM/SamplingTool.h: Since new ScopeNodes can be created after
        the SamplingTools has begun sampling, reads and writes to / from the
        map need to be synchronized. Shark says this doesn't measurably increase
        sampling overhead.

1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
2008-10-25  Geoffrey Garen  <ggaren@apple.com>

        Not reviewed.
        
        Try to fix Windows build.

        * VM/Machine.cpp:
        (JSC::Machine::privateExecute): Provide a dummy value to the
        HostCallRecord in CTI non-sampling builds, to silence compiler warning.

1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
2008-10-25  Geoffrey Garen  <ggaren@apple.com>

        Not reviewed.
        
        Try to fix Windows build.

        * VM/SamplingTool.h:
        (JSC::SamplingTool::encodeSample): Explicitly cast bool to int, to
        silence compiler warning.

1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
2008-10-25  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Sam Weinig, with Gavin Barraclough's help.
        
        Fixed Sampling Tool:
            - Made CodeBlock sampling work with CTI
            - Improved accuracy by unifying most sampling data into a single
              32bit word, which can be written / read atomically.
            - Split out three different #ifdefs for modularity: OPCODE_SAMPLING;
              CODEBLOCK_SAMPLING; OPCODE_STATS.
            - Improved reporting clarity
            - Refactored for code clarity

        * JavaScriptCore.exp: Exported another symbol.

        * VM/CTI.cpp:
        (JSC::CTI::emitCTICall):
        (JSC::CTI::compileOpCall):
        (JSC::CTI::emitSlowScriptCheck):
        (JSC::CTI::compileBinaryArithOpSlowCase):
        (JSC::CTI::privateCompileMainPass):
        (JSC::CTI::privateCompileSlowCases):
        (JSC::CTI::privateCompile):
        * VM/CTI.h: Updated CTI codegen to use the unified SamplingTool interface
        for encoding samples. (This required passing the current vPC to a lot
        more functions, since the unified interface samples the current vPC.)
        Added hooks for writing the current CodeBlock* on function entry and
        after a function call, for the sake of the CodeBlock sampler. Removed
        obsolete hook for clearing the current sample inside op_end. Also removed
        the custom enum used to differentiate flavors of op_call, since the
        OpcodeID enum works just as well. (This was important in an earlier
        version of the patch, but now it's just cleanup.)

        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::lineNumberForVPC):
        * VM/CodeBlock.h: Upated for refactored #ifdefs. Changed lineNumberForVPC
        to be robust against vPCs not recorded for exception handling, since
        the Sampler may ask for an arbitrary vPC.

        * VM/Machine.cpp:
        (JSC::Machine::execute):
        (JSC::Machine::privateExecute):
        (JSC::Machine::cti_op_call_NotJSFunction):
        (JSC::Machine::cti_op_construct_NotJSConstruct):
        * VM/Machine.h:
        (JSC::Machine::setSampler):
        (JSC::Machine::sampler):
        (JSC::Machine::jitCodeBuffer): Upated for refactored #ifdefs. Changed
        Machine to use SamplingTool helper objects to record movement in and
        out of host code. This makes samples a bit more precise.
        
        * VM/Opcode.cpp:
        (JSC::OpcodeStats::~OpcodeStats):
        * VM/Opcode.h: Upated for refactored #ifdefs. Added a little more padding,
        to accomodate our more verbose opcode names.

        * VM/SamplingTool.cpp:
        (JSC::ScopeSampleRecord::sample): Only count a sample toward our total
        if we actually record it. This solves cases where a CodeBlock will
        claim to have been sampled many times, with reported samples that don't
        match.

        (JSC::SamplingTool::run): Read the current sample into a Sample helper
        object, to ensure that the data doesn't change while we're analyzing it,
        and to help decode the data. Only access the CodeBlock sampling hash
        table if CodeBlock sampling has been enabled, so non-CodeBlock sampling
        runs can operate with even less overhead.

        (JSC::SamplingTool::dump): I reorganized this code a lot to print the
        most important info at the top, print as a table, annotate and document
        the stuff I didn't understand when I started, etc.

        * VM/SamplingTool.h: New helper classes, described above.

        * kjs/Parser.h:
        * kjs/Shell.cpp:
        (runWithScripts):
        * kjs/nodes.cpp:
        (JSC::ScopeNode::ScopeNode): Updated for new sampling APIs.

        * wtf/Platform.h: Moved sampling #defines here, since our custom is to
        put ENABLE #defines into Platform.h. Made explicit the fact that
        CODEBLOCK_SAMPLING depends on OPCODE_SAMPLING.

1377
1378
1379
1380
1381
1382
2008-10-25  Jan Michael Alonzo  <jmalonzo@webkit.org>

        JSC Build fix, not reviewed.

        * VM/CTI.cpp: add missing include stdio.h for debug builds

eric@webkit.org's avatar
eric@webkit.org committed
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
2008-10-24  Eric Seidel  <eric@webkit.org>

        Reviewed by Darin Adler.
        
        Get rid of a bonus ASSERT when using a null string as a regexp.
        Specifically calling: RegularExpression::match() with String::empty()
        will hit this ASSERT.
        Chromium hits this, but I don't know of any way to make a layout test.

        * pcre/pcre_exec.cpp:
        (jsRegExpExecute):

1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
2008-10-24  Alexey Proskuryakov  <ap@webkit.org>

        Suggested and rubber-stamped by Geoff Garen.

        Fix a crash when opening Font Picker.

        The change also hopefully fixes this bug, which I could never reproduce:
        https://bugs.webkit.org/show_bug.cgi?id=20241
        <rdar://problem/6290576> Safari crashes at JSValueUnprotect() when fontpicker view close

        * API/JSContextRef.cpp: (JSContextGetGlobalObject): Use lexical global object instead of
        dynamic one.

1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
2008-10-24  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Geoff Garen.

        Remove ScopeChainNode::bottom() and inline it into its only caller,
        ScopeChainnode::globalObject().

        * kjs/JSGlobalObject.h:
        (JSC::ScopeChainNode::globalObject):
        * kjs/ScopeChain.h:
        (JSC::ScopeChain::bottom):

1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
2008-10-24  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Maciej Stachowiak.

        Bug 21862: Create JSFunction prototype property lazily
        <https://bugs.webkit.org/show_bug.cgi?id=21862>

        This is a 1.5% speedup on SunSpider and a 1.4% speedup on the V8
        benchmark suite, including a 3.8% speedup on Earley-Boyer.

        * kjs/JSFunction.cpp:
        (JSC::JSFunction::getOwnPropertySlot):
        * kjs/nodes.cpp:
        (JSC::FuncDeclNode::makeFunction):
        (JSC::FuncExprNode::makeFunction):

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
2008-10-24  Greg Bolsinga  <bolsinga@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21475
        
        Provide support for the Geolocation API
        
        http://dev.w3.org/geo/api/spec-source.html

        * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0

darin@apple.com's avatar
darin@apple.com committed
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
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
2008-10-24  Darin Adler  <darin@apple.com>

        - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732

        * API/APICast.h:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        * API/JSContextRef.cpp:
        * API/JSObjectRef.cpp:
        * API/JSValueRef.cpp:
        * VM/CTI.cpp:
        * VM/CTI.h:
        * VM/CodeBlock.cpp:
        * VM/CodeBlock.h:
        * VM/CodeGenerator.cpp:
        * VM/CodeGenerator.h:
        * VM/ExceptionHelpers.cpp:
        * VM/ExceptionHelpers.h:
        * VM/JSPropertyNameIterator.cpp:
        * VM/JSPropertyNameIterator.h:
        * VM/Machine.cpp:
        * VM/Machine.h:
        * VM/Register.h:
        * kjs/ArgList.cpp:
        * kjs/ArgList.h:
        * kjs/Arguments.cpp:
        * kjs/Arguments.h:
        * kjs/ArrayConstructor.cpp:
        * kjs/ArrayPrototype.cpp:
        * kjs/BooleanConstructor.cpp:
        * kjs/BooleanConstructor.h:
        * kjs/BooleanObject.h:
        * kjs/BooleanPrototype.cpp:
        * kjs/CallData.cpp:
        * kjs/CallData.h:
        * kjs/ConstructData.cpp:
        * kjs/ConstructData.h:
        * kjs/DateConstructor.cpp:
        * kjs/DateInstance.h:
        * kjs/DatePrototype.cpp:
        * kjs/DatePrototype.h:
        * kjs/DebuggerCallFrame.cpp:
        * kjs/DebuggerCallFrame.h:
        * kjs/ErrorConstructor.cpp:
        * kjs/ErrorPrototype.cpp:
        * kjs/ExecState.cpp:
        * kjs/ExecState.h:
        * kjs/FunctionConstructor.cpp:
        * kjs/FunctionPrototype.cpp:
        * kjs/FunctionPrototype.h:
        * kjs/GetterSetter.cpp:
        * kjs/GetterSetter.h:
        * kjs/InternalFunction.h:
        * kjs/JSActivation.cpp:
        * kjs/JSActivation.h:
        * kjs/JSArray.cpp:
        * kjs/JSArray.h:
        * kjs/JSCell.cpp:
        * kjs/JSCell.h:
        * kjs/JSFunction.cpp:
        * kjs/JSFunction.h:
        * kjs/JSGlobalData.h:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h:
        * kjs/JSGlobalObjectFunctions.cpp:
        * kjs/JSGlobalObjectFunctions.h:
        * kjs/JSImmediate.cpp:
        * kjs/JSImmediate.h:
        * kjs/JSNotAnObject.cpp:
        * kjs/JSNotAnObject.h:
        * kjs/JSNumberCell.cpp:
        * kjs/JSNumberCell.h:
        * kjs/JSObject.cpp:
        * kjs/JSObject.h:
        * kjs/JSStaticScopeObject.cpp:
        * kjs/JSStaticScopeObject.h:
        * kjs/JSString.cpp:
        * kjs/JSString.h:
        * kjs/JSValue.h:
        * kjs/JSVariableObject.h:
        * kjs/JSWrapperObject.h:
        * kjs/MathObject.cpp:
        * kjs/MathObject.h:
        * kjs/NativeErrorConstructor.cpp:
        * kjs/NumberConstructor.cpp:
        * kjs/NumberConstructor.h:
        * kjs/NumberObject.cpp:
        * kjs/NumberObject.h:
        * kjs/NumberPrototype.cpp:
        * kjs/ObjectConstructor.cpp:
        * kjs/ObjectPrototype.cpp:
        * kjs/ObjectPrototype.h:
        * kjs/PropertyMap.h:
        * kjs/PropertySlot.cpp:
        * kjs/PropertySlot.h:
        * kjs/RegExpConstructor.cpp:
        * kjs/RegExpConstructor.h:
        * kjs/RegExpMatchesArray.h:
        * kjs/RegExpObject.cpp:
        * kjs/RegExpObject.h:
        * kjs/RegExpPrototype.cpp:
        * kjs/Shell.cpp:
        * kjs/StringConstructor.cpp:
        * kjs/StringObject.cpp:
        * kjs/StringObject.h:
        * kjs/StringObjectThatMasqueradesAsUndefined.h:
        * kjs/StringPrototype.cpp:
        * kjs/StructureID.cpp:
        * kjs/StructureID.h:
        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/completion.h:
        * kjs/grammar.y:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:
        * kjs/lookup.cpp:
        * kjs/lookup.h:
        * kjs/nodes.h:
        * kjs/operations.cpp:
        * kjs/operations.h:
        * kjs/protect.h:
        * profiler/ProfileGenerator.cpp:
        * profiler/Profiler.cpp:
        * profiler/Profiler.h:
        Use JSValue* instead of JSValuePtr.

1577
1578
1579
1580
1581
1582
2008-10-24  David Kilzer  <ddkilzer@apple.com>

        Rolled out r37840.

        * wtf/Platform.h:

ddkilzer@apple.com's avatar
ddkilzer@apple.com committed
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
2008-10-23  Greg Bolsinga  <bolsinga@apple.com>

        Reviewed by Sam Weinig.

        https://bugs.webkit.org/show_bug.cgi?id=21475
        
        Provide support for the Geolocation API
        
        http://dev.w3.org/geo/api/spec-source.html

        * wtf/Platform.h: ENABLE_GEOLOCATION defaults to 0

1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
2008-10-23  David Kilzer  <ddkilzer@apple.com>

        Bug 21832: Fix scripts using 'new File::Temp' for Perl 5.10

        <https://bugs.webkit.org/show_bug.cgi?id=21832>

        Reviewed by Sam Weinig.

        * pcre/dftables: Use imported tempfile() from File::Temp instead of
        'new File::Temp' to make the script work with Perl 5.10.

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
2008-10-23  Gavin Barraclough  <barraclough@apple.com>

        Reviewed by Oliver Hunt.

        Fix hideous pathological case performance when looking up repatch info, bug #21727.

        When repatching JIT code to optimize we look up records providing information about
        the generated code (also used to track recsources used in linking to be later released). 
        The lookup was being performed using a linear scan of all such records.

        (1) Split up the different types of reptach information.  This means we can search them
            separately, and in some cases should reduce their size.
        (2) In the case of property accesses, search with a binary chop over the data.
        (3) In the case of calls, pass a pointer to the repatch info into the relink function.

        * VM/CTI.cpp:
        (JSC::CTI::CTI):
        (JSC::CTI::compileOpCall):
        (JSC::CTI::privateCompileMainPass):
        (JSC::CTI::privateCompileSlowCases):
        (JSC::CTI::privateCompile):
        (JSC::CTI::unlinkCall):
        (JSC::CTI::linkCall):
        * VM/CTI.h:
        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        (JSC::CodeBlock::~CodeBlock):
        (JSC::CodeBlock::unlinkCallers):
        (JSC::CodeBlock::derefStructureIDs):
        * VM/CodeBlock.h:
        (JSC::StructureStubInfo::StructureStubInfo):
        (JSC::CallLinkInfo::CallLinkInfo):
        (JSC::CallLinkInfo::setUnlinked):
        (JSC::CallLinkInfo::isLinked):
        (JSC::getStructureStubInfoReturnLocation):
        (JSC::binaryChop):
        (JSC::CodeBlock::addCaller):
        (JSC::CodeBlock::getStubInfo):
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::emitResolve):
        (JSC::CodeGenerator::emitGetById):
        (JSC::CodeGenerator::emitPutById):
        (JSC::CodeGenerator::emitCall):
        (JSC::CodeGenerator::emitConstruct):
        * VM/Machine.cpp:
        (JSC::Machine::cti_vm_lazyLinkCall):

pkasting@chromium.org's avatar
pkasting@chromium.org committed
1653
1654
1655
1656
1657
1658
1659
1660
1661
2008-10-23  Peter Kasting  <pkasting@google.com>

        Reviewed by Adam Roben.

        https://bugs.webkit.org/show_bug.cgi?id=21833
        Place JavaScript Debugger hooks under #if ENABLE(JAVASCRIPT_DEBUGGER).

        * wtf/Platform.h:

1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
2008-10-23  David Kilzer  <ddkilzer@apple.com>

        Bug 21831: Fix create_hash_table for Perl 5.10

        <https://bugs.webkit.org/show_bug.cgi?id=21831>

        Reviewed by Sam Weinig.

        * kjs/create_hash_table: Escaped square brackets so that Perl 5.10
        doesn't try to use @nameEntries.

darin@apple.com's avatar
darin@apple.com committed
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
2008-10-23  Darin Adler  <darin@apple.com>

        - roll out https://bugs.webkit.org/show_bug.cgi?id=21732
          to remove the JSValuePtr class, to fix two problems

            1) slowness under MSVC, since it doesn't handle a
               class with a single pointer in it as efficiently
               as a pointer

            2) uninitialized pointers in Vector

        * JavaScriptCore.exp: Updated.

        * API/APICast.h:
        (toRef):
        * VM/CTI.cpp:
        (JSC::CTI::asInteger):
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::addConstant):
        * VM/CodeGenerator.h:
        (JSC::CodeGenerator::JSValueHashTraits::constructDeletedValue):
        (JSC::CodeGenerator::JSValueHashTraits::isDeletedValue):
        * VM/Machine.cpp:
        (JSC::Machine::cti_op_add):
        (JSC::Machine::cti_op_pre_inc):
        (JSC::Machine::cti_op_get_by_id):
        (JSC::Machine::cti_op_get_by_id_second):
        (JSC::Machine::cti_op_get_by_id_generic):
        (JSC::Machine::cti_op_get_by_id_fail):
        (JSC::Machine::cti_op_instanceof):
        (JSC::Machine::cti_op_del_by_id):
        (JSC::Machine::cti_op_mul):
        (JSC::Machine::cti_op_call_NotJSFunction):
        (JSC::Machine::cti_op_resolve):
        (JSC::Machine::cti_op_construct_NotJSConstruct):
        (JSC::Machine::cti_op_get_by_val):
        (JSC::Machine::cti_op_sub):
        (JSC::Machine::cti_op_lesseq):
        (JSC::Machine::cti_op_negate):
        (JSC::Machine::cti_op_resolve_base):
        (JSC::Machine::cti_op_resolve_skip):
        (JSC::Machine::cti_op_resolve_global):
        (JSC::Machine::cti_op_div):
        (JSC::Machine::cti_op_pre_dec):
        (JSC::Machine::cti_op_not):
        (JSC::Machine::cti_op_eq):
        (JSC::Machine::cti_op_lshift):
        (JSC::Machine::cti_op_bitand):
        (JSC::Machine::cti_op_rshift):
        (JSC::Machine::cti_op_bitnot):
        (JSC::Machine::cti_op_mod):
        (JSC::Machine::cti_op_less):
        (JSC::Machine::cti_op_neq):
        (JSC::Machine::cti_op_urshift):
        (JSC::Machine::cti_op_bitxor):
        (JSC::Machine::cti_op_bitor):
        (JSC::Machine::cti_op_call_eval):
        (JSC::Machine::cti_op_throw):
        (JSC::Machine::cti_op_next_pname):
        (JSC::Machine::cti_op_typeof):
        (JSC::Machine::cti_op_is_undefined):
        (JSC::Machine::cti_op_is_boolean):
        (JSC::Machine::cti_op_is_number):
        (JSC::Machine::cti_op_is_string):
        (JSC::Machine::cti_op_is_object):
        (JSC::Machine::cti_op_is_function):
        (JSC::Machine::cti_op_stricteq):
        (JSC::Machine::cti_op_nstricteq):
        (JSC::Machine::cti_op_to_jsnumber):
        (JSC::Machine::cti_op_in):
        (JSC::Machine::cti_op_del_by_val):
        (JSC::Machine::cti_vm_throw):
        Removed calls to payload functions.

        * VM/Register.h:
        (JSC::Register::Register): Removed overload for JSCell and call
        to payload function.

        * kjs/JSCell.h: Changed JSCell to derive from JSValue again.
        Removed JSValuePtr constructor.
        (JSC::asCell): Changed cast from reinterpret_cast to static_cast.

        * kjs/JSImmediate.h: Removed JSValuePtr class. Added typedef back.

        * kjs/JSValue.h:
        (JSC::JSValue::JSValue): Added empty protected inline constructor back.
        (JSC::JSValue::~JSValue): Same for destructor.
        Removed == and != operator for JSValuePtr.

        * kjs/PropertySlot.h:
        (JSC::PropertySlot::PropertySlot): Chnaged argument to const JSValue*
        and added a const_cast.

        * kjs/protect.h: Removed overloads and specialization for JSValuePtr.

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
2008-10-22  Oliver Hunt  <oliver@apple.com>

        Reviewed by Maciej Stachowiak.

        Really "fix" CTI mode on windows 2k3.

        This adds new methods fastMallocExecutable and fastFreeExecutable
        to wrap allocation for cti code.  This still just makes fastMalloc
        return executable memory all the time, which will be fixed in a
        later patch.

        However in windows debug builds all executable allocations will be
        allocated on separate executable pages, which should resolve any
        remaining 2k3 issues.  Conveniently the 2k3 bot will now also fail
        if there are any fastFree vs. fastFreeExecutable errors.

        * ChangeLog:
        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::~CodeBlock):
        * kjs/regexp.cpp:
        (JSC::RegExp::~RegExp):
        * masm/X86Assembler.h:
        (JSC::JITCodeBuffer::copy):
        * wtf/FastMalloc.cpp:
        (WTF::fastMallocExecutable):
        (WTF::fastFreeExecutable):
        (WTF::TCMallocStats::fastMallocExecutable):
        (WTF::TCMallocStats::fastFreeExecutable):
        * wtf/FastMalloc.h:

darin@apple.com's avatar
darin@apple.com committed
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
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
2008-10-22  Darin Adler  <darin@apple.com>

        Reviewed by Sam Weinig.

        - fix https://bugs.webkit.org/show_bug.cgi?id=21294
          Bug 21294: Devirtualize getOwnPropertySlot()

        A bit over 3% faster on V8 tests.

        * JavascriptCore.exp: Export leak-related functions..

        * API/JSCallbackConstructor.h:
        (JSC::JSCallbackConstructor::createStructureID): Set HasStandardGetOwnPropertySlot
        since this class doesn't override getPropertySlot.
        * API/JSCallbackFunction.h:
        (JSC::JSCallbackFunction::createStructureID): Ditto.

        * VM/ExceptionHelpers.cpp:
        (JSC::InterruptedExecutionError::InterruptedExecutionError): Use a structure
        that's created just for this class instead of trying to share a single "null
        prototype" structure.

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_create_arguments_no_params): Rename
        Arguments::ArgumentsNoParameters to Arguments::NoParameters.
        
        * kjs/Arguments.h: Rename the enum from Arguments::ArgumentsParameters to
        Arguments::NoParametersType and the value from Arguments::ArgumentsNoParameters
        to Arguments::NoParameters.
        (JSC::Arguments::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
        (JSC::Arguments::Arguments): Added an assertion that there are no parameters.

        * kjs/DatePrototype.h:
        (JSC::DatePrototype::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.

        * kjs/FunctionPrototype.h:
        (JSC::FunctionPrototype::createStructureID): Set HasStandardGetOwnPropertySlot
        since this class doesn't override getPropertySlot.
        * kjs/InternalFunction.h:
        (JSC::InternalFunction::createStructureID): Ditto.

        * kjs/JSArray.h:
        (JSC::JSArray::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.

        * kjs/JSCell.h: Added declaration of fastGetOwnPropertySlot; a non-virtual
        version that uses the structure bit to decide whether to call the virtual
        version.

        * kjs/JSFunction.h:
        (JSC::JSFunction::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.

        * kjs/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData): Initialize new structures; removed
        nullProtoStructureID.
        * kjs/JSGlobalData.h: Added new structures. Removed nullProtoStructureID.

        * kjs/JSGlobalObject.h:
        (JSC::JSGlobalObject::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.

        * kjs/JSNotAnObject.h:
        (JSC::JSNotAnObjectErrorStub::JSNotAnObjectErrorStub): Use a structure
        that's created just for this class instead of trying to share a single "null
        prototype" structure.
        (JSC::JSNotAnObjectErrorStub::isNotAnObjectErrorStub): Marked this function
        virtual for clarity and made it private since no one should call it if they
        already have a pointer to this specific type.
        (JSC::JSNotAnObject::JSNotAnObject): Use a structure that's created just
        for this class instead of trying to share a single "null prototype" structure.
        (JSC::JSNotAnObject::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.

        * kjs/JSObject.h:
        (JSC::JSObject::createStructureID): Added HasStandardGetOwnPropertySlot.
        (JSC::JSObject::inlineGetOwnPropertySlot): Added. Used so we can share code
        between getOwnPropertySlot and fastGetOwnPropertySlot.
        (JSC::JSObject::getOwnPropertySlot): Moved so that functions are above the
        functions that call them. Moved the guts of this function into
        inlineGetOwnPropertySlot.
        (JSC::JSCell::fastGetOwnPropertySlot): Added. Checks the
        HasStandardGetOwnPropertySlot bit and if it's set, calls
        inlineGetOwnPropertySlot, otherwise calls getOwnPropertySlot.
        (JSC::JSObject::getPropertySlot): Changed to call fastGetOwnPropertySlot.
        (JSC::JSValue::get): Changed to call fastGetOwnPropertySlot.

        * kjs/JSWrapperObject.h: Made constructor protected to emphasize that
        this class is only a base class and never instantiated.

        * kjs/MathObject.h:
        (JSC::MathObject::createStructureID): Added. Returns a structure without
        HasStandardGetOwnPropertySlot since this class overrides getOwnPropertySlot.
        * kjs/NumberConstructor.h:
        (JSC::NumberConstructor::createStructureID): Ditto.
        * kjs/RegExpConstructor.h:
        (JSC::RegExpConstructor::createStructureID): Ditto.
        * kjs/RegExpObject.h:
        (JSC::RegExpObject::createStructureID): Ditto.
        * kjs/StringObject.h:
        (JSC::StringObject::createStructureID): Ditto.

        * kjs/TypeInfo.h: Added HasStandardGetOwnPropertySlot flag and
        hasStandardGetOwnPropertySlot accessor function.

1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
2008-10-22  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Geoff Garen.

        Bug 21803: Fuse op_jfalse with op_eq_null and op_neq_null
        <https://bugs.webkit.org/show_bug.cgi?id=21803>

        Fuse op_jfalse with op_eq_null and op_neq_null to make the new opcodes
        op_jeq_null and op_jneq_null.

        This is a 2.6% speedup on the V8 Raytrace benchmark, and strangely also
        a 4.7% speedup on the V8 Arguments benchmark, even though it uses
        neither of the two new opcodes.

        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass):
        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::dump):
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::emitJumpIfTrue):
        (JSC::CodeGenerator::emitJumpIfFalse):
        * VM/Machine.cpp:
        (JSC::Machine::privateExecute):
        * VM/Opcode.h:

1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
2008-10-22  Darin Fisher  <darin@chromium.org>

        Reviewed by Eric Seidel.

        Should not define PLATFORM(WIN,MAC,GTK) when PLATFORM(CHROMIUM) is defined
        https://bugs.webkit.org/show_bug.cgi?id=21757

        PLATFORM(CHROMIUM) implies HAVE_ACCESSIBILITY

        * wtf/Platform.h:

1941
1942
1943
1944
1945
1946
1947
1948
1949
2008-10-22  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Alexey Proskuryakov.

        Correct opcode names in documentation.

        * VM/Machine.cpp:
        (JSC::Machine::privateExecute):

1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
2008-10-21  Oliver Hunt <oliver@apple.com>

        RS=Maciej Stachowiak.

        Force FastMalloc to make all allocated pages executable in
        a vague hope this will allow the Win2k3 bot to be able to
        run tests.

        Filed Bug 21783: Need more granular control over allocation of executable memory
        to cover a more granular version of this patch.

        * wtf/TCSystemAlloc.cpp:
        (TryVirtualAlloc):

ap@webkit.org's avatar
ap@webkit.org committed
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
2008-10-21  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin Adler.

        https://bugs.webkit.org/show_bug.cgi?id=21769
        MessagePort should be GC protected if there are messages to be delivered

        * wtf/MessageQueue.h:
        (WTF::::isEmpty): Added. Also added a warning for methods that return a snapshot of queue
        state, thus likely to cause race conditions.

1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
2008-10-21  Darin Adler  <darin@apple.com>

        Reviewed by Maciej Stachowiak.

        - convert post-increment to pre-increment in a couple more places for speed

        Speeds up V8 benchmarks a little on most computers. (But, strangely, slows
        them down a little on my computer.)

        * kjs/nodes.cpp:
        (JSC::statementListEmitCode): Removed default argument, since we always want
        to specify this explicitly.
        (JSC::ForNode::emitCode): Tolerate ignoredResult() as the dst -- means the
        same thing as 0.
        (JSC::ReturnNode::emitCode): Ditto.
        (JSC::ThrowNode::emitCode): Ditto.
        (JSC::FunctionBodyNode::emitCode): Pass ignoredResult() so that we know we
        don't have to compute the result of function statements.

1994
1995
1996
1997
1998
1999
2000
2001
2008-10-21  Peter Kasting  <pkasting@google.com>

        Reviewed by Maciej Stachowiak.

        Fix an include of a non-public header to use "" instead of <>.

        * API/JSProfilerPrivate.cpp:

weinig@apple.com's avatar
weinig@apple.com committed
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2008-10-20  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=21766
        REGRESSION: 12 JSC tests fail

        The JSGlobalObject was mutating the shared nullProtoStructureID when
        used in jsc.  Instead of using nullProtoStructureID, use a new StructureID.

        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        (JSC::::JSCallbackObject):
        * API/JSContextRef.cpp:
        (JSGlobalContextCreateInGroup):
        * kjs/JSGlobalObject.h:
        (JSC::JSGlobalObject::JSGlobalObject):
        * kjs/Shell.cpp:
        (GlobalObject::GlobalObject):
        (jscmain):

2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2008-10-20  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Maciej Stachowiak.

        Remove an untaken branch in CodeGenerator::emitJumpIfFalse(). This
        function is never called with a backwards target LabelID, and there is
        even an assertion to this effect at the top of the function body.

        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::emitJumpIfFalse):

2034
2035
2036
2037
2008-10-20  Cameron Zwarich  <zwarich@apple.com>

        Rubber-stamped by Sam Weinig.

2038
2039
        Add opcode documentation for undocumented opcodes.

2040
2041
2042
        * VM/Machine.cpp:
        (JSC::Machine::privateExecute):

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
2008-10-16  Sam Weinig  <sam@webkit.org>

        Reviewed by Cameron Zwarich.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=21683
        Don't create intermediate StructureIDs for builtin objects

        Second stage in reduce number of StructureIDs created when initializing the
        JSGlobalObject.

        - Use putDirectWithoutTransition for the remaining singleton objects to reduce
          the number of StructureIDs create for about:blank from 132 to 73.

        * kjs/ArrayConstructor.cpp:
        (JSC::ArrayConstructor::ArrayConstructor):
        * kjs/BooleanConstructor.cpp:
        (JSC::BooleanConstructor::BooleanConstructor):
        * kjs/BooleanPrototype.cpp:
        (JSC::BooleanPrototype::BooleanPrototype):
        * kjs/DateConstructor.cpp:
        (JSC::DateConstructor::DateConstructor):
        * kjs/ErrorConstructor.cpp:
        (JSC::ErrorConstructor::ErrorConstructor):
        * kjs/ErrorPrototype.cpp:
        (JSC::ErrorPrototype::ErrorPrototype):
        * kjs/FunctionConstructor.cpp:
        (JSC::FunctionConstructor::FunctionConstructor):
        * kjs/FunctionPrototype.cpp:
        (JSC::FunctionPrototype::FunctionPrototype):
        (JSC::FunctionPrototype::addFunctionProperties):
        * kjs/FunctionPrototype.h:
        (JSC::FunctionPrototype::createStructureID):
        * kjs/InternalFunction.cpp:
        * kjs/InternalFunction.h:
        (JSC::InternalFunction::InternalFunction):
        * kjs/JSGlobalObject.cpp:
        (JSC::JSGlobalObject::reset):
        * kjs/JSObject.h:
        * kjs/MathObject.cpp:
        (JSC::MathObject::MathObject):
        * kjs/NumberConstructor.cpp:
        (JSC::NumberConstructor::NumberConstructor):
        * kjs/NumberPrototype.cpp:
        (JSC::NumberPrototype::NumberPrototype):
        * kjs/ObjectConstructor.cpp:
        (JSC::ObjectConstructor::ObjectConstructor):
        * kjs/RegExpConstructor.cpp:
        (JSC::RegExpConstructor::RegExpConstructor):
        * kjs/RegExpPrototype.cpp:
        (JSC::RegExpPrototype::RegExpPrototype):
        * kjs/StringConstructor.cpp:
        (JSC::StringConstructor::StringConstructor):
        * kjs/StringPrototype.cpp:
        (JSC::StringPrototype::StringPrototype):
        * kjs/StructureID.cpp:
        (JSC::StructureID::dumpStatistics):
        * kjs/StructureID.h:
        (JSC::StructureID::setPrototypeWithoutTransition):

2102
2103
2104
2105
2106
2107
2108
2008-10-20  Alp Toker  <alp@nuanti.com>

        Fix autotools dist build target by listing recently added header
        files only. Not reviewed.

        * GNUmakefile.am:

2109
2110
2111
2112
2113
2114
2115
2116
2008-10-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        * VM/Machine.cpp:
        (JSC::Machine::tryCacheGetByID): Removed a redundant and sometimes
        incorrect cast, which started ASSERTing after Darin's last checkin.

2117
2118
2119
2120
2121
2122
2123
2124
2125
2008-10-20  Geoffrey Garen  <ggaren@apple.com>

        Not reviewed.
        
        Re-enable CTI, which I accidentally disabled while checking in fixes
        to bytecode.

        * wtf/Platform.h:

2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2008-10-20  Alp Toker  <alp@nuanti.com>

        Rubber-stamped by Mark Rowe.

        Typo fix in function name: mimimum -> minimum.

        * kjs/DateMath.cpp:
        (JSC::minimumYearForDST):
        (JSC::equivalentYearForDST):

2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2008-10-20  Alp Toker  <alp@nuanti.com>

        Reviewed by Mark Rowe.

        Use pthread instead of GThread where possible in the GTK+ port. This
        fixes issues with global initialisation, particularly on GTK+/Win32
        where a late g_thread_init() will cause hangs.

        * GNUmakefile.am:
        * wtf/Platform.h:
        * wtf/Threading.h:
        * wtf/ThreadingGtk.cpp:
        * wtf/ThreadingPthreads.cpp:

ggaren@apple.com's avatar
ggaren@apple.com committed
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
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-10-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed https://bugs.webkit.org/show_bug.cgi?id=21735
        Emit profiling instrumentation only if the Web Inspector's profiling
        feature is enabled

        22.2% speedup on empty function call benchmark.
        2.9% speedup on v8 benchmark.
        0.7% speedup on SunSpider.
        
        Lesser but similar speedups in bytecode.

        * VM/CTI.cpp:
        (JSC::CTI::compileOpCall):
        (JSC::CTI::privateCompileMainPass):
        (JSC::CTI::privateCompileSlowCases): Nixed JITed profiler hooks. Profiler
        hooks now have their own opcodes. Added support for compiling profiler
        hook opcodes.
        
        (JSC::CodeBlock::dump): Dump support for the new profiling opcodes.

        * VM/CodeGenerator.h:
        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::CodeGenerator):
        (JSC::CodeGenerator::emitCall):
        (JSC::CodeGenerator::emitConstruct): Conditionally emit profiling hooks
        around call and construct, at the call site. (It's easier to get things
        right this way, if you have profiled code calling non-profiled code.
        Also, you get a slightly more accurate profile, since you charge the full
        cost of the call / construct operation to the callee.)
        
        Also, fixed a bug where construct would fetch the ".prototype" property
        from the constructor before evaluating the arguments to the constructor,
        incorrectly allowing an "invalid constructor" exception to short-circuit
        argument evaluation. I encountered this bug when trying to make
        constructor exceptions work with profiling.

        * VM/Machine.cpp:
        (JSC::Machine::callEval): Removed obsolete profiler hooks.

        (JSC::Machine::throwException): Added a check for an exception thrown
        within a call instruction. We didn't need this before because the call
        instruction would check for a valid call before involing the profiler.
        (JSC::Machine::execute): Added a didExecute hook at the end of top-level
        function invocation, since op_ret no longer does this for us.

        (JSC::Machine::privateExecute): Removed obsolete profiler hooks. Added
        profiler opcodes. Changed some ++vPC to vPC[x] notation, since the
        latter is better for performance, and it makes reasoning about the
        current opcode in exception handling much simpler.

        (JSC::Machine::cti_op_call_NotJSFunction): Removed obsolete profiler
        hooks.

        (JSC::Machine::cti_op_create_arguments_no_params): Added missing
        CTI_STACK_HACK that I noticed when adding CTI_STACK_HACK to the new
        profiler opcode functions.

        (JSC::Machine::cti_op_profile_will_call):
        (JSC::Machine::cti_op_profile_did_call): The new profiler opcode
        functions.

        (JSC::Machine::cti_op_construct_NotJSConstruct): Removed obsolete profiler
        hooks.

        * VM/Machine.h:
        (JSC::Machine::isCallOpcode): Helper for exception handling.

        * VM/Opcode.h: Declare new opcodes.

        * kjs/JSGlobalObject.h:
        (JSC::JSGlobalObject::supportsProfiling): Added virtual interface that
        allows WebCore to specify whether the target global object has the Web
        Inspector's profiling feature enabled.

        * profiler/Profiler.cpp:
        (JSC::Profiler::willExecute):
        (JSC::Profiler::didExecute):
        (JSC::Profiler::createCallIdentifier):
        * profiler/Profiler.h: Added support for invoking the profiler with
        an arbitrary JSValue*, and not a known object. We didn't need this
        before because the call instruction would check for a valid call before
        involing the profiler.

2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
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
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2008-10-20  Darin Adler  <darin@apple.com>

        Reviewed by Geoff Garen.

        - get CTI working on Windows again

        * VM/CTI.cpp:
        (JSC::CTI::emitCTICall): Add an overload for functions that
        return JSObject*.
        * VM/CTI.h: Use JSValue* and JSObject* as return types for
        cti_op functions. Apparently, MSVC doesn't handle returning
        the JSValuePtr struct in a register. We'll have to look into
        this more.

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_convert_this):
        (JSC::Machine::cti_op_add):
        (JSC::Machine::cti_op_pre_inc):
        (JSC::Machine::cti_op_new_object):
        (JSC::Machine::cti_op_get_by_id):
        (JSC::Machine::cti_op_get_by_id_second):
        (JSC::Machine::cti_op_get_by_id_generic):
        (JSC::Machine::cti_op_get_by_id_fail):
        (JSC::Machine::cti_op_instanceof):
        (JSC::Machine::cti_op_del_by_id):
        (JSC::Machine::cti_op_mul):
        (JSC::Machine::cti_op_new_func):
        (JSC::Machine::cti_op_push_activation):
        (JSC::Machine::cti_op_call_NotJSFunction):
        (JSC::Machine::cti_op_new_array):
        (JSC::Machine::cti_op_resolve):
        (JSC::Machine::cti_op_construct_JSConstructFast):
        (JSC::Machine::cti_op_construct_NotJSConstruct):
        (JSC::Machine::cti_op_get_by_val):
        (JSC::Machine::cti_op_sub):
        (JSC::Machine::cti_op_lesseq):
        (JSC::Machine::cti_op_negate):
        (JSC::Machine::cti_op_resolve_base):
        (JSC::Machine::cti_op_resolve_skip):
        (JSC::Machine::cti_op_resolve_global):
        (JSC::Machine::cti_op_div):
        (JSC::Machine::cti_op_pre_dec):
        (JSC::Machine::cti_op_not):
        (JSC::Machine::cti_op_eq):
        (JSC::Machine::cti_op_lshift):
        (JSC::Machine::cti_op_bitand):
        (JSC::Machine::cti_op_rshift):
        (JSC::Machine::cti_op_bitnot):
        (JSC::Machine::cti_op_new_func_exp):
        (JSC::Machine::cti_op_mod):
        (JSC::Machine::cti_op_less):
        (JSC::Machine::cti_op_neq):
        (JSC::Machine::cti_op_urshift):
        (JSC::Machine::cti_op_bitxor):
        (JSC::Machine::cti_op_new_regexp):
        (JSC::Machine::cti_op_bitor):
        (JSC::Machine::cti_op_call_eval):
        (JSC::Machine::cti_op_throw):
        (JSC::Machine::cti_op_next_pname):
        (JSC::Machine::cti_op_typeof):
        (JSC::Machine::cti_op_is_undefined):
        (JSC::Machine::cti_op_is_boolean):
        (JSC::Machine::cti_op_is_number):
        (JSC::Machine::cti_op_is_string):
        (JSC::Machine::cti_op_is_object):
        (JSC::Machine::cti_op_is_function):
        (JSC::Machine::cti_op_stricteq):
        (JSC::Machine::cti_op_nstricteq):
        (JSC::Machine::cti_op_to_jsnumber):
        (JSC::Machine::cti_op_in):
        (JSC::Machine::cti_op_push_new_scope):
        (JSC::Machine::cti_op_del_by_val):
        (JSC::Machine::cti_op_new_error):
        (JSC::Machine::cti_vm_throw):
        Change these functions to return pointer types, and never
        JSValuePtr.
        * VM/Machine.h: Ditto.

2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2008-10-20  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed some recent break-age in bytecode mode.

        * VM/CodeBlock.cpp:
        (JSC::CodeBlock::printStructureIDs): Fixed up an ASSERT caused by
        Gavin's last checkin. This is a temporary fix so I can keep on moving.
        I'll send email about what I think is an underlying problem soon.

        * VM/Machine.cpp:
        (JSC::Machine::privateExecute): Removed a redundant and sometimes
        incorrect cast, which started ASSERTing after Darin's last checkin.

2329
2330
2331
2332
2333
2334
2008-10-20  Darin Adler  <darin@apple.com>

        - another similar Windows build fix

        * VM/CTI.cpp: Changed return type to JSObject* instead of JSValuePtr.

2335
2336
2337
2338
2339
2340
2341
2008-10-20  Darin Adler  <darin@apple.com>

        - try to fix Windows build

        * VM/CTI.cpp: Use JSValue* instead of JSValuePtr for ctiTrampoline.
        * VM/CTI.h: Ditto.

2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2008-10-19  Darin Adler  <darin@apple.com>

        Reviewed by Cameron Zwarich.

        - finish https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_call_profiler): Use asFunction.
        (JSC::Machine::cti_vm_lazyLinkCall): Ditto.
        (JSC::Machine::cti_op_construct_JSConstructFast): Use asObject.

        * kjs/JSCell.h: Re-sort friend classes. Eliminate inheritance from
        JSValue. Changed cast in asCell from static_cast to reinterpret_cast.
        Removed JSValue::getNumber(double&) and one of JSValue::getObject
        overloads.

        * kjs/JSValue.h: Made the private constructor and destructor both
        non-virtual and also remove the definitions. This class can never
        be instantiated or derived.

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
2008-10-19  Darin Adler  <darin@apple.com>

        Reviewed by Cameron Zwarich.

        - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        Change JSValuePtr from a typedef into a class. This allows us to support
        conversion from JSCell* to JSValuePtr even if JSCell isn't derived from
        JSValue.

        * JavaScriptCore.exp: Updated symbols that involve JSValuePtr, since
        it's now a distinct type.

        * API/APICast.h:
        (toRef): Extract the JSValuePtr payload explicitly since we can't just
        cast any more.
        * VM/CTI.cpp:
        (JSC::CTI::asInteger): Ditto.

        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::addConstant): Get at the payload directly.
        (JSC::CodeGenerator::emitLoad): Added an overload of JSCell* because
        otherwise classes derived from JSValue end up calling the bool
        overload instead of JSValuePtr.
        * VM/CodeGenerator.h: Ditto. Also update traits to use JSValue*
        and the payload functions.

        * VM/Register.h: Added a JSCell* overload and use of payload functions.

        * kjs/JSCell.h:
        (JSC::asCell): Use payload function.
        (JSC::JSValue::asCell): Use JSValue* instead of JSValuePtr.
        (JSC::JSValuePtr::JSValuePtr): Added. Constructor that takes JSCell*
        and creates a JSValuePtr.

        * kjs/JSImmediate.h: Added JSValuePtr class. Also updated makeValue
        and makeInt to work with JSValue* and the payload function.

        * kjs/JSValue.h: Added == and != operators for JSValuePtr. Put them
        here because eventually all the JSValue functions should go here
        except what's needed by JSImmediate. Also fix asValue to use
        JSValue* instead of JSValuePtr.

        * kjs/PropertySlot.h: Change constructor to take JSValuePtr.

        * kjs/protect.h: Update gcProtect functions to work with JSCell*
        as well as JSValuePtr. Also updated the ProtectedPtr<JSValuePtr>
        specialization to work more directly. Also changed all the call
        sites to use gcProtectNullTolerant.

darin@apple.com's avatar
darin@apple.com committed
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
2008-10-19  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        Remove most uses of JSValue, which will be removed in a future patch.

        * VM/Machine.cpp:
        (JSC::fastToUInt32): Call toUInt32SlowCase function; no longer a member
        of JSValue.
        * kjs/JSNumberCell.h:
        (JSC::JSNumberCell::toInt32): Ditto.
        (JSC::JSNumberCell::toUInt32): Ditto.

        * kjs/JSValue.cpp:
        (JSC::toInt32SlowCase): Made a non-member function.
        (JSC::JSValue::toInt32SlowCase): Changed to call non-member function.
        (JSC::toUInt32SlowCase): More of the same.
        (JSC::JSValue::toUInt32SlowCase): Ditto.

        * kjs/JSValue.h: Moved static member function so they are no longer
        member functions at all.

        * VM/CTI.h: Removed forward declaration of JSValue.
        * VM/ExceptionHelpers.h: Ditto.
        * kjs/CallData.h: Ditto.
        * kjs/ConstructData.h: Ditto.
        * kjs/JSGlobalObjectFunctions.h: Ditto.
        * kjs/PropertyMap.h: Ditto.
        * kjs/StructureID.h: Ditto.
        * kjs/collector.h: Ditto.
        * kjs/completion.h: Ditto.

        * kjs/grammar.y:
        (JSC::makeBitwiseNotNode): Call new non-member toInt32 function.
        (JSC::makeLeftShiftNode): More of the same.
        (JSC::makeRightShiftNode): Ditto.

        * kjs/protect.h: Added a specialization for ProtectedPtr<JSValuePtr>
        so this can be used with JSValuePtr.

darin@apple.com's avatar
darin@apple.com committed
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2008-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        Tweak a little more to get closer to where we can make JSValuePtr a class.

        * API/APICast.h:
        (toJS): Change back to JSValue* here, since we're converting the
        pointer type.
        * VM/CTI.cpp:
        (JSC::CTI::unlinkCall): Call asPointer.
        * VM/CTI.h: Cast to JSValue* here, since it's a pointer cast.
        * kjs/DebuggerCallFrame.h:
        (JSC::DebuggerCallFrame::DebuggerCallFrame): Call noValue.
        * kjs/JSGlobalData.cpp:
        (JSC::JSGlobalData::JSGlobalData): Call noValue.
        * kjs/JSImmediate.cpp:
        (JSC::JSImmediate::toObject): Remove unneeded const_cast.
        * kjs/JSWrapperObject.h:
        (JSC::JSWrapperObject::JSWrapperObject): Call noValue.

2481
2482
2483
2484
2485
2486
2487
2008-10-18  Darin Adler  <darin@apple.com>

        - fix non-all-in-one build

        * kjs/completion.h:
        (JSC::Completion::Completion): Add include of JSValue.h.

2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2008-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - fix assertions I introduced with my casting changes

        These were showing up as failures in the JavaScriptCore tests.

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_instanceof): Remove the bogus asCell casting that
        was at the top of the function, and instead cast at the point of use.
        (JSC::Machine::cti_op_construct_NotJSConstruct): Moved the cast to
        object after checking the construct type.

2502
2503
2504
2505
2506
2507
2008-10-18  Darin Adler  <darin@apple.com>

        - fix non-all-in-one build

        * kjs/JSGlobalObjectFunctions.h: Add include of JSImmedate.h (for now).

2508
2509
2510
2511
2512
2513
2008-10-18  Darin Adler  <darin@apple.com>

        - fix build

        * kjs/interpreter.h: Include JSValue.h instead of JSImmediate.h.

2514
2515
2516
2517
2008-10-18  Darin Adler  <darin@apple.com>

        * kjs/interpreter.h: Fix include of JSImmediate.h.

2518
2519
2520
2521
2008-10-18  Darin Adler  <darin@apple.com>

        - fix non-all-in-one build

2522
        * kjs/interpreter.h: Add include of JSImmediate.h.
2523

2524
2525
2526
2527
2528
2529
2008-10-18  Darin Adler  <darin@apple.com>

        - fix non-all-in-one build

        * kjs/ConstructData.h: Add include of JSImmedate.h (for now).

2530
2531
2532
2533
2534
2535
2536
2537
2008-10-18  Darin Adler  <darin@apple.com>

        - try to fix Windows build

        * VM/Machine.cpp:
        (JSC::Machine::Machine): Use JSCell* type since MSVC seems to only allow
        calling ~JSCell directly if it's a JSCell*.

darin@apple.com's avatar
darin@apple.com committed
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
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
2008-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Cameron Zwarich.

        - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
        changing JSValuePtr to be a class, and then eventually renaming it
        to JSValue once that's done.

        * JavaScriptCore.exp: Update entry points, since some now take JSValue*
        instead of const JSValue*.

        * API/APICast.h:
        * API/JSCallbackConstructor.h:
        * API/JSCallbackFunction.cpp:
        * API/JSCallbackFunction.h:
        * API/JSCallbackObject.h:
        * API/JSCallbackObjectFunctions.h:
        * API/JSContextRef.cpp:
        * API/JSObjectRef.cpp:
        * API/JSValueRef.cpp:
        * VM/CTI.cpp:
        * VM/CTI.h:
        * VM/CodeBlock.cpp:
        * VM/CodeBlock.h:
        * VM/CodeGenerator.cpp:
        * VM/CodeGenerator.h:
        * VM/ExceptionHelpers.cpp:
        * VM/ExceptionHelpers.h:
        * VM/JSPropertyNameIterator.cpp:
        * VM/JSPropertyNameIterator.h:
        * VM/Machine.cpp:
        * VM/Machine.h:
        * VM/Register.h:
        * kjs/ArgList.cpp:
        * kjs/ArgList.h:
        * kjs/Arguments.cpp:
        * kjs/Arguments.h:
        * kjs/ArrayConstructor.cpp:
        * kjs/ArrayPrototype.cpp:
        * kjs/BooleanConstructor.cpp:
        * kjs/BooleanConstructor.h:
        * kjs/BooleanObject.h:
        * kjs/BooleanPrototype.cpp:
        * kjs/CallData.cpp:
        * kjs/CallData.h:
        * kjs/ConstructData.cpp:
        * kjs/ConstructData.h:
        * kjs/DateConstructor.cpp:
        * kjs/DateInstance.h:
        * kjs/DatePrototype.cpp:
        * kjs/DebuggerCallFrame.cpp:
        * kjs/DebuggerCallFrame.h:
        * kjs/ErrorConstructor.cpp:
        * kjs/ErrorPrototype.cpp:
        * kjs/ExecState.cpp:
        * kjs/ExecState.h:
        * kjs/FunctionConstructor.cpp:
        * kjs/FunctionPrototype.cpp:
        * kjs/GetterSetter.cpp:
        * kjs/GetterSetter.h:
        * kjs/InternalFunction.h:
        * kjs/JSActivation.cpp:
        * kjs/JSActivation.h:
        * kjs/JSArray.cpp:
        * kjs/JSArray.h:
        * kjs/JSCell.cpp:
        * kjs/JSCell.h:
        * kjs/JSFunction.cpp:
        * kjs/JSFunction.h:
        * kjs/JSGlobalData.h:
        * kjs/JSGlobalObject.cpp:
        * kjs/JSGlobalObject.h:
        * kjs/JSGlobalObjectFunctions.cpp:
        * kjs/JSGlobalObjectFunctions.h:
        * kjs/JSImmediate.cpp:
        * kjs/JSImmediate.h:
        * kjs/JSNotAnObject.cpp:
        * kjs/JSNotAnObject.h:
        * kjs/JSNumberCell.cpp:
        * kjs/JSNumberCell.h:
        * kjs/JSObject.cpp:
        * kjs/JSObject.h:
        * kjs/JSStaticScopeObject.cpp:
        * kjs/JSStaticScopeObject.h:
        * kjs/JSString.cpp:
        * kjs/JSString.h:
        * kjs/JSValue.h:
        * kjs/JSVariableObject.h:
        * kjs/JSWrapperObject.h:
        * kjs/MathObject.cpp:
        * kjs/NativeErrorConstructor.cpp:
        * kjs/NumberConstructor.cpp:
        * kjs/NumberConstructor.h:
        * kjs/NumberObject.cpp:
        * kjs/NumberObject.h:
        * kjs/NumberPrototype.cpp:
        * kjs/ObjectConstructor.cpp:
        * kjs/ObjectPrototype.cpp:
        * kjs/ObjectPrototype.h:
        * kjs/PropertyMap.h:
        * kjs/PropertySlot.cpp:
        * kjs/PropertySlot.h:
        * kjs/RegExpConstructor.cpp:
        * kjs/RegExpConstructor.h:
        * kjs/RegExpMatchesArray.h:
        * kjs/RegExpObject.cpp:
        * kjs/RegExpObject.h:
        * kjs/RegExpPrototype.cpp:
        * kjs/Shell.cpp:
        * kjs/StringConstructor.cpp:
        * kjs/StringObject.cpp:
        * kjs/StringObject.h:
        * kjs/StringObjectThatMasqueradesAsUndefined.h:
        * kjs/StringPrototype.cpp:
        * kjs/StructureID.cpp:
        * kjs/StructureID.h:
        * kjs/collector.cpp:
        * kjs/collector.h:
        * kjs/completion.h:
        * kjs/grammar.y:
        * kjs/interpreter.cpp:
        * kjs/interpreter.h:
        * kjs/lookup.cpp:
        * kjs/lookup.h:
        * kjs/nodes.h:
        * kjs/operations.cpp:
        * kjs/operations.h:
        * kjs/protect.h:
        * profiler/ProfileGenerator.cpp:
        Replace JSValue* with JSValuePtr.

2672
2673
2674
2675
2676
2677
2008-10-18  Darin Adler  <darin@apple.com>

        * VM/Machine.cpp:
        (JSC::Machine::cti_op_call_eval): Removed stray parentheses from my
        last check-in.

darin@apple.com's avatar
darin@apple.com committed
2678
2679
2680
2681
2682
2683
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
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
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
2008-10-18  Darin Adler  <darin@apple.com>

        Reviewed by Oliver Hunt.

        - first step of https://bugs.webkit.org/show_bug.cgi?id=21732
          improve performance by eliminating JSValue as a base class for JSCell

        Remove casts from JSValue* to derived classes, replacing them with
        calls to inline casting functions. These functions are also a bit
        better than aidrect cast because they also do a runtime assertion.

        Removed use of 0 as for JSValue*, changing call sites to use a
        noValue() function instead.

        Move things needed by classes derived from JSValue out of the class,
        since the classes won't be deriving from JSValue any more soon.

        I did most of these changes by changing JSValue to not be JSValue* any
        more, then fixing a lot of the compilation problems, then rolling out
        the JSValue change.

        1.011x as fast on SunSpider (presumably due to some of the Machine.cpp changes)

        * API/APICast.h: Removed unneeded forward declarations.

        * API/JSCallbackObject.h: Added an asCallbackObject function for casting.
        * API/JSCallbackObjectFunctions.h:
        (JSC::JSCallbackObject::asCallbackObject): Added.
        (JSC::JSCallbackObject::getOwnPropertySlot): Use asObject.
        (JSC::JSCallbackObject::call): Use noValue.
        (JSC::JSCallbackObject::staticValueGetter): Use asCallbackObject.
        (JSC::JSCallbackObject::staticFunctionGetter): Ditto.
        (JSC::JSCallbackObject::callbackGetter): Ditto.

        * JavaScriptCore.exp: Updated.

        * JavaScriptCore.xcodeproj/project.pbxproj: Added RegExpMatchesArray.h.

        * VM/CTI.cpp:
        (JSC::CTI::asInteger): Added. For use casting a JSValue to an integer.
        (JSC::CTI::emitGetArg): Use asInteger.
        (JSC::CTI::emitGetPutArg): Ditto.
        (JSC::CTI::getConstantImmediateNumericArg): Ditto. Also use noValue.
        (JSC::CTI::emitInitRegister): Use asInteger.
        (JSC::CTI::getDeTaggedConstantImmediate): Ditto.
        (JSC::CTI::compileOpCallInitializeCallFrame): Ditto.
        (JSC::CTI::compileOpCall): Ditto.
        (JSC::CTI::compileOpStrictEq): Ditto.
        (JSC::CTI::privateCompileMainPass): Ditto.
        (JSC::CTI::privateCompileGetByIdProto): Ditto.
        (JSC::CTI::privateCompileGetByIdChain): Ditto.
        (JSC::CTI::privateCompilePutByIdTransition): Ditto.
        * VM/CTI.h: Rewrite the ARG-related macros to use C++ casts instead of
        C casts and get rid of some extra parentheses. Addd declaration of
        asInteger.

        * VM/CodeGenerator.cpp:
        (JSC::CodeGenerator::emitEqualityOp): Use asString.
        (JSC::CodeGenerator::emitLoad): Use noValue.
        (JSC::CodeGenerator::findScopedProperty): Change globalObject argument
        to JSObject* instead of JSValue*.
        (JSC::CodeGenerator::emitResolve): Remove unneeded cast.
        (JSC::CodeGenerator::emitGetScopedVar): Use asCell.
        (JSC::CodeGenerator::emitPutScopedVar): Ditto.
        * VM/CodeGenerator.h: Changed out argument of findScopedProperty.
        Also change the JSValueMap to use PtrHash explicitly instead of
        getting it from DefaultHash.

        * VM/JSPropertyNameIterator.cpp:
        (JSC::JSPropertyNameIterator::toPrimitive): Use noValue.
        * VM/JSPropertyNameIterator.h:
        (JSC::JSPropertyNameIterator::next): Ditto.

        * VM/Machine.cpp:
        (JSC::fastIsNumber): Moved isImmediate check here instead of
        checking for 0 inside Heap::isNumber. Use asCell and asNumberCell.
        (JSC::fastToInt32): Ditto.
        (JSC::fastToUInt32): Ditto.
        (JSC::jsLess): Use asString.
        (JSC::jsLessEq): Ditto.
        (JSC::jsAdd): Ditto.
        (JSC::jsTypeStringForValue): Use asObject.
        (JSC::jsIsObjectType): Ditto.
        (JSC::jsIsFunctionType): Ditto.
        (JSC::inlineResolveBase): Use noValue.
        (JSC::Machine::callEval): Use asString. Initialize result to
        undefined, not 0.
        (JSC::Machine::Machine): Remove unneeded casts to JSCell*.
        (JSC::Machine::throwException): Use asObject.
        (JSC::Machine::debug): Remove explicit calls to the DebuggerCallFrame
        constructor.
        (JSC::Machine::checkTimeout): Use noValue.
        (JSC::cachePrototypeChain): Use asObject.
        (JSC::Machine::tryCachePutByID): Use asCell.
        (JSC::Machine::tryCacheGetByID): Use aCell and asObject.
        (JSC::Machine::privateExecute): Use noValue, asCell, asObject, asString,
        asArray, asActivation, asFunction. Changed code that creates call frames
        for host functions to pass 0 for the function pointer -- the call frame
        needs a JSFunction* and a host function object is not one. This was
        caught by the assertions in the casting functions. Also remove some
        unneeded casts in cases where two values are compared.
        (JSC::Machine::retrieveLastCaller): Use noValue.
        (JSC::Machine::tryCTICachePutByID): Use asCell.
        (JSC::Machine::tryCTICacheGetByID): Use aCell and asObject.
        (JSC::setUpThrowTrampolineReturnAddress): Added this function to restore
        the PIC-branch-avoidance that was recently lost.
        (JSC::Machine::cti_op_add): Use asString.
        (JSC::Machine::cti_op_instanceof): Use asCell and asObject.
        (JSC::Machine::cti_op_call_JSFunction): Use asFunction.
        (JSC::Machine::cti_op_call_NotJSFunction): Changed code to pass 0 for
        the function pointer, since we don't have a JSFunction. Use asObject.
        (JSC::Machine::cti_op_tear_off_activation): Use asActivation.
        (JSC::Machine::cti_op_construct_JSConstruct): Use asFunction and asObject.
        (JSC::Machine::cti_op_construct_NotJSConstruct): use asObject.
        (JSC::Machine::cti_op_get_by_val): Use asArray and asString.
        (JSC::Machine::cti_op_resolve_func): Use asPointer; this helps prepare
        us for a situation where JSValue is not a pointer.
        (JSC::Machine::cti_op_put_by_val): Use asArray.
        (JSC::Machine::cti_op_put_by_val_array): Ditto.
        (JSC::Machine::cti_op_resolve_global): Use asGlobalObject.
        (JSC::Machine::cti_op_post_inc): Change VM_CHECK_EXCEPTION_2 to
        VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after
        that point. Also use asPointer.
        (JSC::Machine::cti_op_resolve_with_base): Use asPointer.
        (JSC::Machine::cti_op_post_dec): Change VM_CHECK_EXCEPTION_2 to
        VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after
        that point. Also use asPointer.
        (JSC::Machine::cti_op_call_eval): Use asObject, noValue, and change
        VM_CHECK_EXCEPTION_ARG to VM_THROW_EXCEPTION_AT_END.
        (JSC::Machine::cti_op_throw): Change return value to a JSValue*.
        (JSC::Machine::cti_op_in): Use asObject.
        (JSC::Machine::cti_op_switch_char): Use asString.
        (JSC::Machine::cti_op_switch_string): Ditto.
        (JSC::Machine::cti_op_put_getter): Use asObject.
        (JSC::Machine::cti_op_put_setter): Ditto.
        (JSC::Machine::cti_vm_throw): Change return value to a JSValue*.
        Use noValue.
        * VM/Machine.h: Change return values of both cti_op_throw and
        cti_vm_throw to JSValue*.

        * VM/Register.h: Remove nullJSValue, which is the same thing
        as noValue(). Also removed unneeded definition of JSValue.

        * kjs/ArgList.h: Removed unneeded definition of JSValue.

        * kjs/Arguments.h:
        (JSC::asArguments): Added.

        * kjs/ArrayPrototype.cpp:
        (JSC::getProperty): Use noValue.
        (JSC::arrayProtoFuncToString): Use asArray.
        (JSC::arrayProtoFuncToLocaleString): Ditto.
        (JSC::arrayProtoFuncConcat): Ditto.
        (JSC::arrayProtoFuncPop): Ditto. Also removed unneeded initialization
        of the result, which is set in both sides of the branch.
        (JSC::arrayProtoFuncPush): Ditto.
        (JSC::arrayProtoFuncShift): Removed unneeded initialization
        of the result, which is set in both sides of the branch.
        (JSC::arrayProtoFuncSort): Use asArray.

        * kjs/BooleanObject.h:
        (JSC::asBooleanObject): Added.

        * kjs/BooleanPrototype.cpp:
        (JSC::booleanProtoFuncToString): Use asBooleanObject.
        (JSC::booleanProtoFuncValueOf): Ditto.

        * kjs/CallData.cpp:
        (JSC::call): Use asObject and asFunction.
        * kjs/ConstructData.cpp:
        (JSC::construct): Ditto.

        * kjs/DateConstructor.cpp:
        (JSC::constructDate): Use asDateInstance.

        * kjs/DateInstance.h:
        (JSC::asDateInstance): Added.

        * kjs/DatePrototype.cpp:
        (JSC::dateProtoFuncToString): Use asDateInstance.
        (JSC::dateProtoFuncToUTCString): Ditto.
        (JSC::dateProtoFuncToDateString): Ditto.
        (JSC::dateProtoFuncToTimeString): Ditto.
        (JSC::dateProtoFuncToLocaleString): Ditto.
        (JSC::dateProtoFuncToLocaleDateString): Ditto.
        (JSC::dateProtoFuncToLocaleTimeString): Ditto.
        (JSC::dateProtoFuncValueOf): Ditto.
        (JSC::dateProtoFuncGetTime): Ditto.
        (JSC::dateProtoFuncGetFullYear): Ditto.
        (JSC::dateProtoFuncGetUTCFullYear): Ditto.
        (JSC::dateProtoFuncToGMTString): Ditto.
        (JSC::dateProtoFuncGetMonth): Ditto.
        (JSC::dateProtoFuncGetUTCMonth): Ditto.
        (JSC::dateProtoFuncGetDate): Ditto.
        (JSC::dateProtoFuncGetUTCDate): Ditto.
        (JSC::dateProtoFuncGetDay): Ditto.
        (JSC::dateProtoFuncGetUTCDay): Ditto.
        (JSC::dateProtoFuncGetHours): Ditto.
        (JSC::dateProtoFuncGetUTCHours): Ditto.
        (JSC::dateProtoFuncGetMinutes): Ditto.
        (JSC::dateProtoFuncGetUTCMinutes): Ditto.
        (JSC::dateProtoFuncGetSeconds): Ditto.
        (JSC::dateProtoFuncGetUTCSeconds): Ditto.
        (JSC::dateProtoFuncGetMilliSeconds): Ditto.
        (JSC::dateProtoFuncGetUTCMilliseconds): Ditto.
        (JSC::dateProtoFuncGetTimezoneOffset): Ditto.
        (JSC::dateProtoFuncSetTime): Ditto.
        (JSC::setNewValueFromTimeArgs): Ditto.
        (JSC::setNewValueFromDateArgs): Ditto.
        (JSC::dateProtoFuncSetYear): Ditto.
        (JSC::dateProtoFuncGetYear): Ditto.

        * kjs/DebuggerCallFrame.cpp:
        (JSC::DebuggerCallFrame::thisObject): Use asObject.
        (JSC::DebuggerCallFrame::evaluate): Use noValue.
        * kjs/DebuggerCallFrame.h: Added a constructor that
        takes only a callFrame.

        * kjs/ExecState.h:
        (JSC::ExecState::clearException): Use noValue.

        * kjs/FunctionPrototype.cpp:
        (JSC::functionProtoFuncToString): Use asFunction.
        (JSC::functionProtoFuncApply): Use asArguments and asArray.

        * kjs/GetterSetter.cpp:
        (JSC::GetterSetter::getPrimitiveNumber): Use noValue.

        * kjs/GetterSetter.h:
        (JSC::asGetterSetter): Added.

        * kjs/InternalFunction.cpp:
        (JSC::InternalFunction::name): Use asString.

        * kjs/InternalFunction.h:
        (JSC::asInternalFunction): Added.

        * kjs/JSActivation.cpp:
        (JSC::JSActivation::argumentsGetter): Use asActivation.

        * kjs/JSActivation.h:
        (JSC::asActivation): Added.

        * kjs/JSArray.cpp:
        (JSC::JSArray::putSlowCase): Use noValue.
        (JSC::JSArray::deleteProperty): Ditto.
        (JSC::JSArray::increaseVectorLength): Ditto.
        (JSC::JSArray::setLength): Ditto.
        (JSC::JSArray::pop): Ditto.
        (JSC::JSArray::sort): Ditto.
        (JSC::JSArray::compactForSorting): Ditto.
        * kjs/JSArray.h:
        (JSC::asArray): Added.

        * kjs/JSCell.cpp:
        (JSC::JSCell::getJSNumber): Use noValue.

        * kjs/JSCell.h:
        (JSC::asCell): Added.
        (JSC::JSValue::asCell): Changed to not preserve const.
        Given the wide use of JSValue* and JSCell*, it's not
        really useful to use const.
        (JSC::JSValue::isNumber): Use asValue.
        (JSC::JSValue::isString): Ditto.
        (JSC::JSValue::isGetterSetter): Ditto.
        (JSC::JSValue::isObject): Ditto.
        (JSC::JSValue::getNumber): Ditto.
        (JSC::JSValue::getString): Ditto.
        (JSC::JSValue::getObject): Ditto.
        (JSC::JSValue::getCallData): Ditto.
        (JSC::JSValue::getConstructData): Ditto.
        (JSC::JSValue::getUInt32): Ditto.
        (JSC::JSValue::getTruncatedInt32): Ditto.
        (JSC::JSValue::getTruncatedUInt32): Ditto.
        (JSC::JSValue::mark): Ditto.
        (JSC::JSValue::marked): Ditto.
        (JSC::JSValue::toPrimitive): Ditto.
        (JSC::JSValue::getPrimitiveNumber): Ditto.
        (JSC::JSValue::toBoolean): Ditto.
        (JSC::JSValue::toNumber): Ditto.
        (JSC::JSValue::toString): Ditto.
        (JSC::JSValue::toObject): Ditto.
        (JSC::JSValue::toThisObject): Ditto.
        (JSC::JSValue::needsThisConversion): Ditto.
        (JSC::JSValue::toThisString): Ditto.
        (JSC::JSValue::getJSNumber): Ditto.

        * kjs/JSFunction.cpp:
        (JSC::JSFunction::argumentsGetter): Use asFunction.
        (JSC::JSFunction::callerGetter): Ditto.
        (JSC::JSFunction::lengthGetter): Ditto.
        (JSC::JSFunction::construct): Use asObject.

        * kjs/JSFunction.h:
        (JSC::asFunction): Added.

        * kjs/JSGlobalObject.cpp:
        (JSC::lastInPrototypeChain): Use asObject.

        * kjs/JSGlobalObject.h:
        (JSC::asGlobalObject): Added.
        (JSC::ScopeChainNode::globalObject): Use asGlobalObject.

        * kjs/JSImmediate.h: Added noValue, asPointer, and makeValue
        functions. Use rawValue, makeValue, and noValue consistently
        instead of doing reinterpret_cast in various functions.

        * kjs/JSNumberCell.h:
        (JSC::asNumberCell): Added.
        (JSC::JSValue::uncheckedGetNumber): Use asValue and asNumberCell.
        (JSC::JSValue::toJSNumber): Use asValue.

        * kjs/JSObject.cpp:
        (JSC::JSObject::put): Use asObject and asGetterSetter.
        (JSC::callDefaultValueFunction): Use noValue.
        (JSC::JSObject::defineGetter): Use asGetterSetter.
        (JSC::JSObject::defineSetter): Ditto.
        (JSC::JSObject::lookupGetter): Ditto. Also use asObject.
        (JSC::JSObject::lookupSetter): Ditto.
        (JSC::JSObject::hasInstance): Use asObject.
        (JSC::JSObject::fillGetterPropertySlot): Use asGetterSetter.

        * kjs/JSObject.h:
        (JSC::JSObject::getDirect): Use noValue.
        (JSC::asObject): Added.
        (JSC::JSValue::isObject): Use asValue.
        (JSC::JSObject::get): Removed unneeded const_cast.
        (JSC::JSObject::getPropertySlot): Use asObject.
        (JSC::JSValue::get): Removed unneeded const_cast.
        Use asValue, asCell, and asObject.
        (JSC::JSValue::put): Ditto.
        (JSC::JSObject::allocatePropertyStorageInline): Fixed spelling
        of "oldPropertStorage".

        * kjs/JSString.cpp:
        (JSC::JSString::getOwnPropertySlot): Use asObject.

        * kjs/JSString.h:
        (JSC::asString): Added.
        (JSC::JSValue::toThisJSString): Use asValue.

        * kjs/JSValue.h: Make PreferredPrimitiveType a top level enum
        instead of a member of JSValue. Added an asValue function that
        returns this. Removed overload of asCell for const. Use asValue
        instead of getting right at this.

        * kjs/ObjectPrototype.cpp:
        (JSC::objectProtoFuncIsPrototypeOf): Use asObject.
        (JSC::objectProtoFuncDefineGetter): Ditto.
        (JSC::objectProtoFuncDefineSetter): Ditto.

        * kjs/PropertySlot.h:
        (JSC::PropertySlot::PropertySlot): Take a const JSValue* so the
        callers don't have to worry about const.
        (JSC::PropertySlot::clearBase): Use noValue.
        (JSC::PropertySlot::clearValue): Ditto.

        * kjs/RegExpConstructor.cpp:
        (JSC::regExpConstructorDollar1): Use asRegExpConstructor.
        (JSC::regExpConstructorDollar2): Ditto.
        (JSC::regExpConstructorDollar3): Ditto.
        (JSC::regExpConstructorDollar4): Ditto.
        (JSC::regExpConstructorDollar5): Ditto.
        (JSC::regExpConstructorDollar6): Ditto.
        (JSC::regExpConstructorDollar7): Ditto.
        (JSC::regExpConstructorDollar8): Ditto.
        (JSC::regExpConstructorDollar9): Ditto.
        (JSC::regExpConstructorInput): Ditto.
        (JSC::regExpConstructorMultiline): Ditto.
        (JSC::regExpConstructorLastMatch): Ditto.
        (JSC::regExpConstructorLastParen): Ditto.
        (JSC::regExpConstructorLeftContext): Ditto.
        (JSC::regExpConstructorRightContext): Ditto.
        (JSC::setRegExpConstructorInput): Ditto.
        (JSC::setRegExpConstructorMultiline): Ditto.
        (JSC::constructRegExp): Use asObject.

        * kjs/RegExpConstructor.h:
        (JSC::asRegExpConstructor): Added.

        * kjs/RegExpObject.cpp:
        (JSC::regExpObjectGlobal): Use asRegExpObject.
        (JSC::regExpObjectIgnoreCase): Ditto.
        (JSC::regExpObjectMultiline): Ditto.
        (JSC::regExpObjectSource): Ditto.
        (JSC::regExpObjectLastIndex): Ditto.
        (JSC::setRegExpObjectLastIndex): Ditto.
        (JSC::callRegExpObject): Ditto.

        * kjs/RegExpObject.h:
        (JSC::asRegExpObject): Added.

        * kjs/RegExpPrototype.cpp:
        (JSC::regExpProtoFuncTest): Use asRegExpObject.
        (JSC::regExpProtoFuncExec): Ditto.
        (JSC::regExpProtoFuncCompile): Ditto.
        (JSC::regExpProtoFuncToString): Ditto.

        * kjs/StringObject.h:
        (JSC::StringObject::internalValue): Use asString.
        (JSC::asStringObject): Added.

        * kjs/StringPrototype.cpp:
        (JSC::stringProtoFuncReplace): Use asRegExpObject.
        (JSC::stringProtoFuncToString): Ue asStringObject.
        (JSC::stringProtoFuncMatch): Use asRegExpObject.
        (JSC::stringProtoFuncSearch): Ditto.
        (JSC::stringProtoFuncSplit): Ditto.

        * kjs/StructureID.cpp:
        (JSC::StructureID::getEnumerablePropertyNames): Use asObject.
        (JSC::StructureID::createCachedPrototypeChain): Ditto.
        (JSC::StructureIDChain::StructureIDChain): Use asCell and asObject.

        * kjs/collector.h:
        (JSC::Heap::isNumber): Removed null handling. This can only be called
        on valid cells.
        (JSC::Heap::cellBlock): Removed overload for const and non-const.
        Whether the JSCell* is const or not really should have no effect on
        whether you can modify the collector block it's in.

        * kjs/interpreter.cpp:
        (JSC::Interpreter::evaluate): Use noValue and noObject.

        * kjs/nodes.cpp:
        (JSC::FunctionCallResolveNode::emitCode): Use JSObject for the global
        object rather than JSValue.
        (JSC::PostfixResolveNode::emitCode): Ditto.
        (JSC::PrefixResolveNode::emitCode): Ditto.
        (JSC::ReadModifyResolveNode::emitCode): Ditto.
        (JSC::AssignResolveNode::emitCode): Ditto.

        * kjs/operations.h:
        (JSC::equalSlowCaseInline): Use asString, asCell, asNumberCell, 
        (JSC::strictEqualSlowCaseInline): Ditto.

3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
2008-10-18  Cameron Zwarich  <zwarich@apple.com>

        Reviewed by Oliver Hunt.

        Bug 21702: Special op_create_activation for the case where there are no named parameters
        <https://bugs.webkit.org/show_bug.cgi?id=21702>

        This is a 2.5% speedup on the V8 Raytrace benchmark and a 1.1% speedup
        on the V8 Earley-Boyer benchmark.

        * VM/CTI.cpp:
        (JSC::CTI::privateCompileMainPass):
        * VM/Machine.cpp:
        (JSC::Machine::cti_op_create_arguments_no_params):
        * VM/Machine.h:
        * kjs/Arguments.h:
        (JSC::Arguments::):
        (JSC::Arguments::Arguments):

3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160