Skip to content

Commit

Permalink
compiler.tree.propagation: throw the proper error in >fixnum methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Oct 5, 2012
1 parent de166e6 commit 6ccd545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions basis/compiler/tree/propagation/transforms/transforms.factor
Expand Up @@ -324,13 +324,13 @@ M\ set intersect [ intersect-quot ] 1 define-partial-eval
[ \ push def>> ] [ f ] if
] "custom-inlining" set-word-prop

: custom-inline-fixnum ( x -- y )
in-d>> first value-info class>> fixnum \ f class-or class<=
[ [ dup [ \ >fixnum no-method ] unless ] ] [ f ] if ;
: custom-inline-fixnum ( x method -- y )
[ in-d>> first value-info class>> fixnum \ f class-or class<= ] dip
'[ [ dup [ _ no-method ] unless ] ] [ f ] if ;

! Speeds up fasta benchmark
{ >fixnum integer>fixnum integer>fixnum-strict } [
[ custom-inline-fixnum ] "custom-inlining" set-word-prop
dup '[ _ custom-inline-fixnum ] "custom-inlining" set-word-prop
] each

! We want to constant-fold calls to heap-size, and recompile those
Expand Down

0 comments on commit 6ccd545

Please sign in to comment.