comparison graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/memory/FloatingAccessNode.java @ 21522:28cbfacd0518

Merge
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Thu, 28 May 2015 17:44:05 +0200
parents graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingAccessNode.java@8fc336a04d77 graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/FloatingAccessNode.java@cba35d171cd1
children 47bebae7454f
comparison
equal deleted inserted replaced
21521:107300758a4e 21522:28cbfacd0518
1 /*
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 package com.oracle.graal.nodes.memory;
24
25 import com.oracle.graal.api.meta.*;
26 import com.oracle.graal.compiler.common.type.*;
27 import com.oracle.graal.graph.*;
28 import com.oracle.graal.nodeinfo.*;
29 import com.oracle.graal.nodes.*;
30 import com.oracle.graal.nodes.extended.*;
31
32 @NodeInfo
33 public abstract class FloatingAccessNode extends FloatingGuardedNode implements Access, MemoryAccess {
34 public static final NodeClass<FloatingAccessNode> TYPE = NodeClass.create(FloatingAccessNode.class);
35
36 @Input ValueNode object;
37 @Input(InputType.Association) LocationNode location;
38 protected BarrierType barrierType;
39
40 public ValueNode object() {
41 return object;
42 }
43
44 public LocationNode location() {
45 return location;
46 }
47
48 public LocationNode accessLocation() {
49 return location;
50 }
51
52 public LocationIdentity getLocationIdentity() {
53 return location.getLocationIdentity();
54 }
55
56 protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, ValueNode object, LocationNode location, Stamp stamp) {
57 super(c, stamp);
58 this.object = object;
59 this.location = location;
60 }
61
62 protected FloatingAccessNode(NodeClass<? extends FloatingAccessNode> c, ValueNode object, LocationNode location, Stamp stamp, GuardingNode guard, BarrierType barrierType) {
63 super(c, stamp, guard);
64 this.object = object;
65 this.location = location;
66 this.barrierType = barrierType;
67 }
68
69 @Override
70 public BarrierType getBarrierType() {
71 return barrierType;
72 }
73
74 public boolean canNullCheck() {
75 return true;
76 }
77
78 public abstract FixedAccessNode asFixedNode();
79 }