From 5f67e37632cbc3ee52d5a1ce3a9d485daa309ce1 Mon Sep 17 00:00:00 2001 From: Kray-G Date: Fri, 29 Jan 2021 21:31:54 +0900 Subject: [PATCH 1/5] fixed an invalid operation in DateTime. --- lib/std/DateTime.kx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/DateTime.kx b/lib/std/DateTime.kx index 5ab9f7232..6628fc7ee 100644 --- a/lib/std/DateTime.kx +++ b/lib/std/DateTime.kx @@ -42,13 +42,13 @@ _class DateTime(unixtime_, month_, day_, hour_, minute_, second_) { return rhs == this; } if (rhs.isDateTime) { - return datetime_ == rhs.datetime(); + return unixtime_ == rhs.unixtime(); } return false; } public <=>(rhs) { if (rhs.isDateTime) { - return rhs.datetime() - datetime_; + return rhs.unixtime() - unixtime_; } return false; } From 6a2d397219fe6e3809e7880d12cbeb0c02ca8245 Mon Sep 17 00:00:00 2001 From: Kray-G Date: Fri, 29 Jan 2021 21:32:40 +0900 Subject: [PATCH 2/5] allowed any expression at the when condition. --- src/ast_gencode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ast_gencode.c b/src/ast_gencode.c index 2d5137a41..e96854659 100644 --- a/src/ast_gencode.c +++ b/src/ast_gencode.c @@ -1685,15 +1685,13 @@ LOOP_HEAD:; apply_getvals(ctx, cond->lhs, ana, next, 1); add_pop(ana); break; - case KXOP_MKRANGE: + // case KXOP_MKRANGE: + default: gencode_ast_hook(ctx, cond, ana, 0); kv_push(kx_code_t, get_block(module, ana->block)->code, ((kx_code_t){ FILELINE(ana), .op = KX_EQEQ })); kv_push(kx_code_t, get_block(module, ana->block)->code, ((kx_code_t){ FILELINE_OF(cond, ana), .op = KX_JZ, .value1.i = jmpblk })); KX_NEW_BLK(module, ana); break; - default: - kx_yyerror_line("Unsupported when condition expression", node->file, node->line); - break; } if (node->ex) { gencode_ast_hook(ctx, node->ex, ana, 0); From 1f5512fb84665a9f1fba325b0c0dcd7eb7696665 Mon Sep 17 00:00:00 2001 From: Kray-G Date: Fri, 29 Jan 2021 21:33:09 +0900 Subject: [PATCH 3/5] removed unnecessary comment. --- src/ast_gencode.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ast_gencode.c b/src/ast_gencode.c index e96854659..f6ae59f95 100644 --- a/src/ast_gencode.c +++ b/src/ast_gencode.c @@ -1685,7 +1685,6 @@ LOOP_HEAD:; apply_getvals(ctx, cond->lhs, ana, next, 1); add_pop(ana); break; - // case KXOP_MKRANGE: default: gencode_ast_hook(ctx, cond, ana, 0); kv_push(kx_code_t, get_block(module, ana->block)->code, ((kx_code_t){ FILELINE(ana), .op = KX_EQEQ })); From 42e1fbcdcbee6449fb1048008ee092505dab0d2b Mon Sep 17 00:00:00 2001 From: Kray-G Date: Fri, 29 Jan 2021 21:33:59 +0900 Subject: [PATCH 4/5] added a comment. --- src/ast_gencode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ast_gencode.c b/src/ast_gencode.c index f6ae59f95..82a641ab0 100644 --- a/src/ast_gencode.c +++ b/src/ast_gencode.c @@ -1686,6 +1686,7 @@ LOOP_HEAD:; add_pop(ana); break; default: + // This includes the case of KXOP_MKRANGE. gencode_ast_hook(ctx, cond, ana, 0); kv_push(kx_code_t, get_block(module, ana->block)->code, ((kx_code_t){ FILELINE(ana), .op = KX_EQEQ })); kv_push(kx_code_t, get_block(module, ana->block)->code, ((kx_code_t){ FILELINE_OF(cond, ana), .op = KX_JZ, .value1.i = jmpblk })); From 1e48858aa64f92283977150c35f8a39aec6261e5 Mon Sep 17 00:00:00 2001 From: Kray-G Date: Fri, 29 Jan 2021 21:36:52 +0900 Subject: [PATCH 5/5] bumped a version number to 0.21.1. --- ChangeLog.md | 7 +++---- README.md | 2 +- build/kinx.rc | 8 ++++---- build/make.cmd | 2 +- build/mkdeb.sh | 2 +- include/version.h | 2 +- install.nsi | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index e92460b13..83b31120a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -19,11 +19,8 @@ ## V0.21.0 (Current Development Version) * Updated - * Supported an assignment with an object key style. - * `{ x, y } = { x: 10, y: 100 }` means `x = 10, y = 100`. - * Some bug fixes and improvement. -## V0.20.0 (20th Preview Release) - 2021/01/29 +## V0.20.1 (20th Preview Release) - 2021/01/29 * Updated * Added the same directory as a current parsing file to a search path for `using`. @@ -34,6 +31,8 @@ * `var { x: a, y: b } = { x: 10, y: 100 }` means `a = 10, b = 100`. * Supported a pattern matching syntax in assignment, declaration, and function arguments. * `var { x: a, y: 100 } = { x: 10, y: m }` means `a = 10` if `m == 100`, otherwise an exception occurs. + * Supported an object key style also with an assignment. + * `{ x, y } = { x: 10, y: 100 }` means `x = 10, y = 100`. * Relocation of build environment. * Created a `build` directory and moved files needed at building to the `build` directory. * Some bug fixes and improvement. diff --git a/README.md b/README.md index fa7f2b1ca..b188e1cf3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Looks like JavaScript, feels like Ruby, and it is a script language fitting in C ## Topics -* **Preview Release 0.20.0 is now available!** See Releases.
+* **Preview Release 0.20.1 is now available!** See Releases.
* Now the Kinx is supporting the platform of **x86-64 Windows and Linux only**, because I have no environment. * If you are interested in other platforms, **please check [here](#how-to-support-a-platform)**. * **See [ChangeLog.md](ChangeLog.md)** about the history of this project. diff --git a/build/kinx.rc b/build/kinx.rc index 0555e11ca..2842d1d29 100644 --- a/build/kinx.rc +++ b/build/kinx.rc @@ -3,8 +3,8 @@ KINXICO ICON DISCARDABLE "kinxi.ico" VS_VERSION_INFO VERSIONINFO -FILEVERSION 0,20,0,0 -PRODUCTVERSION 0,20,0,0 +FILEVERSION 0,20,1,0 +PRODUCTVERSION 0,20,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEFLAGS 0x00000000L FILEOS VOS__WINDOWS32 @@ -22,12 +22,12 @@ BEGIN BEGIN VALUE "CompanyName", "-" VALUE "FileDescription", "The Script Kinx" - VALUE "FileVersion", "0.20.0.0\0" + VALUE "FileVersion", "0.20.1.0\0" VALUE "InternalName", "Kinx\0" VALUE "LegalCopyright", "Copyright (C) 2019-2021 Kray-G\0" VALUE "OriginalFilename", "kinx.exe\0" VALUE "ProductName", "Kinx\0" - VALUE "ProductVersion", "0.20.0.0\0" + VALUE "ProductVersion", "0.20.1.0\0" END END END diff --git a/build/make.cmd b/build/make.cmd index e0c5a8554..779316962 100644 --- a/build/make.cmd +++ b/build/make.cmd @@ -2,7 +2,7 @@ if "%1" == "" ( if exist "..\kinx.exe" ( - ..\kinx.exe utility\VersionSetup.kx 0.20.0 + ..\kinx.exe utility\VersionSetup.kx 0.20.1 ) cl.exe /DWINMAIN /Feaddpath.exe utility\src\addpath.c Advapi32.lib User32.lib /link /SUBSYSTEM:WINDOWS cl.exe /Feaddpathc.exe utility\src\addpath.c Advapi32.lib User32.lib diff --git a/build/mkdeb.sh b/build/mkdeb.sh index 0694632a4..ce1a6a08b 100755 --- a/build/mkdeb.sh +++ b/build/mkdeb.sh @@ -9,7 +9,7 @@ checkinstall -D -y \ --nodoc \ --reset-uids=yes \ --pkgname=kinx \ - --pkgversion="0.20.0" \ + --pkgversion="0.20.1" \ --pkgrelease="0" \ --pkggroup="kinx" \ --arch=amd64 \ diff --git a/include/version.h b/include/version.h index 9733cc2ee..98b26a1d1 100644 --- a/include/version.h +++ b/include/version.h @@ -7,7 +7,7 @@ #endif #define VER_MAJ 0 #define VER_MIN 20 -#define VER_PAT 0 +#define VER_PAT 1 #define VER_SUFFIX "" #endif /* KX_VERSION_H */ diff --git a/install.nsi b/install.nsi index a78bdccca..a9b9664ee 100644 --- a/install.nsi +++ b/install.nsi @@ -14,7 +14,7 @@ Unicode True # Version !define MAJ_VERSION "1" -!define VERSION_STRING "0.20.0" +!define VERSION_STRING "0.20.1" # Application Name Name "Kinx version ${VERSION_STRING} for x64"