Use different symbol names for caml_do_local_roots on bytecode and native code (#9503)
parent
ccf4df0758
commit
41f0522df3
3
Changes
3
Changes
|
@ -54,6 +54,9 @@ Working version
|
||||||
(Nicolás Ojeda Bär, review by Stephen Dolan, Gabriel Scherer, Mark Shinwell,
|
(Nicolás Ojeda Bär, review by Stephen Dolan, Gabriel Scherer, Mark Shinwell,
|
||||||
and Xavier Leroy)
|
and Xavier Leroy)
|
||||||
|
|
||||||
|
- #8807, #9503: Use different symbols for do_local_roots on bytecode and native
|
||||||
|
(Stephen Dolan, review by David Allsopp and Xavier Leroy)
|
||||||
|
|
||||||
- #9619: Change representation of function closures so that code pointers
|
- #9619: Change representation of function closures so that code pointers
|
||||||
can be easily distinguished from environment variables
|
can be easily distinguished from environment variables
|
||||||
(Xavier Leroy, review by Mark Shinwell and Damien Doligez)
|
(Xavier Leroy, review by Mark Shinwell and Damien Doligez)
|
||||||
|
|
|
@ -29,12 +29,15 @@ intnat caml_darken_all_roots_slice (intnat);
|
||||||
void caml_do_roots (scanning_action, int);
|
void caml_do_roots (scanning_action, int);
|
||||||
extern uintnat caml_incremental_roots_count;
|
extern uintnat caml_incremental_roots_count;
|
||||||
#ifndef NATIVE_CODE
|
#ifndef NATIVE_CODE
|
||||||
CAMLextern void caml_do_local_roots (scanning_action, value *, value *,
|
CAMLextern void caml_do_local_roots_byt (scanning_action, value *, value *,
|
||||||
struct caml__roots_block *);
|
struct caml__roots_block *);
|
||||||
|
#define caml_do_local_roots caml_do_local_roots_byt
|
||||||
#else
|
#else
|
||||||
CAMLextern void caml_do_local_roots(scanning_action f, char * c_bottom_of_stack,
|
CAMLextern void caml_do_local_roots_nat (
|
||||||
uintnat last_retaddr, value * v_gc_regs,
|
scanning_action f, char * c_bottom_of_stack,
|
||||||
struct caml__roots_block * gc_local_roots);
|
uintnat last_retaddr, value * v_gc_regs,
|
||||||
|
struct caml__roots_block * gc_local_roots);
|
||||||
|
#define caml_do_local_roots caml_do_local_roots_nat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CAMLextern void (*caml_scan_roots_hook) (scanning_action);
|
CAMLextern void (*caml_scan_roots_hook) (scanning_action);
|
||||||
|
|
|
@ -92,8 +92,8 @@ void caml_do_roots (scanning_action f, int do_globals)
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_GLOBAL);
|
CAML_EV_END(EV_MAJOR_ROOTS_GLOBAL);
|
||||||
/* The stack and the local C roots */
|
/* The stack and the local C roots */
|
||||||
CAML_EV_BEGIN(EV_MAJOR_ROOTS_LOCAL);
|
CAML_EV_BEGIN(EV_MAJOR_ROOTS_LOCAL);
|
||||||
caml_do_local_roots(f, Caml_state->extern_sp, Caml_state->stack_high,
|
caml_do_local_roots_byt(f, Caml_state->extern_sp, Caml_state->stack_high,
|
||||||
Caml_state->local_roots);
|
Caml_state->local_roots);
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_LOCAL);
|
CAML_EV_END(EV_MAJOR_ROOTS_LOCAL);
|
||||||
/* Global C roots */
|
/* Global C roots */
|
||||||
CAML_EV_BEGIN(EV_MAJOR_ROOTS_C);
|
CAML_EV_BEGIN(EV_MAJOR_ROOTS_C);
|
||||||
|
@ -113,9 +113,9 @@ void caml_do_roots (scanning_action f, int do_globals)
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_HOOK);
|
CAML_EV_END(EV_MAJOR_ROOTS_HOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
CAMLexport void caml_do_local_roots (scanning_action f, value *stack_low,
|
CAMLexport void caml_do_local_roots_byt (scanning_action f, value *stack_low,
|
||||||
value *stack_high,
|
value *stack_high,
|
||||||
struct caml__roots_block *local_roots)
|
struct caml__roots_block *local_roots)
|
||||||
{
|
{
|
||||||
register value * sp;
|
register value * sp;
|
||||||
struct caml__roots_block *lr;
|
struct caml__roots_block *lr;
|
||||||
|
|
|
@ -423,9 +423,9 @@ void caml_do_roots (scanning_action f, int do_globals)
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_DYNAMIC_GLOBAL);
|
CAML_EV_END(EV_MAJOR_ROOTS_DYNAMIC_GLOBAL);
|
||||||
/* The stack and local roots */
|
/* The stack and local roots */
|
||||||
CAML_EV_BEGIN(EV_MAJOR_ROOTS_LOCAL);
|
CAML_EV_BEGIN(EV_MAJOR_ROOTS_LOCAL);
|
||||||
caml_do_local_roots(f, Caml_state->bottom_of_stack,
|
caml_do_local_roots_nat(f, Caml_state->bottom_of_stack,
|
||||||
Caml_state->last_return_address, Caml_state->gc_regs,
|
Caml_state->last_return_address, Caml_state->gc_regs,
|
||||||
Caml_state->local_roots);
|
Caml_state->local_roots);
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_LOCAL);
|
CAML_EV_END(EV_MAJOR_ROOTS_LOCAL);
|
||||||
/* Global C roots */
|
/* Global C roots */
|
||||||
CAML_EV_BEGIN(EV_MAJOR_ROOTS_C);
|
CAML_EV_BEGIN(EV_MAJOR_ROOTS_C);
|
||||||
|
@ -445,9 +445,9 @@ void caml_do_roots (scanning_action f, int do_globals)
|
||||||
CAML_EV_END(EV_MAJOR_ROOTS_HOOK);
|
CAML_EV_END(EV_MAJOR_ROOTS_HOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void caml_do_local_roots(scanning_action f, char * bottom_of_stack,
|
void caml_do_local_roots_nat(scanning_action f, char * bottom_of_stack,
|
||||||
uintnat last_retaddr, value * gc_regs,
|
uintnat last_retaddr, value * gc_regs,
|
||||||
struct caml__roots_block * local_roots)
|
struct caml__roots_block * local_roots)
|
||||||
{
|
{
|
||||||
char * sp;
|
char * sp;
|
||||||
uintnat retaddr;
|
uintnat retaddr;
|
||||||
|
|
Loading…
Reference in New Issue