History

Added Unsafe module stub

Dmitry Kabak (userdima committed 13 years ago

Commit 96f400c1 parent 8cec9442 files · +510 −0Browse files

Showing the changes to java (2 of 2 files). Show all

Unified · Split

2 files
  1. java/pkg/sun/misc/Unsafe_L.b +415 −0
  2. java/pkg/sun/misc/Unsafe_L.m +95 −0
java/pkg/sun/misc/Unsafe_L.b+415−0
@@ -0,0 +1,415 @@
1implement Unsafe_L;
2
3include "jni.m";
4 jni : JNI;
5 ClassModule,
6 JString,
7 JArray,
8 JArrayI,
9 JArrayC,
10 JArrayB,
11 JArrayS,
12 JArrayJ,
13 JArrayF,
14 JArrayD,
15 JArrayZ,
16 JArrayJObject,
17 JArrayJClass,
18 JArrayJString,
19 JClass,
20 JObject : import jni;
21
22#>> extra pre includes here
23
24#<<
25
26include "Unsafe_L.m";
27
28#>> extra post includes here
29
30#<<
31
32init( jni_p : JNI )
33{
34 # save java native inteface mod instance
35 jni = jni_p;
36 #>>extra initialization here
37 #<<
38}
39
40allocateInstance_rClass_rObject( this : ref Unsafe_obj, p0 : JClass) : JObject
41{#>>
42 return nil;
43}#<<
44
45copyMemory_rObject_J_rObject_J_J_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject,p3 : big,p4 : big)
46{#>>
47}#<<
48
49park_Z_J_V( this : ref Unsafe_obj, p0 : byte,p1 : big)
50{#>>
51}#<<
52
53unpark_rObject_V( this : ref Unsafe_obj, p0 : JObject)
54{#>>
55}#<<
56
57getObject_rObject_J_rObject( this : ref Unsafe_obj, p0 : JObject,p1 : big) : JObject
58{#>>
59 return nil;
60}#<<
61
62putObject_rObject_J_rObject_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject)
63{#>>
64}#<<
65
66getBoolean_rObject_J_Z( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte
67{#>>
68 return byte 0;
69}#<<
70
71putBoolean_rObject_J_Z_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte)
72{#>>
73}#<<
74
75getByte_J_B( this : ref Unsafe_obj, p0 : big) : byte
76{#>>
77 return byte 0;
78}#<<
79
80getByte_rObject_J_B( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte
81{#>>
82 return byte 0;
83}#<<
84
85putByte_J_B_V( this : ref Unsafe_obj, p0 : big,p1 : byte)
86{#>>
87}#<<
88
89putByte_rObject_J_B_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte)
90{#>>
91}#<<
92
93getShort_rObject_J_S( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
94{#>>
95 return 0;
96}#<<
97
98getShort_J_S( this : ref Unsafe_obj, p0 : big) : int
99{#>>
100 return 0;
101}#<<
102
103putShort_rObject_J_S_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
104{#>>
105}#<<
106
107putShort_J_S_V( this : ref Unsafe_obj, p0 : big,p1 : int)
108{#>>
109}#<<
110
111getChar_J_C( this : ref Unsafe_obj, p0 : big) : int
112{#>>
113 return 0;
114}#<<
115
116getChar_rObject_J_C( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
117{#>>
118 return 0;
119}#<<
120
121putChar_J_C_V( this : ref Unsafe_obj, p0 : big,p1 : int)
122{#>>
123}#<<
124
125putChar_rObject_J_C_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
126{#>>
127}#<<
128
129getInt_rObject_J_I( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
130{#>>
131 return 0;
132}#<<
133
134getInt_J_I( this : ref Unsafe_obj, p0 : big) : int
135{#>>
136 return 0;
137}#<<
138
139putInt_J_I_V( this : ref Unsafe_obj, p0 : big,p1 : int)
140{#>>
141}#<<
142
143putInt_rObject_J_I_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
144{#>>
145}#<<
146
147getLong_rObject_J_J( this : ref Unsafe_obj, p0 : JObject,p1 : big) : big
148{#>>
149 return big 0;
150}#<<
151
152getLong_J_J( this : ref Unsafe_obj, p0 : big) : big
153{#>>
154 return big 0;
155}#<<
156
157putLong_J_J_V( this : ref Unsafe_obj, p0 : big,p1 : big)
158{#>>
159}#<<
160
161putLong_rObject_J_J_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big)
162{#>>
163}#<<
164
165getFloat_J_F( this : ref Unsafe_obj, p0 : big) : real
166{#>>
167 return 0.0;
168}#<<
169
170getFloat_rObject_J_F( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real
171{#>>
172 return 0.0;
173}#<<
174
175putFloat_J_F_V( this : ref Unsafe_obj, p0 : big,p1 : real)
176{#>>
177}#<<
178
179putFloat_rObject_J_F_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real)
180{#>>
181}#<<
182
183getDouble_J_D( this : ref Unsafe_obj, p0 : big) : real
184{#>>
185 return 0.0;
186}#<<
187
188getDouble_rObject_J_D( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real
189{#>>
190 return 0.0;
191}#<<
192
193putDouble_J_D_V( this : ref Unsafe_obj, p0 : big,p1 : real)
194{#>>
195}#<<
196
197putDouble_rObject_J_D_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real)
198{#>>
199}#<<
200
201getObjectVolatile_rObject_J_rObject( this : ref Unsafe_obj, p0 : JObject,p1 : big) : JObject
202{#>>
203 return nil;
204}#<<
205
206putObjectVolatile_rObject_J_rObject_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject)
207{#>>
208}#<<
209
210getBooleanVolatile_rObject_J_Z( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte
211{#>>
212 return byte 0;
213}#<<
214
215putBooleanVolatile_rObject_J_Z_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte)
216{#>>
217}#<<
218
219getByteVolatile_rObject_J_B( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte
220{#>>
221 return byte 0;
222}#<<
223
224putByteVolatile_rObject_J_B_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte)
225{#>>
226}#<<
227
228getShortVolatile_rObject_J_S( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
229{#>>
230 return 0;
231}#<<
232
233putShortVolatile_rObject_J_S_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
234{#>>
235}#<<
236
237getCharVolatile_rObject_J_C( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
238{#>>
239 return 0;
240}#<<
241
242putCharVolatile_rObject_J_C_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
243{#>>
244}#<<
245
246getIntVolatile_rObject_J_I( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int
247{#>>
248 return 0;
249}#<<
250
251putIntVolatile_rObject_J_I_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
252{#>>
253}#<<
254
255getLongVolatile_rObject_J_J( this : ref Unsafe_obj, p0 : JObject,p1 : big) : big
256{#>>
257 return big 0;
258}#<<
259
260putLongVolatile_rObject_J_J_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big)
261{#>>
262}#<<
263
264getFloatVolatile_rObject_J_F( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real
265{#>>
266 return 0.0;
267}#<<
268
269putFloatVolatile_rObject_J_F_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real)
270{#>>
271}#<<
272
273getDoubleVolatile_rObject_J_D( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real
274{#>>
275 return 0.0;
276}#<<
277
278putDoubleVolatile_rObject_J_D_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real)
279{#>>
280}#<<
281
282getAddress_J_J( this : ref Unsafe_obj, p0 : big) : big
283{#>>
284 return big 0;
285}#<<
286
287putAddress_J_J_V( this : ref Unsafe_obj, p0 : big,p1 : big)
288{#>>
289}#<<
290
291compareAndSwapObject_rObject_J_rObject_rObject_Z( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject,p3 : JObject) : byte
292{#>>
293 return byte 0;
294}#<<
295
296compareAndSwapLong_rObject_J_J_J_Z( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big,p3 : big) : byte
297{#>>
298 return byte 0;
299}#<<
300
301compareAndSwapInt_rObject_J_I_I_Z( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int,p3 : int) : byte
302{#>>
303 return byte 0;
304}#<<
305
306putOrderedObject_rObject_J_rObject_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject)
307{#>>
308}#<<
309
310putOrderedLong_rObject_J_J_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big)
311{#>>
312}#<<
313
314putOrderedInt_rObject_J_I_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int)
315{#>>
316}#<<
317
318registerNatives_V( )
319{#>>
320}#<<
321
322throwException_rThrowable_V( this : ref Unsafe_obj, p0 : JObject)
323{#>>
324}#<<
325
326defineClass_rString_aB_I_I_rClassLoader_rProtectionDomain_rClass( this : ref Unsafe_obj, p0 : JString,p1 : JArrayB,p2 : int,p3 : int,p4 : JObject,p5 : JObject) : JClass
327{#>>
328 return nil;
329}#<<
330
331defineClass_rString_aB_I_I_rClass( this : ref Unsafe_obj, p0 : JString,p1 : JArrayB,p2 : int,p3 : int) : JClass
332{#>>
333 return nil;
334}#<<
335
336objectFieldOffset_rField_J( this : ref Unsafe_obj, p0 : JObject) : big
337{#>>
338 return big 0;
339}#<<
340
341staticFieldBase_rField_rObject( this : ref Unsafe_obj, p0 : JObject) : JObject
342{#>>
343 return nil;
344}#<<
345
346allocateMemory_J_J( this : ref Unsafe_obj, p0 : big) : big
347{#>>
348 return big 0;
349}#<<
350
351reallocateMemory_J_J_J( this : ref Unsafe_obj, p0 : big,p1 : big) : big
352{#>>
353 return big 0;
354}#<<
355
356setMemory_rObject_J_J_B_V( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big,p3 : byte)
357{#>>
358}#<<
359
360freeMemory_J_V( this : ref Unsafe_obj, p0 : big)
361{#>>
362}#<<
363
364staticFieldOffset_rField_J( this : ref Unsafe_obj, p0 : JObject) : big
365{#>>
366 return big 0;
367}#<<
368
369ensureClassInitialized_rClass_V( this : ref Unsafe_obj, p0 : JClass)
370{#>>
371}#<<
372
373arrayBaseOffset_rClass_I( this : ref Unsafe_obj, p0 : JClass) : int
374{#>>
375 return 0;
376}#<<
377
378arrayIndexScale_rClass_I( this : ref Unsafe_obj, p0 : JClass) : int
379{#>>
380 return 0;
381}#<<
382
383addressSize_I( this : ref Unsafe_obj) : int
384{#>>
385 return 0;
386}#<<
387
388pageSize_I( this : ref Unsafe_obj) : int
389{#>>
390 return 0;
391}#<<
392
393defineAnonymousClass_rClass_aB_aObject_rClass( this : ref Unsafe_obj, p0 : JClass,p1 : JArrayB,p2 : JArrayJObject) : JClass
394{#>>
395 return nil;
396}#<<
397
398monitorEnter_rObject_V( this : ref Unsafe_obj, p0 : JObject)
399{#>>
400}#<<
401
402monitorExit_rObject_V( this : ref Unsafe_obj, p0 : JObject)
403{#>>
404}#<<
405
406tryMonitorEnter_rObject_Z( this : ref Unsafe_obj, p0 : JObject) : byte
407{#>>
408 return byte 0;
409}#<<
410
411getLoadAverage_aD_I_I( this : ref Unsafe_obj, p0 : JArrayD,p1 : int) : int
412{#>>
413 return 0;
414}#<<
415
java/pkg/sun/misc/Unsafe_L.m+95−0
@@ -0,0 +1,95 @@
1# generated file edit with care
2
3Unsafe_L : module
4{
5 Unsafe_obj : adt
6 {
7 cl_mod : ClassModule;
8 };
9
10 init : fn( jni_p : JNI );
11 allocateInstance_rClass_rObject : fn( this : ref Unsafe_obj, p0 : JClass) : JObject;
12 copyMemory_rObject_J_rObject_J_J_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject,p3 : big,p4 : big);
13 park_Z_J_V : fn( this : ref Unsafe_obj, p0 : byte,p1 : big);
14 unpark_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject);
15 getObject_rObject_J_rObject : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : JObject;
16 putObject_rObject_J_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject);
17 getBoolean_rObject_J_Z : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte;
18 putBoolean_rObject_J_Z_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte);
19 getByte_J_B : fn( this : ref Unsafe_obj, p0 : big) : byte;
20 getByte_rObject_J_B : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte;
21 putByte_J_B_V : fn( this : ref Unsafe_obj, p0 : big,p1 : byte);
22 putByte_rObject_J_B_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte);
23 getShort_rObject_J_S : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
24 getShort_J_S : fn( this : ref Unsafe_obj, p0 : big) : int;
25 putShort_rObject_J_S_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
26 putShort_J_S_V : fn( this : ref Unsafe_obj, p0 : big,p1 : int);
27 getChar_J_C : fn( this : ref Unsafe_obj, p0 : big) : int;
28 getChar_rObject_J_C : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
29 putChar_J_C_V : fn( this : ref Unsafe_obj, p0 : big,p1 : int);
30 putChar_rObject_J_C_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
31 getInt_rObject_J_I : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
32 getInt_J_I : fn( this : ref Unsafe_obj, p0 : big) : int;
33 putInt_J_I_V : fn( this : ref Unsafe_obj, p0 : big,p1 : int);
34 putInt_rObject_J_I_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
35 getLong_rObject_J_J : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : big;
36 getLong_J_J : fn( this : ref Unsafe_obj, p0 : big) : big;
37 putLong_J_J_V : fn( this : ref Unsafe_obj, p0 : big,p1 : big);
38 putLong_rObject_J_J_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big);
39 getFloat_J_F : fn( this : ref Unsafe_obj, p0 : big) : real;
40 getFloat_rObject_J_F : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real;
41 putFloat_J_F_V : fn( this : ref Unsafe_obj, p0 : big,p1 : real);
42 putFloat_rObject_J_F_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real);
43 getDouble_J_D : fn( this : ref Unsafe_obj, p0 : big) : real;
44 getDouble_rObject_J_D : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real;
45 putDouble_J_D_V : fn( this : ref Unsafe_obj, p0 : big,p1 : real);
46 putDouble_rObject_J_D_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real);
47 getObjectVolatile_rObject_J_rObject : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : JObject;
48 putObjectVolatile_rObject_J_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject);
49 getBooleanVolatile_rObject_J_Z : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte;
50 putBooleanVolatile_rObject_J_Z_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte);
51 getByteVolatile_rObject_J_B : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : byte;
52 putByteVolatile_rObject_J_B_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : byte);
53 getShortVolatile_rObject_J_S : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
54 putShortVolatile_rObject_J_S_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
55 getCharVolatile_rObject_J_C : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
56 putCharVolatile_rObject_J_C_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
57 getIntVolatile_rObject_J_I : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : int;
58 putIntVolatile_rObject_J_I_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
59 getLongVolatile_rObject_J_J : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : big;
60 putLongVolatile_rObject_J_J_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big);
61 getFloatVolatile_rObject_J_F : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real;
62 putFloatVolatile_rObject_J_F_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real);
63 getDoubleVolatile_rObject_J_D : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big) : real;
64 putDoubleVolatile_rObject_J_D_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : real);
65 getAddress_J_J : fn( this : ref Unsafe_obj, p0 : big) : big;
66 putAddress_J_J_V : fn( this : ref Unsafe_obj, p0 : big,p1 : big);
67 compareAndSwapObject_rObject_J_rObject_rObject_Z : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject,p3 : JObject) : byte;
68 compareAndSwapLong_rObject_J_J_J_Z : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big,p3 : big) : byte;
69 compareAndSwapInt_rObject_J_I_I_Z : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int,p3 : int) : byte;
70 putOrderedObject_rObject_J_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : JObject);
71 putOrderedLong_rObject_J_J_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big);
72 putOrderedInt_rObject_J_I_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : int);
73 registerNatives_V : fn( );
74 throwException_rThrowable_V : fn( this : ref Unsafe_obj, p0 : JObject);
75 defineClass_rString_aB_I_I_rClassLoader_rProtectionDomain_rClass : fn( this : ref Unsafe_obj, p0 : JString,p1 : JArrayB,p2 : int,p3 : int,p4 : JObject,p5 : JObject) : JClass;
76 defineClass_rString_aB_I_I_rClass : fn( this : ref Unsafe_obj, p0 : JString,p1 : JArrayB,p2 : int,p3 : int) : JClass;
77 objectFieldOffset_rField_J : fn( this : ref Unsafe_obj, p0 : JObject) : big;
78 staticFieldBase_rField_rObject : fn( this : ref Unsafe_obj, p0 : JObject) : JObject;
79 allocateMemory_J_J : fn( this : ref Unsafe_obj, p0 : big) : big;
80 reallocateMemory_J_J_J : fn( this : ref Unsafe_obj, p0 : big,p1 : big) : big;
81 setMemory_rObject_J_J_B_V : fn( this : ref Unsafe_obj, p0 : JObject,p1 : big,p2 : big,p3 : byte);
82 freeMemory_J_V : fn( this : ref Unsafe_obj, p0 : big);
83 staticFieldOffset_rField_J : fn( this : ref Unsafe_obj, p0 : JObject) : big;
84 ensureClassInitialized_rClass_V : fn( this : ref Unsafe_obj, p0 : JClass);
85 arrayBaseOffset_rClass_I : fn( this : ref Unsafe_obj, p0 : JClass) : int;
86 arrayIndexScale_rClass_I : fn( this : ref Unsafe_obj, p0 : JClass) : int;
87 addressSize_I : fn( this : ref Unsafe_obj) : int;
88 pageSize_I : fn( this : ref Unsafe_obj) : int;
89 defineAnonymousClass_rClass_aB_aObject_rClass : fn( this : ref Unsafe_obj, p0 : JClass,p1 : JArrayB,p2 : JArrayJObject) : JClass;
90 monitorEnter_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject);
91 monitorExit_rObject_V : fn( this : ref Unsafe_obj, p0 : JObject);
92 tryMonitorEnter_rObject_Z : fn( this : ref Unsafe_obj, p0 : JObject) : byte;
93 getLoadAverage_aD_I_I : fn( this : ref Unsafe_obj, p0 : JArrayD,p1 : int) : int;
94
95};