184 Commits

Author SHA1 Message Date
hyunghwan.chung
e08edffb0c renamed patch_long_forward_jump_instruction() to patch_forward_jump_instruction().
enhanced to change a forward jump to a backward jump if target ip is less than the instruction pointer
2019-08-02 09:32:19 +00:00
hyunghwan.chung
bd3fc07aaa got rid of short jump instructions(jump offset encoded in the last 2 bits of the instruction)
added jump_backward_if_false/true instruction and the like
2019-08-02 09:23:08 +00:00
hyunghwan.chung
3b6e59d98c more code to the compiler's goto handling functions 2019-08-01 16:05:04 +00:00
hyunghwan.chung
0fb20bfd40 writing a function to resolve jump labels for goto 2019-08-01 12:33:32 +00:00
hyunghwan.chung
5f4133e9fd wrote a few more lines in add_label() in comp.c 2019-07-31 08:53:44 +00:00
hyunghwan.chung
090a3cd6f7 changed clear_method_data() to free goto and label information 2019-07-30 15:39:33 +00:00
hyunghwan.chung
5ef1c3b989 slightly more code for goto handling 2019-07-28 15:37:01 +00:00
hyunghwan.chung
299faf4a87 some code for goto handling 2019-07-26 07:40:58 +00:00
hyunghwan.chung
bd1d30360e shortened elsif to elif.
enhanced is_reserved_word() to return a token type through a non-NULL second parameter
2019-07-26 04:40:33 +00:00
hyunghwan.chung
05837aef28 more goto-label handling code 2019-07-18 15:51:55 +00:00
hyunghwan.chung
6fddd95dce removed an unused variable 2019-07-17 17:05:54 +00:00
hyunghwan.chung
d3f1a435cb fixed a lexer bug than returned FPDECLIT where INTLIT was desired.
added more code to process jump labels
2019-07-17 17:04:27 +00:00
hyunghwan.chung
1c0b23fa97 started working on parsing labels 2019-07-17 09:52:26 +00:00
hyunghwan.chung
1533c42dbf removed code_start_loc from moo_method_data_t and added start_loc 2019-07-12 08:05:44 +00:00
hyunghwan.chung
8e5e5234cb simplified source line and source text representation of a methond in dbgi 2019-07-12 03:38:45 +00:00
hyunghwan.chung
d5475d79b6 added pf_method_get_ip_source_line() and defined CompiledMethod::ipSourceLine 2019-07-11 06:43:47 +00:00
hyunghwan.chung
4afe4b459d renamed clear_io_names() to moo_clearcionames().
attempting to write a fucntion that gives a source line for an instruction pointer
2019-07-10 15:30:08 +00:00
hyunghwan.chung
b3eb804f87 reorganized moo_duputobcstr(), moo_dupbtoucstr(), moo_dupbtouchars(), moo_duputobchars().
renamed add_io_name() to moo_addcioname().
changed input_handler in std.c to set arg->name when opening a file with moo_addcioname().
shortened dbginfo to dbgi.
enhanced the compiler to record the class location in dbgi
2019-07-10 09:19:38 +00:00
hyunghwan.chung
b4c6e6a9de added CompiledMethod>>sourceFile, CompiledMethod>>sourceLine.
added pf_method_get_source_file().
enhanced moo_addmethodtodbginfo().
enhanced the compiler to call moo_addfiletodbginfo(), moo_addmethodtodbginfo()
2019-07-09 15:56:34 +00:00
hyunghwan.chung
fba3c3213c attempting to store the source location information collected while compiling into the moo_dbginfo_t data structure 2019-07-07 15:24:27 +00:00
hyunghwan.chung
81a1785c35 changed the compiler to set source_file and source_line into moo_method_t 2019-07-06 09:44:29 +00:00
hyunghwan.chung
c334b0af28 added the code_start_loc field to moo_method_data_t and updated emit_byte_instruction()
to get distance of the instruction being emitted
2019-07-06 09:11:25 +00:00
hyunghwan.chung
3f6b0335d9 changed comp.c to pass source location to emit_XXX_instruction() functions 2019-07-04 10:04:59 +00:00
hyunghwan.chung
8e720e4bda changed to pass source location to more calls to emit_xxx_instruction() functions 2019-07-03 15:06:54 +00:00
hyunghwan.chung
67c9c18282 made partial changes to pass source location to emit_XXX_instruction() functions 2019-07-03 08:48:02 +00:00
hyunghwan.chung
a9045a56b2 changed the moo_code_t structure a little 2019-07-02 09:48:56 +00:00
hyunghwan.chung
92093dd23f added two more fields into CompiledMethod. no implementation change has been made yet 2019-06-29 10:46:28 +00:00
hyunghwan.chung
2d8277a046 enhanced the compiler to process byte array in string notation - B"..." 2019-06-27 14:16:43 +00:00
hyunghwan.chung
ea4d782c1d changed %(, %[, %{ to ##(, ##[, ##{ respectively
put back % into is_binselchar().
attempting to support a string-like byte array literal - B"XXXX"
2019-06-27 07:43:17 +00:00
hyunghwan.chung
fcb987891e no more ## comment. // as a signle-line comment starter. 2019-06-27 06:29:09 +00:00
hyunghwan.chung
2cbfdfd6dd added the _instsize field to moo_t.
changed moo_getxtn() to utilize this new field.
remove moo_getxtnstd() as it's not needed any more for the added field
2019-06-21 07:21:58 +00:00
hyunghwan.chung
102de55322 changed the block comment style the same as C 2019-06-19 12:38:09 +00:00
hyunghwan.chung
a4c13608ef fixed some inconsistency in moo_fmt_object_().
changed to handle a symbol with a c-style escape sequences enclosed in #""
2019-05-30 15:44:24 +00:00
hyunghwan.chung
a4d362953b minor spacing fix 2019-05-23 01:14:44 +00:00
hyunghwan.chung
fc6e24edad fixed a bug of variable initialzation skipped when a jump is made to fixed_point 2019-03-28 05:16:13 +00:00
hyunghwan.chung
1b45243b34 minor code touch-up only 2019-02-20 09:43:59 +00:00
hyunghwan.chung
313077f70f added moo_copyoochartosbuf()
changed string_to_fpdec to use sbuf
2019-02-20 09:08:10 +00:00
hyunghwan.chung
26dae2508d added a line of comment to get_numlit() 2019-02-19 05:05:47 +00:00
hyunghwan.chung
4301066c76 fixed a bug in string_to_fpdec().
supports the plus sign before a numeric literal
2019-02-19 05:02:37 +00:00
hyunghwan.chung
d384801eec added moo_fill_uchars()/moo_fill_bchars()
implemented the new fixed-point decimal prescale notation like 9p10.1 to indicate 10.100000000
2019-02-18 17:13:33 +00:00
hyunghwan.chung
c62a0ce3c5 changed some numeric primitives to support fpdec 2019-01-09 16:07:27 +00:00
hyunghwan.chung
29f7058ebf added MOO_IOTOK_FPDECLIT and some handling code 2019-01-09 09:55:27 +00:00
hyunghwan.chung
661f36c17c attempint to add fpdec parsing elements 2019-01-08 10:05:27 +00:00
hyunghwan.chung
25e2c070cf more use of MOO_STORE_OOP() 2018-12-31 16:47:54 +00:00
hyunghwan.chung
fc3a725bb8 renamed moo_pushtmp()/poptmp()/poptmps() to moo_pushvolat()/popvolat()/popvolats() 2018-12-28 08:29:27 +00:00
hyunghwan.chung
9a4bbcaa4c fixed wrong computation of buffer capacity for moo->inttostr.xbuf and moo->inttostr.t
updated some sample code
fixed a few flaws in ffi.c
2018-12-20 16:08:56 +00:00
hyunghwan.chung
fb7b226ea8 used more access macros 2018-12-19 16:57:16 +00:00
hyunghwan.chung
18aa5c37c0 changed quite some accesses to the slot field with macros. wip 2018-12-19 15:47:52 +00:00
hyunghwan.chung
07c11dc9da fixed a memory leak bug in pop_cunit() for interface 2018-11-13 10:08:58 +00:00
hyunghwan.chung
cee3d81210 changed spacing 2018-11-13 10:05:02 +00:00