haikuwebkit/Source/WTF/wtf/PointerPreparations.h

54 lines
2.1 KiB
C
Raw Permalink Normal View History

Add infrastructure for pointer preparation. https://bugs.webkit.org/show_bug.cgi?id=182191 <rdar://problem/36889194> Reviewed by JF Bastien. Source/WebCore: No new tests because this patch does not introduce any behavior change. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestDOMJIT.cpp: * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PointerPreparations.h: Added. Canonical link: https://commits.webkit.org/198012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-27 00:43:27 +00:00
/*
Introduce a getVTablePointer() utility function. https://bugs.webkit.org/show_bug.cgi?id=206804 <rdar://problem/58872290> Reviewed by Yusuke Suzuki and Oliver Hunt. Source/WebCore: Updated CodeGeneratorJS to use getVTablePointer() and rebased test results. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSSetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: With getVTablePointer(), we can abstract away how we get a vtable function pointer without assuming the way it is signed for ARM64E. With this, we can remove the WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION macro which assumes how a vtable function pointer is signed. * wtf/PointerPreparations.h: Canonical link: https://commits.webkit.org/219790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-25 22:34:00 +00:00
* Copyright (C) 2018-2020 Apple Inc. All rights reserved.
Add infrastructure for pointer preparation. https://bugs.webkit.org/show_bug.cgi?id=182191 <rdar://problem/36889194> Reviewed by JF Bastien. Source/WebCore: No new tests because this patch does not introduce any behavior change. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestDOMJIT.cpp: * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PointerPreparations.h: Added. Canonical link: https://commits.webkit.org/198012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-27 00:43:27 +00:00
*
* 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
Introduce a getVTablePointer() utility function. https://bugs.webkit.org/show_bug.cgi?id=206804 <rdar://problem/58872290> Reviewed by Yusuke Suzuki and Oliver Hunt. Source/WebCore: Updated CodeGeneratorJS to use getVTablePointer() and rebased test results. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSSetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: With getVTablePointer(), we can abstract away how we get a vtable function pointer without assuming the way it is signed for ARM64E. With this, we can remove the WTF_PREPARE_VTBL_POINTER_FOR_INSPECTION macro which assumes how a vtable function pointer is signed. * wtf/PointerPreparations.h: Canonical link: https://commits.webkit.org/219790@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-01-25 22:34:00 +00:00
#if CPU(ARM64E)
#include <ptrauth.h>
#endif
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
namespace WTF {
#if COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
template<typename T>
getVTablePointer() should return a const void*. https://bugs.webkit.org/show_bug.cgi?id=207871 <rdar://problem/59525721> Reviewed by Yusuke Suzuki. Source/WebCore: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSSetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * wtf/PointerPreparations.h: (WTF::getVTablePointer): Canonical link: https://commits.webkit.org/220844@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-18 01:07:00 +00:00
ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }
Add infrastructure for pointer preparation. https://bugs.webkit.org/show_bug.cgi?id=182191 <rdar://problem/36889194> Reviewed by JF Bastien. Source/WebCore: No new tests because this patch does not introduce any behavior change. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestDOMJIT.cpp: * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp: * bindings/scripts/test/JS/JSTestSerializationInherit.cpp: * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/PointerPreparations.h: Added. Canonical link: https://commits.webkit.org/198012@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-01-27 00:43:27 +00:00
#else // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
#if CPU(ARM64E)
template<typename T>
getVTablePointer() should return a const void*. https://bugs.webkit.org/show_bug.cgi?id=207871 <rdar://problem/59525721> Reviewed by Yusuke Suzuki. Source/WebCore: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSSetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * wtf/PointerPreparations.h: (WTF::getVTablePointer): Canonical link: https://commits.webkit.org/220844@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-18 01:07:00 +00:00
ALWAYS_INLINE const void* getVTablePointer(T* o) { return __builtin_ptrauth_auth(*(reinterpret_cast<void**>(o)), ptrauth_key_cxx_vtable_pointer, 0); }
#else // not CPU(ARM64E)
template<typename T>
getVTablePointer() should return a const void*. https://bugs.webkit.org/show_bug.cgi?id=207871 <rdar://problem/59525721> Reviewed by Yusuke Suzuki. Source/WebCore: * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSInterfaceName.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSReadOnlySetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSSetLike.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactions.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestCallTracer.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEnabledForContext.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestEventTarget.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestGlobalObject.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestIterable.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestNode.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPluginInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerialization.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifier.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp: (WebCore::toJSNewlyCreated): * bindings/scripts/test/JS/JSTestTypedefs.cpp: (WebCore::toJSNewlyCreated): Source/WTF: * wtf/PointerPreparations.h: (WTF::getVTablePointer): Canonical link: https://commits.webkit.org/220844@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-18 01:07:00 +00:00
ALWAYS_INLINE const void* getVTablePointer(T* o) { return (*(reinterpret_cast<void**>(o))); }
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
#endif // not CPU(ARM64E)
#endif // not COMPILER_HAS_CLANG_BUILTIN(__builtin_get_vtable_pointer)
Open source arm64e code. https://bugs.webkit.org/show_bug.cgi?id=196012 <rdar://problem/49066237> Reviewed by Keith Miller. Source/JavaScriptCore: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * assembler/ARM64EAssembler.h: Added. (JSC::ARM64EAssembler::encodeGroup1): (JSC::ARM64EAssembler::encodeGroup2): (JSC::ARM64EAssembler::encodeGroup4): (JSC::ARM64EAssembler::pacia1716): (JSC::ARM64EAssembler::pacib1716): (JSC::ARM64EAssembler::autia1716): (JSC::ARM64EAssembler::autib1716): (JSC::ARM64EAssembler::paciaz): (JSC::ARM64EAssembler::paciasp): (JSC::ARM64EAssembler::pacibz): (JSC::ARM64EAssembler::pacibsp): (JSC::ARM64EAssembler::autiaz): (JSC::ARM64EAssembler::autiasp): (JSC::ARM64EAssembler::autibz): (JSC::ARM64EAssembler::autibsp): (JSC::ARM64EAssembler::xpaclri): (JSC::ARM64EAssembler::pacia): (JSC::ARM64EAssembler::pacib): (JSC::ARM64EAssembler::pacda): (JSC::ARM64EAssembler::pacdb): (JSC::ARM64EAssembler::autia): (JSC::ARM64EAssembler::autib): (JSC::ARM64EAssembler::autda): (JSC::ARM64EAssembler::autdb): (JSC::ARM64EAssembler::paciza): (JSC::ARM64EAssembler::pacizb): (JSC::ARM64EAssembler::pacdza): (JSC::ARM64EAssembler::pacdzb): (JSC::ARM64EAssembler::autiza): (JSC::ARM64EAssembler::autizb): (JSC::ARM64EAssembler::autdza): (JSC::ARM64EAssembler::autdzb): (JSC::ARM64EAssembler::xpaci): (JSC::ARM64EAssembler::xpacd): (JSC::ARM64EAssembler::pacga): (JSC::ARM64EAssembler::braa): (JSC::ARM64EAssembler::brab): (JSC::ARM64EAssembler::blraa): (JSC::ARM64EAssembler::blrab): (JSC::ARM64EAssembler::braaz): (JSC::ARM64EAssembler::brabz): (JSC::ARM64EAssembler::blraaz): (JSC::ARM64EAssembler::blrabz): (JSC::ARM64EAssembler::retaa): (JSC::ARM64EAssembler::retab): (JSC::ARM64EAssembler::eretaa): (JSC::ARM64EAssembler::eretab): (JSC::ARM64EAssembler::linkPointer): (JSC::ARM64EAssembler::repatchPointer): (JSC::ARM64EAssembler::setPointer): (JSC::ARM64EAssembler::readPointer): (JSC::ARM64EAssembler::readCallTarget): (JSC::ARM64EAssembler::ret): * assembler/MacroAssembler.cpp: * assembler/MacroAssembler.h: * assembler/MacroAssemblerARM64.cpp: * assembler/MacroAssemblerARM64E.h: Added. (JSC::MacroAssemblerARM64E::tagReturnAddress): (JSC::MacroAssemblerARM64E::untagReturnAddress): (JSC::MacroAssemblerARM64E::tagPtr): (JSC::MacroAssemblerARM64E::untagPtr): (JSC::MacroAssemblerARM64E::removePtrTag): (JSC::MacroAssemblerARM64E::callTrustedPtr): (JSC::MacroAssemblerARM64E::call): (JSC::MacroAssemblerARM64E::callRegister): (JSC::MacroAssemblerARM64E::jump): * dfg/DFGOSRExit.cpp: (JSC::DFG::reifyInlinedCallFrames): * dfg/DFGOSRExitCompilerCommon.cpp: (JSC::DFG::reifyInlinedCallFrames): * ftl/FTLThunks.cpp: (JSC::FTL::genericGenerationThunkGenerator): * jit/CCallHelpers.h: (JSC::CCallHelpers::prepareForTailCallSlow): * jit/CallFrameShuffler.cpp: (JSC::CallFrameShuffler::prepareForTailCall): * jit/ExecutableAllocator.cpp: (JSC::ExecutableAllocator::allocate): * jit/ThunkGenerators.cpp: (JSC::arityFixupGenerator): * llint/LLIntOfflineAsmConfig.h: * llint/LowLevelInterpreter.asm: * llint/LowLevelInterpreter64.asm: * runtime/ClassInfo.h: * runtime/InitializeThreading.cpp: (JSC::initializeThreading): * runtime/JSCPtrTag.cpp: Added. (JSC::tagForPtr): (JSC::ptrTagName): (JSC::initializePtrTagLookup): * runtime/JSCPtrTag.h: (JSC::initializePtrTagLookup): * runtime/Options.cpp: (JSC::recomputeDependentOptions): Source/WTF: * WTF.xcodeproj/project.pbxproj: * wtf/BlockPtr.h: * wtf/Platform.h: * wtf/PlatformRegisters.cpp: Added. (WTF::threadStateLRInternal): (WTF::threadStatePCInternal): * wtf/PlatformRegisters.h: * wtf/PointerPreparations.h: * wtf/PtrTag.cpp: Added. (WTF::tagForPtr): (WTF::ptrTagName): (WTF::registerPtrTagLookup): (WTF::reportBadTag): * wtf/PtrTag.h: (WTF::removeCodePtrTag): (WTF::tagCodePtrImpl): (WTF::tagCodePtr): (WTF::untagCodePtrImplHelper): (WTF::untagCodePtrImpl): (WTF::untagCodePtr): (WTF::retagCodePtrImplHelper): (WTF::retagCodePtrImpl): (WTF::retagCodePtr): (WTF::tagCFunctionPtrImpl): (WTF::tagCFunctionPtr): (WTF::untagCFunctionPtrImpl): (WTF::untagCFunctionPtr): (WTF::tagInt): (WTF::assertIsCFunctionPtr): (WTF::assertIsNullOrCFunctionPtr): (WTF::assertIsNotTagged): (WTF::assertIsTagged): (WTF::assertIsNullOrTagged): (WTF::isTaggedWith): (WTF::assertIsTaggedWith): (WTF::assertIsNullOrTaggedWith): (WTF::usesPointerTagging): (WTF::registerPtrTagLookup): (WTF::reportBadTag): (WTF::tagForPtr): Deleted. Canonical link: https://commits.webkit.org/210319@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243254 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-03-20 23:32:26 +00:00
} // namespace WTF
using WTF::getVTablePointer;