From 2f15ac3c8f7504468d8b5d07c98931b20a41e9f6 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 19 Jun 2009 03:42:42 -0500 Subject: [PATCH] compiler.cfg.linear-scan: Fix a couple of bugs --- basis/compiler/cfg/linear-scan/allocation/allocation.factor | 2 +- .../cfg/linear-scan/allocation/spilling/spilling.factor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/compiler/cfg/linear-scan/allocation/allocation.factor b/basis/compiler/cfg/linear-scan/allocation/allocation.factor index 8e6479f938..868beee160 100644 --- a/basis/compiler/cfg/linear-scan/allocation/allocation.factor +++ b/basis/compiler/cfg/linear-scan/allocation/allocation.factor @@ -41,7 +41,7 @@ IN: compiler.cfg.linear-scan.allocation 2tri 3array assoc-combine >alist sort-values ; -: no-free-registers? ( new result -- ? ) +: no-free-registers? ( result -- ? ) second 0 = ; inline : register-available? ( new result -- ? ) diff --git a/basis/compiler/cfg/linear-scan/allocation/spilling/spilling.factor b/basis/compiler/cfg/linear-scan/allocation/spilling/spilling.factor index 5ed7e0f0d1..caef971ab9 100644 --- a/basis/compiler/cfg/linear-scan/allocation/spilling/spilling.factor +++ b/basis/compiler/cfg/linear-scan/allocation/spilling/spilling.factor @@ -39,7 +39,7 @@ IN: compiler.cfg.linear-scan.allocation.spilling #! with the most distant use location. Spill the existing #! interval, then process the new interval and the tail end #! of the existing interval again. - [ reg>> >>reg drop ] + [ reg>> >>reg add-active ] [ [ add-handled ] [ delete-active ] bi* ] [ split-and-spill [ add-handled ] [ add-unhandled ] bi* ] 2tri ;