Skip to content

Commit 6b8a490

Browse files
committed
Rename PythonObject.hpyFields to hpyData
1 parent 281e80c commit 6b8a490

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2293,7 +2293,7 @@ public long ctxFieldLoad(long bits, long idx) {
22932293
Object owner = getObjectForHPyHandle(GraalHPyBoxing.unboxHandle(bits));
22942294
// HPyField index is always non-zero because zero means: uninitialized
22952295
assert idx > 0;
2296-
Object referent = ((PythonObject) owner).getHpyFields()[(int) idx];
2296+
Object referent = ((PythonObject) owner).getHPyData()[(int) idx];
22972297
return GraalHPyBoxing.boxHandle(getHPyHandleForObject(referent));
22982298
}
22992299

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContextFunctions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,7 +2885,7 @@ Object execute(Object[] arguments,
28852885
}
28862886

28872887
static int assign(PythonObject owner, Object referent, int location) {
2888-
Object[] hpyFields = owner.getHpyFields();
2888+
Object[] hpyFields = owner.getHPyData();
28892889
if (location != 0) {
28902890
assert hpyFields != null;
28912891
hpyFields[location] = referent;
@@ -2900,7 +2900,7 @@ static int assign(PythonObject owner, Object referent, int location) {
29002900
hpyFields = PythonUtils.arrayCopyOf(hpyFields, newLocation + 1);
29012901
hpyFields[newLocation] = referent;
29022902
}
2903-
owner.setHpyFields(hpyFields);
2903+
owner.setHPyData(hpyFields);
29042904
return newLocation;
29052905
}
29062906
}
@@ -2948,7 +2948,7 @@ Object execute(Object[] arguments,
29482948
}
29492949
Object owner = asPythonObjectNode.execute(context, arguments[1]);
29502950
if (owner instanceof PythonObject) {
2951-
referent = ((PythonObject) owner).getHpyFields()[idx];
2951+
referent = ((PythonObject) owner).getHPyData()[idx];
29522952
} else {
29532953
throw CompilerDirectives.shouldNotReachHere("HPyField owner is not a PythonObject!");
29542954
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/PythonHPyObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public final class PythonHPyObject extends PythonObject {
4848
public PythonHPyObject(Object pythonClass, Shape instanceShape, Object hpyNativeSpace) {
4949
super(pythonClass, instanceShape);
5050
if (hpyNativeSpace != null) {
51-
this.setHpyFields(new Object[]{hpyNativeSpace});
51+
this.setHPyData(new Object[]{hpyNativeSpace});
5252
}
5353
}
5454
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/PythonObject.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class PythonObject extends PythonAbstractObject {
7373

7474
private final Object initialPythonClass;
7575

76-
private Object[] hpyFields;
76+
private Object[] hpyData;
7777

7878
public PythonObject(Object pythonClass, Shape instanceShape) {
7979
super(instanceShape);
@@ -175,23 +175,23 @@ public static int getCallSiteInlineCacheMaxDepth() {
175175
return PythonOptions.getCallSiteInlineCacheMaxDepth();
176176
}
177177

178-
public final Object[] getHpyFields() {
179-
return hpyFields;
178+
public final Object[] getHPyData() {
179+
return hpyData;
180180
}
181181

182-
public final void setHpyFields(Object[] hpyFields) {
183-
this.hpyFields = hpyFields;
182+
public final void setHPyData(Object[] hpyFields) {
183+
this.hpyData = hpyFields;
184184
}
185185

186186
public final void setHPyNativeSpace(Object dataPtr) {
187-
if (hpyFields == null) {
188-
hpyFields = new Object[]{dataPtr};
187+
if (hpyData == null) {
188+
hpyData = new Object[]{dataPtr};
189189
} else {
190-
hpyFields[0] = dataPtr;
190+
hpyData[0] = dataPtr;
191191
}
192192
}
193193

194194
public final Object getHPyNativeSpace() {
195-
return hpyFields != null ? hpyFields[0] : 0L;
195+
return hpyData != null ? hpyData[0] : 0L;
196196
}
197197
}

0 commit comments

Comments
 (0)