src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/memory/address/IndexAddressNode.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54084 84f10bbf993f
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 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.
    41     public static final NodeClass<IndexAddressNode> TYPE = NodeClass.create(IndexAddressNode.class);
    41     public static final NodeClass<IndexAddressNode> TYPE = NodeClass.create(IndexAddressNode.class);
    42 
    42 
    43     @Input ValueNode array;
    43     @Input ValueNode array;
    44     @Input ValueNode index;
    44     @Input ValueNode index;
    45 
    45 
       
    46     private final JavaKind arrayKind;
    46     private final JavaKind elementKind;
    47     private final JavaKind elementKind;
    47 
    48 
    48     public IndexAddressNode(ValueNode array, ValueNode index, JavaKind elementKind) {
    49     public IndexAddressNode(ValueNode array, ValueNode index, JavaKind elementKind) {
       
    50         this(array, index, elementKind, elementKind);
       
    51     }
       
    52 
       
    53     public IndexAddressNode(ValueNode array, ValueNode index, JavaKind arrayKind, JavaKind elementKind) {
    49         super(TYPE);
    54         super(TYPE);
    50         this.array = array;
    55         this.array = array;
    51         this.index = index;
    56         this.index = index;
       
    57         this.arrayKind = arrayKind;
    52         this.elementKind = elementKind;
    58         this.elementKind = elementKind;
    53     }
    59     }
    54 
    60 
    55     @Override
    61     @Override
    56     public ValueNode getBase() {
    62     public ValueNode getBase() {
    69     @Override
    75     @Override
    70     public long getMaxConstantDisplacement() {
    76     public long getMaxConstantDisplacement() {
    71         return Long.MAX_VALUE;
    77         return Long.MAX_VALUE;
    72     }
    78     }
    73 
    79 
       
    80     public JavaKind getArrayKind() {
       
    81         return arrayKind;
       
    82     }
       
    83 
    74     public JavaKind getElementKind() {
    84     public JavaKind getElementKind() {
    75         return elementKind;
    85         return elementKind;
    76     }
    86     }
    77 
    87 
    78     @Override
    88     @Override