Commit Graph

2809 Commits

Author SHA1 Message Date
Torsten Rüger 0342df41c7 introduce goto instead of using machines jump
fix labels so compiler does not return duplicates
2020-02-13 11:59:00 +07:00
Torsten Rüger 0e3a8bb859 cleaning, docs 2020-02-12 15:41:16 +07:00
Torsten Rüger 3c762c4fe7 Rename SlotDefinition to Slot
And the derived XXDefinitions to XXSlot

Just to be more consistent
And possibly free the Definition for the Language side
2020-02-11 16:19:52 +07:00
Torsten Rüger ec8794191d update parser
remove pesty warnings
2020-02-11 16:04:19 +07:00
Torsten Rüger 31c8a0aac5 refactored the SlotLoad into SlotDefs
That sort of removes the last horrible code.
Surely can still be improved, but mostly oo now
2020-02-11 16:03:51 +07:00
Torsten Rüger 8d02d82ff2 now object slot , almost done 2020-02-10 19:28:48 +07:00
Torsten Rüger 1da5cd16c3 more splitting of slot code
now constants, still wip
2020-02-10 19:07:12 +07:00
Torsten Rüger 24d7fe25da first steps to defining specialised slot classes
getting rid of the mess in SlotDefinition (wip)
2020-02-10 18:36:21 +07:00
Torsten Rüger df4fd409c1 getting back into it 2020-02-09 21:33:34 +07:00
Torsten Rüger 5b27ae7ddf use env, not class var aas compilation switch 2020-02-08 17:44:35 +07:00
Torsten Rüger 6d950086e7 improve texts 2020-02-07 16:14:20 +07:00
Torsten Rüger b7902e6953 remove checks 2019-12-07 11:50:25 +02:00
Torsten Rüger 61b6496029 misc 2019-12-01 12:17:54 +02:00
Torsten Rüger 308670b90c Start to transform SL into SM 2019-10-07 20:14:40 +03:00
Torsten Rüger 8cac5c064d Start nexr level p i SlotLanguage, calling it MacroMaker
Since we already have Macros. Macros are nothing more than a list of SlotMachine Instructions. This is what we are aiming to create (which is also what is created in Sol .to_slot)

So the idea came to slot the MacroMaker in there after its done
2019-10-06 19:49:53 +03:00
Torsten Rüger cbbb0c2f07 More on slot assignment
which turn into slot_load
2019-10-05 19:37:24 +03:00
Torsten Rüger 2c7944af85 if and goto for slot_language 2019-10-05 14:49:45 +03:00
Torsten Rüger 9885841eb4 SlotLanguageExploration 2019-10-04 21:06:22 +03:00
Torsten Rüger 901f7b0132 Mini start to the new SlotLanguage 2019-10-04 17:38:51 +03:00
Torsten Rüger d1f8733623 Rename Vool to Sol
Simple is really the descriptive name for the layer
Sure, it is "virtual" but that is not as important as the fact that it is simple (or simplified)
Also objct (based really) is better, since orientated implies it is a little like that, but only orientated, not really it. Sol only has objects, nothing else
Just cause i was renaming anyway
2019-10-04 00:38:47 +03:00
Torsten Rüger aa9fc8bc81 More rename cleanp 2019-10-03 21:07:55 +03:00
Torsten Rüger c43436f35a Change Mom to SlotMachine
rather large commit, but essentially a simple rename
Rationale in docs and blogs
2019-10-03 20:55:41 +03:00
Torsten Rüger fd8a3e9cc5 some cc driven cleanup
bit anoying that the builtin engine is used
Even it is not as well configurable as preferred reek.
Still, found one minor bug
2019-10-02 17:54:42 +03:00
Torsten Rüger 48e18ac9cd the superclass of a singleton class is the singleton class of the superclass
And i have tests to prove it!
That just rolls of the tongue, it had to be the commit message
2019-10-01 20:55:05 +03:00
Torsten Rüger 2dcb2a9a72 Introduce singleton types
Just for future, as this gives us a way to know immediately in the type, which represent normal, and which singleton classes
Also instantiate singleton class lazily (with singleton type)
This makes the type of class single, ie unique, immediately when it is used, ie methods or variables defined.
Fixes a design mistake, where all singletonn classes shared the same type, and thus unique methods per class were impossible
(Also some misc in commit)
2019-10-01 19:42:16 +03:00
Torsten Rüger ba83affd8c fix resolve issue
the typed method has to be created in the to_pafait pass for it to work correctly, ie for the sends to have something to call

also means that when during compilation creating (raising?) a  method, not only vool. but also callable has to be created
2019-09-29 22:37:28 +03:00
Torsten Rüger 17f87f7464 Starting to fix resolve mechanism
resolve had the wrong approach, sort of class based oo
It took methods from "derived" types and just used them
To be correct, those methods would have to be recompiled for the current type, rubyx is type, not class based.
Started on that, still soe strange hang though

Later, type and method analysis may reveal "compatible" types (down only off course) where one could use the exact same code, but that is phase 2
2019-09-29 12:06:37 +03:00
Torsten Rüger 1e5073200c Remove separate block_compiler lists
both in mom and risc method complers
alll just compilers now, all linked
Required to move some code down into callable_compiler but all in all quite little. cleaner
2019-09-28 17:24:10 +03:00
Torsten Rüger dcbc3e17be refactor risc_collection
move code that operates on compiler to the compiler class
this leaves the collection thin, very thin indeed
2019-09-28 15:37:02 +03:00
Torsten Rüger 9f81d78767 Also make risc compilers a linked lists
also via util::compiler_ist
leave collection as much in place as possible
(though collections and seperate block_compilers are about to go)
2019-09-28 15:08:08 +03:00
Torsten Rüger 2eb9364283 make mom:method_compiler a list
Compilers forms alist by Util::CompilerList
Change Collection to use the list instead of array
2019-09-28 12:41:38 +03:00
Torsten Rüger aba42a6836 Simple compiler list module to make compilers a list 2019-09-28 09:38:34 +03:00
Torsten Rüger 701890f625 Fix bad test coverage
One typo, one debug test
Also stop producing those object files, use in memory io
2019-09-25 01:14:00 +03:00
Torsten Rüger 42ed70b50b fix reek config 2019-09-24 22:34:01 +03:00
Torsten Rüger 41eccb9382 Removing preloads from mains tests
Instead of loading all preload for all tests, adding just those functions that are needed for each. Should reduce test times.

Also renaming tests to give some indication of difficulty. Alas they are not run in that order.
2019-09-24 22:05:38 +03:00
Torsten Rüger 1022390e0f check for redefining of methods and forbid
causing some test problems, but better that way (until it's done right off course)
2019-09-24 21:20:12 +03:00
Torsten Rüger 3df54910cc rename singleton_class to single_class and misc
was clashing with real ruby method name
also many superclass mismatch fixes
some misc
2019-09-24 17:25:19 +03:00
Torsten Rüger dd810cfc49 Make to_mom a 2 stage process
First baby baby step on the way to passes
Create all parfait objects in first pass, so methods exist to be resolved in second path
2019-09-24 15:44:33 +03:00
Torsten Rüger 3510637d21 Merge remote-tracking branch 'origin/master' 2019-09-24 13:00:22 +03:00
Torsten Rüger 7b9097a0b1 Fix word offset
which had weirdly been 1 off
(not weird that it was off, index bugs are common, but weird that the tests passed anyway)
2019-09-24 12:59:22 +03:00
Torsten Rüger a446d3da6b rename meta to singleton class
seems more appropriate, as it is the class for a single object
Also seems to be called that on the net (don't remember where the meta came from, but it's gone)
2019-09-24 12:59:22 +03:00
Torsten Rüger 66728f09f4 Fix meta_class, sis class instance variables and class methods
after some serious recursive thinking it now actually makes sense.
The key was to change the actual type of the class that the meta_class manages
For objects it's (still) ok just to change the instance_type, but since the class object exists and has type, when adding instance variables, that actual type has to change
2019-09-24 12:59:22 +03:00
Torsten Rüger 915a1b5e90 Fix word offset
which had weirdly been 1 off
(not weird that it was off, index bugs are common, but weird that the tests passed anyway)
2019-09-24 12:58:31 +03:00
Torsten Rüger d901c6f27c rename meta to singleton class
seems more appropriate, as it is the class for a single object
Also seems to be called that on the net (don't remember where the meta came from, but it's gone)
2019-09-23 20:57:33 +03:00
Torsten Rüger 6993e337bf Fix meta_class, sis lass instance variables and class methods
after some serious recursive thinking it now actually makes sense
The key was to change the actual type of the class that the meta_class manages
For objects it's (still) ok just to change the instance_type, but since the class object exists and has type, when adding instance variables, that actual type has to change
2019-09-23 20:42:46 +03:00
Torsten Rüger 7b40bb9106 Fixing new parfait boot process
mostly about setting the types to existing objects. 
Then after space is in place, it is set automatically

also a fair bit of misc in the commit
2019-09-23 00:07:30 +03:00
Torsten Rüger e61c5d4a55 Simplify Parfait booting
Since some weeks, Parfait uses instance variables instead of generated attribute getters (that needed type)
This makes it possible to simplify the boot process, getting rid of separate boot Space and class versions.
It is still quite order dependent, but all "normal" ruby code, (less magic) so easier to understand.

Also moved all code that can never run at runtime into the adapter. This included Space and Object new, space as the space will only ever be created at compile time and object, since that is quite different at run-time (which is where i am working towards)
2019-09-22 19:10:47 +03:00
Torsten Rüger a496ea7e4b Derive Class and MetaClass from Behaviour
Finally! If i remember the module was from before i had any non Object superclasses
unified code, unified bugs :-) just makes sense
2019-09-21 18:50:33 +03:00
Torsten Rüger 3b7248df4e more class test and misc 2019-09-21 18:16:58 +03:00
Torsten Rüger 113ba8607c fix to_s (mostly) 2019-09-19 20:48:21 +03:00