global tagging
svn: r17518
This commit is contained in:
parent
7b866a7cf3
commit
a7b8ff1313
|
@ -219,6 +219,11 @@ typedef struct Thread_Local_Variables {
|
|||
struct gmp_tmp_stack gmp_tmp_xxx_;
|
||||
struct gmp_tmp_stack *gmp_tmp_current_;
|
||||
struct Scheme_Logger *scheme_main_logger_;
|
||||
int intdef_counter_;
|
||||
int builtin_ref_counter_;
|
||||
int env_uid_counter_;
|
||||
int scheme_overflow_count_;
|
||||
int generate_lifts_count_;
|
||||
} Thread_Local_Variables;
|
||||
|
||||
#if defined(IMPLEMENT_THREAD_LOCAL_VIA_PTHREADS)
|
||||
|
@ -421,6 +426,11 @@ XFORM_GC_VARIABLE_STACK_THROUGH_THREAD_LOCAL;
|
|||
#define gmp_tmp_xxx XOA (scheme_get_thread_local_variables()->gmp_tmp_xxx_)
|
||||
#define gmp_tmp_current XOA (scheme_get_thread_local_variables()->gmp_tmp_current_)
|
||||
#define scheme_main_logger XOA (scheme_get_thread_local_variables()->scheme_main_logger_)
|
||||
#define intdef_counter XOA (scheme_get_thread_local_variables()->intdef_counter_)
|
||||
#define builtin_ref_counter XOA (scheme_get_thread_local_variables()->builtin_ref_counter_)
|
||||
#define env_uid_counter XOA (scheme_get_thread_local_variables()->env_uid_counter_)
|
||||
#define scheme_overflow_count XOA (scheme_get_thread_local_variables()->scheme_overflow_count_)
|
||||
#define generate_lifts_count XOA (scheme_get_thread_local_variables()->generate_lifts_count_)
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
/* globals */
|
||||
#include "schuchar.inc"
|
||||
READ_ONLY Scheme_Object **scheme_char_constants;
|
||||
READ_ONLY static Scheme_Object *general_category_symbols[NUM_GENERAL_CATEGORIES];
|
||||
|
||||
/* locals */
|
||||
static Scheme_Object *char_p (int argc, Scheme_Object *argv[]);
|
||||
|
@ -63,7 +64,6 @@ static Scheme_Object *char_general_category (int argc, Scheme_Object *argv[]);
|
|||
static Scheme_Object *char_utf8_length (int argc, Scheme_Object *argv[]);
|
||||
static Scheme_Object *char_map_list (int argc, Scheme_Object *argv[]);
|
||||
|
||||
static Scheme_Object *general_category_symbols[NUM_GENERAL_CATEGORIES];
|
||||
|
||||
void scheme_init_portable_case(void)
|
||||
{
|
||||
|
@ -89,6 +89,12 @@ void scheme_init_char (Scheme_Env *env)
|
|||
|
||||
scheme_char_constants[i] = sc;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_GENERAL_CATEGORIES; i++) {
|
||||
Scheme_Object *s;
|
||||
s = scheme_intern_symbol(general_category_names[i]);
|
||||
general_category_symbols[i] = s;
|
||||
}
|
||||
|
||||
p = scheme_make_folding_prim(char_p, "char?", 1, 1, 1);
|
||||
SCHEME_PRIM_PROC_FLAGS(p) |= SCHEME_PRIM_IS_UNARY_INLINED;
|
||||
|
@ -405,11 +411,6 @@ static Scheme_Object *char_general_category (int argc, Scheme_Object *argv[])
|
|||
|
||||
c = SCHEME_CHAR_VAL(argv[0]);
|
||||
cat = scheme_general_category(c);
|
||||
if (!general_category_symbols[cat]) {
|
||||
Scheme_Object *s;
|
||||
s = scheme_intern_symbol(general_category_names[cat]);
|
||||
general_category_symbols[cat] = s;
|
||||
}
|
||||
|
||||
return general_category_symbols[cat];
|
||||
}
|
||||
|
|
|
@ -105,8 +105,9 @@ Scheme_Extension_Table *scheme_extension_table;
|
|||
#endif
|
||||
|
||||
#ifndef NO_DYNAMIC_LOAD
|
||||
static Scheme_Hash_Table *loaded_extensions; /* hash on scheme_initialize pointer */
|
||||
static Scheme_Hash_Table *fullpath_loaded_extensions; /* hash on full path name */
|
||||
/* FIXME disallow extensions under places */
|
||||
FIXME_LATER static Scheme_Hash_Table *loaded_extensions; /* hash on scheme_initialize pointer */
|
||||
FIXME_LATER static Scheme_Hash_Table *fullpath_loaded_extensions; /* hash on full path name */
|
||||
#endif
|
||||
|
||||
#ifdef MZ_PRECISE_GC
|
||||
|
|
|
@ -47,11 +47,6 @@ void scheme_set_allow_set_undefined(int v) { scheme_allow_set_undefined = v; }
|
|||
int scheme_get_allow_set_undefined() { return scheme_allow_set_undefined; }
|
||||
SHARED_OK int scheme_starting_up;
|
||||
|
||||
/* global counters just need to be atomically incremented */
|
||||
static int intdef_counter = 0;
|
||||
static int builtin_ref_counter = 0;
|
||||
static int env_uid_counter = 0;
|
||||
|
||||
/* globals READ-ONLY SHARED */
|
||||
READ_ONLY static Scheme_Object *kernel_symbol;
|
||||
READ_ONLY static Scheme_Object *unshadowable_symbol;
|
||||
|
@ -72,6 +67,9 @@ READ_ONLY static Scheme_Object *toplevels[MAX_CONST_TOPLEVEL_DEPTH][MAX_CONST_TO
|
|||
/* If locked, these are probably sharable: */
|
||||
THREAD_LOCAL_DECL(static Scheme_Hash_Table *toplevels_ht);
|
||||
THREAD_LOCAL_DECL(static Scheme_Hash_Table *locals_ht[2]);
|
||||
THREAD_LOCAL_DECL(static int intdef_counter);
|
||||
THREAD_LOCAL_DECL(static int builtin_ref_counter);
|
||||
THREAD_LOCAL_DECL(static int env_uid_counter);
|
||||
|
||||
/* local functions */
|
||||
static void make_kernel_env(void);
|
||||
|
|
|
@ -48,8 +48,8 @@ void scheme_set_exit(Scheme_Exit_Proc p) { scheme_exit = p; }
|
|||
|
||||
HOOK_SHARED_OK void (*scheme_console_output)(char *str, long len);
|
||||
|
||||
static int init_syslog_level = INIT_SYSLOG_LEVEL;
|
||||
static int init_stderr_level = SCHEME_LOG_ERROR;
|
||||
SHARED_OK static int init_syslog_level = INIT_SYSLOG_LEVEL;
|
||||
SHARED_OK static int init_stderr_level = SCHEME_LOG_ERROR;
|
||||
THREAD_LOCAL_DECL(static Scheme_Logger *scheme_main_logger);
|
||||
|
||||
/* readonly globals */
|
||||
|
|
|
@ -154,12 +154,6 @@
|
|||
SHARED_OK int scheme_startup_use_jit = 1;
|
||||
void scheme_set_startup_use_jit(int v) { scheme_startup_use_jit = v; }
|
||||
|
||||
/* global counters */
|
||||
/* FIXME needs to be atomically incremented */
|
||||
int scheme_overflow_count;
|
||||
int get_overflow_count() { return scheme_overflow_count; }
|
||||
|
||||
|
||||
/* THREAD LOCAL SHARED */
|
||||
THREAD_LOCAL_DECL(volatile int scheme_fuel_counter);
|
||||
#ifdef USE_STACK_BOUNDARY_VAR
|
||||
|
@ -168,6 +162,9 @@ THREAD_LOCAL_DECL(unsigned long volatile scheme_jit_stack_boundary);
|
|||
#endif
|
||||
THREAD_LOCAL_DECL(static Scheme_Object *quick_stx);
|
||||
THREAD_LOCAL_DECL(int scheme_continuation_application_count);
|
||||
THREAD_LOCAL_DECL(static int generate_lifts_count);
|
||||
THREAD_LOCAL_DECL(int scheme_overflow_count);
|
||||
int scheme_get_overflow_count() { return scheme_overflow_count; }
|
||||
|
||||
/* read-only globals */
|
||||
READ_ONLY Scheme_Object *scheme_eval_waiting;
|
||||
|
@ -233,6 +230,7 @@ static Scheme_Object *datum_syntax(Scheme_Object *form, Scheme_Comp_Env *env, Sc
|
|||
static Scheme_Object *datum_expand(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Expand_Info *erec, int drec);
|
||||
static Scheme_Object *top_syntax(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Compile_Info *rec, int drec);
|
||||
static Scheme_Object *top_expand(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Expand_Info *erec, int drec);
|
||||
static Scheme_Object *stop_syntax(Scheme_Object *form, Scheme_Comp_Env *env, Scheme_Compile_Info *rec, int drec);
|
||||
|
||||
static Scheme_Object *write_application(Scheme_Object *obj);
|
||||
static Scheme_Object *read_application(Scheme_Object *obj);
|
||||
|
@ -398,10 +396,12 @@ scheme_init_eval (Scheme_Env *env)
|
|||
REGISTER_SO(app_expander);
|
||||
REGISTER_SO(datum_expander);
|
||||
REGISTER_SO(top_expander);
|
||||
REGISTER_SO(stop_expander);
|
||||
|
||||
app_expander = scheme_make_compiled_syntax(app_syntax, app_expand);
|
||||
datum_expander = scheme_make_compiled_syntax(datum_syntax, datum_expand);
|
||||
top_expander = scheme_make_compiled_syntax(top_syntax, top_expand);
|
||||
stop_expander = scheme_make_compiled_syntax(stop_syntax, stop_expand);
|
||||
scheme_add_global_keyword("#%app", app_expander, env);
|
||||
scheme_add_global_keyword("#%datum", datum_expander, env);
|
||||
scheme_add_global_keyword("#%top", top_expander, env);
|
||||
|
@ -10185,20 +10185,13 @@ static Scheme_Object *stop_expand(Scheme_Object *form, Scheme_Comp_Env *env, Sch
|
|||
|
||||
Scheme_Object *scheme_get_stop_expander(void)
|
||||
{
|
||||
if (!stop_expander) {
|
||||
REGISTER_SO(stop_expander);
|
||||
stop_expander = scheme_make_compiled_syntax(stop_syntax,
|
||||
stop_expand);
|
||||
}
|
||||
|
||||
return stop_expander;
|
||||
}
|
||||
|
||||
Scheme_Object *scheme_generate_lifts_key(void)
|
||||
{
|
||||
static int cnt = 0;
|
||||
char buf[20];
|
||||
sprintf(buf, "lifts%d", cnt++);
|
||||
sprintf(buf, "lifts%d", generate_lifts_count++);
|
||||
return scheme_make_symbol(buf); /* uninterned */
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,13 @@
|
|||
#define READ_ONLY __attribute__((__READ_ONLY__))
|
||||
#define SHARED_OK __attribute__((__SHARED_OK__))
|
||||
#define HOOK_SHARED_OK __attribute__((__HOOK_SHARED_OK__))
|
||||
#define FIXME_LATER __attribute__((__FIXME_LATER__))
|
||||
#else
|
||||
#define ROSYM /* EMPTY */
|
||||
#define READ_ONLY /* EMPTY */
|
||||
#define SHARED_OK /* EMPTY */
|
||||
#define HOOK_SHARED_OK /* EMPTY */
|
||||
#define FIXME_LATER /* EMPTY */
|
||||
#endif
|
||||
|
||||
/*========================================================================*/
|
||||
|
@ -467,7 +469,7 @@ void scheme_zero_unneeded_rands(Scheme_Thread *p);
|
|||
|
||||
int scheme_can_break(Scheme_Thread *p);
|
||||
|
||||
extern int scheme_overflow_count;
|
||||
THREAD_LOCAL_DECL(extern int scheme_overflow_count);
|
||||
|
||||
#define MZTHREADELEM(p, x) scheme_ ## x
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user