Commit Graph

103 Commits

Author SHA1 Message Date
cd211f970f make method creation class methods in MethodCompiler
and pass the wish to use main explicitly, which is really a test
feature
2017-01-17 21:23:58 +02:00
5f7ea08a43 Splitting NameExpression into three, Known,Local,Argument
The decision which to use can be made higher up, in ruby, and so it
should.
2017-01-16 09:33:49 +02:00
bd78a2d555 renames Typed to Vm 2017-01-14 19:28:44 +02:00
9d36d72ee5 load arg type directly into the object
Was going through the method, but the type is just as constant and
saves 2 instructions 4 every call
2017-01-04 21:34:51 +02:00
1647b746ea starting to rename to rubyx 2017-01-02 00:29:20 +02:00
f0350601a7 Move the space instance to the parfait module
A better fit, maybe even a pattern for singletons
2016-12-30 14:10:49 +02:00
a00f6be3ba remove the space instance from register machine
bad design, probably from the booting
2016-12-30 14:04:59 +02:00
b5f04ec718 mostly renames from the type change
also making setters as explicit set_xx methods
2016-12-29 18:45:32 +02:00
e551732f18 tighter integration with factory methods for adding code
define methods to collapse the code Register.
in add_code Register.factory_method
most instructions done, except op and branch that are rare
2016-12-28 20:37:54 +02:00
9cf56b3aa6 use factory functions consistently to create instructions 2016-12-28 19:01:58 +02:00
4cf732d395 use transfer factory 2016-12-28 18:37:15 +02:00
57c038f13b use load_constant factory method 2016-12-28 18:31:29 +02:00
4412eda105 small refactor and rename 2016-12-28 18:16:39 +02:00
903fc3e4cf much ripples from changing the calling convention
See previous commit
Now args and locals are arrays in the Message
2016-12-27 20:39:39 +02:00
aaa94f0743 small fixes 2016-12-27 20:34:11 +02:00
a5946cb644 same renames for bytes (set/get_byte) 2016-12-25 18:11:58 +02:00
f648bf7bd5 rename also get_slot, to slot_to_reg
makes source and target clear
2016-12-25 18:05:39 +02:00
35adf9a5e6 rename set_slot
set_slot was clear about the target, but not the source.
Better with reg_to_slot (and soon it’s inverse slot_to_reg)
2016-12-25 18:02:39 +02:00
c3c52d36b8 seperate args from message (just like frame) 2016-12-21 22:35:36 +02:00
756cb52a98 renames compiler to method_compiler 2016-12-18 14:15:19 +02:00
dc56274940 refactor also building word
obviously created by copy/paste, more refactoring possible
2016-12-15 19:31:39 +02:00
5ea6bfed27 refactor builtin object, some machine too 2016-12-15 19:20:54 +02:00
b3a9d8b1bc register and boot consequences of typed method 2016-12-14 13:23:46 +02:00
17023fdeb1 rename method to typed_method 2016-12-12 23:38:55 +02:00
f3248462cc remove references to soml 2016-12-11 12:55:03 +02:00
224670e449 refactor name expression for compiler 2016-12-09 12:13:33 +02:00
ca4bdcc528 gets rid of soml-parser completely 2016-12-08 20:13:08 +02:00
da553f996f move compiler to typed
starting to get rid of soml, bit by bit
2016-12-08 15:25:20 +02:00
4b05b48197 some docs 2016-12-06 11:38:09 +02:00
229f5896c6 update to use new ast
soml was updated to have a typed ast layer to make programatic creation
easier
this brings LOTS of syntax change with it, that does not really mean
anything at all
All tests pass again so back to the same
2016-03-07 11:55:28 +02:00
dc560aaa5e move main to space 2015-11-30 16:09:12 +02:00
d0b655d05f implement the div10 as assembler
easy after the some version worked
because it’s not arm it probably twice as long as need be
better (any?) optimisation would take care of that
still, nice to see it works
2015-11-21 14:20:25 +02:00
4871a52d37 better error reporting for parser 2015-11-19 10:10:13 +02:00
dffa3fbf42 adding word functions for byte access 2015-11-19 10:08:41 +02:00
5369dc3d52 rename get/set internal
to _word , because _byte versions are coming
2015-11-18 15:36:43 +02:00
303b7eb1f8 putstring unfolds length
which means sys call doesn’t need to
and also interpreter sometimes gets a symbol length
2015-11-16 18:03:29 +02:00
f50d7b57a4 fix the putstring sys call indexing
index 0 is the marker word , so like in some, all indexes 1 based
works :-)
2015-11-15 22:03:06 +02:00
4a8bb32039 serious bit fiddling, div10 using shift magic
forgot that arm has no division (or respectively only later models have)
many magic formulae out there, none seem to work 1000% on the
interpreter. some big 0 ending numbers are 1 off.
2015-11-13 20:46:27 +02:00
5c862111b9 remove div and add div10
general division is for another day, the 10 version is manageable
also same code produces mod10
wip
2015-11-12 20:03:57 +02:00
6137833140 change args argument to create method to be hash
was array and didn’t carry types and names
2015-11-11 20:41:02 +02:00
c38775e933 add set_internal
and the set_slot with register
very much like the get_slot for get_internal
2015-11-08 17:10:36 +02:00
f2c7ed827d simplify the __init
admittedly more source code, but half the runtime
mainly just using message (not new)
made possible by call sequence change
2015-11-07 21:58:19 +02:00
708cdace17 implement indexed object access
one of the few functions that can’t be coded
(or the design specifically is such that it can’t, in c it would be
self[index],
or, worse *(self + index) )
2015-11-07 17:36:28 +02:00
834266e11e improve label names a bit 2015-11-01 19:13:40 +02:00
7e24f63327 polish sources 2015-10-29 22:31:28 +02:00
191be8d2f6 use compiler to generate methods and their instructions 2015-10-28 21:37:42 +02:00
c245272e52 don't export current 2015-10-28 14:37:40 +02:00
ef6cb2a069 use instruction steam from message
had been attached there last week, but was still used mainly through
the source (which i’m trying to remove)
2015-10-28 14:33:38 +02:00
72b790c107 remove method source receiver
no harm done it seems
2015-10-28 14:24:14 +02:00
7e0778dc70 remove return_type
soon to be obsolete with multi returns
2015-10-28 12:19:10 +02:00