Merge branch 'master' of git://factorcode.org/git/factor
commit
809f4ee396
|
@ -69,12 +69,10 @@ CONSTANT: SOCK_RAW 3
|
|||
CONSTANT: AF_UNSPEC 0
|
||||
CONSTANT: AF_UNIX 1
|
||||
CONSTANT: AF_INET 2
|
||||
CONSTANT: AF_INET6 30
|
||||
|
||||
ALIAS: PF_UNSPEC AF_UNSPEC
|
||||
ALIAS: PF_UNIX AF_UNIX
|
||||
ALIAS: PF_INET AF_INET
|
||||
ALIAS: PF_INET6 AF_INET6
|
||||
|
||||
CONSTANT: IPPROTO_TCP 6
|
||||
CONSTANT: IPPROTO_UDP 17
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
USING: alien.c-types alien.syntax classes.struct unix.types ;
|
||||
IN: unix.ffi
|
||||
|
||||
CONSTANT: AF_INET6 28
|
||||
ALIAS: PF_INET6 AF_INET6
|
||||
|
||||
CONSTANT: FD_SETSIZE 1024
|
||||
|
||||
STRUCT: addrinfo
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
USING: alien.c-types alien.syntax classes.struct unix.types ;
|
||||
IN: unix.ffi
|
||||
|
||||
CONSTANT: AF_INET6 24
|
||||
ALIAS: PF_INET6 AF_INET6
|
||||
|
||||
CONSTANT: FD_SETSIZE 1024
|
||||
|
||||
STRUCT: addrinfo
|
||||
|
|
|
@ -230,8 +230,8 @@ struct call_frame_scrubber {
|
|||
gc_info *info = compiled->block_gc_info();
|
||||
|
||||
assert(return_address < compiled->size());
|
||||
int index = info->return_address_index(return_address);
|
||||
if(index != -1)
|
||||
cell index = info->return_address_index(return_address);
|
||||
if(index != (cell)-1)
|
||||
ctx->scrub_stacks(info,index);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -13,7 +13,7 @@ cell gc_info::return_address_index(cell return_address)
|
|||
return i;
|
||||
}
|
||||
|
||||
return gc_info_missing_value;
|
||||
return (cell)-1;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
namespace factor
|
||||
{
|
||||
|
||||
const u32 gc_info_missing_value = (u32)-1;
|
||||
|
||||
struct gc_info {
|
||||
u32 scrub_d_count;
|
||||
u32 scrub_r_count;
|
||||
|
@ -58,7 +56,7 @@ struct gc_info {
|
|||
+ index * gc_root_count;
|
||||
}
|
||||
|
||||
cell lookup_base_pointer(cell index, cell derived_root)
|
||||
u32 lookup_base_pointer(cell index, cell derived_root)
|
||||
{
|
||||
return base_pointer_map()[index * derived_root_count + derived_root];
|
||||
}
|
||||
|
|
|
@ -292,8 +292,8 @@ struct call_frame_slot_visitor {
|
|||
gc_info *info = compiled->block_gc_info();
|
||||
|
||||
assert(return_address < compiled->size());
|
||||
u32 callsite = info->return_address_index(return_address);
|
||||
if(callsite == gc_info_missing_value)
|
||||
cell callsite = info->return_address_index(return_address);
|
||||
if(callsite == (cell)-1)
|
||||
return;
|
||||
|
||||
#ifdef DEBUG_GC_MAPS
|
||||
|
@ -305,8 +305,8 @@ struct call_frame_slot_visitor {
|
|||
/* Subtract old value of base pointer from every derived pointer. */
|
||||
for(cell spill_slot = 0; spill_slot < info->derived_root_count; spill_slot++)
|
||||
{
|
||||
cell base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != gc_info_missing_value)
|
||||
u32 base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != (u32)-1)
|
||||
{
|
||||
#ifdef DEBUG_GC_MAPS
|
||||
std::cout << "visiting derived root " << spill_slot
|
||||
|
@ -334,8 +334,8 @@ struct call_frame_slot_visitor {
|
|||
/* Add the base pointers to obtain new derived pointer values. */
|
||||
for(cell spill_slot = 0; spill_slot < info->derived_root_count; spill_slot++)
|
||||
{
|
||||
cell base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != gc_info_missing_value)
|
||||
u32 base_pointer = info->lookup_base_pointer(callsite, spill_slot);
|
||||
if(base_pointer != (u32)-1)
|
||||
stack_pointer[spill_slot] += stack_pointer[base_pointer];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue