Skip to content

Commit 1ab00e6

Browse files
committed
FEAT: improved dealing with automatically collected natives from C sources
1 parent 98b806d commit 1ab00e6

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

src/tools/file-base.reb

+8-8
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ core: [
103103
t-vector.c
104104
t-word.c
105105
u-aes.c
106-
u-bigint.c ;needed for RSA which is needed in TLS protocol (HTTPS)
106+
u-bigint.c ; needed for RSA which is needed in TLS protocol (HTTPS)
107107
u-bincode.c
108108
u-bmp.c
109109
u-chacha20.c
@@ -119,7 +119,7 @@ core: [
119119
u-png.c
120120
u-poly1305.c
121121
u-rc4.c
122-
u-rsa.c ;needed in TLS protocol (HTTPS)
122+
u-rsa.c ; needed in TLS protocol (HTTPS)
123123
u-uECC.c
124124
u-zlib.c
125125
u-wav.c
@@ -144,12 +144,12 @@ core: [
144144
]
145145

146146
made: [
147-
make-boot.reb core/b-boot.c
148-
make-headers.reb include/tmp-funcs.h
149-
make-host-ext.reb include/host-ext-graphics.h
150-
make-host-init.reb include/host-init.h
151-
make-os-ext.reb include/host-lib.h
152-
make-reb-lib.reb include/reb-lib.h
147+
make-boot.reb core/b-boot.c
148+
make-headers.reb include/tmp-funcs.h
149+
make-host-ext.reb include/host-ext-graphics.h
150+
make-host-init.reb include/host-init.h
151+
make-os-ext.reb include/host-lib.h
152+
make-reb-lib.reb include/reb-lib.h
153153
]
154154

155155
os: [

src/tools/make-boot.reb

+4-10
Original file line numberDiff line numberDiff line change
@@ -1060,10 +1060,11 @@ emit {
10601060

10611061
externs: make string! 2000
10621062
boot-booters: load %booters.reb
1063-
boot-natives: load %natives.reb
1063+
boot-natives: append load %natives.reb load temp-dir/tmp-natives.reb
1064+
10641065

10651066
nats: append copy boot-booters boot-natives
1066-
nats-collected: load temp-dir/tmp-natives.reb
1067+
10671068

10681069
n: boot-sys
10691070
;while [n: find n 'native] [
@@ -1083,10 +1084,6 @@ foreach val nats [
10831084
]
10841085
]
10851086

1086-
foreach [name spec] nats-collected [
1087-
emit-line/decl "REBNATIVE(" name ");"
1088-
nat-count: nat-count + 1
1089-
]
10901087

10911088
print [nat-count "natives"]
10921089

@@ -1097,10 +1094,7 @@ foreach val nats [
10971094
emit-line/code "N_" to word! val "," ;R3
10981095
]
10991096
]
1100-
foreach [name spec] nats-collected [
1101-
emit-line/code "N_" name ","
1102-
append boot-natives make block! spec
1103-
]
1097+
11041098
emit-end
11051099
emit newline
11061100

src/tools/make-headers.reb

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ emit-native-spec: func[
132132
emit-n ["^/;-- " the-file]
133133
c-file: the-file
134134
]
135-
emit-n ["^/" name " {"]
135+
emit-n #"^/"
136136
emit-n trim/head/tail detab spec-rebol
137-
emit-n #"}"
138137
]
139138

140139
func-header: [
@@ -344,6 +343,7 @@ foreach word [
344343
] [make-arg-enums word]
345344

346345
acts: load %../boot/natives.reb
346+
append acts load temp-dir/tmp-natives.reb
347347

348348
foreach word [
349349
checksum

0 commit comments

Comments
 (0)