Mercurial > hg > CbC > CbC_xv6
comparison src/gearsTools/generate_context.pl @ 355:045299ad7e97
...
author | anatofuz |
---|---|
date | Mon, 15 Jun 2020 18:27:09 +0900 |
parents | fde5f96c6ff1 |
children | e194c940c664 |
comparison
equal
deleted
inserted
replaced
354:fde5f96c6ff1 | 355:045299ad7e97 |
---|---|
250 goto start_code(${context_name}); | 250 goto start_code(${context_name}); |
251 } | 251 } |
252 EOFEOF | 252 EOFEOF |
253 | 253 |
254 if ($project->{name} eq "gears") { | 254 if ($project->{name} eq "gears") { |
255 $mata_call .= <<"EOFEOF"; | 255 $meta_call .= <<"EOFEOF"; |
256 __code exit_code(struct Context* ${context_name}) { | 256 __code exit_code(struct Context* ${context_name}) { |
257 free(${context_name}->code); | 257 free(${context_name}->code); |
258 free(${context_name}->data); | 258 free(${context_name}->data); |
259 free(${context_name}->heapStart); | 259 free(${context_name}->heapStart); |
260 goto exit(0); | 260 goto exit(0); |
261 } | 261 } |
262 EOFEOF | 262 EOFEOF |
263 | 263 |
264 } else { | 264 } else { |
265 | 265 |
266 $mata_call .= <<"EOFEOF"; | 266 $meta_call .= <<"EOFEOF"; |
267 __code exit_code(struct Context* ${context_name}) { | 267 __code exit_code(struct Context* ${context_name}) { |
268 // free(${context_name}->code); | 268 // free(${context_name}->code); |
269 // free(${context_name}->data); | 269 // free(${context_name}->data); |
270 // free(${context_name}->heapStart); | 270 // free(${context_name}->heapStart); |
271 goto exit_code(cbc_context); | 271 goto exit_code(cbc_context); |
272 } | 272 } |
273 EOFEOF | 273 EOFEOF |
274 } | 274 } |
275 | 275 |
276 $mata_call .= <<"EOFEOF"; | 276 $meta_call .= <<"EOFEOF"; |
277 __code exit_code_stub(struct Context* ${context_name}) { | 277 __code exit_code_stub(struct Context* ${context_name}) { |
278 goto exit_code(${context_name}); | 278 goto exit_code(${context_name}); |
279 } | 279 } |
280 | 280 |
281 // end context_c | 281 // end context_c |