Skip to content

Commit 3efa93b

Browse files
author
Kim Barrett
committed
8335588: Fix -Wzero-as-null-pointer-constant warnings in calls to Node ctor
Reviewed-by: thartmann, chagedorn
1 parent 587535c commit 3efa93b

File tree

10 files changed

+34
-34
lines changed

10 files changed

+34
-34
lines changed

src/hotspot/share/opto/addnode.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef const Pair<Node*, jint> ConstAddOperands;
4343
class AddNode : public Node {
4444
virtual uint hash() const;
4545
public:
46-
AddNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {
46+
AddNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {
4747
init_class_id(Class_Add);
4848
}
4949

@@ -165,7 +165,7 @@ class AddPNode : public Node {
165165
Base, // Base oop, for GC purposes
166166
Address, // Actually address, derived from base
167167
Offset } ; // Offset added to address
168-
AddPNode( Node *base, Node *ptr, Node *off ) : Node(0,base,ptr,off) {
168+
AddPNode( Node *base, Node *ptr, Node *off ) : Node(nullptr,base,ptr,off) {
169169
init_class_id(Class_AddP);
170170
}
171171
virtual int Opcode() const;

src/hotspot/share/opto/convertnode.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 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
@@ -260,7 +260,7 @@ class RoundDoubleModeNode: public Node {
260260
rmode_floor = 1,
261261
rmode_ceil = 2
262262
};
263-
RoundDoubleModeNode(Node *in1, Node * rmode): Node(0, in1, rmode) {}
263+
RoundDoubleModeNode(Node *in1, Node * rmode): Node(nullptr, in1, rmode) {}
264264
static RoundDoubleModeNode* make(PhaseGVN& gvn, Node* arg, RoundDoubleModeNode::RoundingMode rmode);
265265
virtual int Opcode() const;
266266
virtual const Type *bottom_type() const { return Type::DOUBLE; }

src/hotspot/share/opto/countbitsnode.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 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
@@ -33,7 +33,7 @@ class PhaseTransform;
3333
//---------- CountBitsNode -----------------------------------------------------
3434
class CountBitsNode : public Node {
3535
public:
36-
CountBitsNode(Node* in1) : Node(0, in1) {}
36+
CountBitsNode(Node* in1) : Node(nullptr, in1) {}
3737
const Type* bottom_type() const { return TypeInt::INT; }
3838
virtual uint ideal_reg() const { return Op_RegI; }
3939
};

src/hotspot/share/opto/intrinsicnode.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 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
@@ -239,7 +239,7 @@ class WhitespaceNode : public Node {
239239
//------------------------------CopySign-----------------------------------------
240240
class CopySignDNode : public Node {
241241
protected:
242-
CopySignDNode(Node* in1, Node* in2, Node* in3) : Node(0, in1, in2, in3) {}
242+
CopySignDNode(Node* in1, Node* in2, Node* in3) : Node(nullptr, in1, in2, in3) {}
243243
public:
244244
static CopySignDNode* make(PhaseGVN& gvn, Node* in1, Node* in2);
245245
virtual int Opcode() const;
@@ -249,7 +249,7 @@ class CopySignDNode : public Node {
249249

250250
class CopySignFNode : public Node {
251251
public:
252-
CopySignFNode(Node* in1, Node* in2) : Node(0, in1, in2) {}
252+
CopySignFNode(Node* in1, Node* in2) : Node(nullptr, in1, in2) {}
253253
virtual int Opcode() const;
254254
const Type* bottom_type() const { return TypeLong::FLOAT; }
255255
virtual uint ideal_reg() const { return Op_RegF; }
@@ -258,7 +258,7 @@ class CopySignFNode : public Node {
258258
//------------------------------Signum-------------------------------------------
259259
class SignumDNode : public Node {
260260
protected:
261-
SignumDNode(Node* in1, Node* in2, Node* in3) : Node(0, in1, in2, in3) {}
261+
SignumDNode(Node* in1, Node* in2, Node* in3) : Node(nullptr, in1, in2, in3) {}
262262
public:
263263
static SignumDNode* make(PhaseGVN& gvn, Node* in);
264264
virtual int Opcode() const;
@@ -268,7 +268,7 @@ class SignumDNode : public Node {
268268

269269
class SignumFNode : public Node {
270270
protected:
271-
SignumFNode(Node* in1, Node* in2, Node* in3) : Node(0, in1, in2, in3) {}
271+
SignumFNode(Node* in1, Node* in2, Node* in3) : Node(nullptr, in1, in2, in3) {}
272272
public:
273273
static SignumFNode* make(PhaseGVN& gvn, Node* in);
274274
virtual int Opcode() const;
@@ -306,7 +306,7 @@ class ExpandBitsNode : public TypeNode {
306306
//---------- IsInfiniteFNode -----------------------------------------------------
307307
class IsInfiniteFNode : public Node {
308308
public:
309-
IsInfiniteFNode(Node* in1) : Node(0, in1) {}
309+
IsInfiniteFNode(Node* in1) : Node(nullptr, in1) {}
310310
virtual int Opcode() const;
311311
const Type* bottom_type() const { return TypeInt::BOOL; }
312312
virtual uint ideal_reg() const { return Op_RegI; }
@@ -315,7 +315,7 @@ class IsInfiniteFNode : public Node {
315315
//---------- IsInfiniteDNode -----------------------------------------------------
316316
class IsInfiniteDNode : public Node {
317317
public:
318-
IsInfiniteDNode(Node* in1) : Node(0, in1) {}
318+
IsInfiniteDNode(Node* in1) : Node(nullptr, in1) {}
319319
virtual int Opcode() const;
320320
const Type* bottom_type() const { return TypeInt::BOOL; }
321321
virtual uint ideal_reg() const { return Op_RegI; }
@@ -324,7 +324,7 @@ class IsInfiniteDNode : public Node {
324324
//---------- IsFiniteFNode -----------------------------------------------------
325325
class IsFiniteFNode : public Node {
326326
public:
327-
IsFiniteFNode(Node* in1) : Node(0, in1) {}
327+
IsFiniteFNode(Node* in1) : Node(nullptr, in1) {}
328328
virtual int Opcode() const;
329329
const Type* bottom_type() const { return TypeInt::BOOL; }
330330
virtual uint ideal_reg() const { return Op_RegI; }
@@ -333,7 +333,7 @@ class IsFiniteFNode : public Node {
333333
//---------- IsFiniteDNode -----------------------------------------------------
334334
class IsFiniteDNode : public Node {
335335
public:
336-
IsFiniteDNode(Node* in1) : Node(0, in1) {}
336+
IsFiniteDNode(Node* in1) : Node(nullptr, in1) {}
337337
virtual int Opcode() const;
338338
const Type* bottom_type() const { return TypeInt::BOOL; }
339339
virtual uint ideal_reg() const { return Op_RegI; }

src/hotspot/share/opto/loopnode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ inline jlong BaseCountedLoopNode::stride_con() const {
514514
class LoopLimitNode : public Node {
515515
enum { Init=1, Limit=2, Stride=3 };
516516
public:
517-
LoopLimitNode( Compile* C, Node *init, Node *limit, Node *stride ) : Node(0,init,limit,stride) {
517+
LoopLimitNode( Compile* C, Node *init, Node *limit, Node *stride ) : Node(nullptr,init,limit,stride) {
518518
// Put it on the Macro nodes list to optimize during macro nodes expansion.
519519
init_flags(Flag_is_macro);
520520
C->add_macro_node(this);

src/hotspot/share/opto/memnode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1681,7 +1681,7 @@ class CacheWBPostSyncNode : public Node {
16811681
// Allocation prefetch which may fault, TLAB size have to be adjusted.
16821682
class PrefetchAllocationNode : public Node {
16831683
public:
1684-
PrefetchAllocationNode(Node *mem, Node *adr) : Node(0,mem,adr) {}
1684+
PrefetchAllocationNode(Node *mem, Node *adr) : Node(nullptr,mem,adr) {}
16851685
virtual int Opcode() const;
16861686
virtual uint ideal_reg() const { return NotAMachineReg; }
16871687
virtual uint match_edge(uint idx) const { return idx==2; }

src/hotspot/share/opto/movenode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class MoveD2LNode : public MoveNode {
158158
// (CMove (Binary bol cmp) (Binary src1 src2))
159159
class BinaryNode : public Node {
160160
public:
161-
BinaryNode( Node *n1, Node *n2 ) : Node(0,n1,n2) { }
161+
BinaryNode( Node *n1, Node *n2 ) : Node(nullptr,n1,n2) { }
162162
virtual int Opcode() const;
163163
virtual uint ideal_reg() const { return 0; }
164164
};

src/hotspot/share/opto/mulnode.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 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
@@ -167,7 +167,7 @@ const Type* MulHiValue(const Type *t1, const Type *t2, const Type *bot);
167167
// Upper 64 bits of a 64 bit by 64 bit multiply
168168
class MulHiLNode : public Node {
169169
public:
170-
MulHiLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
170+
MulHiLNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
171171
virtual int Opcode() const;
172172
virtual const Type* Value(PhaseGVN* phase) const;
173173
const Type *bottom_type() const { return TypeLong::LONG; }
@@ -178,7 +178,7 @@ class MulHiLNode : public Node {
178178
// Upper 64 bits of a 64 bit by 64 bit unsigned multiply
179179
class UMulHiLNode : public Node {
180180
public:
181-
UMulHiLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
181+
UMulHiLNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
182182
virtual int Opcode() const;
183183
virtual const Type* Value(PhaseGVN* phase) const;
184184
const Type *bottom_type() const { return TypeLong::LONG; }
@@ -291,7 +291,7 @@ class RotateRightNode : public TypeNode {
291291
// Signed shift right
292292
class RShiftINode : public Node {
293293
public:
294-
RShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
294+
RShiftINode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
295295
virtual int Opcode() const;
296296
virtual Node* Identity(PhaseGVN* phase);
297297
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -304,7 +304,7 @@ class RShiftINode : public Node {
304304
// Signed shift right
305305
class RShiftLNode : public Node {
306306
public:
307-
RShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
307+
RShiftLNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
308308
virtual int Opcode() const;
309309
virtual Node* Identity(PhaseGVN* phase);
310310
virtual const Type* Value(PhaseGVN* phase) const;
@@ -316,7 +316,7 @@ class RShiftLNode : public Node {
316316
// Logical shift right
317317
class URShiftBNode : public Node {
318318
public:
319-
URShiftBNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {
319+
URShiftBNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {
320320
ShouldNotReachHere(); // only vector variant is used
321321
}
322322
virtual int Opcode() const;
@@ -326,7 +326,7 @@ class URShiftBNode : public Node {
326326
// Logical shift right
327327
class URShiftSNode : public Node {
328328
public:
329-
URShiftSNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {
329+
URShiftSNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {
330330
ShouldNotReachHere(); // only vector variant is used
331331
}
332332
virtual int Opcode() const;
@@ -336,7 +336,7 @@ class URShiftSNode : public Node {
336336
// Logical shift right
337337
class URShiftINode : public Node {
338338
public:
339-
URShiftINode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
339+
URShiftINode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
340340
virtual int Opcode() const;
341341
virtual Node* Identity(PhaseGVN* phase);
342342
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -349,7 +349,7 @@ class URShiftINode : public Node {
349349
// Logical shift right
350350
class URShiftLNode : public Node {
351351
public:
352-
URShiftLNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {}
352+
URShiftLNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {}
353353
virtual int Opcode() const;
354354
virtual Node* Identity(PhaseGVN* phase);
355355
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
@@ -396,7 +396,7 @@ class FmaFNode : public FmaNode {
396396
class MulAddS2INode : public Node {
397397
virtual uint hash() const;
398398
public:
399-
MulAddS2INode(Node* in1, Node *in2, Node *in3, Node* in4) : Node(0, in1, in2, in3, in4) {}
399+
MulAddS2INode(Node* in1, Node *in2, Node *in3, Node* in4) : Node(nullptr, in1, in2, in3, in4) {}
400400
virtual int Opcode() const;
401401
const Type *bottom_type() const { return TypeInt::INT; }
402402
virtual uint ideal_reg() const { return Op_RegI; }

src/hotspot/share/opto/opaquenode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class ProfileBooleanNode : public Node {
140140
virtual uint hash() const ; // { return NO_HASH; }
141141
virtual bool cmp( const Node &n ) const;
142142
public:
143-
ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(0, n),
143+
ProfileBooleanNode(Node *n, uint false_cnt, uint true_cnt) : Node(nullptr, n),
144144
_false_cnt(false_cnt), _true_cnt(true_cnt), _consumed(false), _delay_removal(true) {}
145145

146146
uint false_count() const { return _false_cnt; }

src/hotspot/share/opto/subnode.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 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
@@ -39,7 +39,7 @@
3939
// are compressed into -1, and all positive answers compressed to 1.
4040
class SubNode : public Node {
4141
public:
42-
SubNode( Node *in1, Node *in2 ) : Node(0,in1,in2) {
42+
SubNode( Node *in1, Node *in2 ) : Node(nullptr,in1,in2) {
4343
init_class_id(Class_Sub);
4444
}
4545

@@ -363,7 +363,7 @@ class BoolNode : public Node {
363363
// for finding this pattern in the graph.
364364
class AbsNode : public Node {
365365
public:
366-
AbsNode( Node *value ) : Node(0,value) {}
366+
AbsNode( Node *value ) : Node(nullptr,value) {}
367367
virtual Node* Identity(PhaseGVN* phase);
368368
virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
369369
virtual const Type* Value(PhaseGVN* phase) const;
@@ -420,7 +420,7 @@ class AbsDNode : public AbsNode {
420420
// If p < q, return -1 else return 0. Nice for flow-free idioms.
421421
class CmpLTMaskNode : public Node {
422422
public:
423-
CmpLTMaskNode( Node *p, Node *q ) : Node(0, p, q) {}
423+
CmpLTMaskNode( Node *p, Node *q ) : Node(nullptr, p, q) {}
424424
virtual int Opcode() const;
425425
const Type *bottom_type() const { return TypeInt::INT; }
426426
virtual uint ideal_reg() const { return Op_RegI; }
@@ -430,7 +430,7 @@ class CmpLTMaskNode : public Node {
430430
//------------------------------NegNode----------------------------------------
431431
class NegNode : public Node {
432432
public:
433-
NegNode(Node* in1) : Node(0, in1) {
433+
NegNode(Node* in1) : Node(nullptr, in1) {
434434
init_class_id(Class_Neg);
435435
}
436436
};

0 commit comments

Comments
 (0)