CACAO
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
dynamic-super.c File Reference

Go to the source code of this file.

Data Structures

struct  PrimInfo
 
struct  PrimInfo::immarg
 
struct  superstart
 
struct  superreuse
 

Macros

#define NO_IP   0 /* proper native code, without interpreter's ip */
 
#define INST_ADDR(_inst)   N_##_inst
 
#define MAX_IMMARGS   1
 
#define HASHTABLE_PATCHERSUPERS_BITS   14
 
#define HASHTABLE_SUPERREUSE_BITS   14
 
#define debugp(x...)   if (opt_verbose) fprintf(x)
 
#define debugp1(x...)
 

Typedefs

typedef struct superstart superstart
 
typedef struct superreuse superreuse
 

Enumerations

enum  
 

Functions

java_objectheader * engine2 (Inst *ip0, Cell *sp, Cell *fp)
 
static int compare_labels (const void *pa, const void *pb)
 
static Label bsearch_next (Label key, Label *a, u4 n)
 
static void check_prims (Label symbols1[])
 
static bool is_relocatable (ptrint p)
 
static void append_prim (codegendata *cd, ptrint p)
 
static void init_dynamic_super (codegendata *cd)
 
static u4 hash_superreuse (u1 *code, u4 length)
 
static void superreuse_insert (u1 *code, u4 length)
 
static u1superreuse_lookup (u1 *code, u4 length)
 
void patchersuper_rewrite (Inst *p)
 
static void hashtable_patchersupers_insert (superstart *ss)
 
void dynamic_super_rewrite (codegendata *cd)
 
static void new_dynamic_super (codegendata *cd)
 
void append_dispatch (codegendata *cd)
 
static void compile_prim_dyn (codegendata *cd, ptrint p)
 
static void replace_patcher (codegendata *cd, ptrint p)
 
void gen_inst1 (codegendata *cd, ptrint instr)
 
void finish_ss (codegendata *cd)
 
void gen_inst (codegendata *cd, ptrint instr)
 
void print_dynamic_super_statistics (void)
 
void dynamic_super_init (void)
 

Variables

s4 no_super =0
 
static char MAYBE_UNUSED superend []
 
const char *const prim_names []
 
PrimInfopriminfos
 
s4 npriminfos
 
Label before_goto
 
u4 goto_len
 
static hashtable hashtable_patchersupers
 
static java_objectheader * lock_hashtable_patchersupers
 
static hashtable hashtable_superreuse
 
static java_objectheader * lock_hashtable_superreuse
 
u4 count_supers = 0
 
u4 count_supers_unique = 0
 
u4 count_supers_reused = 0
 
u4 count_patchers_exec = 0
 
u4 count_patchers_last = 0
 
u4 count_patchers_ins = 0
 
u4 count_patchers = 0
 
u4 count_supers_nopatch = 0
 
u4 count_supers_patch = 0
 
u4 count_dispatches = 0
 
u4 count_disp_nonreloc = 0
 
u4 count_insts_reloc = 0
 
u4 count_insts = 0
 
u4 count_native_code = 0
 
u4 count_native_saved = 0
 

Macro Definition Documentation

#define debugp (   x...)    if (opt_verbose) fprintf(x)

Definition at line 120 of file dynamic-super.c.

#define debugp1 (   x...)

Definition at line 121 of file dynamic-super.c.

#define HASHTABLE_PATCHERSUPERS_BITS   14

Definition at line 100 of file dynamic-super.c.

#define HASHTABLE_SUPERREUSE_BITS   14

Definition at line 114 of file dynamic-super.c.

#define INST_ADDR (   _inst)    N_##_inst

Definition at line 63 of file dynamic-super.c.

#define MAX_IMMARGS   1

Definition at line 68 of file dynamic-super.c.

#define NO_IP   0 /* proper native code, without interpreter's ip */

Definition at line 29 of file dynamic-super.c.

Typedef Documentation

typedef struct superreuse superreuse
typedef struct superstart superstart

Enumeration Type Documentation

anonymous enum

Definition at line 62 of file dynamic-super.c.

Function Documentation

void append_dispatch ( codegendata cd)

Definition at line 512 of file dynamic-super.c.

static void append_prim ( codegendata cd,
ptrint  p 
)
static

Definition at line 316 of file dynamic-super.c.

static Label bsearch_next ( Label  key,
Label a,
u4  n 
)
static

Definition at line 153 of file dynamic-super.c.

static void check_prims ( Label  symbols1[])
static

Definition at line 202 of file dynamic-super.c.

static int compare_labels ( const void pa,
const void pb 
)
static

Definition at line 146 of file dynamic-super.c.

static void compile_prim_dyn ( codegendata cd,
ptrint  p 
)
static

Definition at line 529 of file dynamic-super.c.

void dynamic_super_init ( void  )

Definition at line 687 of file dynamic-super.c.

void dynamic_super_rewrite ( codegendata cd)

Definition at line 443 of file dynamic-super.c.

java_objectheader* engine2 ( Inst ip0,
Cell sp,
Cell fp 
)
void finish_ss ( codegendata cd)

Definition at line 604 of file dynamic-super.c.

void gen_inst ( codegendata cd,
ptrint  instr 
)

Definition at line 624 of file dynamic-super.c.

void gen_inst1 ( codegendata cd,
ptrint  instr 
)

Definition at line 561 of file dynamic-super.c.

static u4 hash_superreuse ( u1 code,
u4  length 
)
static

Definition at line 346 of file dynamic-super.c.

static void hashtable_patchersupers_insert ( superstart ss)
static

Definition at line 426 of file dynamic-super.c.

static void init_dynamic_super ( codegendata cd)
static

Definition at line 329 of file dynamic-super.c.

static bool is_relocatable ( ptrint  p)
static

Definition at line 310 of file dynamic-super.c.

static void new_dynamic_super ( codegendata cd)
static

Definition at line 470 of file dynamic-super.c.

void patchersuper_rewrite ( Inst p)

Definition at line 391 of file dynamic-super.c.

void print_dynamic_super_statistics ( void  )

Definition at line 655 of file dynamic-super.c.

static void replace_patcher ( codegendata cd,
ptrint  p 
)
static

Definition at line 550 of file dynamic-super.c.

static void superreuse_insert ( u1 code,
u4  length 
)
static

Definition at line 358 of file dynamic-super.c.

static u1* superreuse_lookup ( u1 code,
u4  length 
)
static

Definition at line 376 of file dynamic-super.c.

Variable Documentation

Label before_goto

Definition at line 85 of file dynamic-super.c.

u4 count_disp_nonreloc = 0

Definition at line 135 of file dynamic-super.c.

u4 count_dispatches = 0

Definition at line 134 of file dynamic-super.c.

u4 count_insts = 0

Definition at line 137 of file dynamic-super.c.

u4 count_insts_reloc = 0

Definition at line 136 of file dynamic-super.c.

u4 count_native_code = 0

Definition at line 138 of file dynamic-super.c.

u4 count_native_saved = 0

Definition at line 139 of file dynamic-super.c.

u4 count_patchers = 0

Definition at line 131 of file dynamic-super.c.

u4 count_patchers_exec = 0

Definition at line 128 of file dynamic-super.c.

u4 count_patchers_ins = 0

Definition at line 130 of file dynamic-super.c.

u4 count_patchers_last = 0

Definition at line 129 of file dynamic-super.c.

u4 count_supers = 0

Definition at line 125 of file dynamic-super.c.

u4 count_supers_nopatch = 0

Definition at line 132 of file dynamic-super.c.

u4 count_supers_patch = 0

Definition at line 133 of file dynamic-super.c.

u4 count_supers_reused = 0

Definition at line 127 of file dynamic-super.c.

u4 count_supers_unique = 0

Definition at line 126 of file dynamic-super.c.

u4 goto_len

Definition at line 86 of file dynamic-super.c.

hashtable hashtable_patchersupers
static

Definition at line 99 of file dynamic-super.c.

hashtable hashtable_superreuse
static

Definition at line 113 of file dynamic-super.c.

java_objectheader* lock_hashtable_patchersupers
static

Definition at line 103 of file dynamic-super.c.

java_objectheader* lock_hashtable_superreuse
static

Definition at line 117 of file dynamic-super.c.

s4 no_super =0

Definition at line 52 of file dynamic-super.c.

s4 npriminfos

Definition at line 84 of file dynamic-super.c.

const char* const prim_names[]
Initial value:
={
}

Definition at line 58 of file dynamic-super.c.

PrimInfo* priminfos

Definition at line 83 of file dynamic-super.c.

char MAYBE_UNUSED superend[]
static
Initial value:
={
}

Definition at line 54 of file dynamic-super.c.