From 5b2f7f3b30adf9942fa8a3382e7661d6816fbb38 Mon Sep 17 00:00:00 2001 From: theoweidmannoracle Date: Mon, 11 Nov 2024 08:17:00 +0000 Subject: [PATCH] 8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr Reviewed-by: thartmann, kvn, kbarrett --- src/hotspot/share/gc/shared/c2/barrierSetC2.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp index 00fbf1f2c9f..a78fd434ad9 100644 --- a/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp +++ b/src/hotspot/share/gc/shared/c2/barrierSetC2.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,9 +92,9 @@ class C2AccessValuePtr: public C2AccessValue { public: C2AccessValuePtr(Node* node, const TypePtr* type) : - C2AccessValue(node, reinterpret_cast(type)) {} + C2AccessValue(node, type) {} - const TypePtr* type() const { return reinterpret_cast(_type); } + const TypePtr* type() const { return _type->is_ptr(); } }; // This class wraps a bunch of context parameters that are passed around in the