Moving things to scheme/base

svn: r9960
This commit is contained in:
Kathy Gray 2008-05-26 15:50:15 +00:00
parent 613527fd25
commit 7ccb51d3f1
7 changed files with 32 additions and 35 deletions

View File

@ -1,5 +1,4 @@
#cs (module Comparable scheme/base
(module Comparable mzscheme (require scheme/class)
(require mzlib/class) (provide (all-defined-out))
(provide (all-defined))
(define Comparable (interface () compareTo-java.lang.Object))) (define Comparable (interface () compareTo-java.lang.Object)))

View File

@ -1,12 +1,18 @@
(module Object-composite mzscheme (module Object-composite scheme/base
(require mzlib/class (require scheme/class
(prefix c: mzlib/contract) (prefix-in c: scheme/contract)
(lib "errortrace-lib.ss" "errortrace") errortrace
(lib "Comparable.ss" "profj" "libs" "java" "lang")
(lib "Serializable.ss" "profj" "libs" "java" "io")) profj/libs/java/lang/Comparable
profj/libs/java/io/Serializable
#;(lib "Comparable.ss" "profj" "libs" "java" "lang")
#;(lib "Serializable.ss" "profj" "libs" "java" "io"))
(require "compile-lang-syntax.ss") (require "compile-lang-syntax.ss")
(define make-hash-table make-hash)
(define hash-table-put! hash-set!)
;Runtime needed code ;Runtime needed code
(define (javaRuntime:convert-to-string data) (define (javaRuntime:convert-to-string data)
(cond (cond
@ -109,7 +115,7 @@
(if (string? obj) (if (string? obj)
(make-java-string string) (make-java-string string)
(begin (begin
(c:contract (c:object-contract (c:contract (object-contract
(clone (c:-> c:any/c)) (clone (c:-> c:any/c))
(equals-java.lang.Object (c:-> c:any/c c:any/c)) (equals-java.lang.Object (c:-> c:any/c c:any/c))
(finalize (c:-> c:any/c)) (finalize (c:-> c:any/c))
@ -446,7 +452,7 @@
(define (is-java-array? obj) (is-a? obj java-array)) (define (is-java-array? obj) (is-a? obj java-array))
(define-struct runtime-type (type dim) (make-inspector)) (define-struct runtime-type (type dim) #:transparent)
(define (array->list array start stop) (define (array->list array start stop)
(if (= start stop) (if (= start stop)
@ -879,7 +885,7 @@
; ;
;Throwable and exceptions ;Throwable and exceptions
(provide Throwable (struct java:exception (object)) (provide Throwable (struct-out java:exception)
exception-is-a? handle-exception create-java-exception) exception-is-a? handle-exception create-java-exception)
(define Throwable (define Throwable
@ -987,7 +993,7 @@
;(make-java-exception string continuation-mark-set Throwable) ;(make-java-exception string continuation-mark-set Throwable)
;Where Throwable is an object descending from class Throwable ;Where Throwable is an object descending from class Throwable
(define-struct (java:exception exn) (object)) (define-struct (java:exception exn) (object) #:mutable)
;exception-is-a?: class -> (exn -> bool) ;exception-is-a?: class -> (exn -> bool)
(define (exception-is-a? class) (define (exception-is-a? class)
@ -1019,7 +1025,7 @@
guard-convert-Throwable static-Throwable/c) guard-convert-Throwable static-Throwable/c)
(define (wrap-convert-assert-Throwable obj p n s c) (define (wrap-convert-assert-Throwable obj p n s c)
(c:contract (c:object-contract (c:contract (object-contract
(init-cause (c:-> c:any/c c:any/c)) (init-cause (c:-> c:any/c c:any/c))
(get-message (c:-> c:any/c)) (get-message (c:-> c:any/c))
(get-cause (c:-> c:any/c)) (get-cause (c:-> c:any/c))

View File

@ -1,5 +1,4 @@
#cs (module Object scheme/base
(module Object mzscheme
(require "Object-composite.ss") (require "Object-composite.ss")
(provide ObjectI Object-Mix Object) (provide ObjectI Object-Mix Object)
(provide guard-convert-Object convert-assert-Object wrap-convert-assert-Object (provide guard-convert-Object convert-assert-Object wrap-convert-assert-Object

View File

@ -1,5 +1,4 @@
#cs (module String scheme/base
(module String mzscheme
(require "Object-composite.ss") (require "Object-composite.ss")
(provide make-java-string String String-valueOf-java.lang.Object String-valueOf-char1 (provide make-java-string String String-valueOf-java.lang.Object String-valueOf-char1
String-valueOf-char1-int-int String-copyValueOf-char1-int-int String-copyValueOf-char1 String-valueOf-char1-int-int String-copyValueOf-char1-int-int String-copyValueOf-char1

View File

@ -1,7 +1,6 @@
#cs (module Throwable scheme/base
(module Throwable mzscheme
(require "Object-composite.ss") (require "Object-composite.ss")
(provide Throwable (struct java:exception (object)) (provide Throwable (struct-out java:exception)
exception-is-a? handle-exception create-java-exception) exception-is-a? handle-exception create-java-exception)
(provide guard-convert-Throwable convert-assert-Throwable wrap-convert-assert-Throwable (provide guard-convert-Throwable convert-assert-Throwable wrap-convert-assert-Throwable
dynamic-Throwable/c static-Throwable/c)) dynamic-Throwable/c static-Throwable/c))

View File

@ -1,4 +1,3 @@
#cs (module array scheme/base
(module array mzscheme
(require "Object-composite.ss") (require "Object-composite.ss")
(provide make-java-array is-java-array? make-runtime-type array->list)) (provide make-java-array is-java-array? make-runtime-type array->list))

View File

@ -1,20 +1,16 @@
;Java runtime utilities ;Java runtime utilities
;Kathryn Gray ;Kathryn Gray
;July 2001 (module runtime scheme/base
;This module provides functions needed at runtime for compiled Java code (require scheme/class
scheme/list
(module runtime mzscheme
(require mzlib/class
mzlib/list
profj/libs/java/lang/Object profj/libs/java/lang/Object
profj/libs/java/lang/String profj/libs/java/lang/String
profj/libs/java/lang/Throwable profj/libs/java/lang/Throwable
(lib "ArithmeticException.ss" "profj" "libs" "java" "lang") profj/libs/java/lang/ArithmeticException
(lib "ClassCastException.ss" "profj" "libs" "java" "lang") profj/libs/java/lang/ClassCastException
(lib "NullPointerException.ss" "profj" "libs" "java" "lang") profj/libs/java/lang/NullPointerException
(prefix ast: (lib "ast.ss" "profj"))
) )
(provide convert-to-string shift not-equal bitwise mod divide-dynamic divide-int (provide convert-to-string shift not-equal bitwise mod divide-dynamic divide-int