-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathChangeLog-2011-02-16
executable file
·24628 lines (19161 loc) · 938 KB
/
ChangeLog-2011-02-16
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-02-15 Gavin Barraclough <[email protected]>
Reviewed by Geoff Garen.
Bug 54524 - Allow JSObject to fully utilize cell's capacity for inline storage.
Currently JSObject is both directly instantiated for regular JS objects, and
derived to implement subtypes. A consequence of this is that we need to ensure
that sufficient space from the cell is left unused and available for any data
members that will be introduced by subclasses of JSObject. By restructuring
the internal storage array out of JSObject we can increase the size in the
internal storage for regular objects.
Add classes JSFinalObject and JSNonFinalObject. JSNonFinalObject retains as
much additional capacity as is currently available to allow for data members
in subclasses. JSFinalObject utilizes all available space for internal storage,
and only allows construction through JSFinalObject::create().
The additional storage made available in the JSObject means that we need no
longer rely on a union of the internal storage with a pointer to storage that
is only valid for external storage. This means we can go back to always having
a valid pointer to property storage, regardless of whether this is internal or
external. This simplifies some cases of access to the array from C code, and
significantly simplifies JIT access, since repatching no longer needs to be
able to change between a load of the storage pointer / a LEA of the internal
storage.
* API/JSObjectRef.cpp:
(JSObjectMake):
* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::repatchPointer):
* assembler/MIPSAssembler.h:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86_64.h:
* assembler/RepatchBuffer.h:
* assembler/X86Assembler.h:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::DebuggerActivation):
* debugger/DebuggerActivation.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_resolve_global):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::emit_op_get_by_pname):
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::compileGetByIdHotPath):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::compilePutDirectOffset):
(JSC::JIT::compileGetDirectOffset):
(JSC::JIT::patchGetByIdSelf):
(JSC::JIT::patchPutByIdReplace):
(JSC::JIT::privateCompileGetByIdProto):
(JSC::JIT::privateCompileGetByIdSelfList):
(JSC::JIT::privateCompileGetByIdProtoList):
(JSC::JIT::privateCompileGetByIdChainList):
(JSC::JIT::privateCompileGetByIdChain):
(JSC::JIT::emit_op_get_by_pname):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* runtime/Arguments.h:
(JSC::Arguments::Arguments):
* runtime/ErrorInstance.cpp:
(JSC::ErrorInstance::ErrorInstance):
* runtime/ErrorInstance.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::InterruptedExecutionError):
(JSC::TerminatedExecutionError::TerminatedExecutionError):
* runtime/JSArray.cpp:
(JSC::JSArray::JSArray):
* runtime/JSArray.h:
* runtime/JSByteArray.cpp:
(JSC::JSByteArray::JSByteArray):
* runtime/JSByteArray.h:
(JSC::JSByteArray::JSByteArray):
* runtime/JSFunction.cpp:
(JSC::JSFunction::getOwnPropertySlot):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalObject.h:
(JSC::constructEmptyObject):
* runtime/JSNotAnObject.h:
(JSC::JSNotAnObject::JSNotAnObject):
* runtime/JSObject.cpp:
(JSC::JSObject::createInheritorID):
(JSC::JSObject::allocatePropertyStorage):
* runtime/JSObject.h:
(JSC::JSObject::propertyStorage):
(JSC::JSNonFinalObject::JSNonFinalObject):
(JSC::JSNonFinalObject::createStructure):
(JSC::JSFinalObject::create):
(JSC::JSFinalObject::createStructure):
(JSC::JSFinalObject::JSFinalObject):
(JSC::JSObject::offsetOfInlineStorage):
(JSC::constructEmptyObject):
(JSC::createEmptyObjectStructure):
(JSC::JSObject::JSObject):
(JSC::JSObject::~JSObject):
(JSC::Structure::isUsingInlineStorage):
* runtime/JSObjectWithGlobalObject.cpp:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSObjectWithGlobalObject.h:
(JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::isVanilla):
* runtime/JSVariableObject.h:
(JSC::JSVariableObject::JSVariableObject):
* runtime/JSWrapperObject.h:
(JSC::JSWrapperObject::JSWrapperObject):
* runtime/ObjectConstructor.cpp:
(JSC::constructObject):
* runtime/ObjectPrototype.cpp:
(JSC::ObjectPrototype::ObjectPrototype):
* runtime/ObjectPrototype.h:
* runtime/StrictEvalActivation.cpp:
(JSC::StrictEvalActivation::StrictEvalActivation):
* runtime/StrictEvalActivation.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::growPropertyStorageCapacity):
2011-02-16 Oliver Hunt <[email protected]>
Reviewed by Geoff Garen.
Incorrect handling of global writes in dynamic contexts
https://bugs.webkit.org/show_bug.cgi?id=49383
* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute):
Can't use the existing callframe to return an uncaught exception
as by definition that callframe has already been torn down.
* parser/ASTBuilder.h:
(JSC::ASTBuilder::ASTBuilder):
(JSC::ASTBuilder::varDeclarations):
(JSC::ASTBuilder::funcDeclarations):
(JSC::ASTBuilder::features):
(JSC::ASTBuilder::numConstants):
(JSC::ASTBuilder::createFuncDeclStatement):
(JSC::ASTBuilder::addVar):
(JSC::ASTBuilder::incConstants):
(JSC::ASTBuilder::usesThis):
(JSC::ASTBuilder::usesCatch):
(JSC::ASTBuilder::usesClosures):
(JSC::ASTBuilder::usesArguments):
(JSC::ASTBuilder::usesAssignment):
(JSC::ASTBuilder::usesWith):
(JSC::ASTBuilder::usesEval):
Don't need a vector of scopes in the ASTBuilder
* runtime/Operations.h:
(JSC::resolveBase):
In strict mode the optimisation that we use to skip a lookup
on the global object is incorrect and lead to us always
disallowing global writes when we needed to do a dynamic slot
lookup. Now the strict mode path actually checks for the
property.
2011-02-15 Jon Honeycutt <[email protected]>
Windows build fix for
https://bugs.webkit.org/show_bug.cgi?id=54415
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
Remove deleted files.
2011-02-15 Oliver Hunt <[email protected]>
Fix EFL build for
https://bugs.webkit.org/show_bug.cgi?id=54415
* CMakeLists.txt:
2011-02-14 Oliver Hunt <[email protected]>
Reviewed by Gavin Barraclough and Geoff Garen.
Refactor handles and weak pointers to become nicer and more automatic
https://bugs.webkit.org/show_bug.cgi?id=54415
Move to a true handle based mechanism for GC value protection. This
also allows us to switch to a more sensible behaviour for weak pointers
in which weak pointers are automatically updated.
This allows us to remove the old (and convoluted) that required all
objects that may be held by a weak reference to be aware of the reference
and manually clear them in their destructors.
This also adds a few new data types to JSC that we use to efficiently
allocate and return the underlying handle storage.
This patch is largely renaming and removing now unnecessary destructors
from objects.
* API/JSClassRef.cpp:
(OpaqueJSClass::create):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
(OpaqueJSClass::contextData):
(OpaqueJSClass::prototype):
* API/JSClassRef.h:
* CMakeLists.txt:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.pro:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* collector/handles/Global.h: Added.
New Global handle type used to keep gc objects live, even if they're not
marked.
(JSC::Global::Global):
(JSC::Global::~Global):
(JSC::Global::set):
We can only assign directly to a global from another global.
In all other cases we need the JSGlobalData to be provided
explicitly so we use a set function.
(JSC::Global::operator=):
(JSC::Global::clear):
(JSC::Global::isHashTableDeletedValue):
(JSC::Global::internalSet):
* collector/handles/Handle.h: Added.
Root "Handle" type used for immutable handles and to provide the basic
APIs needed for pointer-like behaviour.
(JSC::HandleBase::operator!):
(JSC::HandleBase::operator UnspecifiedBoolType*):
(JSC::HandleBase::isEmpty):
(JSC::HandleBase::HandleBase):
(JSC::HandleBase::slot):
(JSC::HandleBase::invalidate):
(JSC::HandleBase::setSlot):
(JSC::HandleTypes::getFromSlot):
(JSC::HandleTypes::toJSValue):
(JSC::HandleTypes::validateUpcast):
(JSC::HandleConverter::operator->):
(JSC::HandleConverter::operator*):
(JSC::Handle::Handle):
(JSC::Handle::get):
(JSC::Handle::wrapSlot):
(JSC::operator==):
(JSC::operator!=):
* collector/handles/HandleHeap.cpp: Added.
New heap for global handles.
(JSC::HandleHeap::HandleHeap):
(JSC::HandleHeap::grow):
(JSC::HandleHeap::markStrongHandles):
(JSC::HandleHeap::updateAfterMark):
(JSC::HandleHeap::clearWeakPointers):
(JSC::HandleHeap::writeBarrier):
* collector/handles/HandleHeap.h: Added.
(JSC::HandleHeap::heapFor):
(JSC::HandleHeap::toHandle):
(JSC::HandleHeap::toNode):
(JSC::HandleHeap::allocate):
(JSC::HandleHeap::deallocate):
(JSC::HandleHeap::makeWeak):
Convert a hard handle into weak handle that does not
protect the object it points to.
(JSC::HandleHeap::makeSelfDestroying):
Converts a handle to a weak handle that will be returned
to the free list when the referenced object dies.
(JSC::HandleHeap::Node::Node):
(JSC::HandleHeap::Node::slot):
(JSC::HandleHeap::Node::handleHeap):
(JSC::HandleHeap::Node::setFinalizer):
(JSC::HandleHeap::Node::makeWeak):
(JSC::HandleHeap::Node::isWeak):
(JSC::HandleHeap::Node::makeSelfDestroying):
(JSC::HandleHeap::Node::isSelfDestroying):
(JSC::HandleHeap::Node::finalizer):
(JSC::HandleHeap::Node::setPrev):
(JSC::HandleHeap::Node::prev):
(JSC::HandleHeap::Node::setNext):
(JSC::HandleHeap::Node::next):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::Interpreter):
* interpreter/Interpreter.h:
* interpreter/RegisterFile.cpp:
(JSC::RegisterFile::globalObjectCollected):
* interpreter/RegisterFile.h:
(JSC::RegisterFile::RegisterFile):
* runtime/GCHandle.cpp: Removed.
* runtime/GCHandle.h: Removed.
* runtime/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::destroy):
(JSC::Heap::markRoots):
* runtime/Heap.h:
(JSC::Heap::allocateGlobalHandle):
(JSC::Heap::reportExtraMemoryCost):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
* runtime/JSGlobalData.h:
(JSC::JSGlobalData::allocateGlobalHandle):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
(JSC::JSPropertyNameIterator::~JSPropertyNameIterator):
* runtime/JSPropertyNameIterator.h:
(JSC::JSPropertyNameIterator::createStructure):
(JSC::Structure::setEnumerationCache):
(JSC::Structure::clearEnumerationCache):
* runtime/Protect.h:
* runtime/Structure.cpp:
(JSC::Structure::~Structure):
* runtime/Structure.h:
* runtime/WeakGCPtr.h:
(JSC::WeakGCPtrBase::get):
(JSC::WeakGCPtrBase::clear):
(JSC::WeakGCPtrBase::operator!):
(JSC::WeakGCPtrBase::operator UnspecifiedBoolType*):
(JSC::WeakGCPtrBase::~WeakGCPtrBase):
(JSC::WeakGCPtrBase::WeakGCPtrBase):
(JSC::WeakGCPtrBase::internalSet):
(JSC::LazyWeakGCPtr::LazyWeakGCPtr):
(JSC::LazyWeakGCPtr::set):
(JSC::WeakGCPtr::WeakGCPtr):
(JSC::WeakGCPtr::operator=):
* runtime/WriteBarrier.h:
* wtf/BlockStack.h: Added.
(WTF::::BlockStack):
(WTF::::~BlockStack):
(WTF::::blocks):
(WTF::::grow):
(WTF::::shrink):
* wtf/SentinelLinkedList.h: Added.
(WTF::::SentinelLinkedList):
(WTF::::begin):
(WTF::::end):
(WTF::::push):
(WTF::::remove):
* wtf/SinglyLinkedList.h: Added.
(WTF::::SinglyLinkedList):
(WTF::::isEmpty):
(WTF::::push):
(WTF::::pop):
2011-02-15 Pratik Solanki <[email protected]>
Move WTF_USE_CFNETWORK to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=54168
Reviewed by Darin Adler.
* wtf/Platform.h: Define WTF_USE_CFNETWORK for Windows builds.
2011-02-15 Geoffrey Garen <[email protected]>
Reviewed by Darin Adler.
Moved MarkedBlock data members to the head of the block
https://bugs.webkit.org/show_bug.cgi?id=54482
This allows for a variable-sized tail, to accommodate oversized blocks.
SunSpider reports no change.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h: Added missing element to the CELLS_PER_BLOCK
calculation. This kind of error is why we want to migrate to the system
described below.
(JSC::roundUpToMultipleOf):
(JSC::MarkedBlock::firstCell):
(JSC::MarkedBlock::cells):
(JSC::MarkedBlock::cellNumber): Use subtraction instead of masking to
calculate cell number. The mask is no longer correct because the first
cell is not at the head of the block.
(JSC::MarkedBlock::forEach): Replaced m_cells data member with a cells()
accessor. We want to use sizeof(MarkedBlock) to calculate the size of the
block header, so we can't have an explicit data member to represent the block tail.
Also replaced iteration from zero with iteration from startCell(), since
the first N cells are now occupied by the header.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::reset): Replaced iteration from zero as above.
2011-02-15 Chris Rogers <[email protected]>
Reviewed by Alexey Proskuryakov.
Fix Mutex::tryLock() on Windows to work properly with PlatformCondition::timedWait()
https://bugs.webkit.org/show_bug.cgi?id=54408
* wtf/ThreadingWin.cpp:
(WTF::PlatformCondition::timedWait):
2011-02-15 Xan Lopez <[email protected]>
Reviewed by Martin Robinson.
Remove some dead code in ARMv7
https://bugs.webkit.org/show_bug.cgi?id=54461
* assembler/ARMv7Assembler.h: remove dead code.
2011-02-14 Geoffrey Garen <[email protected]>
Rubber-stamped by Gavin Barraclough.
Some MarkedBlock refactoring.
Made cells private.
Renamed cells => m_cells
marked => m_marks.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate):
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::setMarked):
(JSC::MarkedBlock::forEach):
2011-02-14 Adam Barth <[email protected]>
Reviewed by Eric Seidel.
Add basic parser for Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=54379
Add a constructor for copying a Vector into a String. I suspect there
are a number of call sites that are doing this manually that would
benefit from being moved to this API.
* wtf/text/WTFString.h:
(WTF::String::String):
2011-02-14 Pavel Podivilov <[email protected]>
Reviewed by Yury Semikhatsky.
Web Inspector: use call frame column to determine execution line in source frame.
https://bugs.webkit.org/show_bug.cgi?id=54001
* wtf/text/TextPosition.h:
(WTF::ZeroBasedNumber::convertAsOneBasedInt):
2011-02-13 Jeremy Moskovich <[email protected]>
Reviewed by Adam Barth.
Add a compile-time option to completely disable WebArchive support.
https://bugs.webkit.org/show_bug.cgi?id=52712
Add an ENABLE(WEB_ARCHIVE) compile-time setting and use it for all WebArchive code.
Ports Affected:
WebArchive support is currently enabled for all ports that define PLATFORM(CF) apart from Qt.
This patch preserves this behavior except that it also disables support in the Chromium port.
* wtf/Platform.h: Add ENABLE_WEB_ARCHIVE definition and turn it off explicitly for Qt & Chromium ports.
2011-02-13 Cameron Zwarich <[email protected]>
Reviewed by Dan Bernstein.
Bug 53760 - JSC fails to build with TOT Clang
https://bugs.webkit.org/show_bug.cgi?id=53760
Fix -Woverloaded-virtual warnings. This is also a 6% speedup on the v8 raytrace
benchmark; it is nothing-to-noise on everything else.
* API/JSCallbackObject.h: Remove pointlessly overloaded method.
* API/JSCallbackObjectFunctions.h: Ditto.
* runtime/Arguments.cpp:
(JSC::Arguments::put): Change signature to match the base class. This implementation
was no longer being called by anyone. This wasn't noticed because it is merely an
optimization of the base class' implementation.
* runtime/Arguments.h: Ditto.
2011-02-12 Adam Barth <[email protected]>
Reviewed by Mark Rowe.
Use /dev/urandom as the OSRandomSource on OS(DARWIN)
https://bugs.webkit.org/show_bug.cgi?id=54279
I'm not sure it makes much of a difference whether we use arc4random or
/dev/urandom on Mac. However, there's some aesthetic benefit to using
the same underlying API on as many platforms as reasonable.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
2011-02-12 Adam Barth <[email protected]>
Reviewed by Kenneth Russell.
Enable ArrayBuffers by default
https://bugs.webkit.org/show_bug.cgi?id=54310
Export the required functions.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Daniel Bates <[email protected]>
Reviewed by Geoffrey Garen.
Remove explicit disable ENABLE_ASSEMBLER_WX_EXCLUSIVE on non-iOS ports
https://bugs.webkit.org/show_bug.cgi?id=54107
It is unnecessary to explicitly disable ENABLE_ASSEMBLER_WX_EXCLUSIVE
by the definition of ENABLE().
* wtf/Platform.h:
2011-02-11 Geoffrey Garen <[email protected]>
Not reviewed.
Randomly touch some build files in the hopes of fixing the Qt build.
* JavaScriptCore.gypi:
* JavaScriptCore.pri:
* JavaScriptCore.pro:
2011-02-11 Geoffrey Garen <[email protected]>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
(Rolling back in r78386 with the build fixed.)
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <[email protected]>
Not reviewed.
Used svn merge -r78386:78385 to roll out r78386 because it broke the build.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger):
2011-02-11 Geoffrey Garen <[email protected]>
Reviewed by Sam Weinig.
Garbage collection timer cycles forever, even when nothing is happening
https://bugs.webkit.org/show_bug.cgi?id=54320
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallbackPlatformData::trigger): Be sure to make
our timer inert after forcing a GC, to avoid GC'ing repeatedly.
2011-02-11 Geoffrey Garen <[email protected]>
Try to fix the Windows build: added an exported symbol.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
2011-02-11 Geoffrey Garen <[email protected]>
Reviewed by Oliver Hunt.
A little more encapsulation for the heap: Removed CollectorHeapIterator
https://bugs.webkit.org/show_bug.cgi?id=54298
CollectorHeapIterator is a God object that knows the internals of each
of the pieces of the heap. This undermines the encapsulation I'm trying
to achieve by splitting concepts into different classes.
As an alternative, I've given each class a forEach iteration function,
which takes a functor as an argument. Now, each class just needs to
know how to iterate the things it knows about.
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Removed CollectorHeapIterator.
* debugger/Debugger.cpp:
(JSC::Recompiler::Recompiler):
(JSC::Recompiler::~Recompiler):
(JSC::Recompiler::operator()):
(JSC::Debugger::recompileAllJSFunctions): Updated to use forEach interface
instead of an iterator.
* runtime/CollectorHeapIterator.h: Removed.
* runtime/Heap.cpp:
(JSC::TypeCounter::TypeCounter):
(JSC::TypeCounter::typeName):
(JSC::TypeCounter::operator()):
(JSC::TypeCounter::take):
(JSC::Heap::protectedObjectTypeCounts):
(JSC::Heap::objectTypeCounts): Added forEach and removed iterator.
* runtime/Heap.h:
(JSC::Heap::forEach):
* runtime/JSGlobalData.cpp:
(JSC::Recompiler::operator()):
(JSC::JSGlobalData::recompileAllJSFunctions):
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::forEach): Added forEach. Removed friend declaration
for CollectorHeapIterator. Now, we can make all our data private and
change it without breaking any other classes.
* runtime/MarkedSpace.cpp:
* runtime/MarkedSpace.h:
(JSC::MarkedSpace::forEach): Added forEach and removed iterator.
2011-02-11 Adam Barth <[email protected]>
Reviewed by Andreas Kling.
CryptographicRandomNumber has its threading ifdefs backwards
https://bugs.webkit.org/show_bug.cgi?id=54280
Turns out we want the mutex when thread is enabled. :)
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomNumber):
(WTF::ARC4Stream::ARC4RandomNumberGenerator::randomValues):
2011-02-10 Adam Barth <[email protected]>
Reviewed by Eric Seidel.
WebKit should have a cryptographic RNG
https://bugs.webkit.org/show_bug.cgi?id=22049
Teach JavaScriptCore how to export this function.
* JavaScriptCore.exp:
* JavaScriptCore.xcodeproj/project.pbxproj:
2011-02-10 Geoffrey Garen <[email protected]>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made all constants private
so clients don't know whether allocations are fixed-sized or not
https://bugs.webkit.org/show_bug.cgi?id=54270
SunSpider reports no change.
* runtime/CollectorHeapIterator.h:
(JSC::CollectorHeapIterator::advance): Updated for removal of HeapConstants.
* runtime/Error.cpp: Switched to using ASSERT_CLASS_FITS_IN_CELL, like
all other classes.
* runtime/Heap.cpp:
(JSC::Heap::allocate): Updated for removal of HeapConstants.
(JSC::Heap::reset): Updated to use size(), instead of calculating size
on our own.
* runtime/Heap.h: Moved the ASSERT here to MarkedBlock, since it enforces
on special knowledge of fixed-sizery, which only MarkedBlock is supposed
to know about.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Updated for removal of HeapConstants.
Also changed to reset nextCell to 0 at the end of a block, since that
seems more consistent.
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::storeVPtrs): Changed to use a fixed array of char.
This hard-coded size is a little wonky, but the compiler will tell us
if it's ever wrong, so I think it's OK.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::destroy):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::sweep): Updated for removal of HeapConstants.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::size):
(JSC::MarkedBlock::capacity): Made constants private to this class.
Removed HeapConstants. Added size() and capacity() functions.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::objectCount):
(JSC::MarkedSpace::size):
(JSC::MarkedSpace::capacity):
* runtime/MarkedSpace.h: Use MarkedBlock helper functions instead of
direct knowledge of MarkedBlock internals.
2011-02-10 Geoffrey Garen <[email protected]>
Reviewed by Sam Weinig.
A little more encapsulation for MarkedBlock: Made mark bits private
https://bugs.webkit.org/show_bug.cgi?id=54264
SunSpider reports no change.
* runtime/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::reset): Renamed clearMarkBits => clearMarks, since clients
don't need to know that marks are represented as bits. Renamed
markedCells => markCount, since clients don't need to know that blocks
are split into cells.
* runtime/MarkedBlock.h:
(JSC::MarkedBlock::isEmpty):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::markCount): New helper functions for encapsulating
the information clients actually need.
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::destroy):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearMarks):
(JSC::MarkedSpace::markCount):
(JSC::MarkedSpace::objectCount):
* runtime/MarkedSpace.h: Use new helper functions instead of accessing
MarkedBlock data directly.
2011-02-10 Michael Saboff <[email protected]>
Reviewed by Geoffrey Garen.
Cached JavaScript Parser Data Being Left in Memory Cache
https://bugs.webkit.org/show_bug.cgi?id=54245
Added clear method which removes SourceProviderCache items.
Cleaned up extraneous whitespace.
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* parser/SourceProviderCache.cpp:
(JSC::SourceProviderCache::~SourceProviderCache):
(JSC::SourceProviderCache::clear):
(JSC::SourceProviderCache::byteSize):
(JSC::SourceProviderCache::add):
* parser/SourceProviderCache.h:
2011-02-10 Joseph Pecoraro <[email protected]>
Follow-up fix to r78291. I should pass (int) 0, not '0' to memset.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::commonConstructor): fix mistaken post-review change.
2011-02-10 Joseph Pecoraro <[email protected]>
Reviewed by Geoffrey Garen.
Make DefaultGCActivityCallback for PLATFORM(CF) Easier to Subclass
https://bugs.webkit.org/show_bug.cgi?id=54257
A subclass may want to specify the CFRunLoop that the Garbage Collection
will happen on. It was difficult to manipulate this in a subclass because
the current DefaultGCActivityCallback class does this in its constructor.
This patch generalizes things a bit more so that a specific run loop can
be passed in to the constructor. This makes it so all run loop management
can stay in DefaultGCActivityCallback and a subclass can specify any runloop.
* runtime/GCActivityCallback.h: expose a PLATFORM(CF) constructor that can
specify the runloop GC can be scheduled on.
* runtime/GCActivityCallbackCF.cpp:
(JSC::DefaultGCActivityCallback::DefaultGCActivityCallback): two constructors,
one that specifies the run loop and passes that on to commonConstructor and
the old constructor defaults to the current run loop.
(JSC::DefaultGCActivityCallback::commonConstructor): do normal construction,
adding the timer to the given runloop.
2011-02-10 Geoffrey Garen <[email protected]>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Moved allocate() and sweep() into MarkedBlock
https://bugs.webkit.org/show_bug.cgi?id=54253
SunSpider reports no change.
* runtime/CollectorHeapIterator.h: Removed DeadObjectIterator, since it
is now unused.
* runtime/Heap.cpp:
(JSC::Heap::reset): Moved the call to shrink() here, since it seems a
little more clear for MarkedSpace's client to tell it explicitly when to
shrink.
* runtime/JSCell.h:
(JSC::JSCell::MarkedBlock::allocate): Split out from MarkedSpace::allocate.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::sweep): Split out from MarkedSpace::sweep, and
converted to more directly iterate a MarkedBlock based on knowing its
internal structure.
* runtime/MarkedBlock.h:
* runtime/MarkedSpace.cpp:
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::sweep):
* runtime/MarkedSpace.h: Split out the code mentioned above.
2011-02-10 Patrick Gansterer <[email protected]>
Reviewed by Andreas Kling.
Fix compilation error on OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=53766
Add a HAVE_STRNSTR in Platform.h and define it only on Darwin and FreeBSD.
* wtf/Platform.h:
* wtf/StringExtras.h: Use HAVE(STRNSTR) now.
2011-02-10 Adam Roben <[email protected]>
Print locations of assertions and logs in a way that Visual Studio understands
With this change, double-clicking one of these locations in Visual Studio's Output Window
will focus that line of code in the editor.
Fixes <http://webkit.org/b/54208> Double-clicking locations of assertions/logs in Visual
Studio's Output Window does nothing
Reviewed by Alexey Proskuryakov.
* wtf/Assertions.cpp:
(printCallSite): Use OS(WINDOWS) instead of the meaningless OS(WIN). When we aren't using
the debug CRT (and thus can't call _CrtDbgReport), print the file and line number using the
same format that cl.exe uses when it prints compiler errors.
2011-02-10 Dan Bernstein <[email protected]>
LLVM Compiler build fix.
* runtime/MarkedBlock.cpp:
(JSC::MarkedBlock::create):
2011-02-10 Peter Varga <[email protected]>
Reviewed by Csaba Osztrogonác.
Remove PCRE source from trunk
https://bugs.webkit.org/show_bug.cgi?id=54188
* Android.mk:
* Android.v8.wtf.mk:
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* JavaScriptCore.gypi:
* JavaScriptCore.order:
* JavaScriptCore.pri:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreGenerated.make:
* JavaScriptCore.vcproj/WTF/WTFCommon.vsprops:
* JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
* JavaScriptCore.xcodeproj/project.pbxproj:
* pcre/AUTHORS: Removed.
* pcre/COPYING: Removed.
* pcre/dftables: Removed.
* pcre/pcre.h: Removed.
* pcre/pcre.pri: Removed.
* pcre/pcre_compile.cpp: Removed.
* pcre/pcre_exec.cpp: Removed.
* pcre/pcre_internal.h: Removed.
* pcre/pcre_tables.cpp: Removed.
* pcre/pcre_ucp_searchfuncs.cpp: Removed.
* pcre/pcre_xclass.cpp: Removed.
* pcre/ucpinternal.h: Removed.
* pcre/ucptable.cpp: Removed.
* wscript:
2011-02-10 Patrick Gansterer <[email protected]>
Reviewed by Adam Barth.
Add randomValuesFromOS for OS(WINDOWS)
https://bugs.webkit.org/show_bug.cgi?id=54155
Use CryptGenRandom for generating cryptographically secure random numbers.
This will work on WinCE and MinGW too.
* config.h:
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Jarred Nicholls <[email protected]>
Reviewed by Adam Barth.
REGRESSION(r78149): Return value of read() shouldn't be ignored.
https://bugs.webkit.org/show_bug.cgi?id=54167
stdio read should have its return value handled. Build error in gcc 4.4.5.
* wtf/OSRandomSource.cpp:
(WTF::randomValuesFromOS):
2011-02-10 Patrick Gansterer <[email protected]>
Reviewed by Adam Barth.
Rename randomValuesFromOS to cryptographicallyRandomValuesFromOS
https://bugs.webkit.org/show_bug.cgi?id=54156
randomValuesFromOS generates random numbers of cryptographic quality.
Make this clear by adding "cryptographically" to the function name.
* wtf/CryptographicallyRandomNumber.cpp:
(WTF::ARC4Stream::ARC4RandomNumberGenerator::stir):
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
2011-02-09 Mark Rowe <[email protected]>
Reviewed by Sam Weinig.
<rdar://problem/8805364> Malloc zone enumeration code should be safe in the face of errors from the memory reader.
* wtf/FastMalloc.cpp:
(WTF::PageHeapAllocator::recordAdministrativeRegions): Use the new helper function to walk the linked list safely.
(WTF::TCMalloc_ThreadCache_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMalloc_Central_FreeList::enumerateFreeObjects): Ditto.
(WTF::TCMallocStats::PageMapFreeObjectFinder::visit): Bail out if the span could not be read.
(WTF::TCMallocStats::PageMapMemoryUsageRecorder::visit): Ditto.
* wtf/MallocZoneSupport.h:
(WTF::RemoteMemoryReader::operator()): Remove an assert that is not valid.
(WTF::RemoteMemoryReader::nextEntryInLinkedList): Add a helper function for retrieving the next entry in
a linked list. It maps a failed read of the remote memory in to a null pointer, which all callers can
handle gracefully.
2011-02-09 Gavin Barraclough <[email protected]>
Reviewed by Sam Weinig.
Bug 54164 - Optimize global_var accesses on JSVALUE64
Directly embed the pointer to d->registers, optimize out the load
from the variable object, as we do already in JSVALUE32_64.
This is a ~1.5% win on sunspidey.
* jit/JIT.cpp:
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):
2011-02-09 Geoffrey Garen <[email protected]>
Reviewed by Oliver Hunt.
A little more encapsulation for MarkedBlock: Made MarkedBlock responsible
for its own initialization and destruction
https://bugs.webkit.org/show_bug.cgi?id=54137