OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
strtab.cxx File Reference
#include <alloca.h>
#include <string.h>
#include <map>
#include "HashTable.h"
#include "defs.h"
#include "errors.h"
#include "cxx_memory.h"
#include "strtab.h"
Include dependency graph for strtab.cxx:

Go to the source code of this file.

Classes

struct  NULL_TERMINATED_STRING
 
union  UNALIGN_INT32
 
struct  CHARACTER_ARRAY
 
struct  STR_TAB< STR >
 
struct  STR_TAB< STR >::StringHashKey
 
class  STR_TAB< STR >::ExtractStringBufferFromStringTable
 
class  STR_TAB< STR >::HashStringHashKey
 
class  STR_TAB< STR >::EqStringHashKey
 

Macros

#define UC(x)   ((unsigned char)(x))
 

Typedefs

typedef UINT32 STR_INDEX
 

Functions

static mUINT8 STR_INDEX_size (STR_INDEX idx)
 
static mUINT32 STR_INDEX_index (STR_INDEX idx)
 
static STR_INDEX make_STR_INDEX (UINT32 size, UINT32 idx)
 
template<class STRTAB >
static void initialize_strtab (STRTAB &strtab, UINT32 size)
 
template<class STRTAB >
static void initialize_strtab (STRTAB &strtab, const char *buf, UINT32 size)
 
UINT32 STR_Table_Size ()
 
void Initialize_Strtab (UINT32 size)
 
void Initialize_Strtab (const char *buf, UINT32 size)
 
STR_IDX Save_Str (const char *str)
 
STR_IDX Save_Str2 (const char *s1, const char *s2)
 
STR_IDX Save_Str2i (const char *s1, const char *s2, UINT i)
 
char * Index_To_Str (STR_IDX idx)
 
UINT32 TCON_strtab_size ()
 
char * TCON_strtab_buffer ()
 
void Initialize_TCON_strtab (UINT32 size)
 
void Initialize_TCON_strtab (const char *buf, UINT32 size)
 
UINT32 Save_StrN (const char *s1, UINT32 len)
 
char * Index_to_char_array (UINT32 idx)
 
template<class STR , class MAP >
void merge_strtab (STR_TAB< STR > &strtab, const char *buf, UINT32 size, MAP &map)
 
void Merge_Strtab (const char *buf, UINT32 size, STR_IDX_MAP &map)
 
void Merge_TCON_Strtab (const char *buf, UINT32 size, STR_IDX_MAP &map)
 

Variables

static STR_TAB
< NULL_TERMINATED_STRING
Strtab (1000)
 
STRING_TABLE Str_Table
 
const UINT32 TCON_STRTAB_HASH_SIZE = 512
 
static STR_TAB< CHARACTER_ARRAYTCON_strtab (TCON_STRTAB_HASH_SIZE)
 

Macro Definition Documentation

#define UC (   x)    ((unsigned char)(x))

Definition at line 161 of file strtab.cxx.

Referenced by CHARACTER_ARRAY::get_length(), and CHARACTER_ARRAY::get_str().

Typedef Documentation

typedef UINT32 STR_INDEX

Definition at line 74 of file strtab.cxx.

Function Documentation

template<class STRTAB >
static void initialize_strtab ( STRTAB &  strtab,
UINT32  size 
)
inlinestatic

Definition at line 417 of file strtab.cxx.

References Malloc_Mem_Pool, MEM_POOL_Alloc, and size.

Referenced by Initialize_Strtab(), and Initialize_TCON_strtab().

template<class STRTAB >
static void initialize_strtab ( STRTAB &  strtab,
const char *  buf,
UINT32  size 
)
inlinestatic

Definition at line 426 of file strtab.cxx.

References Malloc_Mem_Pool, MEM_POOL_Alloc, and size.

void Initialize_Strtab ( UINT32  size)

Definition at line 448 of file strtab.cxx.

References initialize_strtab(), and Strtab.

Referenced by Initialize_Symbol_Tables(), WN_get_strtab(), and sexp2whirl::xlate_STR_TAB().

Here is the call graph for this function:

void Initialize_Strtab ( const char *  buf,
UINT32  size 
)

Definition at line 453 of file strtab.cxx.

References initialize_strtab(), and Strtab.

Here is the call graph for this function:

void Initialize_TCON_strtab ( UINT32  size)

Definition at line 498 of file strtab.cxx.

References initialize_strtab(), and TCON_strtab.

Referenced by Init_Constab(), WN_get_global_symtab(), and sexp2whirl::xlate_TCON_STR_TAB().

Here is the call graph for this function:

void Initialize_TCON_strtab ( const char *  buf,
UINT32  size 
)

Definition at line 503 of file strtab.cxx.

References initialize_strtab(), and TCON_strtab.

Here is the call graph for this function:

static STR_INDEX make_STR_INDEX ( UINT32  size,
UINT32  idx 
)
inlinestatic

Definition at line 99 of file strtab.cxx.

Referenced by STR_TAB< STR >::init_hash(), and STR_TAB< STR >::insert().

template<class STR , class MAP >
void merge_strtab ( STR_TAB< STR > &  strtab,
const char *  buf,
UINT32  size,
MAP &  map 
)

Definition at line 522 of file strtab.cxx.

References idx, and STR_TAB< STR >::insert().

Referenced by Merge_Strtab(), and Merge_TCON_Strtab().

Here is the call graph for this function:

void Merge_Strtab ( const char *  buf,
UINT32  size,
STR_IDX_MAP map 
)

Definition at line 539 of file strtab.cxx.

References merge_strtab(), and Strtab.

Here is the call graph for this function:

void Merge_TCON_Strtab ( const char *  buf,
UINT32  size,
STR_IDX_MAP map 
)

Definition at line 545 of file strtab.cxx.

References merge_strtab(), and TCON_strtab.

Here is the call graph for this function:

STR_IDX Save_Str2i ( const char *  s1,
const char *  s2,
UINT  i 
)

Definition at line 472 of file strtab.cxx.

References Save_Str().

Referenced by Copy_ST_No_Base(), and Gen_Temp_Named_Symbol().

Here is the call graph for this function:

UINT32 Save_StrN ( const char *  s1,
UINT32  len 
)

Definition at line 508 of file strtab.cxx.

References TCON_strtab.

Referenced by Host_To_Targ_String().

static mUINT32 STR_INDEX_index ( STR_INDEX  idx)
inlinestatic

Definition at line 90 of file strtab.cxx.

Referenced by STR_TAB< STR >::insert().

static mUINT8 STR_INDEX_size ( STR_INDEX  idx)
inlinestatic

Definition at line 88 of file strtab.cxx.

char* TCON_strtab_buffer ( )

Definition at line 493 of file strtab.cxx.

References TCON_strtab.

Referenced by ir_b_write_global_symtab().

UINT32 TCON_strtab_size ( )

Definition at line 489 of file strtab.cxx.

References TCON_strtab.

Referenced by ir_b_write_global_symtab(), and whirl2sexp::xlate_TCON_STR_TAB().

Variable Documentation

const UINT32 TCON_STRTAB_HASH_SIZE = 512

Definition at line 485 of file strtab.cxx.