mirror of https://github.com/arendst/Tasmota.git
Berry compile local Berry with int64 (#21151)
* Berry compile local Berry with int64 * Revert solidify
This commit is contained in:
parent
918faf3af6
commit
5e60d5217d
|
@ -1,4 +1,4 @@
|
|||
CFLAGS = -Wall -Wextra -std=c99 -O2 -Wno-zero-length-array -Wno-empty-translation-unit
|
||||
CFLAGS = -Wall -Wextra -std=c99 -O2 -Wno-zero-length-array -Wno-empty-translation-unit -DUSE_BERRY_INT64
|
||||
DEBUG_FLAGS = -O0 -g -DBE_DEBUG
|
||||
TEST_FLAGS = $(DEBUG_FLAGS) --coverage -fno-omit-frame-pointer -fsanitize=address -fsanitize=undefined
|
||||
LIBS = -lm
|
||||
|
@ -7,8 +7,8 @@ CC = clang # install clang!! gcc seems to produce a defect berry binary
|
|||
MKDIR = mkdir
|
||||
LFLAGS =
|
||||
|
||||
INCPATH = src default ../re1.5
|
||||
SRCPATH = src default ../re1.5
|
||||
INCPATH = src default ../re1.5 ../berry_mapping/src ../berry_int64/src generate
|
||||
SRCPATH = src default ../re1.5 ../berry_mapping/src ../berry_int64/src
|
||||
GENERATE = generate
|
||||
CONFIG = default/berry_conf.h
|
||||
COC = tools/coc/coc
|
||||
|
|
|
@ -308,10 +308,11 @@ BERRY_LOCAL bclass_array be_class_table = {
|
|||
&be_native_class(AudioOpusDecoder),
|
||||
&be_native_class(AudioInputI2S),
|
||||
#endif // defined(USE_I2S_AUDIO_BERRY) && (ESP_IDF_VERSION_MAJOR >= 5)
|
||||
#endif // TASMOTA
|
||||
|
||||
#if defined(USE_BERRY_INT64) || defined(USE_MATTER_DEVICE)
|
||||
&be_native_class(int64),
|
||||
#endif
|
||||
#endif // TASMOTA
|
||||
NULL, /* do not remove */
|
||||
};
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "be_mapping.h"
|
||||
|
||||
/* using GNU/readline library */
|
||||
#if defined(USE_READLINE_LIB)
|
||||
#include <readline/readline.h>
|
||||
|
@ -403,6 +405,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
int res;
|
||||
bvm *vm = be_vm_new(); /* create a virtual machine instance */
|
||||
be_set_ctype_func_hanlder(vm, be_call_ctype_func);
|
||||
res = analysis_args(vm, argc, argv);
|
||||
be_vm_delete(vm); /* free all objects and vm */
|
||||
return res;
|
||||
|
|
|
@ -147,7 +147,7 @@ static void m_solidify_map(bvm *vm, bbool str_literal, bmap * map, const char *c
|
|||
#if BE_INTGER_TYPE == 2
|
||||
logfmt(" { be_const_key_int(%lli, %i), ", node->key.v.i, key_next);
|
||||
#else
|
||||
logfmt(" { be_const_key_int(%li, %i), ", node->key.v.i, key_next);
|
||||
logfmt(" { be_const_key_int(%i, %i), ", node->key.v.i, key_next);
|
||||
#endif
|
||||
m_solidify_bvalue(vm, str_literal, &node->value, class_name, NULL, fout);
|
||||
} else {
|
||||
|
@ -190,14 +190,14 @@ static void m_solidify_bvalue(bvm *vm, bbool str_literal, bvalue * value, const
|
|||
#if BE_INTGER_TYPE == 2
|
||||
logfmt("be_const_int(%lli)", var_toint(value));
|
||||
#else
|
||||
logfmt("be_const_int(%li)", var_toint(value));
|
||||
logfmt("be_const_int(%i)", var_toint(value));
|
||||
#endif
|
||||
break;
|
||||
case BE_INDEX:
|
||||
#if BE_INTGER_TYPE == 2
|
||||
logfmt("be_const_var(%lli)", var_toint(value));
|
||||
#else
|
||||
logfmt("be_const_var(%li)", var_toint(value));
|
||||
logfmt("be_const_var(%i)", var_toint(value));
|
||||
#endif
|
||||
break;
|
||||
case BE_REAL:
|
||||
|
|
Loading…
Reference in New Issue