Fixing another bug in the method inlining improvement

db4
Daniel Ehrenberg 2010-04-19 16:57:17 -05:00
parent 416707f327
commit 3ed4a82475
2 changed files with 13 additions and 8 deletions

View File

@ -61,16 +61,19 @@ M: callable splicing-nodes splicing-body ;
[ nip t ] [ 2drop f f ] if
] if ;
:: find-method-call ( class generic -- subclass/f ? )
object generic method-classes
[| last-class new-class |
class new-class classes-intersect? [
new-class class class< [
last-class new-class class-min
] [ object f ] if
] [ last-class t ] if
] all? ;
:: split-method-call ( class generic -- quot/f )
class object = [ f ] [
object generic method-classes
[| last-class new-class |
class new-class classes-intersect? [
new-class class class<= [
last-class new-class class-min
] [ object f ] if
] [ last-class t ] if
] all?
class generic find-method-call
[ generic split-code ] [ drop f ] if
] if ;

View File

@ -997,3 +997,5 @@ UNION: ?fixnum fixnum POSTPONE: f ;
[ t ] [ [ { ?fixnum } declare >fixnum ] { >fixnum } inlined? ] unit-test
[ f ] [ [ { integer } declare >fixnum ] { >fixnum } inlined? ] unit-test
[ f ] [ [ { word } declare parent-word ] { parent-word } inlined? ] unit-test