Commit Graph

38 Commits (0dbbc6bbe581f1af042a140d7abba6f2e6163c10)

Author SHA1 Message Date
Slava Pestov c4ef640f4d Big VM cleanup
- Move forward declarations of 'struct factor_vm' to one place
- Rename template parameters from T and TYPE to descriptive names. New convention: CamelCase for template parameters
- Change some higher-order functions taking function pointers into templates, and define classes overriding operator(). There's a bit of new boilerplate here but its more consistent than the old mish-mash approaches
- Put GC state into a gc_state struct
- Use exceptions instead of longjmp for non-local control transfer in GC
- In code GC, instead of interleaving code block tracing with copying, add code blocks which need to be revisited to an std::set stored in the gc_state
2009-10-03 08:47:05 -05:00
Slava Pestov 2c136d6536 Merge branch 'reentrantvm' of git://github.com/phildawes/factor 2009-10-02 03:28:21 -05:00
Slava Pestov 913408c2a3 vm: fix stack alignment in primitive_inline_cache_miss 2009-10-02 03:25:18 -05:00
Phil Dawes b6718641dc Converted some callback fns to use member-fn pointers 2009-09-28 19:45:10 +01:00
Slava Pestov f81c8549f4 Make segment, context, data_heap, zone more object-oriented, and fix crash when calling undefined symbols 2009-09-25 21:17:20 -05:00
Slava Pestov c046ff4b23 vm: make heap data-type object-oriented 2009-09-25 20:32:00 -05:00
Phil Dawes 83b0769eef renamed factorvm to factor_vm 2009-09-24 08:16:52 +01:00
Phil Dawes 46bab62689 misc cleanup 2009-09-24 08:02:14 +01:00
Phil Dawes d25fe552ab removed superflous whitspace lines 2009-09-24 08:02:14 +01:00
Phil Dawes e05f91f3a8 cleaning up stray vm singleton usage 2009-09-16 08:17:27 +01:00
Phil Dawes a4a4439fc5 got debug compiles working again 2009-09-16 08:16:32 +01:00
Phil Dawes a5f24c8fb9 added VM relocation type 2009-09-16 08:16:30 +01:00
Phil Dawes 959da30f05 removed global functions from code_block.cpp 2009-09-16 08:16:27 +01:00
Phil Dawes d5da6a3d58 Dev checkpoint 2009-09-16 08:16:25 +01:00
Phil Dawes baaf71eddc Dev checkpoint 2009-09-16 08:16:25 +01:00
Phil Dawes 93c665c653 Dev checkpoint 2009-09-16 08:16:25 +01:00
Phil Dawes 8fa607e9a9 Dev checkpoint 2009-09-16 08:16:25 +01:00
Phil Dawes a2f14b5a6d added vm member to gc_root and growable arrays 2009-09-16 08:16:22 +01:00
Phil Dawes 0097e76a82 moved code_block functions to vm 2009-09-16 08:16:20 +01:00
Philipp Brüschweiler 230061783a misc small documentation fixes, some fixes for factor.vim, changed permissions of vm/* to 644 2009-08-10 21:33:07 +02:00
Slava Pestov b389dcf441 Redo compiler.codegen.fixup and get %dispatch to work 2009-06-01 02:32:36 -05:00
Slava Pestov fc152ef210 Various improvements aimed at getting local optimization regressions fixed:
- Rename _gc to ##gc
- Absolute labels are now supported
- Generate _dispatch-label
2009-05-31 23:28:08 -05:00
Slava Pestov 6e08e29a3a Remove compiled slot from quotations since its not needed 2009-05-12 03:09:15 -05:00
Slava Pestov 3bf8134476 VM cleanup: replace some #defines with constants and inline functions 2009-05-08 15:05:55 -05:00
Slava Pestov 3591f6c684 Count megamorphic cache hits 2009-05-07 14:26:08 -05:00
Slava Pestov 581d017b46 Working on inline caching for tail call sites 2009-05-06 19:22:22 -05:00
Slava Pestov a961e17ef1 Add new RC_ABSOLUTE_PPC_2 relocation type 2009-05-05 20:56:23 -05:00
Slava Pestov 3295c54bff Remove debug messages from VM 2009-05-05 14:27:22 -05:00
Slava Pestov 53db9d737a Change (void) to () 2009-05-05 11:33:35 -05:00
Slava Pestov 786b9096e2 Store forwarding table off to the side instead of in the code block; saves one cell per code block 2009-05-05 11:07:20 -05:00
Slava Pestov 0682c3da39 Some VM fixes 2009-05-04 15:11:31 -05:00
Slava Pestov af5a7b537e Attempt to fix gcc 4.5.0 compile error 2009-05-04 07:11:00 -05:00
Slava Pestov 2bfde0250e Fixing some build issues on Linux with GCC 4.3 2009-05-04 08:00:06 -04:00
Slava Pestov 8872c40b1e The great type renaming 2009-05-04 04:50:24 -05:00
Slava Pestov edecac508e Use C++ namespaces 2009-05-04 01:46:13 -05:00
Slava Pestov 8e17e0a01e VM: use better abstractions for tagged pointers, eliminate get()/set() stuff, clean up array, string, and byte-array element access 2009-05-04 01:00:30 -05:00
Slava Pestov e3592ca8f6 Clean up untag_* and tag_* inline functions in favor of more idiomatic C++ 2009-05-02 20:47:29 -05:00
Slava Pestov b923d548cf Move vmpp to vm 2009-05-02 20:37:18 -05:00