mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-13 07:47:39 +02:00
Added TODO's for GC of strings, now that storage has changed
This commit is contained in:
parent
ba167dfcd3
commit
85cff010b6
1 changed files with 7 additions and 0 deletions
|
@ -2050,6 +2050,9 @@ char *transport(x, gcgen) char *x; int gcgen;
|
|||
case string_tag:
|
||||
{register string_type *nx = (string_type *) allocp;
|
||||
type_of(nx) = string_tag;
|
||||
TODO: below is changing, now we will need to always copy the cstring
|
||||
along with the string_type. need to be careful of any off-by-one errors
|
||||
here...
|
||||
if (gcgen == 0) {
|
||||
// Minor, data heap is not relocated
|
||||
nx->str = ((string_type *)x)->str;
|
||||
|
@ -2278,6 +2281,10 @@ void GC_loop(int major, closure cont, object *ans, int num_ans)
|
|||
printf("DEBUG transport string \n");
|
||||
#endif
|
||||
scanp += sizeof(string_type); break;
|
||||
TODO: cstring is now after string_type, so need to skip that, too.
|
||||
stack allocations should be OK since we are only scanning the newspace here,
|
||||
but should double-check that... (though we are not able to even scan the
|
||||
stack so should be fine)
|
||||
case integer_tag:
|
||||
#if DEBUG_GC
|
||||
printf("DEBUG transport integer \n");
|
||||
|
|
Loading…
Add table
Reference in a new issue