[Wisp-cvs] wisp/src/native misc.s,1.9,1.10 misc.wth,1.9,1.10
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-18 21:13:40
|
Update of /cvsroot/wisp/wisp/src/native In directory usw-pr-cvs1:/tmp/cvs-serv1097/src/native Modified Files: misc.s misc.wth Log Message: Cleanup. Index: misc.s =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/misc.s,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- misc.s 18 Sep 2002 21:12:38 -0000 1.9 +++ misc.s 18 Sep 2002 21:13:37 -0000 1.10 @@ -1,5 +1,25 @@ .section .text .align 16 +N_pr_get_environment: +.byte 144,81,133,201,15,132,8,0,0,0,88,137,193,233 +.long N_signal_argcount - (.+4) +.byte 88,184 +.long environment +.byte 139,0,195 +.global N_pr_get_environment,NN_pr_get_environment +.equiv NN_pr_get_environment, N_pr_get_environment + 1 +.section .text +.align 16 +N_pr_get_argument_list: +.byte 144,81,133,201,15,132,8,0,0,0,88,137,193,233 +.long N_signal_argcount - (.+4) +.byte 88,184 +.long argument_list +.byte 139,0,195 +.global N_pr_get_argument_list,NN_pr_get_argument_list +.equiv NN_pr_get_argument_list, N_pr_get_argument_list + 1 +.section .text +.align 16 N_new: .byte 144,81,133,201,15,143,8,0,0,0,88,137,193,233 .long N_signal_argcount - (.+4) Index: misc.wth =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/misc.wth,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- misc.wth 18 Sep 2002 21:12:38 -0000 1.9 +++ misc.wth 18 Sep 2002 21:13:37 -0000 1.10 @@ -13,10 +13,12 @@ (extern WB_out_of_memory) (extern WB_range) (extern WB_record_type_huh) +(extern argument_list) (extern decsi$1) (extern decui$1) (extern encsi$1) (extern encui$1) +(extern environment) (extern funcall) (extern rvec) (extern valloc$1) @@ -89,5 +91,17 @@ nip swap 'immediate_return swap cell! ; fix the return address swap 1- swap ; decrement argcount (conform %ecx %eax) ,(jmp funcall)) + +; The supposed usage of |%get-argument-list| and |%get-environment| is +; once, during the initialization phase of the run-time library. +; However, nothing very bad will happen if they are called more times-- +; except, of course, that they'll always return the same object. +; Be advised against handing them to the user. + +(native pr_get_argument_list dup 0 = argc drop + 'argument_list cell@) + +(native pr_get_environment dup 0 = argc drop + 'environment cell@) ; vim: ft=worth |