--- a/JavaNativeMethodImpl_OpenJDK6.st Sat Jan 19 23:54:47 2013 +0000
+++ b/JavaNativeMethodImpl_OpenJDK6.st Sun Jan 20 21:04:06 2013 +0000
@@ -5632,23 +5632,15 @@
<javanative: 'sun/misc/Unsafe' name: 'getByte(Ljava/lang/Object;J)B'>
<javanative: 'sun/misc/Unsafe' name: 'getByte(J)B'>
- | object offset address |
- nativeContext numArgs == 3 ifTrue:[
- "getByte(Ljava/lang/Object;J)V"
- object := nativeContext argAt: 1.
- offset := nativeContext argAt: 2.
- ^object instVarAt: offset
- ].
- nativeContext numArgs == 2 ifTrue:[
- "getByte(J)V"
- address := nativeContext argAt: 1.
- ^SimulatedNativeMemory byteAt: address
- ].
-
- self internalError:'Unssuported getByte() variant'
+ | object offset |
+
+ "getByte(Ljava/lang/Object;J)V"
+ object := nativeContext argAt: 1.
+ offset := nativeContext argAt: 2.
+ ^object instVarAt: offset
"Created: / 09-12-2010 / 17:29:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 19-01-2013 / 19:54:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-01-2013 / 20:55:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_sun_misc_Unsafe_getChar: this _:a1 _: a2 _: a3 _context: nativeContext
@@ -6013,36 +6005,33 @@
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 _: a5 _context: nativeContext
<javanative: 'sun/misc/Unsafe' name: 'putDouble(Ljava/lang/Object;JJ)V'>
- <javanative: 'sun/misc/Unsafe' name: 'putDouble(JJ)V'>
| o offset x |
- nativeContext numArgs == 5 ifTrue:[
- "putDouble(Ljava/lang/Object;JD)V"
- o := nativeContext argAt: 1.
- offset := nativeContext argAt: 2.
- x := nativeContext argAt: 4.
- o instVarAt: offset put: x.
- ^nil
- ].
- nativeContext numArgs == 4 ifTrue:[
- "putDouble(JD)V"
- o := nativeContext argAt: 1.
- x := nativeContext argAt: 3.
- SimulatedNativeMemory sint64At: o put: x.
- ^nil
- ].
- self internalError:'Unknown variant of putLong() native!!'
+
+ o := nativeContext argAt: 1.
+ offset := nativeContext argAt: 2.
+ x := nativeContext argAt: 4.
+ o instVarAt: offset put: x.
+ ^nil
"Created: / 07-12-2010 / 23:50:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 16-07-2012 / 16:03:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-01-2013 / 20:53:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_sun_misc_Unsafe_putLong: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
<javanative: 'sun/misc/Unsafe' name: 'putLong(JJ)V'>
- ^ JavaVM unimplementedNativeMethodSignal raise
+ | o x |
+
+ "putDouble(JD)V"
+ o := nativeContext argAt: 1.
+ x := nativeContext argAt: 3.
+ SimulatedNativeMemory sint64At: o put: x.
+ ^nil
+
+ "Modified: / 20-01-2013 / 20:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_sun_misc_Unsafe_putObject: this _:a1 _: a2 _: a3 _: a4 _context: nativeContext
@@ -19656,6 +19645,35 @@
"Modified: / 16-01-2013 / 22:03:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.security'!
+
+_java_security_AccessController_doPrivileged: this _: a1 _: a2 _context: nativeContext
+
+ <javanative: 'java/security/AccessController' name: ''>
+
+ | retval |
+ JavaVM privilegedAccessQuery answer: true
+ do: [
+ retval := (nativeContext argAt: 1) perform: #'run()Ljava/lang/Object;'.
+ ].
+ ^ retval
+
+ "Modified: / 20-01-2013 / 20:57:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - sun.misc'!
+
+_sun_misc_Unsafe_getByte: this _: a2 _: a3 _context: nativeContext
+
+ <javanative: 'sun/misc/Unsafe' name: 'getByte(J)B'>
+
+ | address |
+ address := nativeContext argAt: 1.
+ ^SimulatedNativeMemory byteAt: address
+
+ "Modified: / 20-01-2013 / 20:54:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'documentation'!
version_HG