]> gitweb.factorcode.org Git - factor.git/blob - extra/benchmark/typecheck3/typecheck3.factor
Fixing everything for mandatory stack effects
[factor.git] / extra / benchmark / typecheck3 / typecheck3.factor
1 USING: math kernel kernel.private slots.private ;
2 IN: benchmark.typecheck3
3
4 TUPLE: hello n ;
5
6 : hello-n* ( obj -- val ) dup tag 2 eq? [ 3 slot ] [ 3 throw ] if ;
7
8 : foo ( obj -- obj n ) 0 100000000 [ over hello-n* + ] times ;
9
10 : typecheck-main ( -- ) 0 hello boa foo 2drop ;
11
12 MAIN: typecheck-main