13
13
import org .truffleruby .cext .ValueWrapperManager .AllocateHandleNode ;
14
14
import org .truffleruby .cext .ValueWrapperManager .HandleBlock ;
15
15
import org .truffleruby .core .MarkingServiceNodes .KeepAliveNode ;
16
+ import org .truffleruby .debug .VariableNamesObject ;
16
17
import org .truffleruby .interop .TranslateInteropExceptionNode ;
17
18
18
19
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
19
20
import com .oracle .truffle .api .dsl .Cached ;
20
21
import com .oracle .truffle .api .dsl .Cached .Exclusive ;
21
22
import com .oracle .truffle .api .interop .InteropLibrary ;
22
- import com .oracle .truffle .api .interop .InvalidArrayIndexException ;
23
23
import com .oracle .truffle .api .interop .TruffleObject ;
24
24
import com .oracle .truffle .api .interop .UnknownIdentifierException ;
25
25
import com .oracle .truffle .api .interop .UnsupportedMessageException ;
@@ -131,7 +131,7 @@ protected boolean hasMembers() {
131
131
132
132
@ ExportMessage
133
133
protected Object getMembers (boolean includeInternal ) {
134
- return new ValueWrapperPropertyList ( );
134
+ return new VariableNamesObject ( new String []{ "value" } );
135
135
}
136
136
137
137
@ ExportMessage
@@ -149,34 +149,4 @@ protected static Object readMember(ValueWrapper wrapper, String member,
149
149
throw UnknownIdentifierException .create (member );
150
150
}
151
151
}
152
-
153
- @ ExportLibrary (InteropLibrary .class )
154
- public static class ValueWrapperPropertyList implements TruffleObject {
155
-
156
- @ ExportMessage
157
- protected static boolean hasArrayElements (ValueWrapperPropertyList wrapper ) {
158
- return true ;
159
- }
160
-
161
- @ ExportMessage
162
- protected static long getArraySize (ValueWrapperPropertyList wrapper ) {
163
- return 1 ;
164
- }
165
-
166
- @ ExportMessage
167
- protected static Object readArrayElement (ValueWrapperPropertyList list , long index ,
168
- @ Cached @ Exclusive BranchProfile errorProfile ) throws InvalidArrayIndexException {
169
- if (index == 0L ) {
170
- return "value" ;
171
- } else {
172
- errorProfile .enter ();
173
- throw InvalidArrayIndexException .create (index );
174
- }
175
- }
176
-
177
- @ ExportMessage
178
- protected static boolean isArrayElementReadable (ValueWrapperPropertyList wrapper , long index ) {
179
- return index == 0L ;
180
- }
181
- }
182
152
}
0 commit comments