Skip to content

Commit

Permalink
Iteration23 (#656)
Browse files Browse the repository at this point in the history
* working on gtk ide
* [ADDED] optimized ternary expressions
* [FIXED] declaring a field with a type of template based array
* [ADDED] unit-test for declaring a field with a type of template based array
* [ADDED] #89 : new functionality - MemoryStream, BitArray, SortedList, SortedArrayList
* fixing elt64-cli
* [ADDED] #95 : LiteralBuffer, WideBuffer
* #590 : elenavm : dynamic class inheritance - allocate in perm, copy vmt with custom routine
  • Loading branch information
arakov authored May 23, 2024
1 parent 4e8e314 commit fc71831
Show file tree
Hide file tree
Showing 126 changed files with 5,230 additions and 803 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release

BUILD_TAG: 6.0.9
BUILD_TAG: 6.1.0

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.10
6.1.0
53 changes: 53 additions & 0 deletions asm/amd64/core60_win_client.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
define INVOKER 10001h

define CORE_SINGLE_CONTENT 2000Bh

define tt_stack_root 0028h

// INVOKER(function, arg)
// INVOKER(function, arg)
procedure % INVOKER

// ; RCX - function
// ; RDX - arg
// ; save registers
push 0
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15

// ; declare new frame
xor rdi, rdi
mov rax, rcx
push 0 // ; FrameHeader.previousFrame
push 0 // ; FrameHeader.reserved
mov rbp, rsp // ; FrameHeader

mov [data : %CORE_SINGLE_CONTENT + tt_stack_root], rsp

push 0
push r8 // ; arg

call rax
add rsp, 32 // ; clear FrameHeader+arg
mov rax, rbx

// ; restore registers
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
add rsp, 8
ret

end
3 changes: 3 additions & 0 deletions bin/templates/vm_win_client60.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
</primitives>
</platform>
<platform key="Win_x64">
<primitives>
<primitive key="core">..\amd64\core60_win_client.bin</primitive>
</primitives>
</platform>
<system>
<platform>4352</platform>
Expand Down
2 changes: 1 addition & 1 deletion build/aarch64/build_package_arm64.script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
RELEASE=elena-6.0.10.aarch64-linux
RELEASE=elena-6.1.0.aarch64-linux

mkdir -p /usr/share/elena
mkdir -p /etc/elena/
Expand Down
2 changes: 1 addition & 1 deletion build/aarch64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: elena-lang
Version: 6.0.10
Version: 6.1.0
Architecture: aarch64
Maintainer: Alex Rakov <arakov@yandex.ru>
Depends: libc6 (>= 2.1)
Expand Down
2 changes: 1 addition & 1 deletion build/amd64/build_package_amd64.script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
RELEASE=elena-6.0.10.amd64-linux
RELEASE=elena-6.1.0.amd64-linux

mkdir -p /usr/share/elena
mkdir -p /etc/elena/
Expand Down
2 changes: 1 addition & 1 deletion build/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: elena-lang
Version: 6.0.10
Version: 6.1.0
Architecture: amd64
Maintainer: Alex Rakov <arakov@yandex.ru>
Depends: libc6 (>= 2.1)
Expand Down
1 change: 1 addition & 0 deletions build/create_package_x64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ copy %~dp0\..\bin\elenavm60.cfg %~dp0\x64\bin
copy %~dp0\..\bin\amd64\core60.bin %~dp0\x64\bin\amd64
copy %~dp0\..\bin\amd64\core60_win.bin %~dp0\x64\bin\amd64
copy %~dp0\..\bin\amd64\corex60.bin %~dp0\x64\bin\amd64
copy %~dp0\..\bin\amd64\core60_win_client.bin %~dp0\x64\bin\amd64

copy %~dp0\..\bin\templates\*.cfg %~dp0\x64\bin\templates\
copy %~dp0\..\bin\scripts\*.es %~dp0\x64\bin\scripts\
Expand Down
24 changes: 22 additions & 2 deletions build/create_package_x86.bat
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ copy %~dp0\..\doc\license %~dp0\x86\doc\
copy %~dp0\..\doc\contributors %~dp0\x86\doc\
copy %~dp0\..\readme.md %~dp0\x86\
copy %~dp0\..\CHANGELOG.md %~dp0\x86\
copy %~dp0\..\VERSION %~dp0\x86\

md %~dp0\x86\src60\system
xcopy %~dp0\..\src60\system\*.l %~dp0\x86\src60\system /s
Expand Down Expand Up @@ -137,6 +138,10 @@ md %~dp0\x86\src60\ltests
xcopy %~dp0\..\src60\ltests\*.l %~dp0\x86\src60\ltests /s
xcopy %~dp0\..\src60\ltests\*.prj %~dp0\x86\src60\ltests /s

md %~dp0\x86\src60\net
xcopy %~dp0\..\src60\net\*.l %~dp0\x86\src60\net /s
xcopy %~dp0\..\src60\net\*.prj %~dp0\x86\src60\net /s

%~dp0\..\bin\sg-cli.exe %~dp0\..\dat\sg\syntax60.txt
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
Expand Down Expand Up @@ -202,12 +207,27 @@ if %ERRORLEVEL% EQU -2 GOTO CompilerError
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on

%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x86\core60.asm bin\x32
%~dp0\x86\bin\elena-cli %~dp0\x86\src60\net\net.prj
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on

%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x32\core60.asm %~dp0\x86\bin\x32
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on

%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x32\core60_win.asm %~dp0\x86\bin\x32
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on

%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x32\corex60.asm %~dp0\x86\bin\x32
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on

%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x86\core60_win.asm bin\x32
%~dp0\..\bin\asm-cli -x86 %~dp0\..\asm\x32\core60_win_client.asm %~dp0\x86\bin\x32
@echo off
if %ERRORLEVEL% EQU -2 GOTO CompilerError
@echo on
Expand Down
4 changes: 2 additions & 2 deletions build/elena_inno.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{3CAA69D3-0F98-44B1-A73E-E864BA51D5BD}
AppName=ELENA Programming Language
AppVersion=6.0.10
AppVersion=6.1.0
;AppVerName=ELENA Programming Language 6.0.10
AppPublisher=Alexey Rakov
AppPublisherURL=http://github.com/ELENA-LANG/elena-lang
Expand All @@ -18,7 +18,7 @@ DefaultGroupName=ELENA Programming Language
AllowNoIcons=yes
LicenseFile=..\doc\license
InfoAfterFile=..\CHANGELOG.md
OutputBaseFilename=elena-lang-6.0.10.x86-setup
OutputBaseFilename=elena-lang-6.1.0.x86-setup
Compression=lzma
SolidCompression=yes
ChangesEnvironment=yes
Expand Down
2 changes: 1 addition & 1 deletion build/i386/build_package_i386.script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
RELEASE=elena-6.0.10.i386-linux
RELEASE=elena-6.1.0.i386-linux

mkdir -p /usr/share/elena
mkdir -p /etc/elena/
Expand Down
2 changes: 1 addition & 1 deletion build/i386/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: elena-lang
Version: 6.0.10
Version: 6.1.0
Architecture: i386
Maintainer: Alex Rakov <arakov@yandex.ru>
Depends: libc6 (>= 2.1)
Expand Down
2 changes: 1 addition & 1 deletion build/ppc64le/build_package_ppc64le.script
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
RELEASE=elena-6.0.10.ppc64le-linux
RELEASE=elena-6.1.0.ppc64le-linux

mkdir -p /usr/share/elena
mkdir -p /etc/elena/
Expand Down
2 changes: 1 addition & 1 deletion build/ppc64le/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: elena-lang
Version: 6.0.10
Version: 6.1.0
Architecture: ppc64le
Maintainer: Alex Rakov <arakov@yandex.ru>
Depends: libc6 (>= 2.1)
Expand Down
5 changes: 5 additions & 0 deletions build/rebuild_lib60_x64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ bin\asm64-cli -amd64 asm\amd64\core60_win.asm bin\amd64
if %ERRORLEVEL% EQU -1 GOTO Asm2BinError
@echo on

bin\asm64-cli -amd64 asm\amd64\core60_win_client.asm bin\amd64
@echo off
if %ERRORLEVEL% EQU -1 GOTO Asm2BinError
@echo on

bin\asm64-cli -bc64 src60\core\system.core_routines.esm lib60_64
@echo off
if %ERRORLEVEL% EQU -1 GOTO Asm2BinError
Expand Down
12 changes: 10 additions & 2 deletions dat/sg/syntax60.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ DECLARATION ::=
| "::" "(" TUPLE_TYPE ")" identifier SUB_IR_DECLARATION;

IR_DECLARATION ::=
{ TEMPLATE_BRACKETS identifier? | { DYNAMIC_DIMENSION ^ARRAY_TYPE }+ identifier } { POSTFIXES NESTED_SCOPE | SCOPE }
{ TEMPLATE_BRACKETS {
DYNAMIC_DIMENSION ^TEMPLATE_TYPE ^ARRAY_TYPE { DYNAMIC_DIMENSION ^ARRAY_TYPE }* identifier
| identifier
| eps}
| { DYNAMIC_DIMENSION ^ARRAY_TYPE }+ identifier
} { POSTFIXES NESTED_SCOPE | SCOPE }
| "::" {
COMPLEX_NAME { "::" COMPLEX_NAME }* TEMPLATE_BRACKETS? METHOD_SCOPE
| "(" TUPLE_TYPE ")" identifier SCOPE
Expand Down Expand Up @@ -447,6 +452,7 @@ EXPRESSION ::=
| L9_OOP
| LESS ^OBJECT TEMPLATE_ARG { "," TEMPLATE_ARG }* ">" ^TEMPLATE_TYPE {
"{" NESTED_EXPRESSION ^NESTED OL_F
| { DYNAMIC_DIMENSION ^ARRAY_TYPE }+ ^OBJECT BRACKET FUNCTION_R L3_OP* L4_OP* L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
| SBRACKET ^OBJECT INDEXER_R OL_F
| BRACKET ^OBJECT FUNCTION_R OL_F
| L3_OOP L3_OP* L4_OP* L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
Expand Down Expand Up @@ -933,6 +939,7 @@ L0_F ::=
L2_F ::=
L2_OP L2_F
| DOT MESSAGE { L3_F | eps ^PROPERTY_OPERATION }
| ":" ^EXPRESSION identifier TEMPLATE_ARG ^ TEMPLATE_EXPR_BLOCK
| L4_OP+ L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
| L5_OP+ L6_OP? L7_OP* L8_OP? L9_OP?
| L6_OP L7_OP* L8_OP? L9_OP?
Expand All @@ -946,14 +953,15 @@ L3_F ::=
| ASSIGN EXPRESSION ^PROPERTY_OPERATION
| BRACKET MESSAGE_R {
DOT MESSAGE { L3_F | eps ^PROPERTY_OPERATION }
| ":" ^EXPRESSION identifier TEMPLATE_ARG ^ TEMPLATE_EXPR_BLOCK
| L4_OP+ L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
| L5_OP+ L6_OP? L7_OP* L8_OP? L9_OP?
| L6_OP L7_OP* L8_OP? L9_OP?
| L7_OP+ L8_OP? L9_OP?
| L8_OP
| L9_OP
| eps
}
}
| "::" L3_SINGLE_EXPRESSION ^ MESSAGE_OPERATION L3_OP* L4_OP* L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
| STAR ^PROPERTY_OPERATION L4_EXPRESSION ^MUL_OPERATION L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
| DIV ^PROPERTY_OPERATION L4_EXPRESSION ^DIV_OPERATION L5_OP* L6_OP? L7_OP* L8_OP? L9_OP?
Expand Down
35 changes: 22 additions & 13 deletions doc/api/forms.html
Original file line number Diff line number Diff line change
Expand Up @@ -713,16 +713,7 @@ <H3>Method Summary</H3>
<CODE>
<i>internal </i>&nbsp;</CODE></TD>
<TD CLASS="colLast">
<CODE>appendControlInternal(<SPAN CLASS="memberNameLink"><A HREF="forms.html#BaseControl">BaseControl</A></SPAN> control)
</CODE>
</TD>
</TR>
<TR CLASS="rowColor">
<TD CLASS="colFirst">
<CODE>
<i>internal </i>&nbsp;</CODE></TD>
<TD CLASS="colLast">
<CODE>appendControlInternal(<SPAN CLASS="memberNameLink"><A HREF="forms.html#ImageList">ImageList</A></SPAN> control)
<CODE>appendControlInternal(control)
</CODE>
</TD>
</TR>
Expand Down Expand Up @@ -904,7 +895,7 @@ <H3>Method Summary</H3>
<TR CLASS="altColor">
<TD CLASS="colFirst">
<CODE>
<SPAN CLASS="memberNameLink"><A HREF="forms.html#IControl">IControl</A></SPAN></CODE></TD>
</CODE></TD>
<TD CLASS="colLast">
<CODE>retrieve(<SPAN CLASS="memberNameLink"><A HREF="system.html#Handle">Handle</A></SPAN> handle)
</CODE>
Expand Down Expand Up @@ -1195,7 +1186,7 @@ <H3>Method Summary</H3>
<TR CLASS="rowColor">
<TD CLASS="colFirst">
<CODE>
<SPAN CLASS="memberNameLink"><A HREF="forms.html#IControl">IControl</A></SPAN></CODE></TD>
</CODE></TD>
<TD CLASS="colLast">
<CODE>retrieve(<SPAN CLASS="memberNameLink"><A HREF="system.html#Handle">Handle</A></SPAN> handle)
</CODE>
Expand All @@ -1219,6 +1210,15 @@ <H3>Method Summary</H3>
</CODE>
</TD>
</TR>
<TR CLASS="altColor">
<TD CLASS="colFirst">
<CODE>
</CODE></TD>
<TD CLASS="colLast">
<CODE>click()
</CODE>
</TD>
</TR>
</TABLE>
</LI>
</UL>
Expand Down Expand Up @@ -1396,7 +1396,7 @@ <H3>Method Summary</H3>
<CODE>
</CODE></TD>
<TD CLASS="colLast">
<CODE>appendControl(<SPAN CLASS="memberNameLink"><A HREF="forms.html#BaseControl">BaseControl</A></SPAN> control)
<CODE>appendControl(control)
</CODE>
</TD>
</TR>
Expand Down Expand Up @@ -2607,6 +2607,15 @@ <H3>Method Summary</H3>
</CODE>
</TD>
</TR>
<TR CLASS="altColor">
<TD CLASS="colFirst">
<CODE>
</CODE></TD>
<TD CLASS="colLast">
<CODE>close()
</CODE>
</TD>
</TR>
</TABLE>
</LI>
</UL>
Expand Down
Loading

0 comments on commit fc71831

Please sign in to comment.