-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCFIB-TREC.j
67 lines (59 loc) · 1.17 KB
/
CFIB-TREC.j
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.class CFIB-TREC
.super Procedure
.field private static final t LLispObject;
.method static <clinit>()V
.limit locals 255
.limit stack 255
ldc_w "t"
invokestatic Symbol.intern(Ljava/lang/String;)LSymbol;
putstatic CFIB-TREC/t LLispObject;
return
.end method
.method public <init>()V
.limit stack 2
.limit locals 1
aload_0
ldc "CFIB-TREC"
invokenonvirtual Procedure.<init>(Ljava/lang/String;)V
return
.end method
.method public run([LLispObject;)LLispObject;
.limit stack 255
.limit locals 255
;; (lambda (n) ((nlambda calc-fib (n a b) (if (= n 0) a (calc-fib (- n 1) b (+ a b)))) n 0 1))
aload_1
ldc_w 0
aaload
astore 5
Lselftail:
;; ((nlambda calc-fib (n a b) (if (= n 0) a (calc-fib (- n 1) b (+ a b)))) n 0 1)
new FUN4
dup
invokenonvirtual FUN4.<init>()V
checkcast Procedure
; preparing args
ldc_w 3
anewarray LispObject
dup
ldc_w 0
aload 5
aastore
dup
ldc_w 1
new LispFixnum
dup
ldc2_w 0
invokenonvirtual LispFixnum.<init>(J)V
aastore
dup
ldc_w 2
new LispFixnum
dup
ldc2_w 1
invokenonvirtual LispFixnum.<init>(J)V
aastore
; end preparing args
invokevirtual Procedure.run([LLispObject;)LLispObject;
areturn
;; endlambda
.end method