Skip to content

Commit 7051ee4

Browse files
committed
Add missing TruffleBoundaries
1 parent 5d7ee56 commit 7051ee4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteDecodeBuffer.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -61,12 +61,14 @@ public class MultibyteDecodeBuffer {
6161
protected CharBuffer writer;
6262
protected PBaseException excobj;
6363

64+
@TruffleBoundary
6465
public MultibyteDecodeBuffer(byte[] inbuf) {
6566
this.inputBuffer = ByteBuffer.wrap(inbuf);
6667
this.writer = writerInit(inbuf.length);
6768
this.excobj = null;
6869
}
6970

71+
@TruffleBoundary(allowInlining = true)
7072
protected int getInSize() {
7173
return inputBuffer.limit();
7274
}
@@ -76,6 +78,7 @@ protected void incInpos(int len) {
7678
setInpos(getInpos() + len);
7779
}
7880

81+
@TruffleBoundary(allowInlining = true)
7982
protected int getInpos() {
8083
return inputBuffer.position();
8184
}
@@ -85,6 +88,7 @@ protected void setInpos(int pos) {
8588
inputBuffer.position(pos);
8689
}
8790

91+
@TruffleBoundary(allowInlining = true)
8892
protected int remaining() {
8993
return inputBuffer.remaining();
9094
}
@@ -102,10 +106,12 @@ protected PBytes createPBytes(PythonObjectFactory factory) {
102106
return factory.createBytes(inputBuffer.array(), getInpos());
103107
}
104108

109+
@TruffleBoundary
105110
protected void replaceInbuf(byte[] inbuf) {
106111
inputBuffer = ByteBuffer.wrap(inbuf);
107112
}
108113

114+
@TruffleBoundary(allowInlining = true)
109115
protected int getOutpos() {
110116
return writer.position();
111117
}

0 commit comments

Comments
 (0)