From c0f4d073dfb1136005d9c16bf4b60a6d1e176c72 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 5 Nov 2005 01:19:15 +0000 Subject: [PATCH] fix 1.0 1+ compiler bug --- CHANGES.html | 27 +++++++++++++++++++++++---- TODO.FACTOR.txt | 3 +-- library/bootstrap/init.factor | 1 - library/compiler/assembler.factor | 12 ++---------- library/compiler/ppc/stack.factor | 2 +- library/compiler/relocate.factor | 2 +- library/compiler/x86/stack.factor | 2 +- 7 files changed, 29 insertions(+), 20 deletions(-) diff --git a/CHANGES.html b/CHANGES.html index 8de15bc72a..3e212f0a04 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -8,7 +8,21 @@ @@ -49,6 +65,8 @@ sequences which have the same elements as the two input sequences, with the comm prefix removed. + +
  • Everything else:
  • diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index b09b9a4707..8999d1ce63 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,9 +1,8 @@ 0.79: -- update handbook - fix remaining GL issues +- UI issue: try resizing slider while menu is open - 3/2 { 1 2 3 } nth -> fep -- 1.0 1+ -> 1.0 1.0 1- -> 1.0 + ui: diff --git a/library/bootstrap/init.factor b/library/bootstrap/init.factor index c780c73b4d..338ce5be6f 100644 --- a/library/bootstrap/init.factor +++ b/library/bootstrap/init.factor @@ -11,7 +11,6 @@ parser threads words ; init-threads init-io "HOME" os-env [ "." ] unless* "~" set - init-assembler init-error-handler default-cli-args parse-command-line diff --git a/library/compiler/assembler.factor b/library/compiler/assembler.factor index a7a8bddc21..83672aa663 100644 --- a/library/compiler/assembler.factor +++ b/library/compiler/assembler.factor @@ -1,10 +1,8 @@ ! Copyright (C) 2004, 2005 Slava Pestov. ! See http://factor.sf.net/license.txt for BSD license. IN: assembler -USING: alien compiler-backend math memory kernel hashtables -namespaces ; - -SYMBOL: interned-literals +USING: alien compiler-backend generic hashtables kernel lists +math memory namespaces ; : compiled-header HEX: 01c3babe ; inline @@ -25,9 +23,6 @@ SYMBOL: interned-literals literal-top set-compiled-cell literal-top dup cell + set-literal-top ; -: intern-literal ( obj -- lit# ) - interned-literals get [ add-literal ] cache ; - : compile-byte ( n -- ) compiled-offset set-compiled-byte compiled-offset 1+ set-compiled-offset ; inline @@ -41,7 +36,4 @@ SYMBOL: interned-literals compiled-offset 0 compile-cell compiled-offset 0 compile-cell ; -: init-assembler ( -- ) - H{ } clone interned-literals global set-hash ; - : w>h/h dup -16 shift HEX: ffff bitand >r HEX: ffff bitand r> ; diff --git a/library/compiler/ppc/stack.factor b/library/compiler/ppc/stack.factor index 0bf5c2fdac..752ec59f53 100644 --- a/library/compiler/ppc/stack.factor +++ b/library/compiler/ppc/stack.factor @@ -12,7 +12,7 @@ M: %immediate generate-node ( vop -- ) dup 0 vop-in address swap 0 vop-out v>operand LOAD ; : load-indirect ( dest literal -- ) - intern-literal over LOAD32 0 1 rel-address dup 0 LWZ ; + add-literal over LOAD32 0 1 rel-address dup 0 LWZ ; M: %indirect generate-node ( vop -- ) dup 0 vop-out v>operand swap 0 vop-in load-indirect ; diff --git a/library/compiler/relocate.factor b/library/compiler/relocate.factor index a9767f1108..88512819c2 100644 --- a/library/compiler/relocate.factor +++ b/library/compiler/relocate.factor @@ -19,7 +19,7 @@ SYMBOL: relocation-table 0 rel-type, relocating word-primitive rel, ; : rel-dlsym ( name dll rel/abs 16/16 -- ) - 1 rel-type, relocating cons intern-literal rel, ; + 1 rel-type, relocating cons add-literal rel, ; : rel-address ( rel/abs 16/16 -- ) #! Relocate address just compiled. diff --git a/library/compiler/x86/stack.factor b/library/compiler/x86/stack.factor index 989c7e49e4..f778c4f28a 100644 --- a/library/compiler/x86/stack.factor +++ b/library/compiler/x86/stack.factor @@ -27,7 +27,7 @@ M: %immediate generate-node ( vop -- ) dup 0 vop-out v>operand swap 0 vop-in address MOV ; : load-indirect ( dest literal -- ) - intern-literal unit MOV 0 0 rel-address ; + add-literal unit MOV 0 0 rel-address ; M: %indirect generate-node ( vop -- ) #! indirect load of a literal through a table