-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathChangeLog
More file actions
4843 lines (3749 loc) · 181 KB
/
ChangeLog
File metadata and controls
4843 lines (3749 loc) · 181 KB
1
2
3
4
5
6
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
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
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
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
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
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2011-06-30 Oliver Hunt <oliver@apple.com>
Reviewed by Gavin Barraclough.
Stop JSObject::isUsingInlineStorage() from using the structure
https://bugs.webkit.org/show_bug.cgi?id=57986
Make the isUsingInlineStorage() implementation just look at
whether the property storage is inside the object.
* runtime/JSObject.h:
(JSC::JSObject::isUsingInlineStorage):
(JSC::JSObject::JSObject):
2011-06-30 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Ensure that all compilation takes place within a dynamic global object scope
https://bugs.webkit.org/show_bug.cgi?id=57054
<rdar://problem/9083011>
Otherwise, entry to the global object scope might throw away the code
we just compiled, causing a crash.
* JavaScriptCore.exp: Updated for signature change.
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate): Removed explicit compilation calls
here because (a) they took place outside a dynamic global object scope
and (b) they were redundant.
* interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall): Updated for signature change.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct): Declare our dynamic global object
scope earlier, to ensure that compilation takes place within it.
* runtime/Completion.cpp:
(JSC::evaluate): Removed explicit compilation calls here because (a)
they took place outside a dynamic global object scope and (b) they were
redundant.
* runtime/Executable.h:
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::compile):
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct): Added an ASSERT to
verify our new invariant that all compilation takes place within a
dynamic global object scope.
* runtime/JSGlobalObject.cpp:
(JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope):
* runtime/JSGlobalObject.h: Changed the signature of DynamicGlobalObjectScope
to require a JSGlobalData instead of an ExecState* since it is often
easier to provide the former, and the latter was not necessary.
2011-06-27 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed build fix. One more filed missing during distcheck, for
the MIPS build.
* GNUmakefile.list.am:
2011-05-20 Xan Lopez <xlopez@igalia.com>
Reviewed by Oliver Hunt.
JIT requires VM overcommit (particularly on x86-64), Linux does not by default support this without swap?
https://bugs.webkit.org/show_bug.cgi?id=42756
Use the MAP_NORESERVE flag for mmap on Linux to skip the kernel
check of the available memory. This should give us an
overcommit-like behavior in most systems, which is what we want.
* wtf/OSAllocatorPosix.cpp:
(WTF::OSAllocator::reserveAndCommit): pass MAP_NORSERVE to mmap.
2011-06-04 Gustavo Noronha Silva <gns@gnome.org>
Unreviewed, MIPS build fix.
WebKitGTK+ tarball fails to build on MIPS.
https://buildd.debian.org/status/fetch.php?pkg=webkitgtk%2B&arch=mips&ver=1.4.0-1&stamp=1304786691
* GNUmakefile.am: Add missing MIPS-related file to the list of
files that are added to the tarball on make dist, and fix sorting.
2011-03-21 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK distcheck build fix.
* GNUmakefile.am:
2011-03-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
[GTK] JSC crashes in 32bit Release bots after r80743
https://bugs.webkit.org/show_bug.cgi?id=56180
The crash was caused by referencing GC memory from a GC destructor. This
is not safe because destruction time / order is not guaranteed.
* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::create):
(JSC::ProfileGenerator::ProfileGenerator):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* profiler/ProfileGenerator.h:
(JSC::ProfileGenerator::origin): Made ExecState* the first argument,
to match the rest of this class and JSC.
Use a JSGlobalObject* instead of an ExecState* with an indirect reference
to a JSGlobalObject* to track our origin. This is simpler and more
efficient, and it removes the destruction order dependency that was causing
our crash.
* profiler/Profiler.cpp:
(JSC::Profiler::startProfiling): Updated for change to JSGlobalObject*.
(JSC::Profiler::stopProfiling): New function for stopping all profiles
for a given global object. This is more straight-forward than multiplexing
through the old function.
(JSC::dispatchFunctionToProfiles): Updated for change to JSGlobalObject*.
* profiler/Profiler.h: Ditto.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject): Ditto.
2011-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
1 Structure leaked beneath JSGlobalData::storeVPtrs()
https://bugs.webkit.org/show_bug.cgi?id=56595
* runtime/Executable.cpp:
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):
(JSC::FunctionExecutable::FunctionExecutable):
* runtime/Executable.h:
(JSC::ExecutableBase::ExecutableBase):
(JSC::NativeExecutable::NativeExecutable):
(JSC::VPtrHackExecutable::VPtrHackExecutable):
(JSC::ScriptExecutable::ScriptExecutable): Use a raw pointer instead of
PassRefPtr, like JSString does, since JSGlobalData owns the singleton
exectuable structure.
2011-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Mark Rowe.
Fixed some string leaks seen on the buildbot
https://bugs.webkit.org/show_bug.cgi?id=56619
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::~PropertyTable): DEref!
2011-03-17 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Crash in JSC::MarkStack::drain Under Stress
https://bugs.webkit.org/show_bug.cgi?id=56470
We perform a number of gc allocations while when
we are setting up new globals in a piece of global
code. We do this by adding new properties to the
symbol table, and then expanding the storage to fit
at the end.
If a GC happens during this time we will report an
incorrect size for the global object's symbol table
storage.
This patch corrects this by growing the storage size
before we starting adding entries to the symbol table.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::resizeRegisters):
2011-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
1 Structure leaked beneath JSGlobalData::storeVPtrs()
https://bugs.webkit.org/show_bug.cgi?id=56595
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs): Take local ownership of the Structure
we're using, since the Executable is not designed to own the Structure.
2011-03-17 Gavin Barraclough <barraclough@apple.com>
Rubber Stamped by Sam Weinig.
Add missing register-register branchTest8 to MacroAssemblerX86Common/X86Assembler.
* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::branchTest8):
* assembler/X86Assembler.h:
(JSC::X86Assembler::testb_rr):
2011-03-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Bug 56603 - DFG JIT related cleanup
Move node generation out to separate function, move binarySearch algorithm out
to StdLibExtras, fix Graph::dump() to print comma between non-node children,
even if there are no node children.
* bytecode/CodeBlock.h:
(JSC::getCallReturnOffset):
(JSC::CodeBlock::getStubInfo):
(JSC::CodeBlock::getCallLinkInfo):
(JSC::CodeBlock::getMethodCallLinkInfo):
(JSC::CodeBlock::bytecodeOffset):
- Move binaryChop to binarySearch in StdLibExtras
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::parse):
(JSC::DFG::parse):
- Make m_noArithmetic a member, initialize m_currentIndex in the constructor.
* dfg/DFGByteCodeParser.h:
- Change parse() to not take a start index (always 0).
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
- Fix Graph::dump() to print comma between non-node children, even if there are no node children.
* dfg/DFGJITCodeGenerator.h:
(JSC::DFG::JITCodeGenerator::JITCodeGenerator):
- Initialize m_compileIndex in constructor.
* dfg/DFGNonSpeculativeJIT.cpp:
(JSC::DFG::NonSpeculativeJIT::compile):
* dfg/DFGNonSpeculativeJIT.h:
- Spilt out compilation of individual node.
* dfg/DFGOperations.cpp:
(JSC::DFG::operationConvertThis):
* dfg/DFGOperations.h:
- Cleanup parameter name.
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT.h:
- Spilt out compilation of individual node.
* runtime/Executable.cpp:
(JSC::tryDFGCompile):
- Change parse() to not take a start index (always 0).
* wtf/StdLibExtras.h:
(WTF::binarySearch):
- Move binaryChop to binarySearch in StdLibExtras
2011-03-17 Anders Carlsson <andersca@apple.com>
Reviewed by Geoffrey Garen.
Fix clang build.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs):
2011-03-17 Geoffrey Garen <ggaren@apple.com>
Reviewed by Darin Adler.
1 Structure leaked beneath JSGlobalData::storeVPtrs()
https://bugs.webkit.org/show_bug.cgi?id=56595
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs): Now that we have an executable, we need
to explicitly run its destructor.
2011-03-17 Jeff Miller <jeffm@apple.com>
Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
*.mode*
*.pbxuser
*.perspective*
project.xcworkspace
xcuserdata
* JavaScriptCore.xcodeproj: Modified property svn:ignore.
2011-03-17 Gavin Barraclough <barraclough@apple.com>
Reverting r81197, breaks JIT + INTERPRETER build.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::hasGlobalResolveInstructionAtBytecodeOffset):
(JSC::CodeBlock::hasGlobalResolveInfoAtBytecodeOffset):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::addPropertyAccessInstruction):
(JSC::CodeBlock::addGlobalResolveInstruction):
(JSC::CodeBlock::addStructureStubInfo):
* bytecode/Opcode.h:
* bytecode/StructureStubInfo.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolve):
(JSC::BytecodeGenerator::emitResolveWithBase):
(JSC::BytecodeGenerator::emitGetById):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitCatch):
2011-03-17 Ben Taylor <bentaylor.solx86@gmail.com>
Reviewed by Alexey Proskuryakov.
Add a COMPILER(SUNCC) define for Sun Studio 12.
https://bugs.webkit.org/show_bug.cgi?56444
derived from patch 1 of 16 originally from https://bugs.webkit.org/show_bug.cgi?id=24932
* wtf/Platform.h:
2011-03-17 Jay Civelli <jcivelli@chromium.org>
Reviewed by David Levin.
Adding a contains method to Vector.
https://bugs.webkit.org/show_bug.cgi?id=55859
* wtf/Vector.h:
(WTF::::operator):
(WTF::::contains):
2011-03-17 Patrick Gansterer <paroga@webkit.org>
Fix the interpreter build.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Added globalData to inheritorID().
2011-03-16 Sam Weinig <sam@webkit.org>
Fix the interpreter build.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::resolve):
(JSC::Interpreter::resolveSkip):
(JSC::Interpreter::resolveGlobal):
(JSC::Interpreter::resolveGlobalDynamic):
(JSC::Interpreter::resolveBaseAndProperty):
(JSC::Interpreter::privateExecute):
Remove .get()s.
2011-03-16 Adam Barth <abarth@webkit.org>
Reviewed by James Robinson.
Remove USE(BUILTIN_UTF8_CODEC)
https://bugs.webkit.org/show_bug.cgi?id=56508
We added this recently when we were unsure about the stability of the
built-in UTF-8 codec. However, the codec seems to be stable, so we
don't need the macro.
* wtf/Platform.h:
2011-03-16 Daniel Bates <dbates@rim.com>
Reviewed by Darin Adler.
Make JIT build for ARM Thumb-2 with RVCT
https://bugs.webkit.org/show_bug.cgi?id=56440
Derived from a patch by Dave Tapuska.
Also, modify the RVCT stub template to indicate that it preserves 8 byte stack alignment.
* jit/JITStubs.cpp:
2011-03-16 Chao-ying Fu <fu@mips.com>
Reviewed by Darin Adler.
Fix MIPS build with const *void
https://bugs.webkit.org/show_bug.cgi?id=56513
* assembler/MacroAssemblerMIPS.h:
(JSC::MacroAssemblerMIPS::load32):
(JSC::MacroAssemblerMIPS::store32):
2011-03-16 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
Remove unnecessary caller tracking shenanigans from CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=56483
This removes some leftover cruft from when we made CodeBlock
mark its callees. Removing it gives us a 0.7% progression,
reducing the overall regression to ~1.3%.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::shrinkToFit):
* bytecode/CodeBlock.h:
(JSC::CallLinkInfo::CallLinkInfo):
* jit/JIT.cpp:
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):
2011-03-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Make Structure creation require a JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=56438
Mechanical change to make Structure::create require JSGlobalData&, and
require all users to provide the globalData.
* API/JSCallbackConstructor.h:
(JSC::JSCallbackConstructor::createStructure):
* API/JSCallbackFunction.h:
(JSC::JSCallbackFunction::createStructure):
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::createStructure):
* API/JSContextRef.cpp:
* JavaScriptCore.exp:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
* debugger/DebuggerActivation.h:
(JSC::DebuggerActivation::createStructure):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* jsc.cpp:
(GlobalObject::GlobalObject):
(functionRun):
(jscmain):
* runtime/Arguments.h:
(JSC::Arguments::createStructure):
* runtime/ArrayPrototype.h:
(JSC::ArrayPrototype::createStructure):
* runtime/BooleanObject.h:
(JSC::BooleanObject::createStructure):
* runtime/DateInstance.h:
(JSC::DateInstance::createStructure):
* runtime/DatePrototype.h:
(JSC::DatePrototype::createStructure):
* runtime/ErrorInstance.h:
(JSC::ErrorInstance::createStructure):
* runtime/Executable.h:
(JSC::ExecutableBase::createStructure):
(JSC::EvalExecutable::createStructure):
(JSC::ProgramExecutable::createStructure):
(JSC::FunctionExecutable::createStructure):
* runtime/FunctionPrototype.h:
(JSC::FunctionPrototype::createStructure):
* runtime/GetterSetter.h:
(JSC::GetterSetter::createStructure):
* runtime/InternalFunction.h:
(JSC::InternalFunction::createStructure):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::createStructure):
* runtime/JSActivation.h:
(JSC::JSActivation::createStructure):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
(JSC::JSArray::createStructure):
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::createStructure):
* runtime/JSByteArray.h:
(JSC::JSByteArray::JSByteArray):
* runtime/JSCell.h:
(JSC::JSCell::JSCell::createDummyStructure):
* runtime/JSFunction.h:
(JSC::JSFunction::createStructure):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs):
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::createStructure):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::createStructure):
* runtime/JSONObject.h:
(JSC::JSONObject::createStructure):
* runtime/JSObject.cpp:
(JSC::JSObject::createInheritorID):
* runtime/JSObject.h:
(JSC::JSObject::createStructure):
(JSC::JSNonFinalObject::createStructure):
(JSC::JSFinalObject::createStructure):
(JSC::createEmptyObjectStructure):
(JSC::JSObject::inheritorID):
* runtime/JSObjectWithGlobalObject.h:
(JSC::JSObjectWithGlobalObject::createStructure):
* runtime/JSPropertyNameIterator.h:
(JSC::JSPropertyNameIterator::createStructure):
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::createStructure):
* runtime/JSString.h:
(JSC::RopeBuilder::createStructure):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::createStructure):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::createStructure):
* runtime/JSZombie.h:
(JSC::JSZombie::createStructure):
* runtime/MathObject.h:
(JSC::MathObject::createStructure):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructor::createStructure):
* runtime/NumberConstructor.h:
(JSC::NumberConstructor::createStructure):
* runtime/NumberObject.h:
(JSC::NumberObject::createStructure):
* runtime/ObjectConstructor.h:
(JSC::ObjectConstructor::createStructure):
* runtime/RegExpConstructor.h:
(JSC::RegExpConstructor::createStructure):
* runtime/RegExpObject.h:
(JSC::RegExpObject::createStructure):
* runtime/ScopeChain.h:
(JSC::ScopeChainNode::createStructure):
* runtime/StringObject.h:
(JSC::StringObject::createStructure):
* runtime/StringObjectThatMasqueradesAsUndefined.h:
(JSC::StringObjectThatMasqueradesAsUndefined::createStructure):
* runtime/StringPrototype.h:
(JSC::StringPrototype::createStructure):
* runtime/Structure.h:
(JSC::Structure::create):
2011-03-16 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Some conservative root gathering cleanup
https://bugs.webkit.org/show_bug.cgi?id=56447
SunSpider says 0.5% - 1.8% faster.
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::gatherConservativeRoots):
* interpreter/RegisterFile.h: New helper function for doing the
conservative gathering of the register file. It's still conservative,
since the register file may contain uninitialized values, but it's
moving-safe, because it only visits values tagged as pointers, so there's
no risk of mistaking an integer for a pointer and accidentally changing it.
* runtime/ConservativeSet.cpp:
(JSC::ConservativeRoots::add):
* runtime/ConservativeSet.h: Added a single-value add function, used above.
* runtime/Heap.cpp:
(JSC::Heap::markRoots): Separated machine stack conservative roots from
register file conservative roots because machine stack roots must be
pinned, but register file roots need not be pinned.
Adopted new interface for passing the current stack extent to the machine
stack root gathering routine. This allows us to exclude marking-related
data structures on the stack, and thus avoid double-marking the set of
machine roots.
* runtime/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::gatherConservativeRoots):
* runtime/MachineStackMarker.h: Added new interface, described above.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::firstAtom):
* wtf/StdLibExtras.h:
(WTF::roundUpToMultipleOf): Moved roundUpToMultipleOf so it could be used
by MachineStacks.
2011-03-16 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
A little bit of MarkStack cleanup
https://bugs.webkit.org/show_bug.cgi?id=56443
Moved MarkStack functions into MarkStack.h/.cpp.
SunSpider reports no change.
* runtime/JSArray.h:
* runtime/JSCell.h: Moved from here...
* runtime/MarkStack.cpp:
(JSC::MarkStack::markChildren):
(JSC::MarkStack::drain): ...to here. Also, no need to inline drain. It's
a huge function, and not called many times.
* runtime/MarkStack.h:
(JSC::MarkStack::~MarkStack): Moved near constructor, per style guide.
(JSC::MarkStack::append):
(JSC::MarkStack::deprecatedAppend):
(JSC::MarkStack::internalAppend): Moved to here.
2011-03-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed another deprecatedAppend
https://bugs.webkit.org/show_bug.cgi?id=56429
* collector/handles/HandleHeap.cpp:
(JSC::HandleHeap::markStrongHandles):
* collector/handles/HandleHeap.h: Use HeapRootMarker, since handles are
marked directly by the Heap.
* runtime/Heap.cpp:
(JSC::Heap::markRoots): Ditto.
2011-03-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed some more deprecated / unsafe append
https://bugs.webkit.org/show_bug.cgi?id=56428
* collector/handles/HandleStack.cpp:
(JSC::HandleStack::mark):
* collector/handles/HandleStack.h: Mark the handle stack using a HeapRoot
marker, since it's a heap root.
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
(JSC::MarkedArgumentBuffer::slowAppend):
* runtime/ArgList.h: Ditto.
* runtime/Heap.cpp:
(JSC::Heap::markRoots): Added a mark call for marking the handle stack.
It seems like Oliver forgot this in his last patch. (!)
* runtime/MarkStack.h: Removed appendSlots, since it would allow an
object to embed JSValues directly instead of using WriteBarrier.
(JSC::MarkStack::append): Added a private append for a list of values.
(JSC::HeapRootMarker::mark): Access to the above.
2011-03-15 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Removed a few more deprecatedAppends, and removed HeapRoot<T>
https://bugs.webkit.org/show_bug.cgi?id=56422
Added HeapRootMarker, a privileged class for marking direct heap roots
that are iterated during each garbage collection. This is easier to use
and more reliable than HeapRoot<T>, so I've removed HeapRoot<T>.
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* interpreter/CallFrame.h:
(JSC::ExecState::exception):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Completion.cpp:
(JSC::evaluate): exception is no longer a HeapRoot<T>, so no need to
call .get() on it.
* runtime/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* runtime/Heap.h: Updated to use HeapRootMarker.
* runtime/JSCell.h:
(JSC::JSCell::MarkStack::append): Added private functions for
HeapRootMarker to use.
* runtime/JSGlobalData.h: exception is no longer a HeapRoot<T>.
* runtime/MarkStack.h:
(JSC::HeapRootMarker::HeapRootMarker):
(JSC::HeapRootMarker::mark): Added private functions for
HeapRootMarker to use.
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::markChildren): Updated to use HeapRootMarker.
* runtime/SmallStrings.h:
(JSC::SmallStrings::emptyString):
(JSC::SmallStrings::singleCharacterString):
(JSC::SmallStrings::singleCharacterStrings): Updated to use HeapRootMarker.
* runtime/WriteBarrier.h: Removed HeapRoot<T>.
2011-03-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Made the global object moving-GC-safe
https://bugs.webkit.org/show_bug.cgi?id=56348
SunSpider reports no change.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Removed a dubious comment that
suggested we do not need to visit all our references during GC, since
that is not true in a moving GC.
Re-sorted data members by type, removed one duplicate, and added back
the one missing mark I found.
* runtime/JSGlobalObject.h: Re-sorted data members by type.
2011-03-15 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Introduce Local<T> to allow us to start moving to precise marking of locals
https://bugs.webkit.org/show_bug.cgi?id=56394
Introduce a new handle type, Local<T> and a scoping mechanism
LocalScope to allow us to start moving towards precise marking
of temporaries and local variables.
We also start to use the new Local<> type in the JSON stringifier
so that we can have some coverage of their behaviour in the initial
checkin.
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* collector/handles/Handle.h:
(JSC::::asObject):
* collector/handles/HandleStack.cpp: Added.
(JSC::HandleStack::HandleStack):
(JSC::HandleStack::mark):
(JSC::HandleStack::grow):
* collector/handles/HandleStack.h: Added.
(JSC::HandleStack::enterScope):
(JSC::HandleStack::zapTo):
(JSC::HandleStack::leaveScope):
(JSC::HandleStack::push):
* collector/handles/Local.h: Added.
(JSC::Local::internalSet):
(JSC::::Local):
(JSC::::operator):
(JSC::LocalStack::LocalStack):
(JSC::LocalStack::peek):
(JSC::LocalStack::pop):
(JSC::LocalStack::push):
(JSC::LocalStack::isEmpty):
(JSC::LocalStack::size):
* collector/handles/LocalScope.h: Added.
(JSC::LocalScope::LocalScope):
(JSC::LocalScope::~LocalScope):
(JSC::LocalScope::release):
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::allocateLocalHandle):
(JSC::Heap::handleStack):
* runtime/JSCell.h:
(JSC::JSCell::::getString):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::allocateLocalHandle):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
(JSC::Stringifier::stringify):
(JSC::Stringifier::appendStringifiedValue):
(JSC::Stringifier::Holder::Holder):
(JSC::Walker::Walker):
(JSC::Walker::walk):
(JSC::JSONProtoFuncParse):
(JSC::JSONProtoFuncStringify):
(JSC::JSONStringify):
* runtime/JSONObject.h:
* runtime/MarkStack.h:
(JSC::MarkStack::appendValues):
(JSC::MarkStack::appendSlots):
2011-03-15 Gavin Barraclough <barraclough@apple.com>
Rubber Stamped by Sam Weinig.
Bug 56420 - Remove ENABLE(JIT) code from ByteCompiler
Some methods have unnecessary differences in name/arguments for interpreter/JIT.
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
(JSC::HandlerInfo::HandlerInfo):
(JSC::CodeBlock::addPropertyAccessInfo):
(JSC::CodeBlock::addGlobalResolveInfo):
(JSC::CodeBlock::addCallLinkInfo):
(JSC::CodeBlock::globalResolveInfo):
* bytecode/Opcode.h:
* bytecode/StructureStubInfo.h:
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitResolve):
(JSC::BytecodeGenerator::emitResolveWithBase):
(JSC::BytecodeGenerator::emitGetById):
(JSC::BytecodeGenerator::emitPutById):
(JSC::BytecodeGenerator::emitDirectPutById):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::emitCatch):
2011-03-15 Gavin Barraclough <barraclough@apple.com>
Reviewed by Sam Weinig.
Fix broken assert in new code.
* dfg/DFGAliasTracker.h:
(JSC::DFG::AliasTracker::recordPutByVal):
- recordPutByVal is called for both PutByVal & PutByValAlias.
2011-03-15 Gavin Barraclough <barraclough@apple.com>
Rubber stamped by Sam Weinig.
Removed redundant code from BytecodeGenerator.
* bytecompiler/BytecodeGenerator.cpp:
* bytecompiler/BytecodeGenerator.h:
- delete uncalled code missed when reparsing was removed.
2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
Reviewed by Darin Adler.
Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
info into the headers rather than in export symbol definition files, but disable it on
all platforms initially so we can deal with port build issues one port at a time.
https://bugs.webkit.org/show_bug.cgi?id=27551
* API/JSBase.h:
* config.h:
* wtf/Assertions.h:
* wtf/ExportMacros.h: Added.
* wtf/Platform.h:
2011-03-14 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Unreviewed build fix.
Buildfix when JIT is not enabled after r81079
https://bugs.webkit.org/show_bug.cgi?id=56361
* runtime/Executable.cpp:
2011-03-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Made the global object moving-GC-safe
https://bugs.webkit.org/show_bug.cgi?id=56348
SunSpider reports no change.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::markChildren): Removed a dubious comment that
suggested we do not need to visit all our references during GC, since
that is not true in a moving GC.
Re-sorted data members by type, removed one duplicate, and added back
the one missing mark I found.
* runtime/JSGlobalObject.h: Re-sorted data members by type.
2011-03-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt.
Made JSWrapperObject and subclasses moving-GC-safe
https://bugs.webkit.org/show_bug.cgi?id=56346
SunSpider reports no change.
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance): No more need for JSGlobalData, since
we don't initialize the wrapped value in our constructor.
* runtime/DateInstance.h: Don't set the OverridesMarkChildren flag because
we do not in fact override markChildren.
* runtime/DatePrototype.h: Declare an anonymous slot, since wrapper object
no longer does so for us. Also added an ASSERT to catch a latent bug,
where DatePrototype stomped on its base class's anonymous slot. Hard-coded
anonymous slots are a plague on our code. This doesn't cause any problems
in our existing code since the base class never reads the anonymous slot
it declares, but it caused crashes when I tried to start using the slot
in an initial version of this patch.
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
(JSC::JSWrapperObject::internalValue):
(JSC::JSWrapperObject::setInternalValue): Resolved a problem where
our internal value was stored in two places: an anonymous slot, and a
data member which was not always visited during GC. Now, we only use the
data member, and we always visit it. (Instead of relying on certain
subclasses to set the OverridesMarkChildren bit, we set it ourselves.)
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject): No more need for JSGlobalData, since
we don't initialize the wrapped value in our constructor.
* runtime/NumberObject.h: Removed meaningless declaration.
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject): No more need for JSGlobalData, since
we don't initialize the wrapped value in our constructor.
* runtime/StringObject.h: Don't set the OverridesMarkChildren flag because
we do not in fact override markChildren.
* runtime/StringPrototype.h: Declare an anonymous slot, since wrapper object
no longer does so for us. Also added an ASSERT to catch a latent bug,
where DatePrototype stomped on its base class's anonymous slot. Hard-coded
anonymous slots are a plague on our code.
2011-03-14 Michael Saboff <msaboff@apple.com>
Reviewed by Gavin Barraclough.
Look-ahead assertions with back references don’t work as expected
https://bugs.webkit.org/show_bug.cgi?id=56082
Changed parentheses assertion processing to temporarily back out the
number of known characters after the assertion while processing the
assertion. This was done so that assertions don't fail due to
checking the number of required characters as additional to the
rest of the express since assertions don't "consume" input.
Added a byte code to uncheck characters to support the change.
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::uncheckInput):
(JSC::Yarr::ByteCompiler::emitDisjunction):
* yarr/YarrInterpreter.h:
(JSC::Yarr::ByteTerm::UncheckInput):
2011-03-14 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
Reviewed by Laszlo Gombos.
[Qt] Warning that round/roundf functions are already defined when compiled with RVCT 4 on symbian.
https://bugs.webkit.org/show_bug.cgi?id=56133
Add condition to not compile webkit internal math round functions on RVCT compiler versions
from 3.0.0 because they are already defined in compiler math library.
* wtf/MathExtras.h:
2011-03-14 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoffrey Garen & Oliver Hunt.
Bug 56284 - Add a dataflow intermediate representation for use in JIT generation.
The JSC JIT presently generates code directly from the bytecode used by the interpreter.
This is not an optimal intermediate representation for JIT code generation, since it does
not capture liveness information of values, and provides little opportunity to perform
any static analysis for even primitive types. The JIT currently generates two code paths,
a fast path handling common cases, and a slower path handling less common operand types.
However the slow path jumps back into the fast path, meaning that information arising
from the earlier type checks cannot be propagated to later operations.
This patch adds:
* a dataflow intermediate representation capable of describing a single basic block
of operations,
* a mechanism to convert a simple, single-block bytecode functions to the new IR,
* and a JIT code generator capable of generating code from this representation.
The JIT generates two code paths, with the slower path not reentering the fast path
mid-block, allowing speculative optimizations to be made on the hot path, with type
information arising from these speculative decisions able to be propagated through the
dataflow. Code generation of both speculative and non-speculative paths exploits the type
and liveness information represented in the dataflow graph to attempt to avoid redundant
boxing and type-checking of values, and to remove unnecessary spills of temporary values
to the RegisterFile.
The dataflow JIT currently can only support a subset of bytecode operations, limited to
arithmetic, bit-ops, and basic property access. Functions that cannot be compiled by the
dataflow JIT will be run using the existing JIT. The coverage of the dataflow JIT will be
expanded to include, control-flow, function calls, and then the long-tail of remaining
bytecode instructions. The JIT presently only support JSVALUE64, and as a consequence of
this only supports x86-64.