Commit Graph

2750 Commits

Author SHA1 Message Date
5b27ae7ddf use env, not class var aas compilation switch 2020-02-08 17:44:35 +07:00
6d950086e7 improve texts 2020-02-07 16:14:20 +07:00
b7902e6953 remove checks 2019-12-07 11:50:25 +02:00
61b6496029 misc 2019-12-01 12:17:54 +02:00
308670b90c Start to transform SL into SM 2019-10-07 20:14:40 +03:00
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
cbbb0c2f07 More on slot assignment
which turn into slot_load
2019-10-05 19:37:24 +03:00
2c7944af85 if and goto for slot_language 2019-10-05 14:49:45 +03:00
9885841eb4 SlotLanguageExploration 2019-10-04 21:06:22 +03:00
901f7b0132 Mini start to the new SlotLanguage 2019-10-04 17:38:51 +03:00
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
aa9fc8bc81 More rename cleanp 2019-10-03 21:07:55 +03:00
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
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
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
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
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
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
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
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
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
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
aba42a6836 Simple compiler list module to make compilers a list 2019-09-28 09:38:34 +03:00
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
42ed70b50b fix reek config 2019-09-24 22:34:01 +03:00
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
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
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
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
3510637d21 Merge remote-tracking branch 'origin/master' 2019-09-24 13:00:22 +03:00
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
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
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
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
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
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
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
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
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
3b7248df4e more class test and misc 2019-09-21 18:16:58 +03:00
113ba8607c fix to_s (mostly) 2019-09-19 20:48:21 +03:00
1e2c4d6678 More tests and compiling parfait object 2019-09-19 17:41:26 +03:00
fd46826b9c Implement class instance variables
as they are just the type of the meta_class, that was relatively simple.
I feel this is what oo is meant to be, instance variables and methods for the objects, and since classes are objects, for them too.
Class variables seem like a design mistake, weird scoping rules and no data hiding (left as an exercise to the reader)
2019-09-19 15:48:27 +03:00
b0d1948800 Moving space to object class
away from Parfait module, as that gets collapsed
Leaving shortcut outside parfait for now
2019-09-18 22:36:56 +03:00
41617519d9 some class send test changes
also ivar, which is still wip
2019-09-18 22:07:58 +03:00
38491d120b removed unused NamedList
args and locals got inlined into message, forgot to delete then
ripples out due to type creation
small type class api change, more ripples, but also more consistent
2019-09-18 22:07:05 +03:00
4b8ff52aa1 forgot to run bundle after removing reporter 2019-09-18 13:40:38 +03:00
f13e8b3bd7 A little work on test times
They have been rising of late, installer reporter to check 8and keep checking)
tweaking of cli parameters 
removed redundant interpreter tests
2019-09-18 13:36:29 +03:00
e56db0a3ac get method name out from method_missing 2019-09-17 20:18:00 +03:00
d58ed8e5e8 remove dead code that was produced 2019-09-17 16:08:49 +03:00