Skip to content

Commit a483ada

Browse files
committed
Fix style
1 parent e5ed65d commit a483ada

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/PyErrStackItem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ boolean hasMembers() {
8282

8383
@ExportMessage
8484
@SuppressWarnings("static-method")
85-
Object getMembers(@SuppressWarnings("unsued") boolean includeInternal) {
85+
Object getMembers(@SuppressWarnings("unused") boolean includeInternal) {
8686
return new PythonAbstractObject.Keys(new Object[]{EXC_TYPE, EXC_VALUE, EXC_TRACEBACK, PREVIOUS_ITEM});
8787
}
8888

8989
@ExportMessage
90+
@SuppressWarnings("static-method")
9091
boolean isMemberReadable(String key) {
9192
return EXC_TYPE.equals(key) || EXC_VALUE.equals(key) || EXC_TRACEBACK.equals(key) || PREVIOUS_ITEM.equals(key);
9293
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/StructWrapperBaseWrapper.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
import com.oracle.graal.python.util.OverflowException;
5252
import com.oracle.truffle.api.CompilerDirectives;
5353
import com.oracle.truffle.api.dsl.Cached;
54-
import com.oracle.truffle.api.dsl.Cached.Exclusive;
54+
import com.oracle.truffle.api.dsl.Cached.Shared;
5555
import com.oracle.truffle.api.interop.InteropLibrary;
5656
import com.oracle.truffle.api.interop.InvalidArrayIndexException;
5757
import com.oracle.truffle.api.interop.UnknownIdentifierException;
@@ -76,6 +76,7 @@
7676
*/
7777
@ExportLibrary(InteropLibrary.class)
7878
@ExportLibrary(NativeTypeLibrary.class)
79+
@SuppressWarnings("static-method")
7980
public final class StructWrapperBaseWrapper extends PythonNativeWrapper {
8081
public static final String NAME = "name";
8182
public static final String OFFSET = "offset";
@@ -99,7 +100,7 @@ boolean hasMembers() {
99100
}
100101

101102
@ExportMessage
102-
protected Object getMembers(@SuppressWarnings("unused") boolean includeInternal) {
103+
Object getMembers(@SuppressWarnings("unused") boolean includeInternal) {
103104
return new InteropArray(new Object[]{NAME, OFFSET, FUNCTION, WRAPPER, DOC, FLAGS, NAME_STROBJ});
104105
}
105106

@@ -120,10 +121,10 @@ boolean isMemberReadable(String member) {
120121
}
121122

122123
@ExportMessage
123-
protected Object readMember(String member,
124-
@Exclusive @Cached GilNode gil,
125-
@Cached GetNativeNullNode getNativeNullNode,
126-
@Cached ToSulongNode toSulongNode) throws UnknownIdentifierException {
124+
Object readMember(String member,
125+
@Shared("gil") @Cached GilNode gil,
126+
@Shared("getNativeNullNode") @Cached GetNativeNullNode getNativeNullNode,
127+
@Shared("toSulongNode") @Cached ToSulongNode toSulongNode) throws UnknownIdentifierException {
127128
boolean mustRelease = gil.acquire();
128129
try {
129130
switch (member) {
@@ -168,9 +169,9 @@ boolean isArrayElementReadable(long index) {
168169

169170
@ExportMessage
170171
Object readArrayElement(long index,
171-
@Exclusive @Cached GilNode gil,
172-
@Cached GetNativeNullNode getNativeNullNode,
173-
@Cached ToSulongNode toSulongNode) throws InvalidArrayIndexException {
172+
@Shared("gil") @Cached GilNode gil,
173+
@Shared("getNativeNullNode") @Cached GetNativeNullNode getNativeNullNode,
174+
@Shared("toSulongNode") @Cached ToSulongNode toSulongNode) throws InvalidArrayIndexException {
174175
boolean mustRelease = gil.acquire();
175176
try {
176177
int i = PInt.intValueExact(index);
@@ -202,14 +203,14 @@ Object readArrayElement(long index,
202203

203204
@ExportMessage
204205
@SuppressWarnings("static-method")
205-
protected boolean hasNativeType() {
206+
boolean hasNativeType() {
206207
// TODO implement native type
207208
return false;
208209
}
209210

210211
@ExportMessage
211212
@SuppressWarnings("static-method")
212-
public Object getNativeType() {
213+
Object getNativeType() {
213214
// TODO implement native type
214215
return null;
215216
}

0 commit comments

Comments
 (0)