Commit Graph

2626 Commits

Author SHA1 Message Date
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
Torsten Rüger 1e2c4d6678 More tests and compiling parfait object 2019-09-19 17:41:26 +03:00
Torsten Rüger 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
Torsten Rüger 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
Torsten Rüger 41617519d9 some class send test changes
also ivar, which is still wip
2019-09-18 22:07:58 +03:00
Torsten Rüger 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
Torsten Rüger 4b8ff52aa1 forgot to run bundle after removing reporter 2019-09-18 13:40:38 +03:00
Torsten Rüger 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
Torsten Rüger e56db0a3ac get method name out from method_missing 2019-09-17 20:18:00 +03:00
Torsten Rüger d58ed8e5e8 remove dead code that was produced 2019-09-17 16:08:49 +03:00
Torsten Rüger 61819b7230 removing old brittle tests
that were replaced by instruction and macro tests
2019-09-17 14:28:19 +03:00
Torsten Rüger 92f1921e2f Last mom instruction test 2019-09-17 14:16:56 +03:00
Torsten Rüger f7f981dca4 Tests for return instructions 2019-09-17 13:52:20 +03:00
Torsten Rüger a256cf1e01 detailed method resolve test
revealing first bug  (non critical, dead code)
2019-09-17 10:18:45 +03:00
Torsten Rüger 830fe2ab2b More instruction tests 2019-09-17 10:16:59 +03:00
Torsten Rüger b46512a1b8 tests for mom check instructions 2019-09-15 19:57:15 +03:00
Torsten Rüger 5ab021de5a Continue testing mom instructions
especially with the custom asserts, gadda say
mesa lika disa
2019-09-15 18:31:10 +03:00
Torsten Rüger 6f108f67d7 Starting to build detailed mom to risc test
so we can get rid of brittle risc folder tests
All of those tests rely on many many implementation details
should just test result through interpreter, no chain.
2019-09-15 17:44:35 +03:00
Torsten Rüger d913bb01de use method missing in resolve method
not just exit
try to print name next
2019-09-15 15:13:11 +03:00
Torsten Rüger 7ee57f2b08 generalize get_main and get_init to get_method
to get at those know methods that really
__must__ exists, hence the bang, raise if don't
about to add method missing and raise to the list
2019-09-15 12:58:43 +03:00
Torsten Rüger b36ba42990 Test complied parfait tests
this makes it obvious that we need a working raise
and a correct method_missing, so we can diagnose the 
resulting errors
2019-09-15 12:18:31 +03:00
Torsten Rüger 56398e1127 Fix load order, travis obviously different
support files were loaded different locally than travis
probably time stamp, vs abc
Anyway, don't rely on dir order, make requires explicit
2019-09-13 22:06:18 +03:00
Torsten Rüger 1ee01622c3 Builtin is no more, final conversions done
All preloading where it needs to be
(some)tests for the preload
split compiler test
remembered binary tests (usually just run on travis)
2019-09-13 20:34:41 +03:00
Torsten Rüger 8af17a69ea splitting commpiler commands and adding preload option 2019-09-13 19:08:59 +03:00
Torsten Rüger 12b29285d7 Lots of preloading for tests
so many relied (implicitly( on some builtin function
after all can't do much in ruby without calling
Now all those dependencies are explicit
Small risc changes come because the macro version has a return label and unreachable label
2019-09-13 14:07:12 +03:00
Torsten Rüger c9d7539479 rework macro tests, or are they builtin
small fixes too
2019-09-13 10:42:20 +03:00
Torsten Rüger 4bf23defc8 fix many tests with preloading
preloading, something akin to builtin, loads some very small predefined (macro) methods for the tests to work (ie call)
2019-09-12 22:27:26 +03:00
Torsten Rüger e33b9f565d some renames before main fixes commences 2019-09-12 13:10:31 +03:00
Torsten Rüger dced6b12e6 removing builtin as a concept (wip)
the "old" way of generating compilers is now obsolete
we can use ruby code with mom macros to achieve the same
Three step wip
remove old builtin
fix tests (including adding necessary methods)
fixup and inclusion of builtin code to parfait
2019-09-12 13:09:30 +03:00
Torsten Rüger 616dd3487c renaming mom builtin to macro 2019-09-11 20:33:49 +03:00
Torsten Rüger 5ea91df4c1 Integer macros tests and defs 2019-09-11 19:23:56 +03:00
Torsten Rüger e8bfb9a58c tests for word macros 2019-09-11 18:53:20 +03:00
Torsten Rüger f264aec94a macro tests for all object mom instructions 2019-09-11 18:43:20 +03:00
Torsten Rüger 2c4f040654 starting to move builtin into parfait
single object method for now
little framework next
2019-09-10 20:40:41 +03:00