comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/snippets/IntrinsifyArrayCopyPhase.java @ 5443:141817e206d4

changes to the dependencies and stamp system: * dependencies can only be of type ValueNode * exactType is a boolean flag, not a separate RiResolvedType * use different Stamp subclasses for IntegerStamp, FloatStamp, ObjectStamp and GenericStamp * use different stamp for nodes that can be a target for dependencies * use different PhiNode constructors for value- and non-value-Phis * use correct stamps for ExceptionObjectNode and CurrentThread
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 25 May 2012 11:35:18 +0200
parents e808627bd16f
children 8d7d009a54d8
comparison
equal deleted inserted replaced
5442:2fac5abf145f 5443:141817e206d4
79 RiResolvedMethod snippetMethod = null; 79 RiResolvedMethod snippetMethod = null;
80 if (targetMethod == arrayCopy) { 80 if (targetMethod == arrayCopy) {
81 ValueNode src = methodCallTarget.arguments().get(0); 81 ValueNode src = methodCallTarget.arguments().get(0);
82 ValueNode dest = methodCallTarget.arguments().get(2); 82 ValueNode dest = methodCallTarget.arguments().get(2);
83 assert src != null && dest != null; 83 assert src != null && dest != null;
84 RiResolvedType srcDeclaredType = src.declaredType(); 84 RiResolvedType srcType = src.objectStamp().type();
85 RiResolvedType destDeclaredType = dest.declaredType(); 85 RiResolvedType destType = dest.objectStamp().type();
86 if (srcDeclaredType != null 86 if (srcType != null
87 && srcDeclaredType.isArrayClass() 87 && srcType.isArrayClass()
88 && destDeclaredType != null 88 && destType != null
89 && destDeclaredType.isArrayClass()) { 89 && destType.isArrayClass()) {
90 CiKind componentKind = srcDeclaredType.componentType().kind(false); 90 CiKind componentKind = srcType.componentType().kind(false);
91 if (srcDeclaredType.componentType() == destDeclaredType.componentType()) { 91 if (srcType.componentType() == destType.componentType()) {
92 if (componentKind == CiKind.Int) { 92 if (componentKind == CiKind.Int) {
93 snippetMethod = intArrayCopy; 93 snippetMethod = intArrayCopy;
94 } else if (componentKind == CiKind.Char) { 94 } else if (componentKind == CiKind.Char) {
95 snippetMethod = charArrayCopy; 95 snippetMethod = charArrayCopy;
96 } else if (componentKind == CiKind.Long) { 96 } else if (componentKind == CiKind.Long) {
105 snippetMethod = doubleArrayCopy; 105 snippetMethod = doubleArrayCopy;
106 } else if (componentKind == CiKind.Object) { 106 } else if (componentKind == CiKind.Object) {
107 snippetMethod = objectArrayCopy; 107 snippetMethod = objectArrayCopy;
108 } 108 }
109 } else if (componentKind == CiKind.Object 109 } else if (componentKind == CiKind.Object
110 && srcDeclaredType.componentType().isSubtypeOf(destDeclaredType.componentType())) { 110 && srcType.componentType().isSubtypeOf(destType.componentType())) {
111 snippetMethod = objectArrayCopy; 111 snippetMethod = objectArrayCopy;
112 } 112 }
113 } 113 }
114 } 114 }
115 115