[Wisp-cvs] wisp/src/native base.inc,1.96,1.97 misc.s,1.1,1.2 misc.wth,1.1,1.2 records.nasm,1.28,1.29
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-18 21:03:15
|
Update of /cvsroot/wisp/wisp/src/native In directory usw-pr-cvs1:/tmp/cvs-serv29161/src/native Modified Files: base.inc misc.s misc.wth records.nasm Log Message: Moved |<record-type>| from records.nasm to misc.wth . Index: base.inc =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/base.inc,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- base.inc 7 Sep 2002 21:50:36 -0000 1.96 +++ base.inc 18 Sep 2002 21:03:13 -0000 1.97 @@ -480,55 +480,6 @@ %define record_type#discriminator(x) dword [(x) + record_type.discriminator] %define record_type#ref(x) dword [(x) + record_type.ref] -;;;; Record type instances - -%macro rectype 1 ; name-root - [section .text] - native %1_huh, any - mov edx, RT_%1 - jmp discriminator_body - %push rectype - %define %$nameroot %1 - %define %$discriminator_name NN_%1_huh - [section .rodata] - align 16 - global RT_%1 -RT_%1: - dd RT_record_type -%endmacro - -%macro rt_slot_count 1 - %ifctx rectype - %repl rectype.1 - dd %1 - dd %$discriminator_name - %else - %error "Invalid slot ordering" - %endif -%endmacro - -%macro rt_ref 1 - %ifctx rectype.1 - %repl rectype.2 - dd %1 - %else - %error "Invalid slot ordering" - %endif -%endmacro - -%macro endrectype 0 - %ifctx rectype.1 ; rt_ref was skipped - dd FALSE - %pop - __SECT__ - %elifctx rectype.2 - %pop - __SECT__ - %else - %error "Invalid slot ordering" - %endif -%endmacro - ;;;; Constants %define CHAR(x) (((x) << 8) | 3) Index: misc.s =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/misc.s,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- misc.s 18 Sep 2002 21:02:26 -0000 1.1 +++ misc.s 18 Sep 2002 21:03:13 -0000 1.2 @@ -1,5 +1,22 @@ .section .text .align 16 +N_record_type_huh: +.byte 144,186 +.long RT_record_type +.byte 233 +.long discriminator_body - (.+4) +.global N_record_type_huh,NN_record_type_huh +.equiv NN_record_type_huh, N_record_type_huh + 1 +.section .text +.align 16 +RT_record_type: +.long RT_record_type +.byte 3,0,0,0 +.long NN_record_type_huh +.byte 19,0,0,0 +.global RT_record_type +.section .text +.align 16 N_rvec_set: .byte 144,81,131,249,2,15,132,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.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- misc.wth 18 Sep 2002 21:02:26 -0000 1.1 +++ misc.wth 18 Sep 2002 21:03:13 -0000 1.2 @@ -8,6 +8,7 @@ (include wisptyp) +(extern RT_record_type) (extern WB_range) (extern decui$1) (extern rvec) @@ -21,5 +22,14 @@ (native rvec_set dup 2 = argc drop swap RVEC_LEN rdecui cells 'rvec + cell! VOID) + +(assemble RT_record_type + (tetra RT_record_type) + (tetra 3) + (tetra NN_record_type_huh) + (tetra 19)) ; FALSE + +(native record_type_huh + 'RT_record_type go-discriminate) ; vim: ft=worth Index: records.nasm =================================================================== RCS file: /cvsroot/wisp/wisp/src/native/records.nasm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- records.nasm 18 Sep 2002 20:55:17 -0000 1.28 +++ records.nasm 18 Sep 2002 21:03:13 -0000 1.29 @@ -222,11 +222,6 @@ mov eax, record_type#ref(eax) ret -; The record type -rectype record_type - rt_slot_count 3 -endrectype - ; FOR INTERNAL USE BY |make-record-type| ONLY! ; It is an important guarantee that it's safe to share record-type:s ; without need to fear undue influence. @@ -238,6 +233,7 @@ extern NN_box_ref extern N_apply extern N_list +extern RT_record_type extern WB_discriminator extern WB_range extern WB_record_constructor |