-
Notifications
You must be signed in to change notification settings - Fork 1
/
interp-Cvecof.rkt
42 lines (34 loc) · 1.01 KB
/
interp-Cvecof.rkt
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
#lang racket
(require "utilities.rkt")
(require "interp-Lvecof-proxy-closure.rkt")
(require "interp-Cvar.rkt")
(require "interp-Cif.rkt")
(require "interp-Cvec.rkt")
(require "interp-Cwhile.rkt")
(require "interp-Cfun.rkt")
(require "interp-Clambda.rkt")
(require "interp-Cwhile.rkt")
(provide interp-Cvecof interp-Cvecof-mixin interp-Cvecof-class)
(define (interp-Cvecof-mixin super-class)
(class super-class
(super-new)
(inherit interp-exp)
(define/override ((interp-stmt env) s)
(match s
[(Prim 'vectorof-set! (list e-vec i e-arg))
((interp-exp env) s)
env]
[else ((super interp-stmt env) s)]))
))
(define interp-Cvecof-class
(interp-Cvecof-mixin
(interp-Cwhile-mixin
(interp-Clambda-mixin
(interp-Cfun-mixin
(interp-Cvec-mixin
(interp-Cwhile-mixin
(interp-Cif-mixin
(interp-Cvar-mixin
interp-Lvecof-proxy-closure-class)))))))))
(define (interp-Cvecof p)
(send (new interp-Cvecof-class) interp-program p))