diff graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java @ 14978:e302df8bf51c

separate subclasses for value and guard phis and proxies
author Lukas Stadler <lukas.stadler@oracle.com>
date Fri, 04 Apr 2014 18:32:32 +0200
parents ae0001b445c0
children 27c04ee36dcb
line wrap: on
line diff
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java	Fri Apr 04 18:23:55 2014 +0200
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/MemoryPhiNode.java	Fri Apr 04 18:32:32 2014 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,22 +23,25 @@
 package com.oracle.graal.nodes;
 
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.graph.*;
 import com.oracle.graal.nodes.extended.*;
+import com.oracle.graal.nodes.type.*;
 
 /**
  * The {@code PhiNode} represents the merging of dataflow in the memory graph.
  */
 public class MemoryPhiNode extends PhiNode implements MemoryNode {
 
-    private final LocationIdentity identity;
+    @Input final NodeInputList<ValueNode> values = new NodeInputList<>(this);
+    private final LocationIdentity locationIdentity;
 
-    public MemoryPhiNode(MergeNode merge, LocationIdentity identity) {
-        super(PhiType.Memory, merge);
-        this.identity = identity;
+    public MemoryPhiNode(MergeNode merge, LocationIdentity locationIdentity) {
+        super(StampFactory.dependency(), merge);
+        this.locationIdentity = locationIdentity;
     }
 
     public LocationIdentity getLocationIdentity() {
-        return identity;
+        return locationIdentity;
     }
 
     public MemoryCheckpoint asMemoryCheckpoint() {
@@ -48,4 +51,9 @@
     public MemoryPhiNode asMemoryPhi() {
         return this;
     }
+
+    @Override
+    public NodeInputList<ValueNode> values() {
+        return values;
+    }
 }