[webkit-changes] [WebKit/WebKit] 568657: Cut the size of JSGlobalObject.h down

Darin Adler noreply at github.com
Sun Mar 5 16:32:58 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 568657736a638d4a2649e98fa9454ce3cc042dd1
      https://github.com/WebKit/WebKit/commit/568657736a638d4a2649e98fa9454ce3cc042dd1
  Author: Darin Adler <darin at apple.com>
  Date:   2023-03-05 (Sun, 05 Mar 2023)

  Changed paths:
    M Source/JavaScriptCore/API/APICast.h
    M Source/JavaScriptCore/API/JSAPIGlobalObject.cpp
    M Source/JavaScriptCore/API/JSAPIGlobalObject.h
    M Source/JavaScriptCore/API/JSAPIGlobalObject.mm
    M Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
    M Source/JavaScriptCore/API/JSClassRef.cpp
    M Source/JavaScriptCore/CMakeLists.txt
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp
    M Source/JavaScriptCore/bytecode/CodeBlock.h
    M Source/JavaScriptCore/bytecode/ExecutionCounter.h
    M Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h
    M Source/JavaScriptCore/bytecode/SpeculatedType.cpp
    M Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
    M Source/JavaScriptCore/debugger/DebuggerEvalEnabler.h
    M Source/JavaScriptCore/debugger/ScriptProfilingScope.h
    M Source/JavaScriptCore/dfg/DFGOperations.cpp
    M Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp
    M Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp
    M Source/JavaScriptCore/heap/Heap.cpp
    M Source/JavaScriptCore/heap/IsoSubspace.h
    M Source/JavaScriptCore/interpreter/CallFrameInlines.h
    M Source/JavaScriptCore/interpreter/Interpreter.cpp
    M Source/JavaScriptCore/jsc.cpp
    M Source/JavaScriptCore/runtime/AggregateError.h
    M Source/JavaScriptCore/runtime/AggregateErrorConstructor.cpp
    M Source/JavaScriptCore/runtime/AggregateErrorConstructor.h
    M Source/JavaScriptCore/runtime/AggregateErrorPrototype.h
    M Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h
    M Source/JavaScriptCore/runtime/ArrayPrototypeInlines.h
    M Source/JavaScriptCore/runtime/BytecodeCacheError.h
    M Source/JavaScriptCore/runtime/DeferredWorkTimer.cpp
    M Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp
    M Source/JavaScriptCore/runtime/ExecutableBase.h
    M Source/JavaScriptCore/runtime/FunctionConstructor.cpp
    A Source/JavaScriptCore/runtime/GlobalObjectMethodTable.h
    M Source/JavaScriptCore/runtime/IndirectEvalExecutable.cpp
    M Source/JavaScriptCore/runtime/IntlObject.cpp
    M Source/JavaScriptCore/runtime/JSArrayBufferView.h
    M Source/JavaScriptCore/runtime/JSBigInt.h
    M Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h
    M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
    M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObject.h
    M Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
    M Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h
    M Source/JavaScriptCore/runtime/JSModuleLoader.cpp
    M Source/JavaScriptCore/runtime/JSONObject.cpp
    M Source/JavaScriptCore/runtime/JSObjectInlines.h
    M Source/JavaScriptCore/runtime/JSPromise.cpp
    M Source/JavaScriptCore/runtime/JSScriptFetchParameters.h
    M Source/JavaScriptCore/runtime/JSScriptFetcher.h
    M Source/JavaScriptCore/runtime/JSSourceCode.h
    M Source/JavaScriptCore/runtime/JSWithScope.h
    M Source/JavaScriptCore/runtime/LazyClassStructure.h
    M Source/JavaScriptCore/runtime/LazyProperty.h
    M Source/JavaScriptCore/runtime/ModuleProgramExecutable.h
    M Source/JavaScriptCore/runtime/PrototypeKey.h
    M Source/JavaScriptCore/runtime/ProxyObject.h
    M Source/JavaScriptCore/runtime/RegExpCachedResult.h
    M Source/JavaScriptCore/runtime/RegExpGlobalDataInlines.h
    M Source/JavaScriptCore/runtime/ShadowRealmObject.cpp
    M Source/JavaScriptCore/runtime/StructureCache.h
    M Source/JavaScriptCore/runtime/StructureInlines.h
    M Source/JavaScriptCore/tools/JSDollarVM.cpp
    M Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp
    M Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/bindings/js/JSCallbackData.h
    M Source/WebCore/bindings/js/JSDOMConvertBufferSource.h
    M Source/WebCore/bindings/js/JSDOMConvertDate.h
    M Source/WebCore/bindings/js/JSDOMConvertUnion.h
    M Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
    M Source/WebCore/bindings/js/JSDOMGlobalObject.h
    M Source/WebCore/bindings/js/JSDOMGuardedObject.h
    M Source/WebCore/bindings/js/JSDOMWindowBase.cpp
    M Source/WebCore/bindings/js/JSDOMWindowBase.h
    M Source/WebCore/bindings/js/JSDOMWrapperCache.h
    M Source/WebCore/bindings/js/JSRemoteDOMWindowBase.cpp
    M Source/WebCore/bindings/js/JSRemoteDOMWindowBase.h
    M Source/WebCore/bindings/js/JSShadowRealmGlobalScopeBase.cpp
    M Source/WebCore/bindings/js/JSShadowRealmGlobalScopeBase.h
    M Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
    M Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h
    M Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.cpp
    M Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.h
    M Source/WebCore/bindings/js/ScriptWrappable.h
    M Source/WebCore/bindings/js/ScriptWrappableInlines.h
    M Source/WebCore/bindings/js/SerializedScriptValue.cpp
    M Source/WebCore/bindings/js/WebCoreTypedArrayController.h
    M Source/WebCore/bridge/runtime_method.h
    M Source/WebCore/html/FormAssociatedCustomElement.h
    M Source/WebCore/html/canvas/EXTDisjointTimerQuery.cpp
    M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
    R Source/WebCore/html/canvas/WebGLAnyInlines.h
    M Source/WebCore/html/canvas/WebGLRenderingContext.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
    M Source/WebCore/html/track/DataCue.h
    M Source/WebCore/inspector/InspectorCanvas.h
    M Source/WebCore/page/WindowOrWorkerGlobalScope.cpp
    M Source/WebCore/platform/SerializedPlatformDataCue.h
    M Source/WebKit/Platform/IPC/JSIPCBinding.h

  Log Message:
  -----------
  Cut the size of JSGlobalObject.h down
https://bugs.webkit.org/show_bug.cgi?id=253376
rdar://problem/106225153

Reviewed by Jer Noble.

Moved things out of JSGlobalObject.h, and removed unneeded includes of JSGlobalObject.h.

* Source/JavaScriptCore/API/APICast.h: Updated includes.

* Source/JavaScriptCore/API/JSAPIGlobalObject.cpp:
(JSC::JSAPIGlobalObject::globalObjectMethodTable): Use function for this class's
globalObjectMethodTable so header doesn't need to include GlobalObjectMethodTable.h.
* Source/JavaScriptCore/API/JSAPIGlobalObject.h: Ditto.
* Source/JavaScriptCore/API/JSAPIGlobalObject.mm:
(JSC::JSAPIGlobalObject::globalObjectMethodTable): Ditto.

* Source/JavaScriptCore/API/JSCallbackObjectFunctions.h: Updated includes.

* Source/JavaScriptCore/API/JSClassRef.cpp:
(OpaqueJSClass::contextData): Use new JSGlobalObject::contextData function, helping hide
more of the details of the JSGlobalObject rare data from other includers of JSGlobalObject.h

* Source/JavaScriptCore/CMakeLists.txt: Added GlobalObjectMethodTable.h.
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: Ditto.

* Source/JavaScriptCore/bytecode/BytecodeIntrinsicRegistry.cpp: Updated includes.
* Source/JavaScriptCore/bytecode/CodeBlock.h: Ditto.
* Source/JavaScriptCore/bytecode/ExecutionCounter.h: Ditto.
* Source/JavaScriptCore/bytecode/ObjectAllocationProfile.h: Ditto.
* Source/JavaScriptCore/bytecode/SpeculatedType.cpp: Ditto.
* Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: Ditto.
* Source/JavaScriptCore/debugger/DebuggerEvalEnabler.h: Ditto.
* Source/JavaScriptCore/debugger/ScriptProfilingScope.h: Ditto.
* Source/JavaScriptCore/dfg/DFGOperations.cpp: Ditto.
* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp: Ditto.
* Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp: Ditto.
* Source/JavaScriptCore/heap/Heap.cpp: Ditto.

* Source/JavaScriptCore/heap/IsoSubspace.h: Removed unused isAllocatedFromIsoSubspace.

* Source/JavaScriptCore/interpreter/CallFrameInlines.h: Updated includes.
* Source/JavaScriptCore/interpreter/Interpreter.cpp: Ditto.
* Source/JavaScriptCore/jsc.cpp: Ditto.
* Source/JavaScriptCore/runtime/AggregateError.h: Ditto.
* Source/JavaScriptCore/runtime/AggregateErrorConstructor.cpp: Ditto.
* Source/JavaScriptCore/runtime/AggregateErrorConstructor.h: Ditto.
* Source/JavaScriptCore/runtime/AggregateErrorPrototype.h: Ditto.
* Source/JavaScriptCore/runtime/ArrayBufferSharingMode.h: Ditto.
* Source/JavaScriptCore/runtime/ArrayPrototypeInlines.h: Ditto.
* Source/JavaScriptCore/runtime/BytecodeCacheError.h: Ditto.
* Source/JavaScriptCore/runtime/DeferredWorkTimer.cpp: Ditto.
* Source/JavaScriptCore/runtime/DirectEvalExecutable.cpp: Ditto.
* Source/JavaScriptCore/runtime/ExecutableBase.h: Ditto.
* Source/JavaScriptCore/runtime/FunctionConstructor.cpp: Ditto.

* Source/JavaScriptCore/runtime/GlobalObjectMethodTable.h: Added. Code here was moved
from JSGlobalObject.h.

* Source/JavaScriptCore/runtime/IndirectEvalExecutable.cpp: Updated includes.
* Source/JavaScriptCore/runtime/IntlObject.cpp: Ditto.

* Source/JavaScriptCore/runtime/JSArrayBufferView.h: Marked some functions inline so we
get warnings if we forget to include the JSArrayBufferViewInlines.h header, even in
debug builds.

* Source/JavaScriptCore/runtime/JSBigInt.h: Updated includes.
* Source/JavaScriptCore/runtime/JSFinalizationRegistry.cpp: Ditto.

* Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h: Moved inline function bodies
out of here into JSGenericTypedArrayViewInlines.h.
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h: Ditto.

* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::baseGlobalObjectMethodTable): Use function for this so header
doesn't need to include GlobalObjectMethodTable.h.
(JSC::JSGlobalObject::JSGlobalObject): Use baseGlobalObjectMethodTable.
(JSC::JSGlobalObject::typedArrayConstructorSpeciesAbsenceWatchpoint): Moved from header.
It is only used in this file.
(JSC::JSGlobalObject::typedArrayPrototypeSymbolIteratorAbsenceWatchpoint): Ditto.
(JSC::JSGlobalObject::typedArrayPrototypeConstructorWatchpoint): Ditto.

* Source/JavaScriptCore/runtime/JSGlobalObject.h: Updated includes and forward declarations.
Moved GlobalObjectData out of the header. Renamed JSGlobalObject::JSGlobalObjectRareData
to JSGlobalObject::RareData and moved it to the inlines header. Moved
JSGlobalObject::GlobalPropertyInfo out of the header.

* Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp: Updated includes.

* Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h: Moved things here from JSGlobalObject.h.

* Source/JavaScriptCore/runtime/JSModuleLoader.cpp: Updated includes.
* Source/JavaScriptCore/runtime/JSONObject.cpp: Ditto.
* Source/JavaScriptCore/runtime/JSObjectInlines.h: Ditto.
* Source/JavaScriptCore/runtime/JSPromise.cpp: Ditto.
* Source/JavaScriptCore/runtime/JSScriptFetchParameters.h: Ditto.
* Source/JavaScriptCore/runtime/JSScriptFetcher.h: Ditto.
* Source/JavaScriptCore/runtime/JSSourceCode.h: Ditto.
* Source/JavaScriptCore/runtime/JSWithScope.h: Ditto.
* Source/JavaScriptCore/runtime/LazyClassStructure.h: Ditto.
* Source/JavaScriptCore/runtime/LazyProperty.h: Ditto.
* Source/JavaScriptCore/runtime/ModuleProgramExecutable.h: Ditto.
* Source/JavaScriptCore/runtime/PrototypeKey.h: Ditto.
* Source/JavaScriptCore/runtime/ProxyObject.h: Ditto.

* Source/JavaScriptCore/runtime/RegExpCachedResult.h: Moved RegExpCachedResult::record
to RegExpGlobalDataInlines.h.
* Source/JavaScriptCore/runtime/RegExpGlobalDataInlines.h: Ditto.

* Source/JavaScriptCore/runtime/ShadowRealmObject.cpp: Updated includes.
* Source/JavaScriptCore/runtime/StructureCache.h: Ditto.
* Source/JavaScriptCore/runtime/StructureInlines.h: Ditto.
* Source/JavaScriptCore/tools/JSDollarVM.cpp: Ditto.
* Source/JavaScriptCore/wasm/js/JSWebAssembly.cpp: Ditto.
* Source/JavaScriptCore/wasm/js/JSWebAssemblyHelpers.h: Ditto.

* Source/WebCore/Headers.cmake: Removed WebGLAnyInlines.h.

* Source/WebCore/Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
Updated includes.

* Source/WebCore/WebCore.xcodeproj/project.pbxproj: Removed WebGLAnyInlines.h.

* Source/WebCore/bindings/js/JSCallbackData.h: Updated includes.
* Source/WebCore/bindings/js/JSDOMConvertBufferSource.h: Ditto.
* Source/WebCore/bindings/js/JSDOMConvertDate.h: Ditto.
* Source/WebCore/bindings/js/JSDOMConvertUnion.h: Ditto.
* Source/WebCore/bindings/js/JSDOMGlobalObject.cpp: Ditto.
* Source/WebCore/bindings/js/JSDOMGlobalObject.h: Ditto.
* Source/WebCore/bindings/js/JSDOMGuardedObject.h: Ditto.

* Source/WebCore/bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::globalObjectMethodTable): Use function for this class's
globalObjectMethodTable so header doesn't need to include GlobalObjectMethodTable.h.
* Source/WebCore/bindings/js/JSDOMWindowBase.h: Ditto.

* Source/WebCore/bindings/js/JSDOMWrapperCache.h: Updated includes.

* Source/WebCore/bindings/js/JSRemoteDOMWindowBase.cpp:
(WebCore::JSRemoteDOMWindowBase::globalObjectMethodTable): Use function for this class's
globalObjectMethodTable so header doesn't need to include GlobalObjectMethodTable.h.
* Source/WebCore/bindings/js/JSRemoteDOMWindowBase.h: Ditto.
* Source/WebCore/bindings/js/JSShadowRealmGlobalScopeBase.cpp:
(WebCore::JSShadowRealmGlobalScopeBase::globalObjectMethodTable): Ditto.
* Source/WebCore/bindings/js/JSShadowRealmGlobalScopeBase.h: Ditto.
* Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::globalObjectMethodTable): Ditto.
* Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h: Ditto.
* Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.cpp:
(WebCore::JSWorkletGlobalScopeBase::globalObjectMethodTable): Ditto.
* Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.h: Ditto.

* Source/WebCore/bindings/js/ScriptWrappable.h: Add inline keyword for declaration of
some functions that are inlines in the ScriptWrappableInlines.h header.

* Source/WebCore/bindings/js/ScriptWrappableInlines.h: Updated includes.
* Source/WebCore/bindings/js/SerializedScriptValue.cpp: Ditto.
* Source/WebCore/bindings/js/WebCoreTypedArrayController.h: Ditto.
* Source/WebCore/bridge/runtime_method.h: Ditto.
* Source/WebCore/html/FormAssociatedCustomElement.h: Ditto.
* Source/WebCore/html/canvas/EXTDisjointTimerQuery.cpp: Ditto.
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp: Ditto.

* Source/WebCore/html/canvas/WebGLAnyInlines.h: Removed.

* Source/WebCore/html/canvas/WebGLRenderingContext.cpp: Updated includes.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: Ditto.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h: Ditto.
* Source/WebCore/html/track/DataCue.h: Ditto.
* Source/WebCore/inspector/InspectorCanvas.h: Ditto.
* Source/WebCore/page/WindowOrWorkerGlobalScope.cpp: Ditto.
* Source/WebCore/platform/SerializedPlatformDataCue.h: Ditto.
* Source/WebKit/Platform/IPC/JSIPCBinding.h: Ditto.

Canonical link: https://commits.webkit.org/261249@main




More information about the webkit-changes mailing list