History

use uchar instead of int to save memory

Sergey Sushilin committed 6 years ago

Commit 4873f6f1 parent 14fc6b61 file · +31 −31Browse files

Unified · Split

tcc.h+31−31
@@ -493,19 +493,19 @@ typedef struct Sym { · 492 unmodified lines
493 int c; /* associated number or Elf symbol index */493 int c; /* associated number or Elf symbol index */
494 union {494 union {
495 int sym_scope; /* scope level for locals */495 int sym_scope; /* scope level for locals */
496 int jnext; /* next jump label */496 int jnext; /* next jump label */
497 struct FuncAttr f; /* function attributes */497 struct FuncAttr f; /* function attributes */
498 int auxtype; /* bitfield access type */498 int auxtype; /* bitfield access type */
499 };499 };
500 };500 };
501 long long enum_val; /* enum constant if IS_ENUM_VAL */501 long long enum_val; /* enum constant if IS_ENUM_VAL */
502 int *d; /* define token stream */502 int *d; /* define token stream */
503 struct Sym *ncl; /* next cleanup */503 struct Sym *ncl; /* next cleanup */
504 };504 };
505 CType type; /* associated type */505 CType type; /* associated type */
506 union {506 union {
507 struct Sym *next; /* next related symbol (for fields and anoms) */507 struct Sym *next; /* next related symbol (for fields and anoms) */
508 struct Sym *cleanupstate; /* in defined labels */508 struct Sym *cleanupstate; /* in defined labels */
509 int asm_label; /* associated asm label */509 int asm_label; /* associated asm label */
510 };510 };
511 struct Sym *prev; /* prev symbol in stack */511 struct Sym *prev; /* prev symbol in stack */
@@ -673,20 +673,20 @@ struct sym_attr { · 161 unmodified lines
673};673};
674 674
675struct TCCState {675struct TCCState {
676 int verbose; /* if true, display some information during compilation */676 unsigned char verbose; /* if true, display some information during compilation */
677 int nostdinc; /* if true, no standard headers are added */677 unsigned char nostdinc; /* if true, no standard headers are added */
678 int nostdlib; /* if true, no standard libraries are added */678 unsigned char nostdlib; /* if true, no standard libraries are added */
679 int nocommon; /* if true, do not use common symbols for .bss data */679 unsigned char nocommon; /* if true, do not use common symbols for .bss data */
680 int static_link; /* if true, static linking is performed */680 unsigned char static_link; /* if true, static linking is performed */
681 int rdynamic; /* if true, all symbols are exported */681 unsigned char rdynamic; /* if true, all symbols are exported */
682 int symbolic; /* if true, resolve symbols in the current module first */682 unsigned char symbolic; /* if true, resolve symbols in the current module first */
683 int filetype; /* file type for compilation (NONE,C,ASM) */683 unsigned char filetype; /* file type for compilation (NONE,C,ASM) */
684 int cversion; /* supported C ISO version, 199901 (the default), 201112, ... */684 unsigned int cversion; /* supported C ISO version, 199901 (the default), 201112, ... */
685 685
686 char *tcc_lib_path; /* CONFIG_TCCDIR or -B option */686 char *tcc_lib_path; /* CONFIG_TCCDIR or -B option */
687 char *soname; /* as specified on the command line (-soname) */687 char *soname; /* as specified on the command line (-soname) */
688 char *rpath; /* as specified on the command line (-Wl,-rpath=) */688 char *rpath; /* as specified on the command line (-Wl,-rpath=) */
689 int enable_new_dtags; /* ditto, (-Wl,--enable-new-dtags) */689 unsigned char enable_new_dtags; /* ditto, (-Wl,--enable-new-dtags) */
690 690
691 /* output type, see TCC_OUTPUT_XXX */691 /* output type, see TCC_OUTPUT_XXX */
692 int output_type;692 int output_type;
@@ -694,33 +694,33 @@ struct TCCState { · 1 unmodified line
694 int output_format;694 int output_format;
695 695
696 /* C language options */696 /* C language options */
697 int char_is_unsigned;697 unsigned char char_is_unsigned;
698 int leading_underscore;698 unsigned char leading_underscore;
699 int ms_extensions; /* allow nested named struct w/o identifier behave like unnamed */699 unsigned char ms_extensions; /* allow nested named struct w/o identifier behave like unnamed */
700 int dollars_in_identifiers; /* allows '$' char in identifiers */700 unsigned char dollars_in_identifiers; /* allows '$' char in identifiers */
701 int ms_bitfields; /* if true, emulate MS algorithm for aligning bitfields */701 unsigned char ms_bitfields; /* if true, emulate MS algorithm for aligning bitfields */
702 702
703 /* warning switches */703 /* warning switches */
704 int warn_write_strings;704 unsigned char warn_write_strings;
705 int warn_unsupported;705 unsigned char warn_unsupported;
706 int warn_error;706 unsigned char warn_error;
707 int warn_none;707 unsigned char warn_none;
708 int warn_implicit_function_declaration;708 unsigned char warn_implicit_function_declaration;
709 int warn_gcc_compat;709 unsigned char warn_gcc_compat;
710 710
711 /* compile with debug symbol (and use them if error during execution) */711 /* compile with debug symbol (and use them if error during execution) */
712 int do_debug;712 unsigned char do_debug;
713#ifdef CONFIG_TCC_BCHECK713#ifdef CONFIG_TCC_BCHECK
714 /* compile with built-in memory and bounds checker */714 /* compile with built-in memory and bounds checker */
715 int do_bounds_check;715 unsigned char do_bounds_check;
716#endif716#endif
717#ifdef TCC_TARGET_ARM717#ifdef TCC_TARGET_ARM
718 enum float_abi float_abi; /* float ABI of the generated code*/718 enum float_abi float_abi; /* float ABI of the generated code*/
719#endif719#endif
720 int run_test; /* nth test to run with -dt -run */720 unsigned char run_test; /* nth test to run with -dt -run */
721 721
722 addr_t text_addr; /* address of text section */722 addr_t text_addr; /* address of text section */
723 int has_text_addr;723 unsigned char has_text_addr;
724 724
725 unsigned section_align; /* section alignment */725 unsigned section_align; /* section alignment */
726 726
@@ -847,11 +847,11 @@ struct TCCState { · 120 unmodified lines
847 int nb_files; /* number thereof */847 int nb_files; /* number thereof */
848 int nb_libraries; /* number of libs thereof */848 int nb_libraries; /* number of libs thereof */
849 char *outfile; /* output filename */849 char *outfile; /* output filename */
850 int option_r; /* option -r */850 unsigned char option_r; /* option -r */
851 int do_bench; /* option -bench */851 unsigned char do_bench; /* option -bench */
852 int gen_deps; /* option -MD */852 int gen_deps; /* option -MD */
853 char *deps_outfile; /* option -MF */853 char *deps_outfile; /* option -MF */
854 int option_pthread; /* -pthread option */854 unsigned char option_pthread; /* -pthread option */
855 int argc;855 int argc;
856 char **argv;856 char **argv;
857};857};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t