Commit Graph

289 Commits

Author SHA1 Message Date
70828ac110 updated the reader and the compiler to support self.var inside class definition
Some checks failed
continuous-integration/drone/push Build is failing
2023-12-01 21:49:28 +09:00
bb4786b6ca some compiler enhancements
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-29 15:54:37 +09:00
57629478a1 some 'do' experiment
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-28 20:47:23 +09:00
9f4bf7485d enhanced the compiler to prohibit variable declaration after 'do' if it's the head of block expression
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-28 01:44:13 +09:00
f3c0c1b8c1 enhanced the compiler to prohibit variable declaration in class init scope
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-27 18:25:27 +09:00
3d47a99cd2 added many charcter handling code
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-22 00:24:57 +09:00
hyung-hwan
6a861d2db5 minor code clean-up
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-21 16:30:20 +09:00
01c0636206 enhanced the block expression checker to allow non-block expression if not followed by another expression
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-15 14:35:49 +09:00
84660b6e79 simplified the block expression checking in processing defun by calling the common checker function
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-15 09:58:02 +09:00
8085fb7725 changed class handling to check for the block expression if enabled
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-14 17:57:20 +09:00
65937937fb updated the compiler to check the block expression after if/elif/else/while/until more properly
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-14 00:31:50 +09:00
f42508731d added code to check if the body after if-condition or else is a block expression. work in progress
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-13 16:11:58 +09:00
8cb9178820 fixed many more issue in compiling block expressoins
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-12 21:54:17 +09:00
889d5d90ae compiler fix to support the code block expression
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-10 02:59:41 +09:00
5a28ab3749 working on the block expression compilation
Some checks failed
continuous-integration/drone/push Build is failing
2023-11-10 00:03:03 +09:00
d5c47e5a9a in progress implementing the block
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-07 21:23:00 +09:00
38e7d85312 removed unused variables and corrected flaws in error message conversion functions
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-07 20:18:06 +09:00
df924338df internal name changes
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-04 22:58:31 +09:00
8514f0e590 enhanced add_literal in the compiler code to reduce duplicate string literals
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-30 01:14:49 +09:00
893e5d4c89 add hcl_attachiostd().
moved the default io handler from bin/main.c to lib/std.c
2023-05-18 10:24:01 +09:00
e8acc7cd5b fixed a bug in compile_do() 2022-08-01 06:31:33 +00:00
ff089929a9 added HCL_EUNDEFVAR 2022-05-05 04:03:56 +00:00
c8905fc88e enhanced the do block handler to support the scoped local variables in the block 2022-05-03 14:43:12 +00:00
fa1c4ac896 added the experimental plus opcode 2022-03-21 15:38:31 +00:00
8747afba63 first successful implementation of class instantion methods 2022-03-17 13:22:17 +00:00
4f37815caf one line of comment in lib/comp.c 2022-03-14 00:01:07 +00:00
c753643daf changed the implementation of return-from-home to traverse the call chain and detect dead context more accurately 2022-03-04 18:08:26 +00:00
f4661d018a fixing bugs related to stack, class stack, exceptio stack handling 2022-02-27 19:35:47 +00:00
3f03140dcc changed an error message 2022-02-24 17:25:15 +00:00
c446330f4a compiler enhancement in checking instance variable access in class methods 2022-02-24 17:16:02 +00:00
50c04bb770 trying to detect prohibited access to an instance vairables in a class method.
inventing the class instantiation method concept
2022-02-24 16:47:26 +00:00
6d409c809f proper return variables handling in message sends 2022-02-21 16:07:55 +00:00
f0b6ccdf42 enhanced the compiler to emit the right instruction for super 2022-02-19 17:26:26 +00:00
e482ce620f fixed wrong instructions generated for set-r and return variables.
class variables access fixed to use hcl->active_context->home->owner instead of hcl->active_context->owner
2022-02-19 16:57:06 +00:00
026ece9aea added the super keyword 2022-02-18 16:32:19 +00:00
420d38c8be simplified the class variable access by remembering the method owner class in context objects 2022-02-17 12:40:22 +00:00
4b4e6a6385 added a class-side dictionary to the class object 2022-02-13 10:15:14 +00:00
eefc544644 wrote some code to process class method definition 2022-02-13 02:39:37 +00:00
cdc499763e adding class_cmstore and class_imstore. deleting class_mstore 2022-02-12 15:05:31 +00:00
a61197d3f7 some code clean-up 2022-02-08 13:57:48 +00:00
ef24bf68df implementing instance variable access with regards to inheritance 2022-02-06 16:06:48 +00:00
495cea5704 added a new identifier - self 2022-02-05 17:35:10 +00:00
72ed203f80 renamed class_set to class_mstore 2022-01-31 01:36:59 +00:00
84e53e3459 adding the class_set instruction 2022-01-29 17:43:11 +00:00
e94936b893 some code for message sending 2022-01-24 15:39:49 +00:00
6cdbc457a0 implementing message sending 2022-01-23 16:46:13 +00:00
7ad9b2d499 rearranged the stack for the call operation by pushing a dummy receiver.
the rearrangement is done to make aa plain function call look the same as a message send
2022-01-22 15:40:38 +00:00
a7a69d9a11 implementing a message sending list 2022-01-14 16:09:52 +00:00
bdf527f298 writing the compiler code for class variable handling 2022-01-09 16:47:38 +00:00
0fd038ddb6 utf8 range limiting.
compiler work for class variable access in the class defintion scope
2022-01-08 09:26:54 +00:00
7c6511d4ad rewriting variable collection in a class 2022-01-04 15:26:17 +00:00
8582b9288d removed a debugging message 2022-01-04 13:43:51 +00:00
a830d578e0 touching up variable declaration handling in a class 2022-01-03 17:59:55 +00:00
57bb1657b3 added new instructions - push_clsvar, store_into_clsvar, pop_into_clsvar 2022-01-01 14:58:57 +00:00
7b653c0df8 fixed yet another bug compiling a catch block 2021-12-26 16:37:54 +00:00
73148041a2 fixed another bug compiling a catch block 2021-12-26 16:00:08 +00:00
447fafd7b2 fixed a wrong compiler check in the post_catch() phase 2021-12-26 14:59:34 +00:00
3d4e161a5f added 'class_push_exit'
enhanced the compiler to produce 'pop_stacktop' at the end of the class if the class body is not empty
2021-12-24 00:05:58 +00:00
a24f591074 some lines of compiler code 2021-12-12 16:09:31 +00:00
f6236f767f removed unneded trailing spaces in comp.c 2021-11-26 15:17:09 +00:00
cf77f8eb6f trying to implement object instantiation 2021-11-26 14:55:50 +00:00
10934db873 removed an unneeded function 2021-11-24 14:08:25 +00:00
1712858fe9 changed emit_variable_access() 2021-11-24 02:45:28 +00:00
67c9bcbbe4 enhanced variable access code in comp.c 2021-11-23 15:52:01 +00:00
7521512db1 improving find_variable_backward() to resolve instance variables 2021-11-23 14:42:20 +00:00
dbdb694974 changing indexed variable access code 2021-11-23 02:37:58 +00:00
6d9f2cc91a fixed the wrong assertion in find_variable_backward() in comp.c 2021-11-21 16:16:59 +00:00
4a0ecfa0f1 improving the compiler code 2021-11-21 16:02:39 +00:00
59be44fa34 work in progress 2021-06-29 11:51:08 +00:00
6b476b5c6e more code to implement class 2021-06-27 17:47:51 +00:00
2f2baf2f59 fixed initialization of hcl->nil_process
got rid of HCL_CODE_MAKE_CLASS and merged its feature to HCL_CODE_CLASS_ENTER
2021-06-25 16:07:29 +00:00
2fbb2eda6c wrote more code to support classes 2021-06-25 15:19:11 +00:00
5cd8bc15ed added the class_enter and class_exit instructions - partially implemented yet 2021-06-19 17:19:24 +00:00
2141768b6f changed compile_return() to cater for exception handling 2021-06-18 19:07:36 +00:00
c994eb6fed work in progress - enhancing compiler to support class definition 2021-06-18 18:54:50 +00:00
90b6603567 experiment to convert an error from a primitive function to an exception 2021-06-18 07:10:38 +00:00
0f1df4684a making a useless commit 2021-06-07 01:11:17 +00:00
bb72984905 more code to implement class 2021-06-01 09:50:35 +00:00
184212b6a0 implementing defclass 2021-05-31 16:20:18 +00:00
d086d7bd4b trying to change some code 2021-05-31 08:59:18 +00:00
b41be3e5c4 added some code to handle defclass 2021-05-29 05:44:29 +00:00
b1f7ab6538 implemented multiple return values assignment with set-r 2021-05-15 05:31:36 +00:00
ebda2ffa0a enhanced compile_return() to handle 'return' differently in a function block containing return variables 2021-05-13 15:54:30 +00:00
550e39e21e some more code to support multiple return values via return variables 2021-05-13 14:43:40 +00:00
391d62511b writing code to implement return variables 2021-05-09 15:32:54 +00:00
01719d0056 enhancing the compiler to support the variable argument list with the ellipsis 2021-05-07 08:53:01 +00:00
44d2c067e1 fixed issues related to the new make_block, make_function instruction scheme 2021-05-06 17:44:58 +00:00
8430090d5d fixing bugs 2021-05-06 14:47:37 +00:00
15fdedcfae updating code to handle the new make_block, make_function scheme 2021-05-06 08:14:00 +00:00
c37b695a76 fixing bugs introduced for block temporaries sheme 2021-05-05 17:37:26 +00:00
bd3730fd12 changed the block temporaries scheme 2021-05-05 14:37:01 +00:00
f954199d38 changing the encoding scheme to store the block temporaries 2021-05-04 09:48:19 +00:00
c65c384d59 fixed a bug in prepare_new_context() and fork handling 2021-05-01 11:26:59 +00:00
999024e54b added hcl_compile_flag_t 2021-04-24 13:50:51 +00:00
38b7178f80 changed code for emit_indexed_variable_access() 2021-04-23 08:27:23 +00:00
3224989b99 try-catching working in the top-level now. implemented a way to secure space for top-level temporary variables 2021-04-23 07:17:40 +00:00
6c2e0df741 coding the compiler to handle an exception variable in the catch part 2021-04-22 09:35:26 +00:00
030a71c7cd trying to implement the exception variable in catch 2021-04-22 00:00:12 +00:00
4ff6fff433 fixed a flaw in collect_local_vardcl(). 2021-04-20 16:17:15 +00:00
2655d7f0b0 updated HCL_PROCESS_NAMED_INSTVARS 12 to 13 2021-04-20 13:45:22 +00:00
5aa6506106 simplified code a bit 2021-04-18 18:02:02 +00:00
cfa019a16d fixing code to implement exception handling 2021-04-14 16:20:18 +00:00
cb917ff44b working on try-catch implementation 2021-04-11 15:45:01 +00:00
5537e1850a reimplementing try-catch 2021-04-11 15:08:27 +00:00
08149767b5 improving function block and control block handling in the compiler code 2021-04-09 08:22:40 +00:00
8aa9ada771 committing broken interim code 2021-04-09 01:23:08 +00:00
042fbbb880 added a few string formatting functions 2021-03-30 05:37:00 +00:00
307bdee5cc added more code to implement simple exception handling 2021-03-02 15:58:13 +00:00
6631779768 added some code for throw 2021-02-28 17:00:28 +00:00
9409e8ec65 removed 'return' from where it's not needed 2021-02-28 06:43:22 +00:00
e61602082d added the try_catch instruction 2021-02-22 14:56:27 +00:00
05d7b73bdb enhancing the compiler to support (try ... catch ...) 2021-02-22 09:20:45 +00:00
13a24ee4bb trivial changes 2021-02-21 16:55:45 +00:00
378bae261a fixed some compiler bugs in processing weird if..elif..else expressions without body parts - (if true), (if false else), (if false elif true) 2021-02-18 15:48:44 +00:00
81c9b25cad fixed some process management code 2021-02-02 23:43:12 +00:00
770de52eba fixed a flaw in post_lambda() in the compiler code 2021-02-01 13:26:48 +00:00
2d22b53c96 fixed some compiler bugs 2021-02-01 13:20:46 +00:00
65c23a3ff5 removed unneeded code
uniformize the naming of locptr, dbgl to dbgi
2021-02-01 03:32:09 +00:00
7fc4262d01 made enhancement to show location information for the ECALL runtime error 2021-01-29 12:39:31 +00:00
525078fbe5 removed unneeded code 2021-01-29 09:41:39 +00:00
d19fab7e3f renamed hcl_read2() and hcl_compile2() to hcl_read() and hcl_compile() respectively 2021-01-29 08:40:10 +00:00
d4fbd0a298 removed hcl_read() and hcl_compile().
in the next commit(), hcl_read2() and hcl_compile2() will get renamed to hcl_read() and hcl_compile() respectively
2021-01-29 08:35:31 +00:00
d36c12e21a changing compiler code to preserve some debugging information 2021-01-27 08:47:08 +00:00
41de130fe4 enhanced the new compiler to produce working bytecodes for the #() list 2021-01-24 15:45:28 +00:00
58165aad49 updated lambda/return/return-from-home compiling code in the new compiler 2021-01-21 14:59:01 +00:00
16557a970c yet implementing the new compiler 2021-01-19 14:07:42 +00:00
e4ae7add8b coding a better compiler 2021-01-17 17:45:39 +00:00
b327791484 experimenting with the new reader 2021-01-15 09:12:28 +00:00
75ecff7aca removed unneeded code 2021-01-03 17:58:57 +00:00
6720640ed7 adding some work-in-progress code to store debugging information for generated byte codes 2021-01-03 13:51:23 +00:00
852543ee19 Added some incomplete code for process-switching 2020-10-15 12:57:05 +00:00
b9f78f7c13 working on return-from-home for non-local return 2020-10-10 17:36:33 +00:00
a69434a96f enhancing the compiler and hcl_execute() for better interactive use 2020-10-08 09:25:54 +00:00
9d5e580387 fixing compiler bugs regarding MAKE_FUNCTION and literal frame rebasing 2020-10-07 08:06:49 +00:00
0ffb5b239d debugging the compiler 2020-10-06 09:40:39 +00:00
dcae55ab70 fixing more bugs.. 2020-10-05 14:49:54 +00:00
e30cbc844c writing code for function activation using function-local literal frame 2020-10-05 09:37:26 +00:00
2b786018d7 changing vm implementation a bit. this commit is buggy 2020-10-04 18:21:05 +00:00
c7e87698d0 still experimenting to find a good way to represent byte codes and literal frames in the interactive mode 2020-09-28 15:44:04 +00:00
b9ae46afff adding experimental changes for compiler enhancement 2020-09-24 08:24:47 +00:00
b8fd5c6712 experiments... 2020-09-22 09:19:53 +00:00
e6be071a54 adding some experimental code 2020-09-19 11:55:58 +00:00
2aaff1b317 added 2 lines of comments 2018-08-08 03:47:12 +00:00
d7f2458ed0 removed unremoved code in the previous commit 2018-08-08 03:44:11 +00:00
9a186711e4 dropped cli-mode code. it turned out to be not effective 2018-08-08 03:41:17 +00:00
f87ebd527e Added a work file 2018-08-07 16:05:41 +00:00
28cc69ea21 wrote more compiler mode to handle input in the cli mode 2018-08-07 11:04:38 +00:00
fe28d23307 added more experimental code for the cli mode 2018-08-06 10:41:38 +00:00
25243fc7af added experimental code to execute an external command 2018-08-02 17:09:32 +00:00
deb53399a4 introduced the new type hcl_bitmask_t 2018-04-26 04:39:20 +00:00