diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log new file mode 100644 index 000000000..bab9054b3 --- /dev/null +++ b/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":[],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":[],"compilerArgs":[]},"fileIndex":[]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log new file mode 100644 index 000000000..d3f7e004b --- /dev/null +++ b/.vscode/dryrun.log @@ -0,0 +1,6 @@ +make --dry-run --always-make --keep-going --print-directory +make: Entering directory '/root/pikascript' +make: Leaving directory '/root/pikascript' + +make: *** No targets specified and no makefile found. Stop. + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..65e1ec078 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "makefile.extensionOutputFolder": "./.vscode" +} \ No newline at end of file diff --git a/.vscode/targets.log b/.vscode/targets.log new file mode 100644 index 000000000..2d5746b09 --- /dev/null +++ b/.vscode/targets.log @@ -0,0 +1,210 @@ +make all --print-data-base --no-builtin-variables --no-builtin-rules --question +make: *** No rule to make target 'all'. Stop. + +# GNU Make 4.3 +# Built for x86_64-pc-linux-gnu +# Copyright (C) 1988-2020 Free Software Foundation, Inc. +# License GPLv3+: GNU GPL version 3 or later +# This is free software: you are free to change and redistribute it. +# There is NO WARRANTY, to the extent permitted by law. + +# Make data base, printed on Wed Aug 24 21:15:35 2022 + +# Variables + +# environment +REMOTE_CONTAINERS_SOCKETS = ["/tmp/vscode-ssh-auth-0cbbdc11027918311efe3bd284f60e72d4c31ea5.sock"] +# environment +LC_ALL = C +# environment +VSCODE_CWD = /root/.vscode-server/bin/e4503b30fc78200f846c62cf8091b76ff5547662 +# default +MAKE_COMMAND := make +# environment +VSCODE_HANDLES_SIGPIPE = true +# automatic +@D = $(patsubst %/,%,$(dir $@)) +# environment +VSCODE_HANDLES_UNCAUGHT_ERRORS = true +# default +.VARIABLES := +# environment +PWD = /root/pikascript +# automatic +%D = $(patsubst %/,%,$(dir $%)) +# environment +HOSTNAME = 438a9adb6812 +# automatic +^D = $(patsubst %/,%,$(dir $^)) +# automatic +%F = $(notdir $%) +# environment +LANG = C +# default +.LOADED := +# default +.INCLUDE_DIRS = /usr/local/include /usr/include /usr/include +# makefile +MAKEFLAGS = pqrR +# makefile +CURDIR := /root/pikascript +# environment +APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL = 1 +# environment +LESSOPEN = | /usr/bin/lesspipe %s +# automatic +*D = $(patsubst %/,%,$(dir $*)) +# environment +MFLAGS = -pqrR +# environment +SSH_AUTH_SOCK = /tmp/vscode-ssh-auth-0cbbdc11027918311efe3bd284f60e72d4c31ea5.sock +# default +.SHELLFLAGS := -c +# automatic ++D = $(patsubst %/,%,$(dir $+)) +# makefile +MAKEFILE_LIST := +# automatic +@F = $(notdir $@) +# automatic +?D = $(patsubst %/,%,$(dir $?)) +# automatic +*F = $(notdir $*) +# automatic +bytecode_frame->const_pool), @@ -1091,18 +1085,10 @@ static Arg* VM_instruction_handler_OUT(PikaObj* self, char* data, Arg* arg_ret_reg) { arg_newReg(outArg_reg, PIKA_ARG_BUFF_SIZE); - Arg* outArg = stack_popArg(&vm->stack, &outArg_reg); // Arg* outArg = stack_popArg_alloc(&vm->stack); ArgType outArg_type = arg_getType(outArg); - if (VMState_getInvokeDeepthNow(vm) > 0) { - /* in block, is a keyword arg */ - arg_setIsKeyword(outArg, PIKA_TRUE); - arg_setName(outArg, data); - return arg_copy_noalloc(outArg, arg_ret_reg); - } - if (_checkLReg(data)) { uint8_t index = _getLRegIndex(data); if (argType_isObject(outArg_type)) { @@ -1210,7 +1196,8 @@ static Arg* VM_instruction_handler_JEZ(PikaObj* self, VMState* vm, char* data, Arg* arg_ret_reg) { - int thisBlockDeepth = VMState_getBlockDeepthNow(vm); + int thisBlockDeepth; + thisBlockDeepth = VMState_getBlockDeepthNow(vm); int jmp_expect = fast_atoi(data); arg_newReg(pika_assertArg_reg, PIKA_ARG_BUFF_SIZE); Arg* pika_assertArg = stack_popArg(&(vm->stack), &pika_assertArg_reg); @@ -1248,9 +1235,6 @@ static uint8_t VMState_getInputArgNum(VMState* vm) { break; } if (invode_deepth == invoke_deepth_this + 1) { - if (instructUnit_getInstruct(ins_unit_now) == OUT) { - continue; - } num++; } if (instructUnit_getIsNewLine(ins_unit_now)) { diff --git a/src/dataArg.h b/src/dataArg.h index d2368353a..dc5f57407 100644 --- a/src/dataArg.h +++ b/src/dataArg.h @@ -61,12 +61,12 @@ typedef union { uint8_t* buffer; } _arg_union; struct Arg { - _arg_union _; // 32/64 bit - uint32_t size; // 32 bit - uint8_t type; // 8 bit - uint32_t flag; // - Hash name_hash; // 32bit - uint8_t content[]; // n bit + _arg_union _; + uint32_t size; + uint8_t type; + PIKA_BOOL serialized; + Hash name_hash; + uint8_t content[]; }; Arg* arg_getNext(Arg* self);