Changeset 12942
- Timestamp:
- 10/03/10 09:08:55 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/test/lisp/abcl/class-file.lisp
r12918 r12942 161 161 (deftest make-class-file.1 162 162 (let* ((class (jvm::make-class-name "org/armedbear/lisp/mcf_1")) 163 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public))))163 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public)))) 164 164 (jvm::class-add-field file (jvm::make-field "ABC" :int)) 165 165 (jvm::class-add-field file (jvm::make-field "ABD" jvm::+lisp-object+)) 166 (jvm::class-add-method file (jvm:: !make-method "MBC" nil :int))167 (jvm::class-add-method file (jvm:: !make-method "MBD" nil jvm::+lisp-object+))168 (jvm::class-add-method file (jvm:: !make-method :constructor :void nil))169 (jvm::class-add-method file (jvm:: !make-method :class-constructor :void nil))166 (jvm::class-add-method file (jvm::make-method "MBC" nil :int)) 167 (jvm::class-add-method file (jvm::make-method "MBD" nil jvm::+lisp-object+)) 168 (jvm::class-add-method file (jvm::make-method :constructor :void nil)) 169 (jvm::class-add-method file (jvm::make-method :class-constructor :void nil)) 170 170 T) 171 171 T) … … 173 173 (deftest finalize-class-file.1 174 174 (let* ((class (jvm::make-class-name "org/armedbear/lisp/fcf_1")) 175 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public))))175 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public)))) 176 176 (jvm::class-add-field file (jvm::make-field "ABC" :int)) 177 177 (jvm::class-add-field file (jvm::make-field "ABD" jvm::+lisp-object+)) 178 (jvm::class-add-method file (jvm:: !make-method "MBC" nil '(:int)))178 (jvm::class-add-method file (jvm::make-method "MBC" nil '(:int))) 179 179 (jvm::class-add-method file 180 (jvm:: !make-method "MBD" nil180 (jvm::make-method "MBD" nil 181 181 (list jvm::+lisp-object+))) 182 182 (jvm::finalize-class-file file) … … 187 187 (deftest generate-method.1 188 188 (let* ((class (jvm::make-class-name "org/armedbear/lisp/gm_1")) 189 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public)))190 (method (jvm:: !make-method :class-constructor :void nil189 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public))) 190 (method (jvm::make-method :class-constructor :void nil 191 191 :flags '(:static)))) 192 192 (jvm::class-add-method file method) … … 195 195 (jvm::finalize-class-file file) 196 196 (with-open-stream (stream (sys::%make-byte-array-output-stream)) 197 (jvm:: !write-class-file file stream)197 (jvm::write-class-file file stream) 198 198 (sys::load-compiled-function (sys::%get-output-stream-bytes stream))) 199 199 T) … … 202 202 (deftest generate-method.2 203 203 (let* ((class (jvm::make-class-name "org/armedbear/lisp/gm_2")) 204 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public)))205 (method (jvm:: !make-method "doNothing" :void nil)))204 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public))) 205 (method (jvm::make-method "doNothing" :void nil))) 206 206 (jvm::class-add-method file method) 207 207 (jvm::with-code-to-method (file method) … … 219 219 (jvm::finalize-class-file file) 220 220 (with-open-stream (stream (sys::%make-byte-array-output-stream)) 221 (jvm:: !write-class-file file stream)221 (jvm::write-class-file file stream) 222 222 (sys::load-compiled-function (sys::%get-output-stream-bytes stream))) 223 223 T) … … 227 227 (deftest generate-method.3 228 228 (let* ((class (jvm::make-class-name "org.armedbear.lisp.gm_3")) 229 (file (jvm:: !make-class-file class jvm::+lisp-primitive+ '(:public)))229 (file (jvm::make-class-file class jvm::+lisp-primitive+ '(:public))) 230 230 ) 231 (let ((method (jvm:: !make-method :constructor :void nil)))231 (let ((method (jvm::make-method :constructor :void nil))) 232 232 (jvm::class-add-method file method) 233 233 (jvm::with-code-to-method (file method) … … 239 239 jvm::+lisp-object+)) 240 240 (jvm::emit 'return))) 241 (let ((method (jvm:: !make-method "execute" jvm::+lisp-object+ nil)))241 (let ((method (jvm::make-method "execute" jvm::+lisp-object+ nil))) 242 242 (jvm::class-add-method file method) 243 243 (jvm::with-code-to-method (file method) … … 246 246 (jvm::finalize-class-file file) 247 247 (with-open-stream (stream (sys::%make-byte-array-output-stream)) 248 (jvm:: !write-class-file file stream)248 (jvm::write-class-file file stream) 249 249 (funcall (sys::load-compiled-function (sys::%get-output-stream-bytes stream))))) 250 250 NIL) … … 254 254 (deftest generate-method.4 255 255 (let* ((class (jvm::make-class-name "org.armedbear.lisp.gm_4")) 256 (file (jvm:: !make-class-file class jvm::+lisp-primitive+ '(:public)))256 (file (jvm::make-class-file class jvm::+lisp-primitive+ '(:public))) 257 257 ) 258 (jvm::class-add-field file (jvm:: !make-field "N1" jvm::+lisp-object+258 (jvm::class-add-field file (jvm::make-field "N1" jvm::+lisp-object+ 259 259 :flags '(:static :private))) 260 (let ((method (jvm:: !make-method :class-constructor :void nil :flags '(:static))))260 (let ((method (jvm::make-method :class-constructor :void nil :flags '(:static)))) 261 261 (jvm::class-add-method file method) 262 262 (jvm::with-code-to-method (file method) … … 264 264 (jvm::emit-putstatic class "N1" jvm::+lisp-object+) 265 265 (jvm::emit 'return))) 266 (let ((method (jvm:: !make-method :constructor :void nil)))266 (let ((method (jvm::make-method :constructor :void nil))) 267 267 (jvm::class-add-method file method) 268 268 (jvm::with-code-to-method (file method) … … 274 274 jvm::+lisp-object+)) 275 275 (jvm::emit 'return))) 276 (let ((method (jvm:: !make-method "execute" jvm::+lisp-object+ nil)))276 (let ((method (jvm::make-method "execute" jvm::+lisp-object+ nil))) 277 277 (jvm::class-add-method file method) 278 278 (jvm::with-code-to-method (file method) … … 281 281 (jvm::finalize-class-file file) 282 282 (with-open-stream (stream (sys::%make-byte-array-output-stream)) 283 (jvm:: !write-class-file file stream)283 (jvm::write-class-file file stream) 284 284 (funcall (sys::load-compiled-function (sys::%get-output-stream-bytes stream))))) 285 285 NIL) … … 289 289 (deftest generate-method.5 290 290 (let* ((class (jvm::make-class-name "org.armedbear.lisp.gm_5")) 291 (file (jvm:: !make-class-file class jvm::+lisp-primitive+ '(:public)))291 (file (jvm::make-class-file class jvm::+lisp-primitive+ '(:public))) 292 292 ) 293 (let ((method (jvm:: !make-method :constructor :void nil)))293 (let ((method (jvm::make-method :constructor :void nil))) 294 294 (jvm::class-add-method file method) 295 295 (jvm::with-code-to-method (file method) … … 301 301 jvm::+lisp-object+)) 302 302 (jvm::emit 'return))) 303 (let ((method (jvm:: !make-method "execute" jvm::+lisp-object+ nil)))303 (let ((method (jvm::make-method "execute" jvm::+lisp-object+ nil))) 304 304 (jvm::class-add-method file method) 305 305 (jvm::with-code-to-method (file method) 306 306 (jvm::emit-getstatic jvm::+lisp+ "NIL" jvm::+lisp-object+) 307 307 (jvm::emit 'jvm::areturn))) 308 (let ((method (jvm:: !make-method "execute" jvm::+lisp-object+308 (let ((method (jvm::make-method "execute" jvm::+lisp-object+ 309 309 (list jvm::+lisp-object+)))) 310 310 (jvm::class-add-method file method) … … 314 314 (jvm::finalize-class-file file) 315 315 (with-open-stream (stream (sys::%make-byte-array-output-stream)) 316 (jvm:: !write-class-file file stream)316 (jvm::write-class-file file stream) 317 317 (let* ((bytes (sys::%get-output-stream-bytes stream)) 318 318 (fn (sys::load-compiled-function bytes))) … … 323 323 (deftest with-code-to-method.1 324 324 (let* ((class (jvm::make-class-name "org/armedbear/lisp/gm_6")) 325 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public)))326 (method (jvm:: !make-method :class-constructor :void nil325 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public))) 326 (method (jvm::make-method :class-constructor :void nil 327 327 :flags '(:static))) 328 328 (registers nil)) … … 347 347 (deftest with-code-to-method.2 348 348 (let* ((class (jvm::make-class-name "org/armedbear/lisp/gm_7")) 349 (file (jvm:: !make-class-file class jvm::+lisp-object+ '(:public)))350 (method1 (jvm:: !make-method :class-constructor :void nil349 (file (jvm::make-class-file class jvm::+lisp-object+ '(:public))) 350 (method1 (jvm::make-method :class-constructor :void nil 351 351 :flags '(:static))) 352 (method2 (jvm:: !make-method "method2" :void nil))352 (method2 (jvm::make-method "method2" :void nil)) 353 353 (registers nil)) 354 354 (jvm::class-add-method file method1) … … 375 375 ;; (deftest generate-method.6 376 376 ;; (let* ((class (jvm::make-class-name "org.armedbear.lisp.gm_6")) 377 ;; (file (jvm:: !make-class-file class jvm::+lisp-primitive+ '(:public)))377 ;; (file (jvm::make-class-file class jvm::+lisp-primitive+ '(:public))) 378 378 ;; ) 379 ;; (let ((method (jvm:: !make-method :constructor :void nil)))379 ;; (let ((method (jvm::make-method :constructor :void nil))) 380 380 ;; (jvm::class-add-method file method) 381 381 ;; (jvm::with-code-to-method (file method) … … 387 387 ;; jvm::+lisp-object+)) 388 388 ;; (jvm::emit 'return))) 389 ;; (let ((method (jvm:: !make-method "execute" jvm::+lisp-object+ nil)))389 ;; (let ((method (jvm::make-method "execute" jvm::+lisp-object+ nil))) 390 390 ;; (jvm::class-add-method file method) 391 391 ;; (jvm::with-code-to-method (file method) … … 394 394 ;; (jvm::finalize-class-file file) 395 395 ;; (with-open-stream (stream (sys::%make-byte-array-output-stream)) 396 ;; (jvm:: !write-class-file file stream)396 ;; (jvm::write-class-file file stream) 397 397 ;; (ignore-errors (sys::load-compiled-function nil)) 398 398 ;; (funcall (sys::load-compiled-function (sys::%get-output-stream-bytes stream))))
Note: See TracChangeset
for help on using the changeset viewer.