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 mzscheme
(require mzlib/class)
(provide (all-defined))
(module Comparable scheme/base
(require scheme/class)
(provide (all-defined-out))
(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
(prefix c: mzlib/contract)
(lib "errortrace-lib.ss" "errortrace")
(lib "Comparable.ss" "profj" "libs" "java" "lang")
(lib "Serializable.ss" "profj" "libs" "java" "io"))
(require scheme/class
(prefix-in c: scheme/contract)
errortrace
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")
(define make-hash-table make-hash)
(define hash-table-put! hash-set!)
;Runtime needed code
(define (javaRuntime:convert-to-string data)
(cond
@ -109,7 +115,7 @@
(if (string? obj)
(make-java-string string)
(begin
(c:contract (c:object-contract
(c:contract (object-contract
(clone (c:-> c:any/c))
(equals-java.lang.Object (c:-> c:any/c c:any/c))
(finalize (c:-> c:any/c))
@ -446,7 +452,7 @@
(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)
(if (= start stop)
@ -879,7 +885,7 @@
;
;Throwable and exceptions
(provide Throwable (struct java:exception (object))
(provide Throwable (struct-out java:exception)
exception-is-a? handle-exception create-java-exception)
(define Throwable
@ -987,7 +993,7 @@
;(make-java-exception string continuation-mark-set 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)
(define (exception-is-a? class)
@ -1019,7 +1025,7 @@
guard-convert-Throwable static-Throwable/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))
(get-message (c:-> c:any/c))
(get-cause (c:-> c:any/c))

View File

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

View File

@ -1,5 +1,4 @@
#cs
(module String mzscheme
(module String scheme/base
(require "Object-composite.ss")
(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

View File

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

View File

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

View File

@ -1,20 +1,16 @@
;Java runtime utilities
;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/String
profj/libs/java/lang/Throwable
(lib "ArithmeticException.ss" "profj" "libs" "java" "lang")
(lib "ClassCastException.ss" "profj" "libs" "java" "lang")
(lib "NullPointerException.ss" "profj" "libs" "java" "lang")
(prefix ast: (lib "ast.ss" "profj"))
profj/libs/java/lang/ArithmeticException
profj/libs/java/lang/ClassCastException
profj/libs/java/lang/NullPointerException
)
(provide convert-to-string shift not-equal bitwise mod divide-dynamic divide-int