: cfgs. ( cfgs -- )
[ nl ] [ cfg. ] interleave ;
-: ssa. ( quot -- ) test-ssa cfgs. ;
-: flat. ( quot -- ) test-flat cfgs. ;
-: regs. ( quot -- ) test-regs cfgs. ;
+: ssa. ( quot/word -- ) test-ssa cfgs. ;
+: flat. ( quot/word -- ) test-flat cfgs. ;
+: regs. ( quot/word -- ) test-regs cfgs. ;
! Prettyprinting
: pprint-loc ( loc word -- ) <block pprint-word n>> pprint* block> ;
IN: compiler.cfg.linear-scan.resolve
TUPLE: location
-{ reg read-only }
-{ rep read-only }
-{ reg-class read-only } ;
+ { reg read-only }
+ { rep read-only }
+ { reg-class read-only } ;
: <location> ( reg rep -- location )
dup reg-class-of location boa ;
IN: compiler.cfg.stack-frame
TUPLE: stack-frame
-{ params integer }
-{ allot-area-size integer }
-{ allot-area-align integer }
-{ spill-area-size integer }
-{ spill-area-align integer }
-{ total-size integer }
-{ allot-area-base integer }
-{ spill-area-base integer } ;
+ { params integer }
+ { allot-area-size integer }
+ { allot-area-align integer }
+ { spill-area-size integer }
+ { spill-area-align integer }
+ { total-size integer }
+ { allot-area-base integer }
+ { spill-area-base integer } ;
: (stack-frame-size) ( stack-frame -- n )
[ spill-area-base>> ] [ spill-area-size>> ] bi + ;
: segment-start-offset ( -- n ) 0 bootstrap-cells ; inline
: segment-end-offset ( -- n ) 2 bootstrap-cells ; inline
-! Offsets in vm struct
-: vm-context-offset ( -- n ) 0 bootstrap-cells ; inline
-: vm-spare-context-offset ( -- n ) 1 bootstrap-cells ; inline
-: vm-signal-handler-addr-offset ( -- n ) 8 bootstrap-cells ; inline
-: vm-fault-flag-offset ( -- n ) 9 bootstrap-cells ; inline
+! Offsets in vm struct. Should be kept in sync with:
+! vm/vm.hpp
+: vm-context-offset ( -- n )
+ 0 bootstrap-cells ; inline
+: vm-spare-context-offset ( -- n )
+ 1 bootstrap-cells ; inline
+: vm-signal-handler-addr-offset ( -- n )
+ 8 bootstrap-cells ; inline
+: vm-fault-flag-offset ( -- n )
+ 9 bootstrap-cells ; inline
: vm-special-object-offset ( n -- offset )
bootstrap-cells 10 bootstrap-cells + ;
{ end cell_t }
{ size cell_t } ;
+! dispatch-statistics should be kept in sync with:
+! vm/dispatch.hpp
+STRUCT: dispatch-statistics
+ { megamorphic-cache-hits cell_t }
+ { megamorphic-cache-misses cell_t }
+
+ { cold-call-to-ic-transitions cell_t }
+ { ic-to-pic-transitions cell_t }
+ { pic-to-mega-transitions cell_t }
+
+ { pic-tag-count cell_t }
+ { pic-tuple-count cell_t } ;
+
STRUCT: vm
{ ctx context* }
{ spare-ctx context* }
{ compaction-time cell_t }
{ temp-time ulonglong } ;
-! dispatch-statistics should be kept in sync with:
-! vm/dispatch.hpp
-STRUCT: dispatch-statistics
-{ megamorphic-cache-hits cell_t }
-{ megamorphic-cache-misses cell_t }
-
-{ cold-call-to-ic-transitions cell_t }
-{ ic-to-pic-transitions cell_t }
-{ pic-to-mega-transitions cell_t }
-
-{ pic-tag-count cell_t }
-{ pic-tuple-count cell_t } ;
-
! gc-info should be kept in sync with:
! vm/gc_info.hpp
STRUCT: gc-info