Skip to content

Commit 5b2f7f3

Browse files
theoweidmannoracleTobiHartmann
authored andcommittedNov 11, 2024
8343837: Remove unnecessary reinterpret_cast from C2AccessValuePtr
Reviewed-by: thartmann, kvn, kbarrett
1 parent 5f338e9 commit 5b2f7f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/hotspot/share/gc/shared/c2/barrierSetC2.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -92,9 +92,9 @@ class C2AccessValuePtr: public C2AccessValue {
9292

9393
public:
9494
C2AccessValuePtr(Node* node, const TypePtr* type) :
95-
C2AccessValue(node, reinterpret_cast<const Type*>(type)) {}
95+
C2AccessValue(node, type) {}
9696

97-
const TypePtr* type() const { return reinterpret_cast<const TypePtr*>(_type); }
97+
const TypePtr* type() const { return _type->is_ptr(); }
9898
};
9999

100100
// This class wraps a bunch of context parameters that are passed around in the

0 commit comments

Comments
 (0)
Please sign in to comment.