JavaNativeMethodImpl_OpenJDK7.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 08 Feb 2013 11:18:39 +0100
branchopenjdk7-support
changeset 2049 17a00367b040
parent 2046 3309a3bc8615
child 2050 c77d58b7076b
permissions -rw-r--r--
Native method annotation fixes for OpenJDK6. Copyright fixes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2041
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
                            SWING Research Group, Czech Technical University in Prague
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
 hereby transferred.
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
"{ Package: 'stx:libjava' }"
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
JavaNativeMethodImpl_OpenJDK6 subclass:#JavaNativeMethodImpl_OpenJDK7
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	instanceVariableNames:''
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	classVariableNames:''
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    17
	poolDictionaries:'JavaVMData'
2041
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
	category:'Languages-Java-Support-OpenJDK7'
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
!
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'documentation'!
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
copyright
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
"
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
 COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
                            SWING Research Group, Czech Technical University in Prague
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
 hereby transferred.
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
"
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
! !
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    37
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.io'!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    38
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    39
_java_io_FileOutputStream_open: this _: a1 _: a2 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    40
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    41
    <javanative: 'java/io/FileOutputStream' name: 'open(Ljava/lang/String;Z)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    42
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    43
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    44
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    45
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    46
_java_io_FileOutputStream_write: this _: a1 _: a2 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    47
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    48
    <javanative: 'java/io/FileOutputStream' name: 'write(IZ)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    49
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    50
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    51
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    52
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    53
_java_io_FileOutputStream_writeBytes: this _: a1 _: a2 _: a3 _: a4 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    54
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    55
    <javanative: 'java/io/FileOutputStream' name: 'writeBytes([BIIZ)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    56
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    57
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    58
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    59
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    60
_java_io_UnixFileSystem_createFileExclusively: this _: a1 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    61
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    62
    <javanative: 'java/io/UnixFileSystem' name: 'createFileExclusively(Ljava/lang/String;)Z'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    63
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    64
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    65
! !
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    66
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    67
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.lang'!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    68
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    69
_java_lang_ClassLoader_getCaller: this _: a1 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    70
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    71
    <javanative: 'java/lang/ClassLoader' name: 'getCaller(I)Ljava/lang/Class;'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    72
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    73
    "/ index 0: java.lang.ClassLoader.class
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    74
    "/ index 1: the immediate caller of index 0.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    75
    "/ index 2: the immediate caller of index 1.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    76
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    77
    | ctx |
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    78
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    79
    ctx := self nativeContext sender.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    80
    a1 timesRepeat:[
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    81
        ctx := ctx sender
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    82
    ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    83
    ^JavaVM reflection javaClassObjectForClass: ctx receiver class theNonMetaclass
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    84
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    85
    "Modified: / 07-02-2013 / 23:35:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    86
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    87
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    88
_java_lang_Thread_setNativeName: this _: a1 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    89
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    90
    <javanative: 'java/lang/Thread' name: 'setNativeName(Ljava/lang/String;)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    91
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    92
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    93
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    94
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    95
_java_lang_Throwable_fillInStackTrace: this _: a1 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    96
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    97
    <javanative: 'java/lang/Throwable' name: 'fillInStackTrace(I)Ljava/lang/Throwable;'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    98
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
    99
    | java_lang_Throwable  exceptionObject  list  con |
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   100
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   101
    java_lang_Throwable := Java classNamed: 'java/lang/Throwable'.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   102
    exceptionObject := this.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   103
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   104
    "/
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   105
    "/ debugging only
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   106
    "/
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   107
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   108
    (java_lang_Throwable notNil and:[(exceptionObject isKindOf: java_lang_Throwable) not]) ifTrue: [
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   109
        self error:'Thrown object is not a java.lang.Throwable'.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   110
    ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   111
    con := self nativeContext sender.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   112
    "/ Just a guess, there is no comment what the parameter means...
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   113
    a1 timesRepeat: [ con := con sender ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   114
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   115
    "/
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   116
    "/ we are not interrested in all intermediate Exception frames ...
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   117
    "/
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   118
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   119
    FullExceptionTrace ifFalse: [
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   120
        "/ first, skip any JavaVM contexts
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   121
        [ con receiver == exceptionObject ] whileFalse: [ con := con sender ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   122
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   123
        "/ then, all exception-init contexts
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   124
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   125
        [ con receiver == exceptionObject ] whileTrue: [ con := con sender ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   126
    ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   127
    list := OrderedCollection new.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   128
    [ con notNil ] whileTrue: [
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   129
        (con isJavaContext) ifTrue: [
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   130
            "/ add a copy, in case the context continues with some
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   131
            "/ cleanup ...
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   132
            list add: con shallowCopy
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   133
        ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   134
        con := con sender
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   135
    ].
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   136
    exceptionObject instVarNamed: 'backtrace' put: (list asArray).
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   137
    ^ nil.
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   138
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   139
    "Modified: / 08-02-2013 / 01:28:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   140
! !
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   141
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   142
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - java.util.zip'!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   143
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   144
_java_util_zip_ZipFile_getCommentBytes: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   145
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   146
    <javanative: 'java/util/zip/ZipFile' name: 'getCommentBytes(J)[B'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   147
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   148
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   149
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   150
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   151
    ^zmember fileComment asByteArray
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   152
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   153
    "Modified: / 08-02-2013 / 09:46:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   154
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   155
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   156
_java_util_zip_ZipFile_getEntry: this _: a1 _: a2 _: a3 _: a4 
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   157
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   158
    <javanative: 'java/util/zip/ZipFile' name: 'getEntry(J[BZ)J'>
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   159
    "
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   160
    !!!!!!WARNING!!!!!!!!
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   161
    In Open JDK 7, it takes byte array instead of string like in Open JDK 6!!!!!!!!
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   162
    "
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   163
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   164
    | zipArchive  filename  member |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   165
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   166
    zipArchive := ZipCache at: a1.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   167
    filename := a3 asString.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   168
    member := (zipArchive findMemberAllowForMissingTrailingSlash: filename).
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   169
    member isNil ifTrue: [
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   170
        ^ 0
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   171
    ] ifFalse: [
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   172
        ^ ZipEntryCache indexOf: member ifAbsent:[
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   173
            ZipEntryCache add: member.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   174
            ZipEntryCache size.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   175
        ]
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   176
    ]
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   177
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   178
    "Modified: / 08-02-2013 / 09:35:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   179
!
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   180
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   181
_java_util_zip_ZipFile_getEntryBytes: this _: jzentry _: a2 _: type 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   182
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   183
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryBytes(JI)[B'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   184
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   185
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   186
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   187
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   188
    type == 1 "JZENTRY_EXTRA" ifTrue:[
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   189
        ^zmember extraFieldLength == 0
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   190
            ifTrue:[nil]
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   191
            ifFalse:[zmember extraField asByteArray].
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   192
    ].
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   193
    type == 2 "JZENTRY_COMMENT" ifTrue:[
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   194
        ^zmember fileCommentLength == 0
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   195
            ifTrue:[nil]
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   196
            ifFalse:[zmember fileComment asByteArray].
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   197
    ].
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   198
    self breakPoint: #jv.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   199
    JavaVM throwZipException: 'Unknown type in getEntryBytes()'.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   200
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   201
    "Modified: / 08-02-2013 / 09:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   202
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   203
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   204
_java_util_zip_ZipFile_getEntryCSize: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   205
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   206
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryCSize(J)J'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   207
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   208
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   209
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   210
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   211
    ^zmember compressedSize
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   212
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   213
    "Modified: / 08-02-2013 / 09:44:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   214
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   215
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   216
_java_util_zip_ZipFile_getEntryCrc: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   217
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   218
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryCrc(J)J'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   219
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   220
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   221
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   222
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   223
    ^zmember crc32
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   224
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   225
    "Modified: / 08-02-2013 / 09:45:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   226
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   227
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   228
_java_util_zip_ZipFile_getEntryFlag: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   229
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   230
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryFlag(J)I'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   231
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   232
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   233
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   234
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   235
    ^zmember generalPurposBitFlag
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   236
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   237
    "Modified: / 08-02-2013 / 09:42:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   238
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   239
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   240
_java_util_zip_ZipFile_getEntryMethod: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   241
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   242
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryMethod(J)I'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   243
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   244
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   245
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   246
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   247
    ^zmember compressionMethod
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   248
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   249
    "Modified: / 08-02-2013 / 09:44:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   250
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   251
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   252
_java_util_zip_ZipFile_getEntrySize: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   253
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   254
    <javanative: 'java/util/zip/ZipFile' name: 'getEntrySize(J)J'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   255
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   256
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   257
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   258
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   259
    ^zmember uncompressedSize
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   260
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   261
    "Modified: / 08-02-2013 / 09:43:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   262
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   263
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   264
_java_util_zip_ZipFile_getEntryTime: this _: jzentry _: a2 
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   265
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   266
    <javanative: 'java/util/zip/ZipFile' name: 'getEntryTime(J)J'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   267
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   268
    |  zmember |
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   269
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   270
    zmember := ZipEntryCache at: jzentry.
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   271
    ^zmember lastModFileTime
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   272
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   273
    "Modified: / 08-02-2013 / 09:45:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   274
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   275
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   276
_java_util_zip_ZipFile_open: this _: a1 _: a2 _: a3 _: a4 _: a5 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   277
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   278
    <javanative: 'java/util/zip/ZipFile' name: 'open(Ljava/lang/String;IJZ)J'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   279
2045
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   280
    "No mmap support for zip files yet, use Open JDK 6 implementation"
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   281
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   282
    | path  mode  lastModTime  result |
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   283
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   284
    path := Java as_ST_String: a1.
2045
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   285
    "/(path endsWith:'.jar') ifFalse:[self breakPoint: #jv].
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   286
    mode := a2.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   287
    lastModTime := a3.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   288
    result := path asFilename.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   289
    result ifNil: [ JavaVM throwZipException ].
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   290
    ^[
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   291
        | i zar |
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   292
        zar := ZipArchive readingFrom: result readStream.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   293
        i := ZipCache indexOf: nil.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   294
        i ~~ 0 ifTrue:[
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   295
            ZipCache at: i put: zar.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   296
            i
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   297
        ] ifFalse:[
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   298
            ZipCache add: zar.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   299
            ZipCache size.
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   300
        ].
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   301
    ] on: Error do:[:ex|
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   302
        JavaVM throwZipException:'Cannot open zip file: ' , ex description
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   303
    ]
cc12924bfbe8 More natives for Open JDK 7. VM boots, but cannot load classes using ext class loader.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2044
diff changeset
   304
2046
3309a3bc8615 Initial support for Open JDK 7 finished. VM boots, Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2045
diff changeset
   305
    "Modified: / 08-02-2013 / 09:16:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2044
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   306
! !
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   307
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   308
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'native - sun.misc'!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   309
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   310
_sun_misc_Unsafe_copyMemory: this _: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   311
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   312
    <javanative: 'sun/misc/Unsafe' name: 'copyMemory(Ljava/lang/Object;JLjava/lang/Object;JJ)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   313
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   314
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   315
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   316
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   317
_sun_misc_Unsafe_defineAnonymousClass: this _: a1 _: a2 _: a3 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   318
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   319
    <javanative: 'sun/misc/Unsafe' name: 'defineAnonymousClass(Ljava/lang/Class;[B[Ljava/lang/Object;)Ljava/lang/Class;'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   320
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   321
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   322
!
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   323
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   324
_sun_misc_Unsafe_setMemory: this _: a1 _: a2 _: a3 _: a4 _: a5 _: a6 
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   325
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   326
    <javanative: 'sun/misc/Unsafe' name: 'setMemory(Ljava/lang/Object;JJB)V'>
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   327
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   328
    ^ JavaVM unimplementedNativeMethodSignal raise
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   329
! !
15d698503afe Some more Open JDK 7 natives. Still does not boot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 2041
diff changeset
   330
2041
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   331
!JavaNativeMethodImpl_OpenJDK7 class methodsFor:'documentation'!
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   332
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   333
version_HG
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   334
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   335
    ^ '$Changeset: <not expanded> $'
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   336
! !
eb765dbc5b59 Added native method implementation class for OpenJDK7.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   337