/objects/applications/pep/pep_runtime.self
http://github.com/ticking/self · Unknown · 1339 lines · 1100 code · 239 blank · 0 comment · 0 complexity · 926f05bd928d2237416153d28d546ecc MD5 · raw file
- '$Revision: 30.7 $'
- '
- Copyright 1992-2006 Sun Microsystems, Inc.
- See the LICENSE file for license information.
- '
- '-- Module body'
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- pep_runtime = bootstrap define: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () ToBe: bootstrap addSlotsTo: (
- bootstrap remove: 'comment' From:
- bootstrap remove: 'directory' From:
- bootstrap remove: 'fileInTimeString' From:
- bootstrap remove: 'postFileIn' From:
- bootstrap remove: 'revision' From:
- bootstrap remove: 'subpartNames' From:
- globals modules init copy ) From: bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals modules pep_runtime.
- CopyDowns:
- globals modules init. copy
- SlotsToOmit: comment directory fileInTimeString myComment postFileIn revision subpartNames.
- \x7fIsComplete: '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- myComment <- ''.
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- directory <- 'applications/pep'.
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: InitializeToExpression: (_CurrentTimeString)\x7fVisibility: public'
-
- fileInTimeString <- _CurrentTimeString.
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- postFileIn = ( |
- |
- transporter moduleDictionary resetFillingSemaphore.
- snapshotAction addSchedulerInitialMessage:
- message copy receiver: transporter moduleDictionary
- Selector: 'resetFillingSemaphore'.
- resend.postFileIn).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: InitializeToExpression: (\'$Revision: 30.7 $\')\x7fVisibility: public'
-
- revision <- '$Revision: 30.7 $'.
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'pep_runtime' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- subpartNames <- ''.
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'booleanArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'booleanArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters booleanArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'byteArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'byteArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters byteArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'charArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'charArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters charArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'doubleArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'doubleArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters doubleArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'floatArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'floatArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters floatArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'intArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'intArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters intArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'longArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'longArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters longArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'objectArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'objectArray' -> 'my_class' -> () From: ( |
- {} = 'Comment: For the arrays of the built-in types (int, short, byte, etc.) it is alright to
- have methods in the parent of the array objects. For arrays of \"class instances\"
- it is best not to add too much state to this array parent, since it will be cloned
- as specialized to lots of classes (e.g., array of point, array of colorPoint, etc.).
- Instead, we have added an extra parent-indirection and placed the methods up there.\x7fModuleInfo: Creator: globals pep arrayBuildMixin array_masters objectArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'shortArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- my_class* = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'shortArray' -> 'my_class' -> () From: ( |
- {} = 'ModuleInfo: Creator: globals pep arrayBuildMixin array_masters shortArray my_class.
- '.
- | ) .
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_allArrays' -> () From: ( | {
- 'Category: array instantiation\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- java_inst_newArraySize: n = ( |
- |
- 0 pep ifTraceMutator: [
- ^ 0 pep mutatorTracer newarray: (basic_newArraySize: n).
- ].
- basic_newArraySize: n).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- array_parent* = bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_allArrays' -> ().
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'Comment: Needed for IO etc. which calls into Self
- code.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- asVMByteVector = ( |
- | self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- basic_newArraySize: n = ( |
- |
- _CloneBytes: n Filler: java_inst_filler IfFail: [|:e|
- 0 > n ifTrue: [java_inst_athrow: class_java_lang_NegativeArraySizeException].
- 'outOfMemoryError' != e ifFalse: [java_error: e].
- 0 memory allocationFailedBytes: n.
- _CloneBytes: n Filler: java_inst_filler.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- java_inst_arraylength = ( |
- |
- _ByteSize).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_at: index = ( |
- |
- _ByteAt: index IfFail: [|:e|
- java_inst_handlePrimError: e.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_at: index Put: v = ( |
- |
- _ByteAt: index Put: v IfFail: [|:e|
- java_inst_handlePrimError: e.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_byteVectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_copyRangeDstPos: dstPos SrcArray: srcArray SrcPos: srcPos Len: len IfFail: errBlk = ( |
- |
- _CopyByteRangeDstPos: dstPos Src: srcArray SrcPos: srcPos Length: len IfFail: errBlk).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- array_parent* = bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_allArrays' -> ().
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- basic_newArraySize: n = ( |
- |
- _Clone: n Filler: java_inst_filler IfFail: [|:e|
- 0 > n ifTrue: [java_inst_athrow: class_java_lang_NegativeArraySizeException].
- 'outOfMemoryError' != e ifFalse: [java_error: e].
- 0 memory allocationFailedBytes: n.
- _Clone: n Filler: java_inst_filler.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'ModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- java_inst_arraylength = ( |
- | _Size).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_at: index = ( |
- |
- _At: index IfFail: [|:e|
- java_inst_handlePrimError: e.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_at: index Put: v = ( |
- |
- _At: index Put: v IfFail: [|:e|
- java_inst_handlePrimError: e.
- ].
- 0 pep ifTraceMutator: [
- obj_flags = 'T_CLASS' ifTrue: [ "Array of references."
- 0 pep mutatorTracer putarray: self Idx: index StoredObj: v.
- ].
- ].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'Category: primitive wrappers\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: private'
-
- java_inst_copyRangeDstPos: dstPos SrcArray: srcArray SrcPos: srcPos Len: len IfFail: errBlk = ( |
- |
- _CopyRangeDstPos: dstPos Src: srcArray SrcPos: srcPos Length: len IfFail: errBlk).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'arrayBuildMixin' -> 'array_masters' -> 'traits_vectorBasedArray' -> () From: ( | {
- 'Comment: Better implement this method if you are a vector, or the UI will crash.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot\x7fVisibility: public'
-
- methodPointerIfFail: b = ( |
- | _MethodPointerIfFail: b).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileDescriptor\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileDescriptor_initSystemFD_Ljava_io_FileDescriptor: fdObj I: fd0 = ( |
- |
- fdObj java_inst_setFileNumber: fd0.
- fdObj).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileDescriptor\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileDescriptor_valid = ( |
- |
- "Note: getFileNumber already subtracts 1, so
- compare using '<=' not '<'."
- 0 <= java_inst_getFileNumber ifTrue: [java_true]
- False: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_available = ( |
- cur <- 0.
- end <- 0.
- selfFile.
- statObj.
- |
- java_io_FileInputStream_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_FileInputStream_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException.
- ]).
- statObj: (selfFile fstatIfFail: [java_inst_IOException]).
- statObj s_ischr || [statObj s_isfifo] || [statObj s_issock] ifTrue: [
- 0 error: 'special devices currently not supported'. "%%%"
- ].
- java_inst_tripleSeek: selfFile Cur: [|:c| cur: c] End: [|:e| end: e].
- end - cur).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_close = ( |
- |
- java_io_FileInputStream_fd_ java_inst_closeFileDescriptor).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_open_Ljava_lang_String: name = ( |
- |
- java_inst_openFileName: name
- Flags: 0 os_file flags read
- Mode: 0
- FileDescObj: java_io_FileInputStream_fd_).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_read = ( |
- selfFile.
- |
- java_io_FileInputStream_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_FileInputStream_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException: 'read error'.
- ]).
- (selfFile readOneCharIfFail: [
- selfFile atEOF ifTrue: [^ -1].
- java_inst_IOException: 'read error'.
- ]) asByte).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_readBytes_Array_B: byteArray I: off I: len = ( |
- bytesRead <- 0.
- |
- bytesRead: (java_inst_readFromFileDescObj: java_io_FileInputStream_fd_
- Into: byteArray
- Offset: off
- Length: len
- MinBytes: 1).
- 0 = bytesRead ifTrue: [-1] False: [bytesRead]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileInputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileInputStream_skip_J: n = ( |
- cur <- 0.
- end <- 0.
- selfFile.
- |
- java_io_FileInputStream_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_FileInputStream_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException.
- ]).
- cur: (selfFile lseekOffset: 0 Whence: selfFile seek_cur IfFail: [
- java_inst_IOException.
- ]).
- end: (selfFile lseekOffset: n Whence: selfFile seek_cur IfFail: [
- java_inst_IOException.
- ]).
- end java_inst_lsub: cur).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileOutputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileOutputStream_close = ( |
- |
- java_io_FileOutputStream_fd_ java_inst_closeFileDescriptor).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileOutputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileOutputStream_open_Ljava_lang_String: name = ( |
- flags.
- |
- flags: 0 os_file flags.
- java_inst_openFileName: name
- Flags: flags write || flags create || flags truncate
- Mode: 8r664
- FileDescObj: java_io_FileOutputStream_fd_).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileOutputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileOutputStream_writeBytes_Array_B: byteArray I: off I: len = ( |
- |
- java_inst_writeToFileDescObj: java_io_FileOutputStream_fd_
- From: byteArray
- Offset: off
- Length: len).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: FileOutputStream\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_FileOutputStream_write_I: byte = ( |
- selfFile.
- |
- java_io_FileOutputStream_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_FileOutputStream_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException: 'write error'.
- ]).
- selfFile write: (0 byteVector copySize: 1 FillingWith: byte)
- IfFail: [java_inst_IOException: 'write error'].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_canRead0 = ( |
- |
- java_inst_sysAccessMode: 0 os accessModes r_ok).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_canWrite0 = ( |
- |
- java_inst_sysAccessMode: 0 os accessModes w_ok).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_exists0 = ( |
- |
- java_inst_sysAccessMode: 0 os accessModes f_ok).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_isAbsolute = ( |
- selfStrPath <- ''.
- |
- java_io_File_path_ java_inst_athrowIfNull.
- selfStrPath: java_io_File_path_ o_javaStrToSelfStr.
- (0 os_file isAbsolutePath: selfStrPath) ifTrue: [java_true]
- False: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_isDirectory0 = ( |
- |
- java_inst_statOp: [|:statObj|
- (statObj s_isdirIfFail: [^ java_false]) ifTrue: [java_true]
- False: [java_false].
- ] IfFail: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_isFile0 = ( |
- |
- java_inst_statOp: [|:statObj|
- (statObj s_isregIfFail: [^ java_false]) ifTrue: [java_true]
- False: [java_false].
- ] IfFail: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_lastModified0 = ( |
- |
- java_inst_statOp: [|:statObj. v|
- v: (statObj st_mtimeIfFail: [^ java_zero_long]).
- (0 time msecPerDay java_inst_lmul: (v at: 0)) java_inst_ladd: (v at: 1).
- ] IfFail: [java_zero_long]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_length0 = ( |
- |
- java_inst_statOp: [|:statObj|
- statObj st_sizeIfFail: [^ java_zero_long].
- ] IfFail: [java_zero_long]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: File\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_File_mkdir0 = ( |
- path.
- |
- path: java_io_File_path_.
- path java_inst_athrowIfNull.
- 0 os mkdir: path o_javaStrToSelfStr
- Mode: 8r771
- IfFail: [^ java_false].
- java_true. "Indicate success.").
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: RandomAccessFile\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_RandomAccessFile_close = ( |
- |
- java_io_FileInputStream_fd_ java_inst_closeFileDescriptor).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: RandomAccessFile\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_RandomAccessFile_length = ( |
- end <- 0.
- selfFile.
- |
- java_io_RandomAccessFile_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_RandomAccessFile_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException.
- ]).
- java_inst_tripleSeek: selfFile Cur: [] End: [|:e| end: e].
- end).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: RandomAccessFile\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_RandomAccessFile_open_Ljava_lang_String: name Z: writable = ( |
- f <- 0.
- flags.
- m <- 0.
- |
- flags: 0 os_file flags.
- (o_javaBoolToSelfBool: writable) ifTrue: [
- m: 8r664.
- f: flags readWrite || flags create.
- ] False: [
- m: 0.
- f: flags read.
- ].
- java_inst_openFileName: name
- Flags: f
- Mode: m
- FileDescObj: java_io_RandomAccessFile_fd_).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: RandomAccessFile\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_RandomAccessFile_readBytes_Array_B: byteArray I: off I: len = ( |
- |
- java_inst_readFromFileDescObj: java_io_RandomAccessFile_fd_
- Into: byteArray
- Offset: off
- Length: len
- MinBytes: 1).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: io\x7fCategory: RandomAccessFile\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_io_RandomAccessFile_seek_J: pos = ( |
- selfFile.
- |
- java_io_RandomAccessFile_fd_ java_inst_athrowIfNullMessage: 'null FileDescriptor'.
- selfFile: (java_io_RandomAccessFile_fd_ java_inst_getSelfFileIfFail: [
- java_inst_IOException.
- ]).
- selfFile lseekOffset: pos Whence: selfFile seek_set IfFail: [
- java_inst_IOException.
- ].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: ClassLoader\x7fComment: Corresponding native method defined in ...share/java/lang/class.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_ClassLoader_defineClass0_Array_B: data I: offset I: length = ( |
- bytes.
- cl.
- dlen <- 0.
- |
- data java_inst_athrowIfNull.
- dlen: data java_inst_arraylength.
- offset java_inst_iflt ||
- [length java_inst_iflt] ||
- [(offset java_inst_iadd: length) java_inst_if_icmpgt: dlen] ifTrue: [
- java_inst_athrow: java_classes
- class_java_lang_ArrayIndexOutOfBoundsException.
- ].
- "Transfer the 'data' to a self bytevector."
- bytes: (0 byteVector copySize: length).
- bytes copyRangeDstPos: 0 SrcArray: data SrcPos: offset Len: length.
- cl: (0 pep loader defineClassFromBytes: bytes IfFail: [|:e|
- java_inst_athrow: java_classes class_java_lang_ClassFormatError
- Message: e. "Supplying the message is my addition. Ole, July 1996."
- ]).
- cl proto_instance java_lang_Object_getClass).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: ClassLoader\x7fComment: Corresponding native method defined in ...share/java/lang/class.c.
- How is this method different from the method
- java_lang_Class_forName_Ljava_lang_String:?
- They seem to do the same!\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_ClassLoader_findSystemClass0_Ljava_lang_String: className = ( |
- cl.
- name <- ''.
- |
- name: className o_javaStrToSelfStr.
- cl: (0 pep loader getClassNamed: name IfFail: [
- java_inst_athrow: java_classes class_java_lang_ClassNotFoundException Message: name.
- ]).
- cl proto_instance java_lang_Object_getClass).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: ClassLoader\x7fComment: Corresponding native method defined in ...share/java/lang/class.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_ClassLoader_init = ( |
- |
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: ClassLoader\x7fComment: Corresponding native method defined in ...share/java/lang/class.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_ClassLoader_resolveClass0_Ljava_lang_Class: c = ( |
- |
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fComment: Corresponding native method defined in .../class.c.
- How is this method different from the method
- java_lang_ClassLoader_findSystemClass_Ljava_lang_String:?
- They seem to do the same!\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_forName_Ljava_lang_String: className = ( |
- cl.
- name <- ''.
- |
- name: className o_javaStrToSelfStr.
- cl: (0 pep loader getClassNamed: name IfFail: [
- java_inst_athrow: java_classes class_java_lang_ClassNotFoundException Message: name.
- ]).
- cl proto_instance java_lang_Object_getClass).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_getInterfaces = ( |
- intfs.
- res.
- |
- intfs: the_class interface_names.
- res: (java_classes class_java_lang_Class array_1 java_inst_newArraySize: intfs size).
- intfs do: [|:className. :idx. cl|
- cl: (0 pep loader getClassNamed: className IfFail: [
- java_inst_athrow: java_classes class_java_lang_ClassNotFoundException Message: name.
- ]).
- res java_inst_aastore: idx With: cl proto_instance java_lang_Object_getClass.
- ].
- res).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_getName = ( |
- |
- o_selfStrToJavaStr: the_class class_name).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_getSuperclass = ( |
- |
- (the_class _Eq: java_classes class_java_lang_Object) ifTrue: [^ java_null].
- the_class super_class proto_instance java_lang_Object_getClass).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_isInterface = ( |
- |
- the_class class_is_interface ifTrue: [java_true]
- False: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Class\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Class_newInstance = ( |
- |
- the_class class_is_interface || [the_class class_is_abstract] ifTrue: [
- java_inst_athrow: java_classes class_java_lang_InstantiationException.
- ].
- "Also should check for illegal access (how?). %%%"
- 0 pep mutatorTracer keepAlive: the_class java_inst_new
- Do: [|:inst| inst init_obj]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Double\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Double_doubleToLongBits_D: val = ( |
- bv.
- |
- bv: (0 byteVector copySize: 8).
- bv javaAt: 0 PutDouble: val.
- bv javaLongAt: 0).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Double\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Double_longBitsToDouble_J: bits = ( |
- bv.
- |
- bv: (0 byteVector copySize: 8).
- bv javaAt: 0 PutLong: bits.
- bv javaDoubleAt: 0).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Double\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Double_toString_D: double = ( |
- |
- o_selfStrToJavaStr: double _FloatPrintString).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Double\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Double_valueOf_Ljava_lang_String: str = ( |
- |
- 0 pep mutatorTracer keepAlive: java_classes class_java_lang_Double
- java_inst_new
- Do: [|:inst|
- inst init_obj_D: (java_inst_javaStringToSelfFloat: str).
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Float\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Float_floatToIntBits_F: val = ( |
- bv.
- |
- bv: (0 byteVector copySize: 4).
- bv javaAt: 0 PutFloat: val.
- bv javaIntAt: 0).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Float\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Float_intBitsToFloat_I: bits = ( |
- bv.
- |
- bv: (0 byteVector copySize: 4).
- bv javaAt: 0 PutInt: bits.
- bv javaFloatAt: 0).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Float\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Float_toString_F: float = ( |
- |
- o_selfStrToJavaStr: float _FloatPrintString).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Float\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Float_valueOf_Ljava_lang_String: str = ( |
- |
- 0 pep mutatorTracer keepAlive: java_classes class_java_lang_Float
- java_inst_new
- Do: [|:inst|
- inst init_obj_F: (java_inst_javaStringToSelfFloat: str).
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_acos_D: d = ( |
- | d arcCos).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_asin_D: d = ( |
- | d arcSin).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_atan_D: d = ( |
- | d arcTan).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_ceil_D: d = ( |
- | d ceil).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_cos_D: d = ( |
- | d cos).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_floor_D: d = ( |
- | d floor).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_log_D: d = ( |
- | d naturalLog).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_sin_D: d = ( |
- | d sin).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_sqrt_D: d = ( |
- | d squareRoot).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Math\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Math_tan_D: d = ( |
- | d tan).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_clone = ( |
- |
- 'T_NORMAL_OBJECT' = obj_flags ifTrue: [
- is_java_lang_Cloneable ifFalse: [
- java_inst_athrow: java_classes class_java_lang_CloneNotSupportedException
- Message: class_name.
- ].
- ].
- _Clone).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_getClass = ( |
- |
- java_inst_athrowIfNull.
- 0 pep mutatorTracer keepAlive: java_classes class_java_lang_Class
- java_inst_new
- Do: [|:res|
- res init_obj.
- res the_class: my_class.
- res.
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_hashCode = ( |
- |
- _IdentityHash).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_notify = ( |
- |
- check_holds_monitor.
- my_waitQ isEmpty ifFalse: [my_waitQ signal].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_notifyAll = ( |
- |
- check_holds_monitor.
- [my_waitQ isEmpty] whileFalse: [my_waitQ signal].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Object\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Object_wait_J: millis = ( |
- ms <- 0.
- |
- check_holds_monitor.
- my_waitQ allocateIn: self. "Lazy allocation."
- ms: millis asInteger.
- "'waiting on: ' print. my_waitQ objectID printLine."
- 0 = ms ifTrue: [ "In Java, a wait of 0 ms is forever."
- my_lock forceUnlockForWaitOn: my_waitQ.
- ] False: [
- my_lock forceUnlockForWaitOn: my_waitQ TimeOut: ms.
- ].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Runtime\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Runtime_buildLibName_Ljava_lang_String: path Ljava_lang_String: filename = ( |
- sname <- ''.
- spath <- ''.
- sres <- ''.
- |
- path java_inst_athrowIfNull.
- filename java_inst_athrowIfNull.
- spath: path o_javaStrToSelfStr.
- sname: filename o_javaStrToSelfStr.
- sres: spath, '/lib', sname, '.so'. "Gwak! Why did they have to do
- that in a native method?"
- o_selfStrToJavaStr: sres).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Runtime\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Runtime_exitInternal_I: int = ( |
- str <- ''.
- |
- str: 'exitInternal called with arg: ', int printString.
- str printLine.
- "this_process abort: str.").
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Runtime\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Runtime_initializeLinkerInternal = ( |
- |
- sync_do: [
- "Should also initialize linker, but for now just return LD_LIBRARY_PATH
- (as is required). %%%"
- o_selfStrToJavaStr: (0 os environmentAt: 'LD_LIBRARY_PATH'
- IfFail: [^ java_null]).
- ]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Runtime\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Runtime_loadFileInternal_Ljava_lang_String: filename = ( |
- |
- filename java_inst_athrowIfNull.
- "Should really call dlopen! For now just return 1,
- pretending we did the job! %%%"
- java_one_int).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Runtime\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Runtime_traceMethodCalls_Z: bool = ( |
- | self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: SecurityManager\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_SecurityManager_classLoaderDepth = ( |
- |
- "This is wrong, of course.
- But I have no desire to do the right thing. %%%"
- -1).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: SecurityManager\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_SecurityManager_currentClassLoader = ( |
- |
- java_null. "Not always right! %%%").
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: System\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_System_arraycopy_Ljava_lang_Object: srcArray I: srcPos Ljava_lang_Object: dstArray I: dstPos I: length = ( |
- |
- "The implementation of the array copy method in the Java virtual machine also
- checks to see if one of the 'obj_flags' is 'T_NORMAL_OBJECT' (i.e., the
- object is not an array. If that is the case, it fails the array copy native
- method with the ArrayStoreException. In Pep, we catch this case efficiently
- by having even non-array objects implement the array copy method (they throw
- the appropriate exception).
- All other error checks are deferred to the different implementations of
- java_inst_arraycopyPos:SrcArray:Pos:Len: (for efficiency)."
- dstArray java_inst_arraycopyPos: dstPos SrcArray: srcArray Pos: srcPos Len: length.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: System\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_System_currentTimeMillis = ( |
- v.
- |
- v: _TimeReal.
- "Use java runtime instructions to get result of appropriate type."
- ((v _At: 0) java_inst_lmul: (24 * 60 * 60 * 1000))
- java_inst_ladd: (v _At: 1)).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: System\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_System_initProperties_Ljava_util_Properties: props = ( |
- osName <- ''.
- osVers <- ''.
- pp.
- |
- '5.0' <= 0 os release ifTrue: [
- osName: 'Solaris'.
- osVers: 0 os release.
- osVers at: 0 PutByte: (osVers byteAt: 0) - 3.
- ] False: [
- osName: 'SunOS'.
- osVers: 0 os release.
- ].
- "Native methods get moved to a different place when pep translates them.
- So tricky to call other methods. Instead use a block to factor code."
- pp: [|:key. :val|
- 0 pep mutatorTracer keepAlive: (o_selfStrToJavaStr: key) Do: [|:kStr|
- 0 pep mutatorTracer keepAlive: (o_selfStrToJavaStr: val) Do: [|:vStr|
- props put_Ljava_lang_Object: kStr Ljava_lang_Object: vStr.
- ].
- ].
- ].
- pp value: 'java.version' With: '1.0.1'.
- pp value: 'java.vendor' With: 'Kanban group'.
- pp value: 'java.vendor.url' With: 'http://self.sunlabs.com/'.
- pp value: 'java.home' With: (0 os environmentAt: 'JAVA_HOME'
- IfFail: '/usr/local/java').
- pp value: 'java.class.version' With: '45.3'.
- pp value: 'java.class.path' With: 0 pep loader classPath.
- pp value: 'os.name' With: osName.
- pp value: 'os.version' With: osVers.
- pp value: 'os.arch' With: 'sparc'.
- pp value: 'file.separator' With: 0 os_file directorySeparator.
- pp value: 'path.separator' With: 0 os_file pathSeparator.
- pp value: 'line.separator' With: '\n'.
- pp value: 'user.name' With: (0 os environmentAt: 'USER'
- IfFail: '?').
- pp value: 'user.home' With: (0 os environmentAt: 'HOME'
- IfFail: '?').
- pp value: 'user.dir' With: (0 os getcwdIfFail: '?').
- pp value: 'java.compiler' With: (0 os environmentAt: 'JAVA_COMPILER'
- IfFail: '').
- "%%% Skipping locale stuff; see .../solaris/java/runtime/properties_md.c."
- pp value: 'awt.toolkit' With: 'sun.awt.tiny.TinyToolkit'.
- "Finally do the user-defined properties."
- user_props do: [|:val. :key| pp value: key With: val].
- props).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_currentThread = ( |
- selfProcess.
- |
- selfProcess: this_process.
- 0 nil = selfProcess javaThread ifTrue: [
- java_error: 'currentThread native method failed: ',
- 'not running as a Java thread'.
- ].
- selfProcess javaThread).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_interrupt0 = ( |
- |
- (thread_getSelfProcessIfNone: [^ self]) java_interrupted: java_true.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fComment: Corresponds to the method java_lang_Thread_isAlive(Thread *p)
- defined in thread.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_isAlive = ( |
- |
- thread_hasSelfProcess &&
- [java_lang_Thread_stillborn_ java_inst_ifeq] ifTrue: [java_true]
- False: [java_false]).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_isInterrupted = ( |
- |
- (thread_getSelfProcessIfNone: [^ false]) java_interrupted).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_resume0 = ( |
- |
- (thread_getSelfProcessIfNone: [^ self]) resume.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_setPriority0_I: pri = ( |
- |
- "If there is no Self process, then we have (probably) just created
- an instance of class java.lang.Thread. It does not (yet) have
- an underlying Self process, so here we just ignore the request
- to set the priority.
- The Java code has already recorded the desired priority in the
- instance variable 'java_lang_Thread_priority' from where we can
- take it when the process is made runnable."
- (thread_getSelfProcessIfNone: [^ self]) java_inst_setPriority: pri.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_sleep_J: millis = ( |
- ms <- 0.
- |
- "Also need to handle interrupted sleep. %%%"
- ms: millis asInteger.
- 0 > ms ifTrue: [
- java_inst_athrow: java_classes class_java_lang_IllegalArgumentException
- Message: 'timeout value is negative'.
- ].
- 0 = ms ifTrue: [ "Wait forever."
- ms: scheduler timeoutInfinity.
- ].
- this_process sleep: ms.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_start = ( |
- |
- "Similar to the C function in thread.c."
- sync_do: [| selfProcess. startMsg. cob <- ''. tar. |
- "It is illegal to call 'start' on an active thred."
- thread_hasSelfProcess ifTrue: [
- java_inst_athrow: java_classes class_java_lang_IllegalThreadStateException.
- ].
- [thread_RT0. "For senders"].
- startMsg: 0 message copy.
- startMsg receiver: self.
- startMsg selector: 'thread_RT0'. "First routine called by new thread.
- Defined in file thread.c."
- startMsg arguments: 0 vector.
- "Try to get a more sensible process name than 'java.lang.Thread'."
- cob: my_class class_name.
- tar: java_lang_Thread_target_.
- ('java.lang.Thread' = cob) && [tar java_inst_ifnonnull] ifTrue: [
- cob: tar my_class class_name.
- ].
- cob: cob, '::run'.
- selfProcess: (newSelfProcess_startMsg: startMsg
- SysThread: java_lang_Thread_daemon_ java_inst_ifne
- CauseOfBirth: cob).
- "'Starting Thread: ' print. _ObjectID print.
- ', self process: ' print. selfProcess objectID printLine."
- link_javaThread: self SelfProcess: selfProcess.
- selfProcess java_inst_setPriority: java_lang_Thread_priority_.
- selfProcess resume. "Start the new thread."
- ].
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Thread\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Thread_suspend0 = ( |
- |
- (thread_getSelfProcessIfNone: [^ self]) suspend.
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Throwable\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Throwable_fillInStackTrace = ( |
- |
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: lang\x7fCategory: Throwable\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_lang_Throwable_printStackTrace0_Ljava_io_PrintStream: s = ( |
- |
- s println_Ljava_lang_String: (o_selfStrToJavaStr: '<stack trace omitted>').
- self).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: net\x7fCategory: InetAddress\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_net_InetAddress_getHostByAddr_I: addr = ( |
- bvAddr.
- name <- ''.
- |
- bvAddr: (0 byteVector copySize: 4).
- bvAddr javaAt: 0 PutInt: addr.
- name: (0 os hostNameForAddr: bvAddr
- Type: 0 os_file socketConstants af_inet
- IfFail: [
- java_inst_athrow: java_classes class_java_net_UnknownHostException.
- ]).
- o_selfStrToJavaStr: name).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: net\x7fCategory: InetAddress\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_net_InetAddress_getInetFamily = ( |
- |
- 0 os_file socketConstants af_inet asInt64).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: net\x7fCategory: InetAddress\x7fComment: Implements the C function java_net_InetAddress_getLocalHostName()
- found in .../solaris/net/socket.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_net_InetAddress_getLocalHostName = ( |
- |
- o_selfStrToJavaStr: 0 os nodename).
- } | )
- bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'pep' -> 'nativeMethods' -> () From: ( | {
- 'Category: java\x7fCategory: net\x7fCategory: InetAddress\x7fComment: Implements the C function java_net_InetAddress_lookupAllHostAddr()
- found in .../solaris/net/socket.c.\x7fModuleInfo: Module: pep_runtime InitialContents: FollowSlot'
-
- java_net_InetAddress_lookupAllHostAddr_Ljava_lang_String: host = ( |
- hostname <- ''.
- |
- host java_inst_athrowIfNull.
- hostname: host o_javaStrToSelfStr.
- [|:throwException. addrs. res. |
- hostname first isDigit ifTrue: throwException.
- addrs: (0 os hostAddressesForName: hostname