Get rid of HeapRootVisitor and make SlotVisitor less painful to use
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2016 02:16:19 +0000 (02:16 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2016 02:16:19 +0000 (02:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165911

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:

Previously we had two ways of adding a raw pointer to the GC's mark stack:

- SlotVisitor::appendUnbarrieredXYZ() methods
- HeapRootVisitor::visit() methods

HeapRootVisitor existed only to prevent you from calling its non-WriteBarrier<> methods
unless you had permission. But SlotVisitor would let you do it anyway, because that was
a lot more practical.

I think that we should just have one way to do it. This removes HeapRootVisitor. It
also renames appendUnbarrieredXYZ to appendUnbarriered, and it removes the use of extra
indirection (so you now pass const WriteBarrier<>& instead of WriteBarrier<>*).

* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
* JavaScriptCore.xcodeproj/project.pbxproj:
* Scripts/builtins/builtins_templates.py:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::visitOSRExitTargets):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):
* bytecode/DirectEvalCodeCache.cpp:
(JSC::DirectEvalCodeCache::visitAggregate):
* bytecode/InternalFunctionAllocationProfile.h:
(JSC::InternalFunctionAllocationProfile::visitAggregate):
* bytecode/ObjectAllocationProfile.h:
(JSC::ObjectAllocationProfile::visitAggregate):
* bytecode/PolymorphicAccess.cpp:
(JSC::AccessCase::propagateTransitions):
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::visitChildren):
* bytecode/UnlinkedFunctionExecutable.cpp:
(JSC::UnlinkedFunctionExecutable::visitChildren):
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::visitChildren):
* dfg/DFGDesiredTransitions.cpp:
(JSC::DFG::DesiredTransition::visitChildren):
* dfg/DFGDesiredWeakReferences.cpp:
(JSC::DFG::DesiredWeakReferences::visitChildren):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::visitChildren):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::markCodeBlocks):
(JSC::DFG::Plan::checkLivenessAndVisitChildren):
* heap/HandleSet.cpp:
(JSC::HandleSet::visitStrongHandles):
* heap/HandleSet.h:
* heap/HandleStack.cpp:
(JSC::HandleStack::visit):
* heap/HandleStack.h:
* heap/Heap.cpp:
(JSC::Heap::markToFixpoint):
* heap/Heap.h:
* heap/HeapRootVisitor.h: Removed.
* heap/LargeAllocation.cpp:
(JSC::LargeAllocation::visitWeakSet):
* heap/LargeAllocation.h:
* heap/MarkedBlock.h:
(JSC::MarkedBlock::Handle::visitWeakSet):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::visitWeakSets):
* heap/MarkedSpace.h:
* heap/SlotVisitor.cpp:
(JSC::SlotVisitor::appendUnbarriered):
* heap/SlotVisitor.h:
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::appendUnbarriered):
(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendHidden):
(JSC::SlotVisitor::appendValues):
(JSC::SlotVisitor::appendValuesHidden):
(JSC::SlotVisitor::appendUnbarrieredPointer): Deleted.
(JSC::SlotVisitor::appendUnbarrieredReadOnlyPointer): Deleted.
(JSC::SlotVisitor::appendUnbarrieredValue): Deleted.
(JSC::SlotVisitor::appendUnbarrieredReadOnlyValue): Deleted.
(JSC::SlotVisitor::appendUnbarrieredWeak): Deleted.
* heap/WeakBlock.cpp:
(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::visit):
* heap/WeakBlock.h:
* heap/WeakSet.h:
(JSC::WeakSet::visit):
* interpreter/ShadowChicken.cpp:
(JSC::ShadowChicken::visitChildren):
* jit/GCAwareJITStubRoutine.cpp:
(JSC::MarkingGCAwareJITStubRoutine::markRequiredObjectsInternal):
* jit/PolymorphicCallStubRoutine.cpp:
(JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):
* jsc.cpp:
(WTF::Element::visitChildren):
(WTF::ImpureGetter::visitChildren):
(WTF::SimpleObject::visitChildren):
* runtime/AbstractModuleRecord.cpp:
(JSC::AbstractModuleRecord::visitChildren):
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/ArgList.h:
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::visitChildren):
* runtime/DirectArguments.cpp:
(JSC::DirectArguments::visitChildren):
* runtime/EvalExecutable.cpp:
(JSC::EvalExecutable::visitChildren):
* runtime/Exception.cpp:
(JSC::Exception::visitChildren):
* runtime/FunctionExecutable.cpp:
(JSC::FunctionExecutable::visitChildren):
* runtime/FunctionRareData.cpp:
(JSC::FunctionRareData::visitChildren):
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildren):
* runtime/HashMapImpl.cpp:
(JSC::HashMapBucket<Data>::visitChildren):
(JSC::HashMapImpl<HashMapBucket>::visitChildren):
* runtime/InferredTypeTable.cpp:
(JSC::InferredTypeTable::visitChildren):
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::visitChildren):
* runtime/IntlCollator.cpp:
(JSC::IntlCollator::visitChildren):
* runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructor::visitChildren):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::visitChildren):
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructor::visitChildren):
* runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::visitChildren):
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructor::visitChildren):
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildren):
* runtime/JSCallee.cpp:
(JSC::JSCallee::visitChildren):
* runtime/JSCellInlines.h:
(JSC::JSCell::visitChildren):
* runtime/JSCustomGetterSetterFunction.cpp:
(JSC::JSCustomGetterSetterFunction::visitChildren):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildren):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildren):
* runtime/JSMapIterator.cpp:
(JSC::JSMapIterator::visitChildren):
* runtime/JSModuleEnvironment.cpp:
(JSC::JSModuleEnvironment::visitChildren):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::visitChildren):
* runtime/JSModuleRecord.cpp:
(JSC::JSModuleRecord::visitChildren):
* runtime/JSNativeStdFunction.cpp:
(JSC::JSNativeStdFunction::visitChildren):
* runtime/JSObject.cpp:
(JSC::JSObject::visitButterflyImpl):
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::visitChildren):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::visitChildren):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSProxy.cpp:
(JSC::JSProxy::visitChildren):
* runtime/JSScope.cpp:
(JSC::JSScope::visitChildren):
* runtime/JSSegmentedVariableObject.cpp:
(JSC::JSSegmentedVariableObject::visitChildren):
* runtime/JSSetIterator.cpp:
(JSC::JSSetIterator::visitChildren):
* runtime/JSString.cpp:
(JSC::JSRopeString::visitFibers):
* runtime/JSSymbolTableObject.cpp:
(JSC::JSSymbolTableObject::visitChildren):
* runtime/JSWeakMap.cpp:
(JSC::JSWeakMap::visitChildren):
* runtime/JSWeakSet.cpp:
(JSC::JSWeakSet::visitChildren):
* runtime/JSWithScope.cpp:
(JSC::JSWithScope::visitChildren):
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildren):
* runtime/LazyClassStructure.cpp:
(JSC::LazyClassStructure::visit):
* runtime/LazyPropertyInlines.h:
(JSC::ElementType>::visit):
* runtime/MapBase.cpp:
(JSC::MapBase<HashMapBucketType>::visitChildren):
* runtime/ModuleProgramExecutable.cpp:
(JSC::ModuleProgramExecutable::visitChildren):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildren):
* runtime/ProgramExecutable.cpp:
(JSC::ProgramExecutable::visitChildren):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::visitChildren):
* runtime/ProxyRevoke.cpp:
(JSC::ProxyRevoke::visitChildren):
* runtime/RegExpCachedResult.cpp:
(JSC::RegExpCachedResult::visitChildren):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildren):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::visitChildren):
* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::visit):
* runtime/ScopedArguments.cpp:
(JSC::ScopedArguments::visitChildren):
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::visitStrongReferences):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::visitChildren):
* runtime/Structure.cpp:
(JSC::Structure::visitChildren):
(JSC::Structure::markIfCheap):
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/StructureRareData.cpp:
(JSC::StructureRareData::visitChildren):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::visitChildren):
* runtime/TypeProfilerLog.cpp:
(JSC::TypeProfilerLog::visit):
* runtime/WeakMapData.cpp:
(JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
* wasm/js/JSWebAssemblyInstance.cpp:
(JSC::JSWebAssemblyInstance::visitChildren):
* wasm/js/JSWebAssemblyMemory.cpp:
(JSC::JSWebAssemblyMemory::visitChildren):
* wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::visitChildren):
* wasm/js/JSWebAssemblyTable.cpp:
(JSC::JSWebAssemblyTable::visitChildren):
* wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::visitChildren):
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::visitChildren):

Source/WebCore:

No new tests because no new behavior.

This updates WebCore code to new JSC API.

* bindings/js/JSDOMBinding.cpp:
(WebCore::DOMConstructorJSBuiltinObject::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMPromise.h:
(WebCore::DeferredPromise::visitAggregate):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::visitJSFunction):
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209897 268f45cc-cd09-0410-ab3c-d52691b4dbfc

119 files changed:
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/Scripts/builtins/builtins_templates.py
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-AnotherGuardedInternalBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-GuardedInternalBuiltin-Separate.js-result
Source/JavaScriptCore/Scripts/tests/builtins/expected/WebCore-xmlCasingTest-Separate.js-result
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecode/DirectEvalCodeCache.cpp
Source/JavaScriptCore/bytecode/InternalFunctionAllocationProfile.h
Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h
Source/JavaScriptCore/bytecode/PolymorphicAccess.cpp
Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp
Source/JavaScriptCore/debugger/DebuggerScope.cpp
Source/JavaScriptCore/dfg/DFGDesiredTransitions.cpp
Source/JavaScriptCore/dfg/DFGDesiredWeakReferences.cpp
Source/JavaScriptCore/dfg/DFGGraph.cpp
Source/JavaScriptCore/dfg/DFGPlan.cpp
Source/JavaScriptCore/heap/HandleSet.cpp
Source/JavaScriptCore/heap/HandleSet.h
Source/JavaScriptCore/heap/HandleStack.cpp
Source/JavaScriptCore/heap/HandleStack.h
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/HeapRootVisitor.h [deleted file]
Source/JavaScriptCore/heap/LargeAllocation.cpp
Source/JavaScriptCore/heap/LargeAllocation.h
Source/JavaScriptCore/heap/MarkedBlock.h
Source/JavaScriptCore/heap/MarkedSpace.cpp
Source/JavaScriptCore/heap/MarkedSpace.h
Source/JavaScriptCore/heap/SlotVisitor.cpp
Source/JavaScriptCore/heap/SlotVisitor.h
Source/JavaScriptCore/heap/SlotVisitorInlines.h
Source/JavaScriptCore/heap/WeakBlock.cpp
Source/JavaScriptCore/heap/WeakBlock.h
Source/JavaScriptCore/heap/WeakSet.h
Source/JavaScriptCore/interpreter/ShadowChicken.cpp
Source/JavaScriptCore/jit/GCAwareJITStubRoutine.cpp
Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/AbstractModuleRecord.cpp
Source/JavaScriptCore/runtime/ArgList.cpp
Source/JavaScriptCore/runtime/ArgList.h
Source/JavaScriptCore/runtime/ClonedArguments.cpp
Source/JavaScriptCore/runtime/DirectArguments.cpp
Source/JavaScriptCore/runtime/EvalExecutable.cpp
Source/JavaScriptCore/runtime/Exception.cpp
Source/JavaScriptCore/runtime/FunctionExecutable.cpp
Source/JavaScriptCore/runtime/FunctionRareData.cpp
Source/JavaScriptCore/runtime/GetterSetter.cpp
Source/JavaScriptCore/runtime/HashMapImpl.cpp
Source/JavaScriptCore/runtime/InferredTypeTable.cpp
Source/JavaScriptCore/runtime/InternalFunction.cpp
Source/JavaScriptCore/runtime/IntlCollator.cpp
Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp
Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp
Source/JavaScriptCore/runtime/JSBoundFunction.cpp
Source/JavaScriptCore/runtime/JSCallee.cpp
Source/JavaScriptCore/runtime/JSCellInlines.h
Source/JavaScriptCore/runtime/JSCustomGetterSetterFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSMapIterator.cpp
Source/JavaScriptCore/runtime/JSModuleEnvironment.cpp
Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp
Source/JavaScriptCore/runtime/JSModuleRecord.cpp
Source/JavaScriptCore/runtime/JSNativeStdFunction.cpp
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSPromiseDeferred.cpp
Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp
Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
Source/JavaScriptCore/runtime/JSProxy.cpp
Source/JavaScriptCore/runtime/JSScope.cpp
Source/JavaScriptCore/runtime/JSSegmentedVariableObject.cpp
Source/JavaScriptCore/runtime/JSSetIterator.cpp
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
Source/JavaScriptCore/runtime/JSWeakMap.cpp
Source/JavaScriptCore/runtime/JSWeakSet.cpp
Source/JavaScriptCore/runtime/JSWithScope.cpp
Source/JavaScriptCore/runtime/JSWrapperObject.cpp
Source/JavaScriptCore/runtime/LazyClassStructure.cpp
Source/JavaScriptCore/runtime/LazyPropertyInlines.h
Source/JavaScriptCore/runtime/MapBase.cpp
Source/JavaScriptCore/runtime/ModuleProgramExecutable.cpp
Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
Source/JavaScriptCore/runtime/ProgramExecutable.cpp
Source/JavaScriptCore/runtime/ProxyObject.cpp
Source/JavaScriptCore/runtime/ProxyRevoke.cpp
Source/JavaScriptCore/runtime/RegExpCachedResult.cpp
Source/JavaScriptCore/runtime/RegExpObject.cpp
Source/JavaScriptCore/runtime/RegExpPrototype.cpp
Source/JavaScriptCore/runtime/SamplingProfiler.cpp
Source/JavaScriptCore/runtime/ScopedArguments.cpp
Source/JavaScriptCore/runtime/SmallStrings.cpp
Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp
Source/JavaScriptCore/runtime/Structure.cpp
Source/JavaScriptCore/runtime/StructureChain.cpp
Source/JavaScriptCore/runtime/StructureRareData.cpp
Source/JavaScriptCore/runtime/SymbolTable.cpp
Source/JavaScriptCore/runtime/TypeProfilerLog.cpp
Source/JavaScriptCore/runtime/WeakMapData.cpp
Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp
Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.cpp
Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.cpp
Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
Source/WebCore/bindings/js/JSDOMPromise.h
Source/WebCore/bindings/js/JSEventListener.cpp
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

index 8b47446..f615ce9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
  * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -108,7 +108,7 @@ public:
             LockHolder locker(m_lock);
             for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
                 if (ptr->value)
-                    visitor.append(&ptr->value);
+                    visitor.append(ptr->value);
             }
         }
 
index b2b41a6..537205e 100644 (file)
@@ -1,3 +1,250 @@
+2016-12-15  Filip Pizlo  <fpizlo@apple.com>
+
+        Get rid of HeapRootVisitor and make SlotVisitor less painful to use
+        https://bugs.webkit.org/show_bug.cgi?id=165911
+
+        Reviewed by Geoffrey Garen.
+        
+        Previously we had two ways of adding a raw pointer to the GC's mark stack:
+        
+        - SlotVisitor::appendUnbarrieredXYZ() methods
+        - HeapRootVisitor::visit() methods
+        
+        HeapRootVisitor existed only to prevent you from calling its non-WriteBarrier<> methods
+        unless you had permission. But SlotVisitor would let you do it anyway, because that was
+        a lot more practical.
+        
+        I think that we should just have one way to do it. This removes HeapRootVisitor. It
+        also renames appendUnbarrieredXYZ to appendUnbarriered, and it removes the use of extra
+        indirection (so you now pass const WriteBarrier<>& instead of WriteBarrier<>*).
+
+        * API/JSCallbackObject.h:
+        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
+        * JavaScriptCore.xcodeproj/project.pbxproj:
+        * Scripts/builtins/builtins_templates.py:
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::visitWeakly):
+        (JSC::CodeBlock::visitChildren):
+        (JSC::CodeBlock::propagateTransitions):
+        (JSC::CodeBlock::determineLiveness):
+        (JSC::CodeBlock::visitOSRExitTargets):
+        (JSC::CodeBlock::stronglyVisitStrongReferences):
+        (JSC::CodeBlock::stronglyVisitWeakReferences):
+        * bytecode/DirectEvalCodeCache.cpp:
+        (JSC::DirectEvalCodeCache::visitAggregate):
+        * bytecode/InternalFunctionAllocationProfile.h:
+        (JSC::InternalFunctionAllocationProfile::visitAggregate):
+        * bytecode/ObjectAllocationProfile.h:
+        (JSC::ObjectAllocationProfile::visitAggregate):
+        * bytecode/PolymorphicAccess.cpp:
+        (JSC::AccessCase::propagateTransitions):
+        * bytecode/UnlinkedCodeBlock.cpp:
+        (JSC::UnlinkedCodeBlock::visitChildren):
+        * bytecode/UnlinkedFunctionExecutable.cpp:
+        (JSC::UnlinkedFunctionExecutable::visitChildren):
+        * debugger/DebuggerScope.cpp:
+        (JSC::DebuggerScope::visitChildren):
+        * dfg/DFGDesiredTransitions.cpp:
+        (JSC::DFG::DesiredTransition::visitChildren):
+        * dfg/DFGDesiredWeakReferences.cpp:
+        (JSC::DFG::DesiredWeakReferences::visitChildren):
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::visitChildren):
+        * dfg/DFGPlan.cpp:
+        (JSC::DFG::Plan::markCodeBlocks):
+        (JSC::DFG::Plan::checkLivenessAndVisitChildren):
+        * heap/HandleSet.cpp:
+        (JSC::HandleSet::visitStrongHandles):
+        * heap/HandleSet.h:
+        * heap/HandleStack.cpp:
+        (JSC::HandleStack::visit):
+        * heap/HandleStack.h:
+        * heap/Heap.cpp:
+        (JSC::Heap::markToFixpoint):
+        * heap/Heap.h:
+        * heap/HeapRootVisitor.h: Removed.
+        * heap/LargeAllocation.cpp:
+        (JSC::LargeAllocation::visitWeakSet):
+        * heap/LargeAllocation.h:
+        * heap/MarkedBlock.h:
+        (JSC::MarkedBlock::Handle::visitWeakSet):
+        * heap/MarkedSpace.cpp:
+        (JSC::MarkedSpace::visitWeakSets):
+        * heap/MarkedSpace.h:
+        * heap/SlotVisitor.cpp:
+        (JSC::SlotVisitor::appendUnbarriered):
+        * heap/SlotVisitor.h:
+        * heap/SlotVisitorInlines.h:
+        (JSC::SlotVisitor::appendUnbarriered):
+        (JSC::SlotVisitor::append):
+        (JSC::SlotVisitor::appendHidden):
+        (JSC::SlotVisitor::appendValues):
+        (JSC::SlotVisitor::appendValuesHidden):
+        (JSC::SlotVisitor::appendUnbarrieredPointer): Deleted.
+        (JSC::SlotVisitor::appendUnbarrieredReadOnlyPointer): Deleted.
+        (JSC::SlotVisitor::appendUnbarrieredValue): Deleted.
+        (JSC::SlotVisitor::appendUnbarrieredReadOnlyValue): Deleted.
+        (JSC::SlotVisitor::appendUnbarrieredWeak): Deleted.
+        * heap/WeakBlock.cpp:
+        (JSC::WeakBlock::specializedVisit):
+        (JSC::WeakBlock::visit):
+        * heap/WeakBlock.h:
+        * heap/WeakSet.h:
+        (JSC::WeakSet::visit):
+        * interpreter/ShadowChicken.cpp:
+        (JSC::ShadowChicken::visitChildren):
+        * jit/GCAwareJITStubRoutine.cpp:
+        (JSC::MarkingGCAwareJITStubRoutine::markRequiredObjectsInternal):
+        * jit/PolymorphicCallStubRoutine.cpp:
+        (JSC::PolymorphicCallStubRoutine::markRequiredObjectsInternal):
+        * jsc.cpp:
+        (WTF::Element::visitChildren):
+        (WTF::ImpureGetter::visitChildren):
+        (WTF::SimpleObject::visitChildren):
+        * runtime/AbstractModuleRecord.cpp:
+        (JSC::AbstractModuleRecord::visitChildren):
+        * runtime/ArgList.cpp:
+        (JSC::MarkedArgumentBuffer::markLists):
+        * runtime/ArgList.h:
+        * runtime/ClonedArguments.cpp:
+        (JSC::ClonedArguments::visitChildren):
+        * runtime/DirectArguments.cpp:
+        (JSC::DirectArguments::visitChildren):
+        * runtime/EvalExecutable.cpp:
+        (JSC::EvalExecutable::visitChildren):
+        * runtime/Exception.cpp:
+        (JSC::Exception::visitChildren):
+        * runtime/FunctionExecutable.cpp:
+        (JSC::FunctionExecutable::visitChildren):
+        * runtime/FunctionRareData.cpp:
+        (JSC::FunctionRareData::visitChildren):
+        * runtime/GetterSetter.cpp:
+        (JSC::GetterSetter::visitChildren):
+        * runtime/HashMapImpl.cpp:
+        (JSC::HashMapBucket<Data>::visitChildren):
+        (JSC::HashMapImpl<HashMapBucket>::visitChildren):
+        * runtime/InferredTypeTable.cpp:
+        (JSC::InferredTypeTable::visitChildren):
+        * runtime/InternalFunction.cpp:
+        (JSC::InternalFunction::visitChildren):
+        * runtime/IntlCollator.cpp:
+        (JSC::IntlCollator::visitChildren):
+        * runtime/IntlCollatorConstructor.cpp:
+        (JSC::IntlCollatorConstructor::visitChildren):
+        * runtime/IntlDateTimeFormat.cpp:
+        (JSC::IntlDateTimeFormat::visitChildren):
+        * runtime/IntlDateTimeFormatConstructor.cpp:
+        (JSC::IntlDateTimeFormatConstructor::visitChildren):
+        * runtime/IntlNumberFormat.cpp:
+        (JSC::IntlNumberFormat::visitChildren):
+        * runtime/IntlNumberFormatConstructor.cpp:
+        (JSC::IntlNumberFormatConstructor::visitChildren):
+        * runtime/JSBoundFunction.cpp:
+        (JSC::JSBoundFunction::visitChildren):
+        * runtime/JSCallee.cpp:
+        (JSC::JSCallee::visitChildren):
+        * runtime/JSCellInlines.h:
+        (JSC::JSCell::visitChildren):
+        * runtime/JSCustomGetterSetterFunction.cpp:
+        (JSC::JSCustomGetterSetterFunction::visitChildren):
+        * runtime/JSFunction.cpp:
+        (JSC::JSFunction::visitChildren):
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSMapIterator.cpp:
+        (JSC::JSMapIterator::visitChildren):
+        * runtime/JSModuleEnvironment.cpp:
+        (JSC::JSModuleEnvironment::visitChildren):
+        * runtime/JSModuleNamespaceObject.cpp:
+        (JSC::JSModuleNamespaceObject::visitChildren):
+        * runtime/JSModuleRecord.cpp:
+        (JSC::JSModuleRecord::visitChildren):
+        * runtime/JSNativeStdFunction.cpp:
+        (JSC::JSNativeStdFunction::visitChildren):
+        * runtime/JSObject.cpp:
+        (JSC::JSObject::visitButterflyImpl):
+        * runtime/JSPromiseDeferred.cpp:
+        (JSC::JSPromiseDeferred::visitChildren):
+        * runtime/JSPropertyNameEnumerator.cpp:
+        (JSC::JSPropertyNameEnumerator::visitChildren):
+        * runtime/JSPropertyNameIterator.cpp:
+        (JSC::JSPropertyNameIterator::visitChildren):
+        * runtime/JSProxy.cpp:
+        (JSC::JSProxy::visitChildren):
+        * runtime/JSScope.cpp:
+        (JSC::JSScope::visitChildren):
+        * runtime/JSSegmentedVariableObject.cpp:
+        (JSC::JSSegmentedVariableObject::visitChildren):
+        * runtime/JSSetIterator.cpp:
+        (JSC::JSSetIterator::visitChildren):
+        * runtime/JSString.cpp:
+        (JSC::JSRopeString::visitFibers):
+        * runtime/JSSymbolTableObject.cpp:
+        (JSC::JSSymbolTableObject::visitChildren):
+        * runtime/JSWeakMap.cpp:
+        (JSC::JSWeakMap::visitChildren):
+        * runtime/JSWeakSet.cpp:
+        (JSC::JSWeakSet::visitChildren):
+        * runtime/JSWithScope.cpp:
+        (JSC::JSWithScope::visitChildren):
+        * runtime/JSWrapperObject.cpp:
+        (JSC::JSWrapperObject::visitChildren):
+        * runtime/LazyClassStructure.cpp:
+        (JSC::LazyClassStructure::visit):
+        * runtime/LazyPropertyInlines.h:
+        (JSC::ElementType>::visit):
+        * runtime/MapBase.cpp:
+        (JSC::MapBase<HashMapBucketType>::visitChildren):
+        * runtime/ModuleProgramExecutable.cpp:
+        (JSC::ModuleProgramExecutable::visitChildren):
+        * runtime/NativeErrorConstructor.cpp:
+        (JSC::NativeErrorConstructor::visitChildren):
+        * runtime/ProgramExecutable.cpp:
+        (JSC::ProgramExecutable::visitChildren):
+        * runtime/ProxyObject.cpp:
+        (JSC::ProxyObject::visitChildren):
+        * runtime/ProxyRevoke.cpp:
+        (JSC::ProxyRevoke::visitChildren):
+        * runtime/RegExpCachedResult.cpp:
+        (JSC::RegExpCachedResult::visitChildren):
+        * runtime/RegExpObject.cpp:
+        (JSC::RegExpObject::visitChildren):
+        * runtime/RegExpPrototype.cpp:
+        (JSC::RegExpPrototype::visitChildren):
+        * runtime/SamplingProfiler.cpp:
+        (JSC::SamplingProfiler::visit):
+        * runtime/ScopedArguments.cpp:
+        (JSC::ScopedArguments::visitChildren):
+        * runtime/SmallStrings.cpp:
+        (JSC::SmallStrings::visitStrongReferences):
+        * runtime/SparseArrayValueMap.cpp:
+        (JSC::SparseArrayValueMap::visitChildren):
+        * runtime/Structure.cpp:
+        (JSC::Structure::visitChildren):
+        (JSC::Structure::markIfCheap):
+        * runtime/StructureChain.cpp:
+        (JSC::StructureChain::visitChildren):
+        * runtime/StructureRareData.cpp:
+        (JSC::StructureRareData::visitChildren):
+        * runtime/SymbolTable.cpp:
+        (JSC::SymbolTable::visitChildren):
+        * runtime/TypeProfilerLog.cpp:
+        (JSC::TypeProfilerLog::visit):
+        * runtime/WeakMapData.cpp:
+        (JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
+        * wasm/js/JSWebAssemblyInstance.cpp:
+        (JSC::JSWebAssemblyInstance::visitChildren):
+        * wasm/js/JSWebAssemblyMemory.cpp:
+        (JSC::JSWebAssemblyMemory::visitChildren):
+        * wasm/js/JSWebAssemblyModule.cpp:
+        (JSC::JSWebAssemblyModule::visitChildren):
+        * wasm/js/JSWebAssemblyTable.cpp:
+        (JSC::JSWebAssemblyTable::visitChildren):
+        * wasm/js/WebAssemblyFunction.cpp:
+        (JSC::WebAssemblyFunction::visitChildren):
+        * wasm/js/WebAssemblyModuleRecord.cpp:
+        (JSC::WebAssemblyModuleRecord::visitChildren):
+
 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Sort Xcode project files
index 254c638..2d92577 100644 (file)
                14E9D17B107EC469004DDA21 /* JSGlobalObjectFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */; };
                14F7256514EE265E00B1652B /* WeakHandleOwner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14F7256314EE265E00B1652B /* WeakHandleOwner.cpp */; };
                14F7256614EE265E00B1652B /* WeakHandleOwner.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F7256414EE265E00B1652B /* WeakHandleOwner.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 14F97446138C853E00DA1C67 /* HeapRootVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A28D4A8177B71C80007FA3C /* JSStringRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
                1A8826B1653C4CD1A642983B /* TemplateRegistryKeyTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B47F234366C4B72AC852A7E /* TemplateRegistryKeyTable.cpp */; };
                1ACF7377171CA6FB00C9BB1E /* Weak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACF7376171CA6FB00C9BB1E /* Weak.cpp */; };
                14F252560D08DD8D004ECFFF /* JSEnvironmentRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSEnvironmentRecord.h; sourceTree = "<group>"; };
                14F7256314EE265E00B1652B /* WeakHandleOwner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakHandleOwner.cpp; sourceTree = "<group>"; };
                14F7256414EE265E00B1652B /* WeakHandleOwner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakHandleOwner.h; sourceTree = "<group>"; };
-               14F97446138C853E00DA1C67 /* HeapRootVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapRootVisitor.h; sourceTree = "<group>"; };
                169948EDE68D4054B01EF797 /* DefinePropertyAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefinePropertyAttributes.h; sourceTree = "<group>"; };
                1879510614C540FFB561C124 /* JSModuleLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSModuleLoader.cpp; sourceTree = "<group>"; };
                1A28D4A7177B71C80007FA3C /* JSStringRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStringRefPrivate.h; sourceTree = "<group>"; };
                                A5339EC81BB4B4510054F005 /* HeapObserver.h */,
                                A5398FA91C750D950060A963 /* HeapProfiler.cpp */,
                                A5398FAA1C750D950060A963 /* HeapProfiler.h */,
-                               14F97446138C853E00DA1C67 /* HeapRootVisitor.h */,
                                A54C2AAE1C6544D100A18D78 /* HeapSnapshot.cpp */,
                                A54C2AAF1C6544D100A18D78 /* HeapSnapshot.h */,
                                A5311C341C77CEAC00E6B1B6 /* HeapSnapshotBuilder.cpp */,
                                2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */,
                                A5339EC91BB4B4600054F005 /* HeapObserver.h in Headers */,
                                A5398FAB1C750DA40060A963 /* HeapProfiler.h in Headers */,
-                               14F97447138C853E00DA1C67 /* HeapRootVisitor.h in Headers */,
                                A54C2AB11C6544F200A18D78 /* HeapSnapshot.h in Headers */,
                                A5311C361C77CEC500E6B1B6 /* HeapSnapshotBuilder.h in Headers */,
                                C24D31E3161CD695002AA4DB /* HeapStatistics.h in Headers */,
index 5e3ee82..7d5a04d 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright (c) 2014, 2015 Apple Inc. All rights reserved.
+# Copyright (c) 2014-2016 Apple Inc. All rights reserved.
 # Copyright (C) 2015 Canon Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -205,7 +205,7 @@ inline void ${objectName}BuiltinFunctions::init(JSC::JSGlobalObject& globalObjec
 
 inline void ${objectName}BuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 {
-#define VISIT_FUNCTION(name) visitor.append(&m_##name##Function);
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
     ${macroPrefix}_FOREACH_${objectMacro}_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
 #undef VISIT_FUNCTION
 }
index ad530b2..9eae1be 100644 (file)
@@ -142,7 +142,7 @@ inline void AnotherGuardedInternalBuiltinBuiltinFunctions::init(JSC::JSGlobalObj
 
 inline void AnotherGuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 {
-#define VISIT_FUNCTION(name) visitor.append(&m_##name##Function);
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
     WEBCORE_FOREACH_ANOTHERGUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
 #undef VISIT_FUNCTION
 }
index 039ccc1..7bc645a 100644 (file)
@@ -143,7 +143,7 @@ inline void GuardedInternalBuiltinBuiltinFunctions::init(JSC::JSGlobalObject& gl
 
 inline void GuardedInternalBuiltinBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 {
-#define VISIT_FUNCTION(name) visitor.append(&m_##name##Function);
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
     WEBCORE_FOREACH_GUARDEDINTERNALBUILTIN_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
 #undef VISIT_FUNCTION
 }
index d21626d..4af18ac 100644 (file)
@@ -157,7 +157,7 @@ inline void xmlCasingTestBuiltinFunctions::init(JSC::JSGlobalObject& globalObjec
 
 inline void xmlCasingTestBuiltinFunctions::visit(JSC::SlotVisitor& visitor)
 {
-#define VISIT_FUNCTION(name) visitor.append(&m_##name##Function);
+#define VISIT_FUNCTION(name) visitor.append(m_##name##Function);
     WEBCORE_FOREACH_XMLCASINGTEST_BUILTIN_FUNCTION_NAME(VISIT_FUNCTION)
 #undef VISIT_FUNCTION
 }
index 790dea5..75a00ed 100644 (file)
@@ -2461,7 +2461,7 @@ void CodeBlock::visitWeakly(SlotVisitor& visitor)
         return;
 
     if (shouldVisitStrongly(locker)) {
-        visitor.appendUnbarrieredReadOnlyPointer(this);
+        visitor.appendUnbarriered(this);
         return;
     }
     
@@ -2476,7 +2476,7 @@ void CodeBlock::visitWeakly(SlotVisitor& visitor)
 
     // If we jettison ourselves we'll install our alternative, so make sure that it
     // survives GC even if we don't.
-    visitor.append(&m_alternative);
+    visitor.append(m_alternative);
     
     // There are two things that we use weak reference harvesters for: DFG fixpoint for
     // jettisoning, and trying to find structures that would be live based on some
@@ -2528,7 +2528,7 @@ void CodeBlock::visitChildren(SlotVisitor& visitor)
     visitor.addUnconditionalFinalizer(&m_unconditionalFinalizer);
 
     if (CodeBlock* otherBlock = specialOSREntryBlockOrNull())
-        visitor.appendUnbarrieredReadOnlyPointer(otherBlock);
+        visitor.appendUnbarriered(otherBlock);
 
     if (m_jitCode)
         visitor.reportExtraMemoryVisited(m_jitCode->size());
@@ -2654,7 +2654,7 @@ void CodeBlock::propagateTransitions(const ConcurrentJSLocker&, SlotVisitor& vis
                 Structure* newStructure =
                     m_vm->heap.structureIDTable().get(newStructureID);
                 if (Heap::isMarkedConcurrently(oldStructure))
-                    visitor.appendUnbarrieredReadOnlyPointer(newStructure);
+                    visitor.appendUnbarriered(newStructure);
                 else
                     allAreMarkedSoFar = false;
                 break;
@@ -2699,7 +2699,7 @@ void CodeBlock::propagateTransitions(const ConcurrentJSLocker&, SlotVisitor& vis
                 // to mark (i.e. its global object and prototype are both already
                 // live).
                 
-                visitor.append(&dfgCommon->transitions[i].m_to);
+                visitor.append(dfgCommon->transitions[i].m_to);
             } else
                 allAreMarkedSoFar = false;
         }
@@ -2747,7 +2747,7 @@ void CodeBlock::determineLiveness(const ConcurrentJSLocker&, SlotVisitor& visito
     // All weak references are live. Record this information so we don't
     // come back here again, and scan the strong references.
     dfgCommon->livenessHasBeenProved = true;
-    visitor.appendUnbarrieredReadOnlyPointer(this);
+    visitor.appendUnbarriered(this);
 #endif // ENABLE(DFG_JIT)
 }
 
@@ -3045,14 +3045,14 @@ void CodeBlock::visitOSRExitTargets(const ConcurrentJSLocker&, SlotVisitor& visi
     // guaranteeing that it matches the details of the CodeBlock we compiled
     // the OSR exit against.
 
-    visitor.append(&m_alternative);
+    visitor.append(m_alternative);
 
 #if ENABLE(DFG_JIT)
     DFG::CommonData* dfgCommon = m_jitCode->dfgCommon();
     if (dfgCommon->inlineCallFrames) {
         for (auto* inlineCallFrame : *dfgCommon->inlineCallFrames) {
             ASSERT(inlineCallFrame->baselineCodeBlock);
-            visitor.append(&inlineCallFrame->baselineCodeBlock);
+            visitor.append(inlineCallFrame->baselineCodeBlock);
         }
     }
 #endif
@@ -3062,22 +3062,22 @@ void CodeBlock::stronglyVisitStrongReferences(const ConcurrentJSLocker& locker,
 {
     UNUSED_PARAM(locker);
     
-    visitor.append(&m_globalObject);
-    visitor.append(&m_ownerExecutable);
-    visitor.append(&m_unlinkedCode);
+    visitor.append(m_globalObject);
+    visitor.append(m_ownerExecutable);
+    visitor.append(m_unlinkedCode);
     if (m_rareData)
         m_rareData->m_directEvalCodeCache.visitAggregate(visitor);
     visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
     for (size_t i = 0; i < m_functionExprs.size(); ++i)
-        visitor.append(&m_functionExprs[i]);
+        visitor.append(m_functionExprs[i]);
     for (size_t i = 0; i < m_functionDecls.size(); ++i)
-        visitor.append(&m_functionDecls[i]);
+        visitor.append(m_functionDecls[i]);
     for (unsigned i = 0; i < m_objectAllocationProfiles.size(); ++i)
         m_objectAllocationProfiles[i].visitAggregate(visitor);
 
 #if ENABLE(JIT)
     for (ByValInfo* byValInfo : m_byValInfos)
-        visitor.append(&byValInfo->cachedSymbol);
+        visitor.append(byValInfo->cachedSymbol);
 #endif
 
 #if ENABLE(DFG_JIT)
@@ -3098,16 +3098,16 @@ void CodeBlock::stronglyVisitWeakReferences(const ConcurrentJSLocker&, SlotVisit
 
     for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) {
         if (!!dfgCommon->transitions[i].m_codeOrigin)
-            visitor.append(&dfgCommon->transitions[i].m_codeOrigin); // Almost certainly not necessary, since the code origin should also be a weak reference. Better to be safe, though.
-        visitor.append(&dfgCommon->transitions[i].m_from);
-        visitor.append(&dfgCommon->transitions[i].m_to);
+            visitor.append(dfgCommon->transitions[i].m_codeOrigin); // Almost certainly not necessary, since the code origin should also be a weak reference. Better to be safe, though.
+        visitor.append(dfgCommon->transitions[i].m_from);
+        visitor.append(dfgCommon->transitions[i].m_to);
     }
     
     for (unsigned i = 0; i < dfgCommon->weakReferences.size(); ++i)
-        visitor.append(&dfgCommon->weakReferences[i]);
+        visitor.append(dfgCommon->weakReferences[i]);
 
     for (unsigned i = 0; i < dfgCommon->weakStructureReferences.size(); ++i)
-        visitor.append(&dfgCommon->weakStructureReferences[i]);
+        visitor.append(dfgCommon->weakStructureReferences[i]);
 
     dfgCommon->livenessHasBeenProved = true;
 #endif    
index 609daff..5bfef12 100644 (file)
@@ -47,7 +47,7 @@ void DirectEvalCodeCache::visitAggregate(SlotVisitor& visitor)
     LockHolder locker(m_lock);
     EvalCacheMap::iterator end = m_cacheMap.end();
     for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr)
-        visitor.append(&ptr->value);
+        visitor.append(ptr->value);
 }
 
 } // namespace JSC
index 4c7c349..2181b81 100644 (file)
@@ -38,7 +38,7 @@ public:
     Structure* createAllocationStructureFromBase(VM&, JSCell* owner, JSObject* prototype, Structure* base);
 
     void clear() { m_structure.clear(); }
-    void visitAggregate(SlotVisitor& visitor) { visitor.append(&m_structure); }
+    void visitAggregate(SlotVisitor& visitor) { visitor.append(m_structure); }
 
 private:
     WriteBarrier<Structure> m_structure;
index 269d423..843c9ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -121,7 +121,7 @@ public:
 
     void visitAggregate(SlotVisitor& visitor)
     {
-        visitor.append(&m_structure);
+        visitor.append(m_structure);
     }
 
 private:
index e6c7427..134c3d4 100644 (file)
@@ -575,7 +575,7 @@ bool AccessCase::propagateTransitions(SlotVisitor& visitor) const
     switch (m_type) {
     case Transition:
         if (Heap::isMarkedConcurrently(m_structure->previousID()))
-            visitor.appendUnbarrieredReadOnlyPointer(m_structure.get());
+            visitor.appendUnbarriered(m_structure.get());
         else
             result = false;
         break;
index 912aad1..53defbf 100644 (file)
@@ -94,15 +94,15 @@ void UnlinkedCodeBlock::visitChildren(JSCell* cell, SlotVisitor& visitor)
     Base::visitChildren(thisObject, visitor);
     auto locker = holdLock(*thisObject);
     for (FunctionExpressionVector::iterator ptr = thisObject->m_functionDecls.begin(), end = thisObject->m_functionDecls.end(); ptr != end; ++ptr)
-        visitor.append(ptr);
+        visitor.append(*ptr);
     for (FunctionExpressionVector::iterator ptr = thisObject->m_functionExprs.begin(), end = thisObject->m_functionExprs.end(); ptr != end; ++ptr)
-        visitor.append(ptr);
+        visitor.append(*ptr);
     visitor.appendValues(thisObject->m_constantRegisters.data(), thisObject->m_constantRegisters.size());
     if (thisObject->m_unlinkedInstructions)
         visitor.reportExtraMemoryVisited(thisObject->m_unlinkedInstructions->sizeInBytes());
     if (thisObject->m_rareData) {
         for (size_t i = 0, end = thisObject->m_rareData->m_regexps.size(); i != end; i++)
-            visitor.append(&thisObject->m_rareData->m_regexps[i]);
+            visitor.append(thisObject->m_rareData->m_regexps[i]);
     }
 }
 
index 94d71c8..c11ab95 100644 (file)
@@ -127,8 +127,8 @@ void UnlinkedFunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visito
     UnlinkedFunctionExecutable* thisObject = jsCast<UnlinkedFunctionExecutable*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_unlinkedCodeBlockForCall);
-    visitor.append(&thisObject->m_unlinkedCodeBlockForConstruct);
+    visitor.append(thisObject->m_unlinkedCodeBlockForCall);
+    visitor.append(thisObject->m_unlinkedCodeBlockForConstruct);
 }
 
 FunctionExecutable* UnlinkedFunctionExecutable::link(VM& vm, const SourceCode& passedParentSource, std::optional<int> overrideLineNumber, Intrinsic intrinsic)
index 3106fbb..49cfce6 100644 (file)
@@ -61,8 +61,8 @@ void DebuggerScope::visitChildren(JSCell* cell, SlotVisitor& visitor)
     DebuggerScope* thisObject = jsCast<DebuggerScope*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     JSObject::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_scope);
-    visitor.append(&thisObject->m_next);
+    visitor.append(thisObject->m_scope);
+    visitor.append(thisObject->m_next);
 }
 
 String DebuggerScope::className(const JSObject* object)
index e273ae8..4b82b03 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -53,9 +53,9 @@ void DesiredTransition::reallyAdd(VM& vm, CommonData* common)
 
 void DesiredTransition::visitChildren(SlotVisitor& visitor)
 {
-    visitor.appendUnbarrieredPointer(&m_codeOriginOwner);
-    visitor.appendUnbarrieredPointer(&m_oldStructure);
-    visitor.appendUnbarrieredPointer(&m_newStructure);
+    visitor.appendUnbarriered(m_codeOriginOwner);
+    visitor.appendUnbarriered(m_oldStructure);
+    visitor.appendUnbarriered(m_newStructure);
 }
 
 DesiredTransitions::DesiredTransitions()
index 1af13ef..21306ac 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -81,7 +81,7 @@ void DesiredWeakReferences::reallyAdd(VM& vm, CommonData* common)
 void DesiredWeakReferences::visitChildren(SlotVisitor& visitor)
 {
     for (JSCell* target : m_references)
-        visitor.appendUnbarrieredPointer(&target);
+        visitor.appendUnbarriered(target);
 }
 
 } } // namespace JSC::DFG
index f9f8e4c..ec4b20a 100644 (file)
@@ -1410,8 +1410,8 @@ void Graph::registerFrozenValues()
 void Graph::visitChildren(SlotVisitor& visitor)
 {
     for (FrozenValue* value : m_frozenValues) {
-        visitor.appendUnbarrieredReadOnlyValue(value->value());
-        visitor.appendUnbarrieredReadOnlyPointer(value->structure());
+        visitor.appendUnbarriered(value->value());
+        visitor.appendUnbarriered(value->structure());
     }
     
     for (BlockIndex blockIndex = numBlocks(); blockIndex--;) {
@@ -1425,28 +1425,26 @@ void Graph::visitChildren(SlotVisitor& visitor)
             switch (node->op()) {
             case CheckStructure:
                 for (unsigned i = node->structureSet().size(); i--;)
-                    visitor.appendUnbarrieredReadOnlyPointer(node->structureSet()[i]);
+                    visitor.appendUnbarriered(node->structureSet()[i]);
                 break;
                 
             case NewObject:
             case ArrayifyToStructure:
             case NewStringObject:
-                visitor.appendUnbarrieredReadOnlyPointer(node->structure());
+                visitor.appendUnbarriered(node->structure());
                 break;
                 
             case PutStructure:
             case AllocatePropertyStorage:
             case ReallocatePropertyStorage:
-                visitor.appendUnbarrieredReadOnlyPointer(
-                    node->transition()->previous);
-                visitor.appendUnbarrieredReadOnlyPointer(
-                    node->transition()->next);
+                visitor.appendUnbarriered(node->transition()->previous);
+                visitor.appendUnbarriered(node->transition()->next);
                 break;
                 
             case MultiGetByOffset:
                 for (const MultiGetByOffsetCase& getCase : node->multiGetByOffsetData().cases) {
                     for (Structure* structure : getCase.set())
-                        visitor.appendUnbarrieredReadOnlyPointer(structure);
+                        visitor.appendUnbarriered(structure);
                 }
                 break;
                     
@@ -1455,9 +1453,9 @@ void Graph::visitChildren(SlotVisitor& visitor)
                     PutByIdVariant& variant = node->multiPutByOffsetData().variants[i];
                     const StructureSet& set = variant.oldStructure();
                     for (unsigned j = set.size(); j--;)
-                        visitor.appendUnbarrieredReadOnlyPointer(set[j]);
+                        visitor.appendUnbarriered(set[j]);
                     if (variant.kind() == PutByIdVariant::Transition)
-                        visitor.appendUnbarrieredReadOnlyPointer(variant.newStructure());
+                        visitor.appendUnbarriered(variant.newStructure());
                 }
                 break;
                 
index c0c9479..35f3130 100644 (file)
@@ -619,10 +619,10 @@ void Plan::markCodeBlocks(SlotVisitor& slotVisitor)
     // an explicit barrier. So, we need to be pessimistic and assume that
     // all our CodeBlocks must be visited during GC.
 
-    slotVisitor.appendUnbarrieredReadOnlyPointer(codeBlock);
-    slotVisitor.appendUnbarrieredReadOnlyPointer(codeBlock->alternative());
+    slotVisitor.appendUnbarriered(codeBlock);
+    slotVisitor.appendUnbarriered(codeBlock->alternative());
     if (profiledDFGCodeBlock)
-        slotVisitor.appendUnbarrieredReadOnlyPointer(profiledDFGCodeBlock);
+        slotVisitor.appendUnbarriered(profiledDFGCodeBlock);
 }
 
 void Plan::rememberCodeBlocks(VM& vm)
@@ -647,16 +647,16 @@ void Plan::checkLivenessAndVisitChildren(SlotVisitor& visitor)
 
     cleanMustHandleValuesIfNecessary();
     for (unsigned i = mustHandleValues.size(); i--;)
-        visitor.appendUnbarrieredValue(&mustHandleValues[i]);
+        visitor.appendUnbarriered(mustHandleValues[i]);
 
-    visitor.appendUnbarrieredReadOnlyPointer(codeBlock);
-    visitor.appendUnbarrieredReadOnlyPointer(codeBlock->alternative());
-    visitor.appendUnbarrieredReadOnlyPointer(profiledDFGCodeBlock);
+    visitor.appendUnbarriered(codeBlock);
+    visitor.appendUnbarriered(codeBlock->alternative());
+    visitor.appendUnbarriered(profiledDFGCodeBlock);
 
     if (inlineCallFrames) {
         for (auto* inlineCallFrame : *inlineCallFrames) {
             ASSERT(inlineCallFrame->baselineCodeBlock.get());
-            visitor.appendUnbarrieredReadOnlyPointer(inlineCallFrame->baselineCodeBlock.get());
+            visitor.appendUnbarriered(inlineCallFrame->baselineCodeBlock.get());
         }
     }
 
index dec8370..9d7d5c6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,7 +28,6 @@
 
 #include "HandleBlock.h"
 #include "HandleBlockInlines.h"
-#include "HeapRootVisitor.h"
 #include "JSObject.h"
 #include "JSCInlines.h"
 #include <wtf/DataLog.h>
@@ -59,14 +58,14 @@ void HandleSet::grow()
     }
 }
 
-void HandleSet::visitStrongHandles(HeapRootVisitor& heapRootVisitor)
+void HandleSet::visitStrongHandles(SlotVisitor& visitor)
 {
     Node* end = m_strongList.end();
     for (Node* node = m_strongList.begin(); node != end; node = node->next()) {
 #if ENABLE(GC_VALIDATION)
         RELEASE_ASSERT(isLiveNode(node));
 #endif
-        heapRootVisitor.visit(node->slot());
+        visitor.appendUnbarriered(*node->slot());
     }
 }
 
index 6e5d7f6..458daeb 100644 (file)
@@ -36,9 +36,9 @@
 namespace JSC {
 
 class HandleSet;
-class HeapRootVisitor;
 class VM;
 class JSValue;
+class SlotVisitor;
 
 class HandleNode {
 public:
@@ -73,7 +73,7 @@ public:
     HandleSlot allocate();
     void deallocate(HandleSlot);
 
-    void visitStrongHandles(HeapRootVisitor&);
+    void visitStrongHandles(SlotVisitor&);
 
     JS_EXPORT_PRIVATE void writeBarrier(HandleSlot, const JSValue&);
 
index 178bbcc..30c0d1f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "HandleStack.h"
 
-#include "HeapRootVisitor.h"
 #include "JSObject.h"
 #include "JSCInlines.h"
 
@@ -40,7 +39,7 @@ HandleStack::HandleStack()
     grow();
 }
 
-void HandleStack::visit(HeapRootVisitor& heapRootVisitor)
+void HandleStack::visit(SlotVisitor& visitor)
 {
     const Vector<HandleSlot>& blocks = m_blockStack.blocks();
     size_t blockLength = m_blockStack.blockLength;
@@ -48,10 +47,10 @@ void HandleStack::visit(HeapRootVisitor& heapRootVisitor)
     int end = blocks.size() - 1;
     for (int i = 0; i < end; ++i) {
         HandleSlot block = blocks[i];
-        heapRootVisitor.visit(block, blockLength);
+        visitor.appendUnbarriered(block, blockLength);
     }
     HandleSlot block = blocks[end];
-    heapRootVisitor.visit(block, m_frame.m_next - block);
+    visitor.appendUnbarriered(block, m_frame.m_next - block);
 }
 
 void HandleStack::grow()
index b05a11b..dc14864 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
 namespace JSC {
 
 class LocalScope;
-class HeapRootVisitor;
+class SlotVisitor;
 
 class HandleStack {
 public:
@@ -49,7 +49,7 @@ public:
 
     HandleSlot push();
 
-    void visit(HeapRootVisitor&);
+    void visit(SlotVisitor&);
 
 private:
     JS_EXPORT_PRIVATE void grow();
index 5aa091f..b4f4ff1 100644 (file)
@@ -26,6 +26,7 @@
 #include "ConservativeRoots.h"
 #include "DFGWorklist.h"
 #include "EdenGCActivityCallback.h"
+#include "Exception.h"
 #include "FullGCActivityCallback.h"
 #include "GCActivityCallback.h"
 #include "GCIncomingRefCountedSetInlines.h"
@@ -35,7 +36,6 @@
 #include "HeapHelperPool.h"
 #include "HeapIterationScope.h"
 #include "HeapProfiler.h"
-#include "HeapRootVisitor.h"
 #include "HeapSnapshot.h"
 #include "HeapStatistics.h"
 #include "HeapVerifier.h"
@@ -515,8 +515,6 @@ void Heap::markToFixpoint(double gcStartTime)
 {
     TimingScope markToFixpointTimingScope(*this, "Heap::markToFixpoint");
     
-    HeapRootVisitor heapRootVisitor(*m_collectorSlotVisitor);
-    
     if (m_collectionScope == CollectionScope::Full) {
         m_opaqueRoots.clear();
         m_collectorSlotVisitor->clearMarkStacks();
@@ -559,7 +557,8 @@ void Heap::markToFixpoint(double gcStartTime)
             }
         });
 
-    m_collectorSlotVisitor->didStartMarking();
+    SlotVisitor& slotVisitor = *m_collectorSlotVisitor;
+    slotVisitor.didStartMarking();
 
     SpaceTimeScheduler scheduler(*this);
     
@@ -580,55 +579,53 @@ void Heap::markToFixpoint(double gcStartTime)
         // Now we visit roots that don't get barriered, so each fixpoint iteration just revisits
         // all of them.
 #if JSC_OBJC_API_ENABLED
-        scanExternalRememberedSet(*m_vm, *m_collectorSlotVisitor);
+        scanExternalRememberedSet(*m_vm, slotVisitor);
 #endif
             
         if (m_vm->smallStrings.needsToBeVisited(*m_collectionScope))
-            m_vm->smallStrings.visitStrongReferences(*m_collectorSlotVisitor);
+            m_vm->smallStrings.visitStrongReferences(slotVisitor);
             
         for (auto& pair : m_protectedValues)
-            heapRootVisitor.visit(&pair.key);
+            slotVisitor.appendUnbarriered(pair.key);
             
         if (m_markListSet && m_markListSet->size())
-            MarkedArgumentBuffer::markLists(heapRootVisitor, *m_markListSet);
+            MarkedArgumentBuffer::markLists(slotVisitor, *m_markListSet);
             
-        if (m_vm->exception())
-            heapRootVisitor.visit(m_vm->addressOfException());
-        if (m_vm->lastException())
-            heapRootVisitor.visit(m_vm->addressOfLastException());
+        slotVisitor.appendUnbarriered(m_vm->exception());
+        slotVisitor.appendUnbarriered(m_vm->lastException());
             
-        m_handleSet.visitStrongHandles(heapRootVisitor);
-        m_handleStack.visit(heapRootVisitor);
+        m_handleSet.visitStrongHandles(slotVisitor);
+        m_handleStack.visit(slotVisitor);
 
 #if ENABLE(SAMPLING_PROFILER)
         if (SamplingProfiler* samplingProfiler = m_vm->samplingProfiler()) {
             LockHolder locker(samplingProfiler->getLock());
             samplingProfiler->processUnverifiedStackTraces();
-            samplingProfiler->visit(*m_collectorSlotVisitor);
+            samplingProfiler->visit(slotVisitor);
             if (Options::logGC() == GCLogging::Verbose)
-                dataLog("Sampling Profiler data:\n", *m_collectorSlotVisitor);
+                dataLog("Sampling Profiler data:\n", slotVisitor);
         }
 #endif // ENABLE(SAMPLING_PROFILER)
         
         if (m_vm->typeProfiler())
-            m_vm->typeProfilerLog()->visit(*m_collectorSlotVisitor);
+            m_vm->typeProfilerLog()->visit(slotVisitor);
                 
-        m_vm->shadowChicken().visitChildren(*m_collectorSlotVisitor);
+        m_vm->shadowChicken().visitChildren(slotVisitor);
                 
-        m_jitStubRoutines->traceMarkedStubRoutines(*m_collectorSlotVisitor);
+        m_jitStubRoutines->traceMarkedStubRoutines(slotVisitor);
 
-        m_collectorSlotVisitor->mergeOpaqueRootsIfNecessary();
+        slotVisitor.mergeOpaqueRootsIfNecessary();
         for (auto& parallelVisitor : m_parallelSlotVisitors)
             parallelVisitor->mergeOpaqueRootsIfNecessary();
 
-        m_objectSpace.visitWeakSets(heapRootVisitor);
+        m_objectSpace.visitWeakSets(slotVisitor);
         harvestWeakReferences();
         visitCompilerWorklistWeakReferences();
-        DFG::markCodeBlocks(*m_vm, *m_collectorSlotVisitor);
-        bool shouldTerminate = m_collectorSlotVisitor->isEmpty() && m_mutatorMarkStack->isEmpty();
+        DFG::markCodeBlocks(*m_vm, slotVisitor);
+        bool shouldTerminate = slotVisitor.isEmpty() && m_mutatorMarkStack->isEmpty();
         
         if (Options::logGC()) {
-            dataLog(m_collectorSlotVisitor->collectorMarkStack().size(), "+", m_mutatorMarkStack->size() + m_collectorSlotVisitor->mutatorMarkStack().size(), ", a=", m_bytesAllocatedThisCycle / 1024, " kb, b=", m_barriersExecuted, ", mu=", scheduler.currentDecision().targetMutatorUtilization(), " ");
+            dataLog(slotVisitor.collectorMarkStack().size(), "+", m_mutatorMarkStack->size() + slotVisitor.mutatorMarkStack().size(), ", a=", m_bytesAllocatedThisCycle / 1024, " kb, b=", m_barriersExecuted, ", mu=", scheduler.currentDecision().targetMutatorUtilization(), " ");
         }
         
         // We want to do this to conservatively ensure that we rescan any code blocks that are
@@ -645,14 +642,14 @@ void Heap::markToFixpoint(double gcStartTime)
         
         // The SlotVisitor's mark stacks are accessed by the collector thread (i.e. this thread)
         // without locks. That's why we double-buffer.
-        m_mutatorMarkStack->transferTo(m_collectorSlotVisitor->mutatorMarkStack());
+        m_mutatorMarkStack->transferTo(slotVisitor.mutatorMarkStack());
         
         if (Options::logGC() == GCLogging::Verbose)
-            dataLog("Live Weak Handles:\n", *m_collectorSlotVisitor);
+            dataLog("Live Weak Handles:\n", slotVisitor);
         
         {
             TimingScope traceTimingScope(*this, "Heap::markToFixpoint tracing");
-            ParallelModeEnabler enabler(*m_collectorSlotVisitor);
+            ParallelModeEnabler enabler(slotVisitor);
             
             if (Options::useCollectorTimeslicing()) {
                 scheduler.snapPhase();
@@ -663,7 +660,7 @@ void Heap::markToFixpoint(double gcStartTime)
                     if (decision.shouldBeResumed()) {
                         {
                             ResumeTheWorldScope resumeTheWorldScope(*this);
-                            drainResult = m_collectorSlotVisitor->drainInParallelPassively(decision.timeToStop());
+                            drainResult = slotVisitor.drainInParallelPassively(decision.timeToStop());
                             if (drainResult == SlotVisitor::SharedDrainResult::Done) {
                                 // At this point we will stop. But maybe the scheduler does not want
                                 // that.
@@ -680,13 +677,13 @@ void Heap::markToFixpoint(double gcStartTime)
                                 dataLog("wul!=", wakeUpLatency.milliseconds(), " ms ");
                         }
                     } else
-                        drainResult = m_collectorSlotVisitor->drainInParallel(decision.timeToResume());
+                        drainResult = slotVisitor.drainInParallel(decision.timeToResume());
                 } while (drainResult != SlotVisitor::SharedDrainResult::Done);
             } else {
                 // Disabling collector timeslicing is meant to be used together with
                 // --collectContinuously=true to maximize the opportunity for harmful races.
                 ResumeTheWorldScope resumeTheWorldScope(*this);
-                m_collectorSlotVisitor->drainInParallel();
+                slotVisitor.drainInParallel();
             }
         }
     }
index 3e0ce66..0ecc3e5 100644 (file)
@@ -63,7 +63,6 @@ class GCActivityCallback;
 class GCAwareJITStubRoutine;
 class Heap;
 class HeapProfiler;
-class HeapRootVisitor;
 class HeapVerifier;
 class HelpingGCScope;
 class IncrementalSweeper;
@@ -459,7 +458,6 @@ private:
     void visitConservativeRoots(ConservativeRoots&);
     void visitCompilerWorklistWeakReferences();
     void removeDeadCompilerWorklistEntries();
-    void markToFixpoint(HeapRootVisitor&);
     void updateObjectCounts(double gcStartTime);
     void endMarking();
 
diff --git a/Source/JavaScriptCore/heap/HeapRootVisitor.h b/Source/JavaScriptCore/heap/HeapRootVisitor.h
deleted file mode 100644 (file)
index e62efce..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#pragma once
-
-#include "SlotVisitor.h"
-#include "SlotVisitorInlines.h"
-
-namespace JSC {
-
-    // Privileged class for marking JSValues directly. It is only safe to use
-    // this class to mark direct heap roots that are marked during every GC pass.
-    // All other references should be wrapped in WriteBarriers.
-    class HeapRootVisitor {
-    private:
-        friend class Heap;
-        HeapRootVisitor(SlotVisitor&);
-
-    public:
-        void visit(JSValue*);
-        void visit(JSValue*, size_t);
-        void visit(JSString**);
-        void visit(JSCell**);
-
-        SlotVisitor& visitor();
-
-    private:
-        SlotVisitor& m_visitor;
-    };
-
-    inline HeapRootVisitor::HeapRootVisitor(SlotVisitor& visitor)
-        : m_visitor(visitor)
-    {
-    }
-
-    inline void HeapRootVisitor::visit(JSValue* slot)
-    {
-        m_visitor.appendUnbarrieredValue(slot);
-    }
-
-    inline void HeapRootVisitor::visit(JSValue* slot, size_t count)
-    {
-        for (size_t i = 0; i < count; ++i)
-            m_visitor.appendUnbarrieredValue(&slot[i]);
-    }
-
-    inline void HeapRootVisitor::visit(JSString** slot)
-    {
-        m_visitor.appendUnbarrieredPointer(slot);
-    }
-
-    inline void HeapRootVisitor::visit(JSCell** slot)
-    {
-        m_visitor.appendUnbarrieredPointer(slot);
-    }
-
-    inline SlotVisitor& HeapRootVisitor::visitor()
-    {
-        return m_visitor;
-    }
-
-} // namespace JSC
index cb73ec0..fa1ebd5 100644 (file)
@@ -65,7 +65,7 @@ void LargeAllocation::shrink()
     m_weakSet.shrink();
 }
 
-void LargeAllocation::visitWeakSet(HeapRootVisitor& visitor)
+void LargeAllocation::visitWeakSet(SlotVisitor& visitor)
 {
     m_weakSet.visit(visitor);
 }
index a105ba1..f00d598 100644 (file)
@@ -30,6 +30,8 @@
 
 namespace JSC {
 
+class SlotVisitor;
+
 // WebKit has a good malloc that already knows what to do for large allocations. The GC shouldn't
 // have to think about such things. That's where LargeAllocation comes in. We will allocate large
 // objects directly using malloc, and put the LargeAllocation header just before them. We can detect
@@ -62,7 +64,7 @@ public:
     
     void shrink();
     
-    void visitWeakSet(HeapRootVisitor&);
+    void visitWeakSet(SlotVisitor&);
     void reapWeakSet();
     
     void clearNewlyAllocated() { m_isNewlyAllocated = false; }
index 85c6539..b0dd4a6 100644 (file)
@@ -40,6 +40,7 @@ class Heap;
 class JSCell;
 class MarkedAllocator;
 class MarkedSpace;
+class SlotVisitor;
 
 typedef uintptr_t Bits;
 typedef uint32_t HeapVersion;
@@ -132,7 +133,7 @@ public:
         
         void shrink();
             
-        unsigned visitWeakSet(HeapRootVisitor&);
+        unsigned visitWeakSet(SlotVisitor&);
         void reapWeakSet();
             
         // While allocating from a free list, MarkedBlock temporarily has bogus
@@ -431,9 +432,9 @@ inline void MarkedBlock::Handle::shrink()
     m_weakSet.shrink();
 }
 
-inline unsigned MarkedBlock::Handle::visitWeakSet(HeapRootVisitor& heapRootVisitor)
+inline unsigned MarkedBlock::Handle::visitWeakSet(SlotVisitor& visitor)
 {
-    return m_weakSet.visit(heapRootVisitor);
+    return m_weakSet.visit(visitor);
 }
 
 inline void MarkedBlock::Handle::reapWeakSet()
index 7b81944..993b5f3 100644 (file)
@@ -359,10 +359,10 @@ void MarkedSpace::prepareForAllocation()
     m_allocatorForEmptyAllocation = m_firstAllocator;
 }
 
-void MarkedSpace::visitWeakSets(HeapRootVisitor& heapRootVisitor)
+void MarkedSpace::visitWeakSets(SlotVisitor& visitor)
 {
     auto visit = [&] (WeakSet* weakSet) {
-        weakSet->visit(heapRootVisitor);
+        weakSet->visit(visitor);
     };
     
     m_newActiveWeakSets.forEach(visit);
index c61aa59..1261dc2 100644 (file)
@@ -129,7 +129,7 @@ public:
     
     void prepareForAllocation();
 
-    void visitWeakSets(HeapRootVisitor&);
+    void visitWeakSets(SlotVisitor&);
     void reapWeakSets();
 
     MarkedBlockSet& blocks() { return m_blocks; }
index 9414de1..98e9e72 100644 (file)
@@ -216,7 +216,7 @@ void SlotVisitor::appendJSCellOrAuxiliary(HeapCell* heapCell)
     } }
 }
 
-void SlotVisitor::append(JSValue value)
+void SlotVisitor::appendUnbarriered(JSValue value)
 {
     if (!value || !value.isCell())
         return;
index b4d2f80..6eb8be9 100644 (file)
@@ -52,7 +52,6 @@ class SlotVisitor {
     WTF_MAKE_FAST_ALLOCATED;
 
     friend class SetCurrentCellScope;
-    friend class HeapRootVisitor; // Allowed to mark a JSValue* or JSCell** directly.
     friend class Heap;
 
 public:
@@ -70,20 +69,27 @@ public:
 
     void append(ConservativeRoots&);
     
-    template<typename T> void append(WriteBarrierBase<T>*);
-    template<typename T> void appendHidden(WriteBarrierBase<T>*);
+    template<typename T> void append(const WriteBarrierBase<T>&);
+    template<typename T> void appendHidden(const WriteBarrierBase<T>&);
     template<typename Iterator> void append(Iterator begin , Iterator end);
-    void appendValues(WriteBarrierBase<Unknown>*, size_t count);
-    void appendValuesHidden(WriteBarrierBase<Unknown>*, size_t count);
+    void appendValues(const WriteBarrierBase<Unknown>*, size_t count);
+    void appendValuesHidden(const WriteBarrierBase<Unknown>*, size_t count);
+    
+    // These don't require you to prove that you have a WriteBarrier<>. That makes sense
+    // for:
+    //
+    // - roots.
+    // - sophisticated data structures that barrier through other means (like DFG::Plan and
+    //   friends).
+    //
+    // If you are not a root and you don't know what kind of barrier you have, then you
+    // shouldn't call these methods.
+    JS_EXPORT_PRIVATE void appendUnbarriered(JSValue);
+    void appendUnbarriered(JSValue*, size_t);
+    void appendUnbarriered(JSCell*);
     
     template<typename T>
-    void appendUnbarrieredPointer(T**);
-    void appendUnbarrieredValue(JSValue*);
-    template<typename T>
-    void appendUnbarrieredWeak(Weak<T>*);
-    template<typename T>
-    void appendUnbarrieredReadOnlyPointer(T*);
-    void appendUnbarrieredReadOnlyValue(JSValue);
+    void append(const Weak<T>& weak);
     
     JS_EXPORT_PRIVATE void addOpaqueRoot(void*);
     JS_EXPORT_PRIVATE bool containsOpaqueRoot(void*) const;
@@ -149,7 +155,6 @@ public:
 private:
     friend class ParallelModeEnabler;
     
-    JS_EXPORT_PRIVATE void append(JSValue); // This is private to encourage clients to use WriteBarrier<T>.
     void appendJSCellOrAuxiliary(HeapCell*);
     void appendHidden(JSValue);
 
index cf335d0..dc22349 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012, 2013, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 namespace JSC {
 
-template<typename T>
-inline void SlotVisitor::appendUnbarrieredPointer(T** slot)
-{
-    ASSERT(slot);
-    append(*slot);
-}
-
-template<typename T>
-inline void SlotVisitor::appendUnbarrieredReadOnlyPointer(T* cell)
-{
-    append(cell);
-}
-
-inline void SlotVisitor::appendUnbarrieredValue(JSValue* slot)
+inline void SlotVisitor::appendUnbarriered(JSValue* slot, size_t count)
 {
-    ASSERT(slot);
-    append(*slot);
+    for (size_t i = count; i--;)
+        appendUnbarriered(slot[i]);
 }
 
-inline void SlotVisitor::appendUnbarrieredReadOnlyValue(JSValue value)
+inline void SlotVisitor::appendUnbarriered(JSCell* cell)
 {
-    append(value);
+    appendUnbarriered(JSValue(cell));
 }
 
 template<typename T>
-inline void SlotVisitor::appendUnbarrieredWeak(Weak<T>* weak)
+inline void SlotVisitor::append(const Weak<T>& weak)
 {
-    ASSERT(weak);
-    append(weak->get());
+    appendUnbarriered(weak.get());
 }
 
 template<typename T>
-inline void SlotVisitor::append(WriteBarrierBase<T>* slot)
+inline void SlotVisitor::append(const WriteBarrierBase<T>& slot)
 {
-    append(slot->get());
+    appendUnbarriered(slot.get());
 }
 
 template<typename T>
-inline void SlotVisitor::appendHidden(WriteBarrierBase<T>* slot)
+inline void SlotVisitor::appendHidden(const WriteBarrierBase<T>& slot)
 {
-    appendHidden(slot->get());
+    appendHidden(slot.get());
 }
 
 template<typename Iterator>
 inline void SlotVisitor::append(Iterator begin, Iterator end)
 {
     for (auto it = begin; it != end; ++it)
-        append(&*it);
+        append(*it);
 }
 
-inline void SlotVisitor::appendValues(WriteBarrierBase<Unknown>* barriers, size_t count)
+inline void SlotVisitor::appendValues(const WriteBarrierBase<Unknown>* barriers, size_t count)
 {
     for (size_t i = 0; i < count; ++i)
-        append(&barriers[i]);
+        append(barriers[i]);
 }
 
-inline void SlotVisitor::appendValuesHidden(WriteBarrierBase<Unknown>* barriers, size_t count)
+inline void SlotVisitor::appendValuesHidden(const WriteBarrierBase<Unknown>* barriers, size_t count)
 {
     for (size_t i = 0; i < count; ++i)
-        appendHidden(&barriers[i]);
+        appendHidden(barriers[i]);
 }
 
 inline void SlotVisitor::reportExtraMemoryVisited(size_t size)
index dc57cc4..8845d6f 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "CellContainerInlines.h"
 #include "Heap.h"
-#include "HeapRootVisitor.h"
 #include "JSCInlines.h"
 #include "JSObject.h"
 #include "WeakHandleOwner.h"
@@ -97,10 +96,8 @@ void WeakBlock::sweep()
 }
 
 template<typename ContainerType>
-void WeakBlock::specializedVisit(ContainerType& container, HeapRootVisitor& heapRootVisitor)
+void WeakBlock::specializedVisit(ContainerType& container, SlotVisitor& visitor)
 {
-    SlotVisitor& visitor = heapRootVisitor.visitor();
-    
     HeapVersion markingVersion = visitor.markingVersion();
 
     for (size_t i = 0; i < weakImplCount(); ++i) {
@@ -112,18 +109,18 @@ void WeakBlock::specializedVisit(ContainerType& container, HeapRootVisitor& heap
         if (!weakHandleOwner)
             continue;
 
-        const JSValue& jsValue = weakImpl->jsValue();
+        JSValue jsValue = weakImpl->jsValue();
         if (container.isMarkedConcurrently(markingVersion, jsValue.asCell()))
             continue;
         
         if (!weakHandleOwner->isReachableFromOpaqueRoots(Handle<Unknown>::wrapSlot(&const_cast<JSValue&>(jsValue)), weakImpl->context(), visitor))
             continue;
 
-        heapRootVisitor.visit(&const_cast<JSValue&>(jsValue));
+        visitor.appendUnbarriered(jsValue);
     }
 }
 
-void WeakBlock::visit(HeapRootVisitor& heapRootVisitor)
+void WeakBlock::visit(SlotVisitor& visitor)
 {
     // If a block is completely empty, a visit won't have any effect.
     if (isEmpty())
@@ -133,9 +130,9 @@ void WeakBlock::visit(HeapRootVisitor& heapRootVisitor)
     ASSERT(m_container);
     
     if (m_container.isLargeAllocation())
-        specializedVisit(m_container.largeAllocation(), heapRootVisitor);
+        specializedVisit(m_container.largeAllocation(), visitor);
     else
-        specializedVisit(m_container.markedBlock(), heapRootVisitor);
+        specializedVisit(m_container.markedBlock(), visitor);
 }
 
 void WeakBlock::reap()
index b6453f6..8519e23 100644 (file)
@@ -33,7 +33,7 @@
 namespace JSC {
 
 class Heap;
-class HeapRootVisitor;
+class SlotVisitor;
 
 class WeakBlock : public DoublyLinkedListNode<WeakBlock> {
 public:
@@ -63,7 +63,7 @@ public:
     void sweep();
     SweepResult takeSweepResult();
 
-    void visit(HeapRootVisitor&);
+    void visit(SlotVisitor&);
     void reap();
 
     void lastChanceToFinalize();
@@ -73,7 +73,7 @@ private:
     static FreeCell* asFreeCell(WeakImpl*);
     
     template<typename ContainerType>
-    void specializedVisit(ContainerType&, HeapRootVisitor&);
+    void specializedVisit(ContainerType&, SlotVisitor&);
 
     explicit WeakBlock(CellContainer);
     void finalize(WeakImpl*);
index 36fb594..35d45db 100644 (file)
@@ -53,7 +53,7 @@ public:
 
     bool isEmpty() const;
 
-    unsigned visit(HeapRootVisitor&);
+    unsigned visit(SlotVisitor&);
     void reap();
     void sweep();
     void shrink();
@@ -106,7 +106,7 @@ inline void WeakSet::lastChanceToFinalize()
         block->lastChanceToFinalize();
 }
 
-inline unsigned WeakSet::visit(HeapRootVisitor& visitor)
+inline unsigned WeakSet::visit(SlotVisitor& visitor)
 {
     unsigned count = 0;
     for (WeakBlock* block = m_blocks.head(); block; block = block->next()) {
index b202824..5038d45 100644 (file)
@@ -408,23 +408,23 @@ void ShadowChicken::visitChildren(SlotVisitor& visitor)
     for (unsigned i = m_logCursor - m_log; i--;) {
         JSObject* callee = m_log[i].callee;
         if (callee != Packet::tailMarker() && callee != Packet::throwMarker())
-            visitor.appendUnbarrieredReadOnlyPointer(callee);
+            visitor.appendUnbarriered(callee);
         if (callee != Packet::throwMarker())
-            visitor.appendUnbarrieredReadOnlyPointer(m_log[i].scope);
+            visitor.appendUnbarriered(m_log[i].scope);
         if (callee == Packet::tailMarker()) {
-            visitor.appendUnbarrieredValue(&m_log[i].thisValue);
-            visitor.appendUnbarrieredReadOnlyPointer(m_log[i].codeBlock);
+            visitor.appendUnbarriered(m_log[i].thisValue);
+            visitor.appendUnbarriered(m_log[i].codeBlock);
         }
     }
     
     for (unsigned i = m_stack.size(); i--; ) {
         Frame& frame = m_stack[i];
-        visitor.appendUnbarrieredValue(&frame.thisValue);
-        visitor.appendUnbarrieredReadOnlyPointer(frame.callee);
+        visitor.appendUnbarriered(frame.thisValue);
+        visitor.appendUnbarriered(frame.callee);
         if (frame.scope)
-            visitor.appendUnbarrieredReadOnlyPointer(frame.scope);
+            visitor.appendUnbarriered(frame.scope);
         if (frame.codeBlock)
-            visitor.appendUnbarrieredReadOnlyPointer(frame.codeBlock);
+            visitor.appendUnbarriered(frame.codeBlock);
     }
 }
 
index e98f271..31a2ae1 100644 (file)
@@ -98,7 +98,7 @@ MarkingGCAwareJITStubRoutine::~MarkingGCAwareJITStubRoutine()
 void MarkingGCAwareJITStubRoutine::markRequiredObjectsInternal(SlotVisitor& visitor)
 {
     for (auto& entry : m_cells)
-        visitor.append(&entry);
+        visitor.append(entry);
 }
 
 
index b12b552..0b24b02 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -129,7 +129,7 @@ bool PolymorphicCallStubRoutine::visitWeak(VM&)
 void PolymorphicCallStubRoutine::markRequiredObjectsInternal(SlotVisitor& visitor)
 {
     for (auto& variant : m_variants)
-        visitor.append(&variant);
+        visitor.append(variant);
 }
 
 } // namespace JSC
index 4a29494..d588651 100644 (file)
@@ -183,7 +183,7 @@ public:
         Element* thisObject = jsCast<Element*>(cell);
         ASSERT_GC_OBJECT_INHERITS(thisObject, info());
         Base::visitChildren(thisObject, visitor);
-        visitor.append(&thisObject->m_root);
+        visitor.append(thisObject->m_root);
     }
 
     static ElementHandleOwner* handleOwner();
@@ -330,7 +330,7 @@ public:
     {
         Base::visitChildren(cell, visitor);
         ImpureGetter* thisObject = jsCast<ImpureGetter*>(cell);
-        visitor.append(&thisObject->m_delegate);
+        visitor.append(thisObject->m_delegate);
     }
 
     void setDelegate(VM& vm, JSObject* delegate)
@@ -521,7 +521,7 @@ public:
         SimpleObject* thisObject = jsCast<SimpleObject*>(cell);
         ASSERT_GC_OBJECT_INHERITS(thisObject, info());
         Base::visitChildren(thisObject, visitor);
-        visitor.append(&thisObject->m_hiddenValue);
+        visitor.append(thisObject->m_hiddenValue);
     }
 
     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
index ebe5f5d..a2caa45 100644 (file)
@@ -68,9 +68,9 @@ void AbstractModuleRecord::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     AbstractModuleRecord* thisObject = jsCast<AbstractModuleRecord*>(cell);
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_moduleEnvironment);
-    visitor.append(&thisObject->m_moduleNamespaceObject);
-    visitor.append(&thisObject->m_dependenciesMap);
+    visitor.append(thisObject->m_moduleEnvironment);
+    visitor.append(thisObject->m_moduleNamespaceObject);
+    visitor.append(thisObject->m_dependenciesMap);
 }
 
 void AbstractModuleRecord::appendRequestedModule(const Identifier& moduleName)
index 7813b40..585e8e0 100644 (file)
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "ArgList.h"
 
-#include "HeapRootVisitor.h"
 #include "JSCJSValue.h"
 #include "JSObject.h"
 #include "JSCInlines.h"
@@ -54,13 +53,13 @@ void ArgList::getSlice(int startIndex, ArgList& result) const
     result.m_argCount =  m_argCount - startIndex;
 }
 
-void MarkedArgumentBuffer::markLists(HeapRootVisitor& heapRootVisitor, ListSet& markSet)
+void MarkedArgumentBuffer::markLists(SlotVisitor& visitor, ListSet& markSet)
 {
     ListSet::iterator end = markSet.end();
     for (ListSet::iterator it = markSet.begin(); it != end; ++it) {
         MarkedArgumentBuffer* list = *it;
         for (int i = 0; i < list->m_size; ++i)
-            heapRootVisitor.visit(reinterpret_cast<JSValue*>(&list->slotFor(i)));
+            visitor.appendUnbarriered(JSValue::decode(list->slotFor(i)));
     }
 }
 
index 1a9bf2f..7d1c9c6 100644 (file)
@@ -92,7 +92,7 @@ public:
         return JSValue::decode(slotFor(m_size - 1));
     }
         
-    static void markLists(HeapRootVisitor&, ListSet&);
+    static void markLists(SlotVisitor&, ListSet&);
 
 private:
     void expandCapacity();
index 6596cab..7bed2dc 100644 (file)
@@ -273,7 +273,7 @@ void ClonedArguments::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ClonedArguments* thisObject = jsCast<ClonedArguments*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_callee);
+    visitor.append(thisObject->m_callee);
 }
 
 } // namespace JSC
index 67d2614..881570b 100644 (file)
@@ -97,7 +97,7 @@ void DirectArguments::visitChildren(JSCell* thisCell, SlotVisitor& visitor)
     Base::visitChildren(thisObject, visitor);
     
     visitor.appendValues(thisObject->storage(), std::max(thisObject->m_length, thisObject->m_minCapacity));
-    visitor.append(&thisObject->m_callee);
+    visitor.append(thisObject->m_callee);
 
     if (bool* override = thisObject->m_overrides.get())
         visitor.markAuxiliary(override);
index 4f773a0..236b371 100644 (file)
@@ -49,7 +49,7 @@ void EvalExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
     EvalExecutable* thisObject = jsCast<EvalExecutable*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     ScriptExecutable::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_unlinkedEvalCodeBlock);
+    visitor.append(thisObject->m_unlinkedEvalCodeBlock);
     if (EvalCodeBlock* evalCodeBlock = thisObject->m_evalCodeBlock.get())
         evalCodeBlock->visitWeakly(visitor);
 }
index 7169abc..93175ee 100644 (file)
@@ -57,7 +57,7 @@ void Exception::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_value);
+    visitor.append(thisObject->m_value);
 }
 
 Exception::Exception(VM& vm)
index 5c4e566..13bf1d5 100644 (file)
@@ -89,8 +89,8 @@ void FunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
         codeBlockForCall->visitWeakly(visitor);
     if (FunctionCodeBlock* codeBlockForConstruct = thisObject->m_codeBlockForConstruct.get())
         codeBlockForConstruct->visitWeakly(visitor);
-    visitor.append(&thisObject->m_unlinkedExecutable);
-    visitor.append(&thisObject->m_singletonFunction);
+    visitor.append(thisObject->m_unlinkedExecutable);
+    visitor.append(thisObject->m_singletonFunction);
 }
 
 FunctionExecutable* FunctionExecutable::fromGlobalCode(
index c327c57..5656f76 100644 (file)
@@ -56,7 +56,7 @@ void FunctionRareData::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     rareData->m_objectAllocationProfile.visitAggregate(visitor);
     rareData->m_internalFunctionAllocationProfile.visitAggregate(visitor);
-    visitor.append(&rareData->m_boundFunctionStructure);
+    visitor.append(rareData->m_boundFunctionStructure);
 }
 
 FunctionRareData::FunctionRareData(VM& vm)
index 4bba0e6..2b96272 100644 (file)
@@ -41,8 +41,8 @@ void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     JSCell::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_getter);
-    visitor.append(&thisObject->m_setter);
+    visitor.append(thisObject->m_getter);
+    visitor.append(thisObject->m_setter);
 }
 
 GetterSetter* GetterSetter::withGetter(VM& vm, JSGlobalObject* globalObject, JSObject* newGetter)
index 4ade6e4..a24cc2f 100644 (file)
@@ -45,8 +45,8 @@ void HashMapBucket<Data>::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_next);
-    visitor.append(&thisObject->m_prev);
+    visitor.append(thisObject->m_next);
+    visitor.append(thisObject->m_prev);
 
     static_assert(sizeof(Data) % sizeof(WriteBarrier<Unknown>) == 0, "We assume that these are filled with WriteBarrier<Unknown> members only.");
     visitor.appendValues(bitwise_cast<WriteBarrier<Unknown>*>(&thisObject->m_data), sizeof(Data) / sizeof(WriteBarrier<Unknown>));
@@ -67,8 +67,8 @@ void HashMapImpl<HashMapBucket>::visitChildren(JSCell* cell, SlotVisitor& visito
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_head);
-    visitor.append(&thisObject->m_tail);
+    visitor.append(thisObject->m_head);
+    visitor.append(thisObject->m_tail);
     
     if (HashMapBufferType* buffer = thisObject->m_buffer.get())
         visitor.markAuxiliary(buffer);
index 95563e4..78278e8 100644 (file)
@@ -60,7 +60,7 @@ void InferredTypeTable::visitChildren(JSCell* cell, SlotVisitor& visitor)
         if (!entry.value)
             continue;
         if (entry.value->isRelevant())
-            visitor.append(&entry.value);
+            visitor.append(entry.value);
         else
             entry.value.clear();
     }
index fea00b0..aa7a159 100644 (file)
@@ -57,7 +57,7 @@ void InternalFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     
-    visitor.append(&thisObject->m_originalName);
+    visitor.append(thisObject->m_originalName);
 }
 
 const String& InternalFunction::name()
index 9861d2e..22b4eb3 100644 (file)
@@ -91,7 +91,7 @@ void IntlCollator::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_boundCompare);
+    visitor.append(thisObject->m_boundCompare);
 }
 
 static Vector<String> sortLocaleData(const String& locale, size_t keyIndex)
index c8fe0b1..a625b09 100644 (file)
@@ -160,7 +160,7 @@ void IntlCollatorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_collatorStructure);
+    visitor.append(thisObject->m_collatorStructure);
 }
 
 } // namespace JSC
index 93c681a..6552c60 100644 (file)
@@ -90,7 +90,7 @@ void IntlDateTimeFormat::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_boundFormat);
+    visitor.append(thisObject->m_boundFormat);
 }
 
 void IntlDateTimeFormat::setBoundFormat(VM& vm, JSBoundFunction* format)
index 3039e62..7f57975 100644 (file)
@@ -161,7 +161,7 @@ void IntlDateTimeFormatConstructor::visitChildren(JSCell* cell, SlotVisitor& vis
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_dateTimeFormatStructure);
+    visitor.append(thisObject->m_dateTimeFormatStructure);
 }
 
 } // namespace JSC
index 04d5a70..acba514 100644 (file)
@@ -84,7 +84,7 @@ void IntlNumberFormat::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_boundFormat);
+    visitor.append(thisObject->m_boundFormat);
 }
 
 static Vector<String> localeData(const String& locale, size_t keyIndex)
index 75ffb17..db25c7f 100644 (file)
@@ -161,7 +161,7 @@ void IntlNumberFormatConstructor::visitChildren(JSCell* cell, SlotVisitor& visit
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_numberFormatStructure);
+    visitor.append(thisObject->m_numberFormatStructure);
 }
 
 } // namespace JSC
index 1af2d5e..e429d1d 100644 (file)
@@ -207,9 +207,9 @@ void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_targetFunction);
-    visitor.append(&thisObject->m_boundThis);
-    visitor.append(&thisObject->m_boundArgs);
+    visitor.append(thisObject->m_targetFunction);
+    visitor.append(thisObject->m_boundThis);
+    visitor.append(thisObject->m_boundArgs);
 }
 
 } // namespace JSC
index 9192925..b350f31 100644 (file)
@@ -60,7 +60,7 @@ void JSCallee::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_scope);
+    visitor.append(thisObject->m_scope);
 }
 
 } // namespace JSC
index 7d454a1..f4fb5b4 100644 (file)
@@ -117,8 +117,7 @@ ALWAYS_INLINE Structure* JSCell::structure(VM& vm) const
 
 inline void JSCell::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    Structure* structure = cell->structure(visitor.vm());
-    visitor.appendUnbarrieredPointer(&structure);
+    visitor.appendUnbarriered(cell->structure(visitor.vm()));
 }
 
 ALWAYS_INLINE VM& ExecState::vm() const
index e547d97..792a2e7 100644 (file)
@@ -82,7 +82,7 @@ void JSCustomGetterSetterFunction::visitChildren(JSCell* cell, SlotVisitor& visi
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_getterSetter);
+    visitor.append(thisObject->m_getterSetter);
 }
 
 void JSCustomGetterSetterFunction::finishCreation(VM& vm, NativeExecutable* executable, CustomGetterSetter* getterSetter, const String& name)
index 567acc8..5cbe8bb 100644 (file)
@@ -207,8 +207,8 @@ void JSFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_executable);
-    visitor.append(&thisObject->m_rareData);
+    visitor.append(thisObject->m_executable);
+    visitor.append(thisObject->m_rareData);
 }
 
 CallType JSFunction::getCallData(JSCell* cell, CallData& callData)
index 72dbca0..bd666b9 100644 (file)
@@ -1159,111 +1159,111 @@ void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_globalThis);
-
-    visitor.append(&thisObject->m_globalLexicalEnvironment);
-    visitor.append(&thisObject->m_globalScopeExtension);
-    visitor.append(&thisObject->m_globalCallee);
-    visitor.append(&thisObject->m_regExpConstructor);
-    visitor.append(&thisObject->m_errorConstructor);
-    visitor.append(&thisObject->m_nativeErrorPrototypeStructure);
-    visitor.append(&thisObject->m_nativeErrorStructure);
+    visitor.append(thisObject->m_globalThis);
+
+    visitor.append(thisObject->m_globalLexicalEnvironment);
+    visitor.append(thisObject->m_globalScopeExtension);
+    visitor.append(thisObject->m_globalCallee);
+    visitor.append(thisObject->m_regExpConstructor);
+    visitor.append(thisObject->m_errorConstructor);
+    visitor.append(thisObject->m_nativeErrorPrototypeStructure);
+    visitor.append(thisObject->m_nativeErrorStructure);
     thisObject->m_evalErrorConstructor.visit(visitor);
-    visitor.append(&thisObject->m_rangeErrorConstructor);
+    visitor.append(thisObject->m_rangeErrorConstructor);
     thisObject->m_referenceErrorConstructor.visit(visitor);
     thisObject->m_syntaxErrorConstructor.visit(visitor);
-    visitor.append(&thisObject->m_typeErrorConstructor);
+    visitor.append(thisObject->m_typeErrorConstructor);
     thisObject->m_URIErrorConstructor.visit(visitor);
-    visitor.append(&thisObject->m_objectConstructor);
-    visitor.append(&thisObject->m_promiseConstructor);
+    visitor.append(thisObject->m_objectConstructor);
+    visitor.append(thisObject->m_promiseConstructor);
 
-    visitor.append(&thisObject->m_nullGetterFunction);
-    visitor.append(&thisObject->m_nullSetterFunction);
+    visitor.append(thisObject->m_nullGetterFunction);
+    visitor.append(thisObject->m_nullSetterFunction);
 
-    visitor.append(&thisObject->m_parseIntFunction);
-    visitor.append(&thisObject->m_evalFunction);
-    visitor.append(&thisObject->m_callFunction);
-    visitor.append(&thisObject->m_applyFunction);
-    visitor.append(&thisObject->m_throwTypeErrorFunction);
+    visitor.append(thisObject->m_parseIntFunction);
+    visitor.append(thisObject->m_evalFunction);
+    visitor.append(thisObject->m_callFunction);
+    visitor.append(thisObject->m_applyFunction);
+    visitor.append(thisObject->m_throwTypeErrorFunction);
     thisObject->m_arrayProtoToStringFunction.visit(visitor);
     thisObject->m_arrayProtoValuesFunction.visit(visitor);
     thisObject->m_initializePromiseFunction.visit(visitor);
     thisObject->m_iteratorProtocolFunction.visit(visitor);
-    visitor.append(&thisObject->m_newPromiseCapabilityFunction);
-    visitor.append(&thisObject->m_functionProtoHasInstanceSymbolFunction);
+    visitor.append(thisObject->m_newPromiseCapabilityFunction);
+    visitor.append(thisObject->m_functionProtoHasInstanceSymbolFunction);
     thisObject->m_throwTypeErrorGetterSetter.visit(visitor);
-    visitor.append(&thisObject->m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter);
-    visitor.append(&thisObject->m_moduleLoader);
-
-    visitor.append(&thisObject->m_objectPrototype);
-    visitor.append(&thisObject->m_functionPrototype);
-    visitor.append(&thisObject->m_arrayPrototype);
-    visitor.append(&thisObject->m_errorPrototype);
-    visitor.append(&thisObject->m_iteratorPrototype);
-    visitor.append(&thisObject->m_generatorFunctionPrototype);
-    visitor.append(&thisObject->m_generatorPrototype);
-    visitor.append(&thisObject->m_asyncFunctionPrototype);
-    visitor.append(&thisObject->m_moduleLoaderPrototype);
+    visitor.append(thisObject->m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter);
+    visitor.append(thisObject->m_moduleLoader);
+
+    visitor.append(thisObject->m_objectPrototype);
+    visitor.append(thisObject->m_functionPrototype);
+    visitor.append(thisObject->m_arrayPrototype);
+    visitor.append(thisObject->m_errorPrototype);
+    visitor.append(thisObject->m_iteratorPrototype);
+    visitor.append(thisObject->m_generatorFunctionPrototype);
+    visitor.append(thisObject->m_generatorPrototype);
+    visitor.append(thisObject->m_asyncFunctionPrototype);
+    visitor.append(thisObject->m_moduleLoaderPrototype);
 
     thisObject->m_debuggerScopeStructure.visit(visitor);
     thisObject->m_withScopeStructure.visit(visitor);
-    visitor.append(&thisObject->m_strictEvalActivationStructure);
-    visitor.append(&thisObject->m_lexicalEnvironmentStructure);
+    visitor.append(thisObject->m_strictEvalActivationStructure);
+    visitor.append(thisObject->m_lexicalEnvironmentStructure);
     thisObject->m_moduleEnvironmentStructure.visit(visitor);
-    visitor.append(&thisObject->m_directArgumentsStructure);
-    visitor.append(&thisObject->m_scopedArgumentsStructure);
-    visitor.append(&thisObject->m_clonedArgumentsStructure);
-    visitor.append(&thisObject->m_objectStructureForObjectConstructor);
+    visitor.append(thisObject->m_directArgumentsStructure);
+    visitor.append(thisObject->m_scopedArgumentsStructure);
+    visitor.append(thisObject->m_clonedArgumentsStructure);
+    visitor.append(thisObject->m_objectStructureForObjectConstructor);
     for (unsigned i = 0; i < NumberOfIndexingShapes; ++i)
-        visitor.append(&thisObject->m_originalArrayStructureForIndexingShape[i]);
+        visitor.append(thisObject->m_originalArrayStructureForIndexingShape[i]);
     for (unsigned i = 0; i < NumberOfIndexingShapes; ++i)
-        visitor.append(&thisObject->m_arrayStructureForIndexingShapeDuringAllocation[i]);
+        visitor.append(thisObject->m_arrayStructureForIndexingShapeDuringAllocation[i]);
     thisObject->m_callbackConstructorStructure.visit(visitor);
     thisObject->m_callbackFunctionStructure.visit(visitor);
     thisObject->m_callbackObjectStructure.visit(visitor);
-    visitor.append(&thisObject->m_propertyNameIteratorStructure);
+    visitor.append(thisObject->m_propertyNameIteratorStructure);
 #if JSC_OBJC_API_ENABLED
     thisObject->m_objcCallbackFunctionStructure.visit(visitor);
     thisObject->m_objcWrapperObjectStructure.visit(visitor);
 #endif
     thisObject->m_nullPrototypeObjectStructure.visit(visitor);
-    visitor.append(&thisObject->m_errorStructure);
-    visitor.append(&thisObject->m_calleeStructure);
-    visitor.append(&thisObject->m_functionStructure);
+    visitor.append(thisObject->m_errorStructure);
+    visitor.append(thisObject->m_calleeStructure);
+    visitor.append(thisObject->m_functionStructure);
     thisObject->m_customGetterSetterFunctionStructure.visit(visitor);
     thisObject->m_boundFunctionStructure.visit(visitor);
-    visitor.append(&thisObject->m_getterSetterStructure);
+    visitor.append(thisObject->m_getterSetterStructure);
     thisObject->m_nativeStdFunctionStructure.visit(visitor);
     thisObject->m_namedFunctionStructure.visit(visitor);
-    visitor.append(&thisObject->m_symbolObjectStructure);
-    visitor.append(&thisObject->m_regExpStructure);
-    visitor.append(&thisObject->m_generatorFunctionStructure);
-    visitor.append(&thisObject->m_asyncFunctionStructure);
-    visitor.append(&thisObject->m_iteratorResultObjectStructure);
-    visitor.append(&thisObject->m_regExpMatchesArrayStructure);
-    visitor.append(&thisObject->m_moduleRecordStructure);
-    visitor.append(&thisObject->m_moduleNamespaceObjectStructure);
-    visitor.append(&thisObject->m_dollarVMStructure);
-    visitor.append(&thisObject->m_proxyObjectStructure);
-    visitor.append(&thisObject->m_callableProxyObjectStructure);
-    visitor.append(&thisObject->m_proxyRevokeStructure);
-    visitor.append(&thisObject->m_moduleLoaderStructure);
+    visitor.append(thisObject->m_symbolObjectStructure);
+    visitor.append(thisObject->m_regExpStructure);
+    visitor.append(thisObject->m_generatorFunctionStructure);
+    visitor.append(thisObject->m_asyncFunctionStructure);
+    visitor.append(thisObject->m_iteratorResultObjectStructure);
+    visitor.append(thisObject->m_regExpMatchesArrayStructure);
+    visitor.append(thisObject->m_moduleRecordStructure);
+    visitor.append(thisObject->m_moduleNamespaceObjectStructure);
+    visitor.append(thisObject->m_dollarVMStructure);
+    visitor.append(thisObject->m_proxyObjectStructure);
+    visitor.append(thisObject->m_callableProxyObjectStructure);
+    visitor.append(thisObject->m_proxyRevokeStructure);
+    visitor.append(thisObject->m_moduleLoaderStructure);
     
-    visitor.append(&thisObject->m_arrayBufferPrototype);
-    visitor.append(&thisObject->m_arrayBufferStructure);
-    visitor.append(&thisObject->m_sharedArrayBufferPrototype);
-    visitor.append(&thisObject->m_sharedArrayBufferStructure);
+    visitor.append(thisObject->m_arrayBufferPrototype);
+    visitor.append(thisObject->m_arrayBufferStructure);
+    visitor.append(thisObject->m_sharedArrayBufferPrototype);
+    visitor.append(thisObject->m_sharedArrayBufferStructure);
 
 #define VISIT_SIMPLE_TYPE(CapitalName, lowerName, properName, instanceType, jsName, prototypeBase) \
-    visitor.append(&thisObject->m_ ## lowerName ## Prototype); \
-    visitor.append(&thisObject->m_ ## properName ## Structure); \
+    visitor.append(thisObject->m_ ## lowerName ## Prototype); \
+    visitor.append(thisObject->m_ ## properName ## Structure); \
 
     FOR_EACH_SIMPLE_BUILTIN_TYPE(VISIT_SIMPLE_TYPE)
     
 #if ENABLE(WEBASSEMBLY)
-    visitor.append(&thisObject->m_webAssemblyStructure);
-    visitor.append(&thisObject->m_webAssemblyModuleRecordStructure);
-    visitor.append(&thisObject->m_webAssemblyFunctionStructure);
+    visitor.append(thisObject->m_webAssemblyStructure);
+    visitor.append(thisObject->m_webAssemblyModuleRecordStructure);
+    visitor.append(thisObject->m_webAssemblyFunctionStructure);
     FOR_EACH_WEBASSEMBLY_CONSTRUCTOR_TYPE(VISIT_SIMPLE_TYPE)
 #endif // ENABLE(WEBASSEMBLY)
 
@@ -1280,7 +1280,7 @@ void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     for (unsigned i = NUMBER_OF_TYPED_ARRAY_TYPES; i--;)
         thisObject->lazyTypedArrayStructure(indexToTypedArrayType(i)).visit(visitor);
     
-    visitor.append(&thisObject->m_speciesGetterSetter);
+    visitor.append(thisObject->m_speciesGetterSetter);
     thisObject->m_typedArrayProto.visit(visitor);
     thisObject->m_typedArraySuperConstructor.visit(visitor);
 }
index 40eb669..9da4550 100644 (file)
@@ -45,8 +45,8 @@ void JSMapIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSMapIterator* thisObject = jsCast<JSMapIterator*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_map);
-    visitor.append(&thisObject->m_iter);
+    visitor.append(thisObject->m_map);
+    visitor.append(thisObject->m_iter);
 }
 
 JSValue JSMapIterator::createPair(CallFrame* callFrame, JSValue key, JSValue value)
index 8168b78..80fedeb 100644 (file)
@@ -74,7 +74,7 @@ void JSModuleEnvironment::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSModuleEnvironment* thisObject = jsCast<JSModuleEnvironment*>(cell);
     Base::visitChildren(thisObject, visitor);
     visitor.appendValues(thisObject->variables(), thisObject->symbolTable()->scopeSize());
-    visitor.append(&thisObject->moduleRecordSlot());
+    visitor.append(thisObject->moduleRecordSlot());
 }
 
 bool JSModuleEnvironment::getOwnPropertySlot(JSObject* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 82724ff..d968c5c 100644 (file)
@@ -92,7 +92,7 @@ void JSModuleNamespaceObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSModuleNamespaceObject* thisObject = jsCast<JSModuleNamespaceObject*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_moduleRecord);
+    visitor.append(thisObject->m_moduleRecord);
 }
 
 bool JSModuleNamespaceObject::getOwnPropertySlot(JSObject* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index 40819d7..b786ff2 100644 (file)
@@ -73,7 +73,7 @@ void JSModuleRecord::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSModuleRecord* thisObject = jsCast<JSModuleRecord*>(cell);
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_moduleProgramExecutable);
+    visitor.append(thisObject->m_moduleProgramExecutable);
 }
 
 void JSModuleRecord::link(ExecState* exec)
index b4a2826..5d56d9b 100644 (file)
@@ -47,7 +47,7 @@ void JSNativeStdFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSNativeStdFunction* thisObject = jsCast<JSNativeStdFunction*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_functionCell);
+    visitor.append(thisObject->m_functionCell);
 }
 
 void JSNativeStdFunction::finishCreation(VM& vm, NativeExecutable* executable, int length, const String& name, NativeStdFunctionCell* functionCell)
index 8742e8f..1c62aec 100644 (file)
@@ -149,7 +149,7 @@ ALWAYS_INLINE Structure* JSObject::visitButterflyImpl(SlotVisitor& visitor)
         case ALL_ARRAY_STORAGE_INDEXING_TYPES:
             visitor.appendValuesHidden(butterfly->arrayStorage()->m_vector, butterfly->arrayStorage()->vectorLength());
             if (butterfly->arrayStorage()->m_sparseMap)
-                visitor.append(&butterfly->arrayStorage()->m_sparseMap);
+                visitor.append(butterfly->arrayStorage()->m_sparseMap);
             break;
         default:
             break;
@@ -411,7 +411,7 @@ ALWAYS_INLINE Structure* JSObject::visitButterflyImpl(SlotVisitor& visitor)
         default: // ALL_ARRAY_STORAGE_INDEXING_TYPES
             visitor.appendValuesHidden(butterfly->arrayStorage()->m_vector, butterfly->arrayStorage()->vectorLength());
             if (butterfly->arrayStorage()->m_sparseMap)
-                visitor.append(&butterfly->arrayStorage()->m_sparseMap);
+                visitor.append(butterfly->arrayStorage()->m_sparseMap);
             break;
         }
         break;
index 06afc98..d456917 100644 (file)
@@ -121,9 +121,9 @@ void JSPromiseDeferred::visitChildren(JSCell* cell, SlotVisitor& visitor)
 
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_promise);
-    visitor.append(&thisObject->m_resolve);
-    visitor.append(&thisObject->m_reject);
+    visitor.append(thisObject->m_promise);
+    visitor.append(thisObject->m_resolve);
+    visitor.append(thisObject->m_reject);
 }
 
 } // namespace JSC
index bb17964..9a39e8c 100644 (file)
@@ -92,8 +92,8 @@ void JSPropertyNameEnumerator::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSPropertyNameEnumerator* thisObject = jsCast<JSPropertyNameEnumerator*>(cell);
     auto locker = holdLock(*thisObject);
     for (unsigned i = 0; i < thisObject->m_propertyNames.size(); ++i)
-        visitor.append(&thisObject->m_propertyNames[i]);
-    visitor.append(&thisObject->m_prototypeChain);
+        visitor.append(thisObject->m_propertyNames[i]);
+    visitor.append(thisObject->m_prototypeChain);
 }
 
 } // namespace JSC
index b30d17e..d637884 100644 (file)
@@ -82,8 +82,8 @@ void JSPropertyNameIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSPropertyNameIterator* thisObject = jsCast<JSPropertyNameIterator*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_iteratedObject);
-    visitor.append(&thisObject->m_propertyNameEnumerator);
+    visitor.append(thisObject->m_iteratedObject);
+    visitor.append(thisObject->m_propertyNameEnumerator);
 }
 
 bool JSPropertyNameIterator::next(ExecState* exec, JSValue& output)
index e358b37..f623cac 100644 (file)
@@ -41,7 +41,7 @@ void JSProxy::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSProxy* thisObject = jsCast<JSProxy*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_target);
+    visitor.append(thisObject->m_target);
 }
 
 void JSProxy::setTarget(VM& vm, JSGlobalObject* globalObject)
index c890fb1..adda2b4 100644 (file)
@@ -44,7 +44,7 @@ void JSScope::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSScope* thisObject = jsCast<JSScope*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_next);
+    visitor.append(thisObject->m_next);
 }
 
 // Returns true if we found enough information to terminate optimization.
index 08a8e59..f371f32 100644 (file)
@@ -70,7 +70,7 @@ void JSSegmentedVariableObject::visitChildren(JSCell* cell, SlotVisitor& slotVis
     // relatively easily.
     auto locker = holdLock(thisObject->m_lock);
     for (unsigned i = thisObject->m_variables.size(); i--;)
-        slotVisitor.appendHidden(&thisObject->m_variables[i]);
+        slotVisitor.appendHidden(thisObject->m_variables[i]);
 }
 
 void JSSegmentedVariableObject::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
index c285bc3..9782779 100644 (file)
@@ -45,8 +45,8 @@ void JSSetIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSSetIterator* thisObject = jsCast<JSSetIterator*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_set);
-    visitor.append(&thisObject->m_iter);
+    visitor.append(thisObject->m_set);
+    visitor.append(thisObject->m_iter);
 }
 
 JSValue JSSetIterator::createPair(CallFrame* callFrame, JSValue key, JSValue value)
index 9e23139..db631c0 100644 (file)
@@ -104,11 +104,11 @@ void JSString::visitChildren(JSCell* cell, SlotVisitor& visitor)
 void JSRopeString::visitFibers(SlotVisitor& visitor)
 {
     if (isSubstring()) {
-        visitor.append(&substringBase());
+        visitor.append(substringBase());
         return;
     }
     for (size_t i = 0; i < s_maxInternalRopeLength && fiber(i); ++i)
-        visitor.append(&fiber(i));
+        visitor.append(fiber(i));
 }
 
 static const unsigned maxLengthForOnStackResolve = 2048;
index efbc191..f1041fb 100644 (file)
@@ -41,7 +41,7 @@ void JSSymbolTableObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSSymbolTableObject* thisObject = jsCast<JSSymbolTableObject*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_symbolTable);
+    visitor.append(thisObject->m_symbolTable);
 }
 
 bool JSSymbolTableObject::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName)
index c027ff2..8a2b30d 100644 (file)
@@ -43,7 +43,7 @@ void JSWeakMap::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Base::visitChildren(cell, visitor);
     JSWeakMap* thisObj = jsCast<JSWeakMap*>(cell);
-    visitor.append(&thisObj->m_weakMapData);
+    visitor.append(thisObj->m_weakMapData);
 }
 
 String JSWeakMap::toStringName(const JSObject*, ExecState*)
index 3577c5d..afc4ce6 100644 (file)
@@ -43,7 +43,7 @@ void JSWeakSet::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Base::visitChildren(cell, visitor);
     JSWeakSet* thisObj = jsCast<JSWeakSet*>(cell);
-    visitor.append(&thisObj->m_weakMapData);
+    visitor.append(thisObj->m_weakMapData);
 }
 
 String JSWeakSet::toStringName(const JSC::JSObject*, ExecState*)
index 08b6c68..50eff92 100644 (file)
@@ -46,7 +46,7 @@ void JSWithScope::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSWithScope* thisObject = jsCast<JSWithScope*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_object);
+    visitor.append(thisObject->m_object);
 }
 
 Structure* JSWithScope::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
index b6fadad..c69161c 100644 (file)
@@ -33,7 +33,7 @@ void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSWrapperObject* thisObject = jsCast<JSWrapperObject*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     JSObject::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_internalValue);
+    visitor.append(thisObject->m_internalValue);
 }
 
 } // namespace JSC
index 6ac59b8..1e601f9 100644 (file)
@@ -90,7 +90,7 @@ void LazyClassStructure::Initializer::setConstructor(JSObject* constructor)
 void LazyClassStructure::visit(SlotVisitor& visitor)
 {
     m_structure.visit(visitor);
-    visitor.append(&m_constructor);
+    visitor.append(m_constructor);
 }
 
 void LazyClassStructure::dump(PrintStream& out) const
index f7913b6..599d843 100644 (file)
@@ -69,7 +69,7 @@ template<typename OwnerType, typename ElementType>
 void LazyProperty<OwnerType, ElementType>::visit(SlotVisitor& visitor)
 {
     if (m_pointer && !(m_pointer & lazyTag))
-        visitor.appendUnbarrieredReadOnlyPointer(bitwise_cast<ElementType*>(m_pointer));
+        visitor.appendUnbarriered(bitwise_cast<ElementType*>(m_pointer));
 }
 
 template<typename OwnerType, typename ElementType>
index 437feaf..6527f8c 100644 (file)
@@ -35,7 +35,7 @@ void MapBase<HashMapBucketType>::visitChildren(JSCell* cell, SlotVisitor& visito
 {
     MapBase* thisObject = static_cast<MapBase*>(cell);
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_map);
+    visitor.append(thisObject->m_map);
 }
 
 template <typename HashMapBucketType>
index 8767be0..4fa1936 100644 (file)
@@ -91,8 +91,8 @@ void ModuleProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ModuleProgramExecutable* thisObject = jsCast<ModuleProgramExecutable*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     ScriptExecutable::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_unlinkedModuleProgramCodeBlock);
-    visitor.append(&thisObject->m_moduleEnvironmentSymbolTable);
+    visitor.append(thisObject->m_unlinkedModuleProgramCodeBlock);
+    visitor.append(thisObject->m_moduleEnvironmentSymbolTable);
     if (ModuleProgramCodeBlock* moduleProgramCodeBlock = thisObject->m_moduleProgramCodeBlock.get())
         moduleProgramCodeBlock->visitWeakly(visitor);
 }
index 47a812f..0055ef9 100644 (file)
@@ -58,7 +58,7 @@ void NativeErrorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
     NativeErrorConstructor* thisObject = jsCast<NativeErrorConstructor*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_errorStructure);
+    visitor.append(thisObject->m_errorStructure);
 }
 
 EncodedJSValue JSC_HOST_CALL Interpreter::constructWithNativeErrorConstructor(ExecState* exec)
index 6769e41..6a4f94a 100644 (file)
@@ -203,7 +203,7 @@ void ProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ProgramExecutable* thisObject = jsCast<ProgramExecutable*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     ScriptExecutable::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_unlinkedProgramCodeBlock);
+    visitor.append(thisObject->m_unlinkedProgramCodeBlock);
     if (ProgramCodeBlock* programCodeBlock = thisObject->m_programCodeBlock.get())
         programCodeBlock->visitWeakly(visitor);
 }
index 420f74a..aab1319 100644 (file)
@@ -1157,8 +1157,8 @@ void ProxyObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_target);
-    visitor.append(&thisObject->m_handler);
+    visitor.append(thisObject->m_target);
+    visitor.append(thisObject->m_handler);
 }
 
 } // namespace JSC
index 83dd07d..da6faa3 100644 (file)
@@ -81,7 +81,7 @@ void ProxyRevoke::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_proxy);
+    visitor.append(thisObject->m_proxy);
 }
 
 } // namespace JSC
index f83f32b..7dbaf05 100644 (file)
@@ -33,13 +33,13 @@ namespace JSC {
 
 void RegExpCachedResult::visitChildren(SlotVisitor& visitor)
 {
-    visitor.append(&m_lastInput);
-    visitor.append(&m_lastRegExp);
+    visitor.append(m_lastInput);
+    visitor.append(m_lastRegExp);
     if (m_reified) {
-        visitor.append(&m_reifiedInput);
-        visitor.append(&m_reifiedResult);
-        visitor.append(&m_reifiedLeftContext);
-        visitor.append(&m_reifiedRightContext);
+        visitor.append(m_reifiedInput);
+        visitor.append(m_reifiedResult);
+        visitor.append(m_reifiedLeftContext);
+        visitor.append(m_reifiedRightContext);
     }
 }
 
index 0ceb5b8..28b4498 100644 (file)
@@ -56,8 +56,8 @@ void RegExpObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
     RegExpObject* thisObject = jsCast<RegExpObject*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_regExp);
-    visitor.append(&thisObject->m_lastIndex);
+    visitor.append(thisObject->m_regExp);
+    visitor.append(thisObject->m_lastIndex);
 }
 
 bool RegExpObject::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
index f03b9b4..f7816b1 100644 (file)
@@ -91,7 +91,7 @@ void RegExpPrototype::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
     
-    visitor.append(&thisObject->m_emptyRegExp);
+    visitor.append(thisObject->m_emptyRegExp);
 }
 
 // ------------------------------ Functions ---------------------------
index 265fd68..7034dc6 100644 (file)
@@ -519,7 +519,7 @@ void SamplingProfiler::visit(SlotVisitor& slotVisitor)
 {
     RELEASE_ASSERT(m_lock.isLocked());
     for (JSCell* cell : m_liveCellPointers)
-        slotVisitor.appendUnbarrieredReadOnlyPointer(cell);
+        slotVisitor.appendUnbarriered(cell);
 }
 
 void SamplingProfiler::shutdown()
index 1d84379..f8eb6ec 100644 (file)
@@ -103,9 +103,9 @@ void ScopedArguments::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
 
-    visitor.append(&thisObject->m_callee);
-    visitor.append(&thisObject->m_table);
-    visitor.append(&thisObject->m_scope);
+    visitor.append(thisObject->m_callee);
+    visitor.append(thisObject->m_table);
+    visitor.append(thisObject->m_scope);
     
     if (thisObject->m_totalLength > thisObject->m_table->length()) {
         visitor.appendValues(
index 105c0ef..cac5d69 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "SmallStrings.h"
 
-#include "HeapRootVisitor.h"
 #include "JSGlobalObject.h"
 #include "JSString.h"
 #include "JSCInlines.h"
@@ -93,15 +92,15 @@ void SmallStrings::initializeCommonStrings(VM& vm)
 void SmallStrings::visitStrongReferences(SlotVisitor& visitor)
 {
     m_needsToBeVisited = false;
-    visitor.appendUnbarrieredPointer(&m_emptyString);
+    visitor.appendUnbarriered(m_emptyString);
     for (unsigned i = 0; i <= maxSingleCharacterString; ++i)
-        visitor.appendUnbarrieredPointer(m_singleCharacterStrings + i);
-#define JSC_COMMON_STRINGS_ATTRIBUTE_VISIT(name) visitor.appendUnbarrieredPointer(&m_##name);
+        visitor.appendUnbarriered(m_singleCharacterStrings[i]);
+#define JSC_COMMON_STRINGS_ATTRIBUTE_VISIT(name) visitor.appendUnbarriered(m_##name);
     JSC_COMMON_STRINGS_EACH_NAME(JSC_COMMON_STRINGS_ATTRIBUTE_VISIT)
 #undef JSC_COMMON_STRINGS_ATTRIBUTE_VISIT
-    visitor.appendUnbarrieredPointer(&m_objectStringStart);
-    visitor.appendUnbarrieredPointer(&m_nullObjectString);
-    visitor.appendUnbarrieredPointer(&m_undefinedObjectString);
+    visitor.appendUnbarriered(m_objectStringStart);
+    visitor.appendUnbarriered(m_nullObjectString);
+    visitor.appendUnbarriered(m_undefinedObjectString);
 }
 
 SmallStrings::~SmallStrings()
index 87abe79..10fae9a 100644 (file)
@@ -202,7 +202,7 @@ void SparseArrayValueMap::visitChildren(JSCell* thisObject, SlotVisitor& visitor
     auto locker = holdLock(*thisMap);
     iterator end = thisMap->m_map.end();
     for (iterator it = thisMap->m_map.begin(); it != end; ++it)
-        visitor.append(&it->value);
+        visitor.append(it->value);
 }
 
 } // namespace JSC
index 0e46cd0..2eb9191 100644 (file)
@@ -1060,25 +1060,25 @@ void Structure::visitChildren(JSCell* cell, SlotVisitor& visitor)
     
     ConcurrentJSLocker locker(thisObject->m_lock);
     
-    visitor.append(&thisObject->m_globalObject);
+    visitor.append(thisObject->m_globalObject);
     if (!thisObject->isObject())
         thisObject->m_cachedPrototypeChain.clear();
     else {
-        visitor.append(&thisObject->m_prototype);
-        visitor.append(&thisObject->m_cachedPrototypeChain);
+        visitor.append(thisObject->m_prototype);
+        visitor.append(thisObject->m_cachedPrototypeChain);
     }
-    visitor.append(&thisObject->m_previousOrRareData);
+    visitor.append(thisObject->m_previousOrRareData);
 
     if (thisObject->isPinnedPropertyTable() || thisObject->isAddingPropertyForTransition()) {
         // NOTE: This can interleave in pin(), in which case it may see a null property table.
         // That's fine, because then the barrier will fire and we will scan this again.
-        visitor.append(&thisObject->m_propertyTableUnsafe);
+        visitor.append(thisObject->m_propertyTableUnsafe);
     } else if (visitor.isBuildingHeapSnapshot())
-        visitor.append(&thisObject->m_propertyTableUnsafe);
+        visitor.append(thisObject->m_propertyTableUnsafe);
     else if (thisObject->m_propertyTableUnsafe)
         thisObject->m_propertyTableUnsafe.clear();
 
-    visitor.append(&thisObject->m_inferredTypeTable);
+    visitor.append(thisObject->m_inferredTypeTable);
 }
 
 bool Structure::isCheapDuringGC()
@@ -1096,7 +1096,7 @@ bool Structure::markIfCheap(SlotVisitor& visitor)
     if (!isCheapDuringGC())
         return Heap::isMarkedConcurrently(this);
     
-    visitor.appendUnbarrieredReadOnlyPointer(this);
+    visitor.appendUnbarriered(this);
     return true;
 }
 
index e111f62..eebfe20 100644 (file)
@@ -51,7 +51,7 @@ void StructureChain::visitChildren(JSCell* cell, SlotVisitor& visitor)
     if (WriteBarrier<Structure>* vector = thisObject->m_vector.get()) {
         size_t i = 0;
         while (vector[i])
-            visitor.append(&vector[i++]);
+            visitor.append(vector[i++]);
     }
 }
 
index 4cfbb26..bc75e14 100644 (file)
@@ -67,9 +67,9 @@ void StructureRareData::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
 
     JSCell::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_previous);
-    visitor.append(&thisObject->m_objectToStringValue);
-    visitor.append(&thisObject->m_cachedPropertyNameEnumerator);
+    visitor.append(thisObject->m_previous);
+    visitor.append(thisObject->m_objectToStringValue);
+    visitor.append(thisObject->m_cachedPropertyNameEnumerator);
 }
 
 JSPropertyNameEnumerator* StructureRareData::cachedPropertyNameEnumerator() const
index 7596f4a..8101944 100644 (file)
@@ -101,11 +101,11 @@ void SymbolTable::visitChildren(JSCell* thisCell, SlotVisitor& visitor)
 {
     SymbolTable* thisSymbolTable = jsCast<SymbolTable*>(thisCell);
     
-    visitor.append(&thisSymbolTable->m_arguments);
-    visitor.append(&thisSymbolTable->m_singletonScope);
+    visitor.append(thisSymbolTable->m_arguments);
+    visitor.append(thisSymbolTable->m_singletonScope);
     
     if (thisSymbolTable->m_rareData)
-        visitor.append(&thisSymbolTable->m_rareData->m_codeBlock);
+        visitor.append(thisSymbolTable->m_rareData->m_codeBlock);
     
     // Save some memory. This is O(n) to rebuild and we do so on the fly.
     ConcurrentJSLocker locker(thisSymbolTable->m_lock);
index 2f0fac3..6d98335 100644 (file)
@@ -104,10 +104,10 @@ void TypeProfilerLog::processLogEntries(const String& reason)
 void TypeProfilerLog::visit(SlotVisitor& visitor)
 {
     for (LogEntry* entry = m_logStartPtr; entry != m_currentLogEntryPtr; ++entry) {
-        visitor.appendUnbarrieredReadOnlyValue(entry->value);
+        visitor.appendUnbarriered(entry->value);
         if (StructureID id = entry->structureID) {
             Structure* structure = visitor.heap()->structureIDTable().get(id); 
-            visitor.appendUnbarrieredReadOnlyPointer(structure);
+            visitor.appendUnbarriered(structure);
         }
     }
 }
index 902fa6d..eba831e 100644 (file)
@@ -112,7 +112,7 @@ void WeakMapData::DeadKeyCleaner::visitWeakReferences(SlotVisitor& visitor)
         if (!Heap::isMarked(it->key))
             continue;
         m_liveKeyCount++;
-        visitor.append(&it->value);
+        visitor.append(it->value);
     }
     RELEASE_ASSERT(m_liveKeyCount <= m_target->m_map.size());
 }
index 960e248..180f570 100644 (file)
@@ -83,13 +83,13 @@ void JSWebAssemblyInstance::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
 
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_module);
-    visitor.append(&thisObject->m_moduleNamespaceObject);
-    visitor.append(&thisObject->m_memory);
-    visitor.append(&thisObject->m_table);
+    visitor.append(thisObject->m_module);
+    visitor.append(thisObject->m_moduleNamespaceObject);
+    visitor.append(thisObject->m_memory);
+    visitor.append(thisObject->m_table);
     visitor.reportExtraMemoryVisited(thisObject->module()->moduleInformation().globals.size());
     for (unsigned i = 0; i < thisObject->m_numImportFunctions; ++i)
-        visitor.append(thisObject->importFunction(i));
+        visitor.append(*thisObject->importFunction(i));
 }
 
 const ClassInfo JSWebAssemblyInstance::s_info = { "WebAssembly.Instance", &Base::s_info, 0, CREATE_METHOD_TABLE(JSWebAssemblyInstance) };
index 681d221..bc449a8 100644 (file)
@@ -88,7 +88,7 @@ void JSWebAssemblyMemory::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
 
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_bufferWrapper);
+    visitor.append(thisObject->m_bufferWrapper);
 }
 
 } // namespace JSC
index 337ce03..d6524c5 100644 (file)
@@ -79,11 +79,9 @@ void JSWebAssemblyModule::visitChildren(JSCell* cell, SlotVisitor& visitor)
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
 
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_exportSymbolTable);
-    for (unsigned i = 0; i < thisObject->m_calleeCount * 2; i++) {
-        WriteBarrier<JSWebAssemblyCallee>* callee = &thisObject->callees()[i];
-        visitor.append(callee);
-    }
+    visitor.append(thisObject->m_exportSymbolTable);
+    for (unsigned i = 0; i < thisObject->m_calleeCount * 2; i++)
+        visitor.append(thisObject->callees()[i]);
 
     visitor.addUnconditionalFinalizer(&thisObject->m_unconditionalFinalizer);
 }
index aee5417..684b144 100644 (file)
@@ -91,7 +91,7 @@ void JSWebAssemblyTable::visitChildren(JSCell* cell, SlotVisitor& visitor)
     Base::visitChildren(thisObject, visitor);
 
     for (unsigned i = 0; i < thisObject->m_size; ++i)
-        visitor.append(&thisObject->m_jsFunctions.get()[i]);
+        visitor.append(thisObject->m_jsFunctions.get()[i]);
 }
 
 bool JSWebAssemblyTable::grow(uint32_t newSize)
index f0be5f3..677c01a 100644 (file)
@@ -165,9 +165,9 @@ void WebAssemblyFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
     WebAssemblyFunction* thisObject = jsCast<WebAssemblyFunction*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_instance);
-    visitor.append(&thisObject->m_jsEntrypoint);
-    visitor.append(&thisObject->m_wasmEntrypoint);
+    visitor.append(thisObject->m_instance);
+    visitor.append(thisObject->m_jsEntrypoint);
+    visitor.append(thisObject->m_wasmEntrypoint);
 }
 
 void WebAssemblyFunction::finishCreation(VM& vm, NativeExecutable* executable, unsigned length, const String& name, JSWebAssemblyInstance* instance, JSWebAssemblyCallee* jsEntrypoint, JSWebAssemblyCallee* wasmEntrypoint, Wasm::Signature* signature)
index 0c6d881..6b599aa 100644 (file)
@@ -78,8 +78,8 @@ void WebAssemblyModuleRecord::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     WebAssemblyModuleRecord* thisObject = jsCast<WebAssemblyModuleRecord*>(cell);
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_instance);
-    visitor.append(&thisObject->m_startFunction);
+    visitor.append(thisObject->m_instance);
+    visitor.append(thisObject->m_startFunction);
 }
 
 void WebAssemblyModuleRecord::link(ExecState* state, JSWebAssemblyInstance* instance)
index 0c24778..2e52c17 100644 (file)
@@ -1,3 +1,27 @@
+2016-12-15  Filip Pizlo  <fpizlo@apple.com>
+
+        Get rid of HeapRootVisitor and make SlotVisitor less painful to use
+        https://bugs.webkit.org/show_bug.cgi?id=165911
+
+        Reviewed by Geoffrey Garen.
+
+        No new tests because no new behavior.
+        
+        This updates WebCore code to new JSC API.
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::DOMConstructorJSBuiltinObject::visitChildren):
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::visitChildren):
+        * bindings/js/JSDOMPromise.h:
+        (WebCore::DeferredPromise::visitAggregate):
+        * bindings/js/JSEventListener.cpp:
+        (WebCore::JSEventListener::visitJSFunction):
+        * bindings/js/JSWorkerGlobalScopeBase.cpp:
+        (WebCore::JSWorkerGlobalScopeBase::visitChildren):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+
 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Sort Xcode project files
index 468a4f9..5504000 100644 (file)
@@ -1013,7 +1013,7 @@ void DOMConstructorJSBuiltinObject::visitChildren(JSC::JSCell* cell, JSC::SlotVi
     auto* thisObject = jsCast<DOMConstructorJSBuiltinObject*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_initializeFunction);
+    visitor.append(thisObject->m_initializeFunction);
 }
 
 static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec)
index 62c4dfa..d1e0944 100644 (file)
@@ -191,10 +191,10 @@ void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
         auto locker = holdLock(thisObject->m_gcLock);
         
         for (auto& structure : thisObject->structures(locker).values())
-            visitor.append(&structure);
+            visitor.append(structure);
         
         for (auto& constructor : thisObject->constructors(locker).values())
-            visitor.append(&constructor);
+            visitor.append(constructor);
         
         for (auto& deferredPromise : thisObject->deferredPromises(locker))
             deferredPromise->visitAggregate(visitor);
index 6405e1b..f00d14d 100644 (file)
@@ -99,7 +99,7 @@ public:
     bool isSuspended() { return !m_deferred || !canInvokeCallback(); } // The wrapper world has gone away or active DOM objects have been suspended.
     JSDOMGlobalObject* globalObject() { return m_globalObject.get(); }
 
-    void visitAggregate(JSC::SlotVisitor& visitor) { visitor.appendUnbarrieredWeak(&m_deferred); }
+    void visitAggregate(JSC::SlotVisitor& visitor) { visitor.append(m_deferred); }
 
 private:
     DeferredPromise(JSDOMGlobalObject&, JSC::JSPromiseDeferred&);
index 7915692..300ce8b 100644 (file)
@@ -70,7 +70,7 @@ void JSEventListener::visitJSFunction(SlotVisitor& visitor)
     if (!m_wrapper)
         return;
 
-    visitor.appendUnbarrieredWeak(&m_jsFunction);
+    visitor.append(m_jsFunction);
 }
 
 void JSEventListener::handleEvent(ScriptExecutionContext* scriptExecutionContext, Event* event)
index a3f03fe..62f76c8 100644 (file)
@@ -79,7 +79,7 @@ void JSWorkerGlobalScopeBase::visitChildren(JSCell* cell, SlotVisitor& visitor)
     JSWorkerGlobalScopeBase* thisObject = jsCast<JSWorkerGlobalScopeBase*>(cell);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     Base::visitChildren(thisObject, visitor);
-    visitor.append(&thisObject->m_proxy);
+    visitor.append(thisObject->m_proxy);
 }
 
 void JSWorkerGlobalScopeBase::destroy(JSCell* cell)
index 7c19454..db0b522 100644 (file)
@@ -3977,7 +3977,7 @@ END
             foreach (@{$interface->attributes}) {
                 my $attribute = $_;
                 if ($attribute->extendedAttributes->{CachedAttribute}) {
-                    push(@implContent, "    visitor.append(&thisObject->m_" . $attribute->name . ");\n");
+                    push(@implContent, "    visitor.append(thisObject->m_" . $attribute->name . ");\n");
                 }
             }
         }