mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-25 15:27:17 +00:00
Berry reduce bproto structure by 8 bytes (#18946)
This commit is contained in:
parent
7d68c55b38
commit
5792dad12b
@ -151,15 +151,15 @@ typedef struct bproto {
|
|||||||
bbyte nupvals; /* upvalue count */
|
bbyte nupvals; /* upvalue count */
|
||||||
bbyte argc; /* argument count */
|
bbyte argc; /* argument count */
|
||||||
bbyte varg; /* variable argument position + 1 */
|
bbyte varg; /* variable argument position + 1 */
|
||||||
|
int16_t codesize; /* code size */
|
||||||
|
int16_t nconst; /* constants count */
|
||||||
|
int16_t nproto; /* proto count */
|
||||||
bgcobject *gray; /* for gc gray list */
|
bgcobject *gray; /* for gc gray list */
|
||||||
bupvaldesc *upvals;
|
bupvaldesc *upvals;
|
||||||
bvalue *ktab; /* constants table */
|
bvalue *ktab; /* constants table */
|
||||||
struct bproto **ptab; /* proto table */
|
struct bproto **ptab; /* proto table */
|
||||||
binstruction *code; /* instructions sequence */
|
binstruction *code; /* instructions sequence */
|
||||||
bstring *name; /* function name */
|
bstring *name; /* function name */
|
||||||
int codesize; /* code size */
|
|
||||||
int nconst; /* constants count */
|
|
||||||
int nproto; /* proto count */
|
|
||||||
bstring *source; /* source file name */
|
bstring *source; /* source file name */
|
||||||
#if BE_DEBUG_RUNTIME_INFO /* debug information */
|
#if BE_DEBUG_RUNTIME_INFO /* debug information */
|
||||||
blineinfo *lineinfo;
|
blineinfo *lineinfo;
|
||||||
|
@ -517,15 +517,15 @@ typedef bclass_ptr bclass_array[];
|
|||||||
BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
|
BE_IIF(_is_upval)(sizeof(_name##_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
|
||||||
(_argc), /**< argc */ \
|
(_argc), /**< argc */ \
|
||||||
0, /**< varg */ \
|
0, /**< varg */ \
|
||||||
|
sizeof(_name##_code)/sizeof(uint32_t), /**< codesize */ \
|
||||||
|
BE_IIF(_is_const)(sizeof(_name##_ktab)/sizeof(bvalue),0), /**< nconst */ \
|
||||||
|
BE_IIF(_is_subproto)(sizeof(_name##_subproto)/sizeof(bproto*),0), /**< proto */ \
|
||||||
NULL, /**< bgcobject *gray */ \
|
NULL, /**< bgcobject *gray */ \
|
||||||
BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /**< bupvaldesc *upvals */ \
|
BE_IIF(_is_upval)((bupvaldesc*)&_name##_upvals,NULL), /**< bupvaldesc *upvals */ \
|
||||||
BE_IIF(_is_const)((bvalue*)&_name##_ktab,NULL), /**< ktab */ \
|
BE_IIF(_is_const)((bvalue*)&_name##_ktab,NULL), /**< ktab */ \
|
||||||
BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL), /**< bproto **ptab */ \
|
BE_IIF(_is_subproto)((struct bproto**)&_name##_subproto,NULL), /**< bproto **ptab */ \
|
||||||
(binstruction*) &_name##_code, /**< code */ \
|
(binstruction*) &_name##_code, /**< code */ \
|
||||||
be_local_const_str(_name##_str_name), /**< name */ \
|
be_local_const_str(_name##_str_name), /**< name */ \
|
||||||
sizeof(_name##_code)/sizeof(uint32_t), /**< codesize */ \
|
|
||||||
BE_IIF(_is_const)(sizeof(_name##_ktab)/sizeof(bvalue),0), /**< nconst */ \
|
|
||||||
BE_IIF(_is_subproto)(sizeof(_name##_subproto)/sizeof(bproto*),0), /**< proto */ \
|
|
||||||
be_local_const_str(_name##_str_source), /**< source */ \
|
be_local_const_str(_name##_str_source), /**< source */ \
|
||||||
PROTO_RUNTIME_BLOCK /**< */ \
|
PROTO_RUNTIME_BLOCK /**< */ \
|
||||||
PROTO_VAR_INFO_BLOCK /**< */ \
|
PROTO_VAR_INFO_BLOCK /**< */ \
|
||||||
@ -545,15 +545,15 @@ typedef bclass_ptr bclass_array[];
|
|||||||
BE_IIF(_has_upval)(sizeof(*_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
|
BE_IIF(_has_upval)(sizeof(*_upvals)/sizeof(bupvaldesc),0), /**< nupvals */ \
|
||||||
(_argc), /**< argc */ \
|
(_argc), /**< argc */ \
|
||||||
(_varg), /**< varg */ \
|
(_varg), /**< varg */ \
|
||||||
|
sizeof(*_code)/sizeof(binstruction), /**< codesize */ \
|
||||||
|
BE_IIF(_has_const)(sizeof(*_ktab)/sizeof(bvalue),0), /**< nconst */ \
|
||||||
|
BE_IIF(_has_subproto)(sizeof(*_protos)/sizeof(bproto*),0), /**< proto */ \
|
||||||
NULL, /**< bgcobject *gray */ \
|
NULL, /**< bgcobject *gray */ \
|
||||||
(bupvaldesc*) _upvals, /**< bupvaldesc *upvals */ \
|
(bupvaldesc*) _upvals, /**< bupvaldesc *upvals */ \
|
||||||
(bvalue*) _ktab, /**< ktab */ \
|
(bvalue*) _ktab, /**< ktab */ \
|
||||||
(struct bproto**) _protos, /**< bproto **ptab */ \
|
(struct bproto**) _protos, /**< bproto **ptab */ \
|
||||||
(binstruction*) _code, /**< code */ \
|
(binstruction*) _code, /**< code */ \
|
||||||
((bstring*) _fname), /**< name */ \
|
((bstring*) _fname), /**< name */ \
|
||||||
sizeof(*_code)/sizeof(binstruction), /**< codesize */ \
|
|
||||||
BE_IIF(_has_const)(sizeof(*_ktab)/sizeof(bvalue),0), /**< nconst */ \
|
|
||||||
BE_IIF(_has_subproto)(sizeof(*_protos)/sizeof(bproto*),0), /**< proto */ \
|
|
||||||
((bstring*) _source), /**< source */ \
|
((bstring*) _source), /**< source */ \
|
||||||
PROTO_RUNTIME_BLOCK /**< */ \
|
PROTO_RUNTIME_BLOCK /**< */ \
|
||||||
PROTO_VAR_INFO_BLOCK /**< */ \
|
PROTO_VAR_INFO_BLOCK /**< */ \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user