src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/calc/RemNode.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
48 protected RemNode(ValueNode x, ValueNode y) { |
48 protected RemNode(ValueNode x, ValueNode y) { |
49 this(TYPE, x, y); |
49 this(TYPE, x, y); |
50 } |
50 } |
51 |
51 |
52 protected RemNode(NodeClass<? extends RemNode> c, ValueNode x, ValueNode y) { |
52 protected RemNode(NodeClass<? extends RemNode> c, ValueNode x, ValueNode y) { |
53 super(c, ArithmeticOpTable::getRem, x, y); |
53 super(c, getArithmeticOpTable(x).getRem(), x, y); |
54 } |
54 } |
55 |
55 |
56 public static ValueNode create(ValueNode forX, ValueNode forY, NodeView view) { |
56 public static ValueNode create(ValueNode forX, ValueNode forY, NodeView view) { |
57 BinaryOp<Rem> op = ArithmeticOpTable.forStamp(forX.stamp(view)).getRem(); |
57 BinaryOp<Rem> op = ArithmeticOpTable.forStamp(forX.stamp(view)).getRem(); |
58 Stamp stamp = op.foldStamp(forX.stamp(view), forY.stamp(view)); |
58 Stamp stamp = op.foldStamp(forX.stamp(view), forY.stamp(view)); |
62 } |
62 } |
63 return new RemNode(forX, forY); |
63 return new RemNode(forX, forY); |
64 } |
64 } |
65 |
65 |
66 @Override |
66 @Override |
|
67 protected BinaryOp<Rem> getOp(ArithmeticOpTable table) { |
|
68 return table.getRem(); |
|
69 } |
|
70 |
|
71 @Override |
67 public void lower(LoweringTool tool) { |
72 public void lower(LoweringTool tool) { |
68 tool.getLowerer().lower(this, tool); |
73 tool.getLowerer().lower(this, tool); |
69 } |
74 } |
70 |
75 |
71 @Override |
76 @Override |