8.10
3.7.3.7 Version 7 Test Suites
(require cpsc411/test-suite/public/v7) | |
package: cpsc411-lib |
procedure
(v7-public-test-suite pass-list interp-list) → test-suite? pass-list : (listof (-> any/c any/c)) interp-list : (listof (or/c #f (-> any/c any/c)))
The test suite for the v7 compiler passes.
Reuses all test suites from v6-public-test-suite where possible.
pass-list is expected to be a list of passes that compile from values-lang-v6? to x64, compatible with current-pass-list.
See v1-public-test-suite for details about the interpretation of pass-list and interp-list.
Convert an int64? in twos-complement into the equivalent tagged, ptr representation.
Examples:
> (i64->ptr 5) 40
> (i64->ptr (max-int 64)) 9223372036854775800
Convert an int32? in twos-complement into the equivalent tagged, ptr representation.
Examples:
> (i32->ptr 5) 40
> (i32->ptr (max-int 32)) 2147483640
Given a program p in some language between exprs-bits-lang-v7 and
and proc-imp-cmf-lang-v7, convert any integer to a ptr representation.
Examples:
> (replace-int64-exprs-to-ptr '(module 5)) '(module 40)
> (replace-int64-exprs-to-ptr '(module (if (= x 6) 5 6))) '(module (if (= x 48) 40 48))
Given a program p in some imperative language with jumps and explicit
return, convert any integer operand to a ptr representation.
This version explicitly avoids opands that manipulate the frame-base-pointer-register?, whose "integers" have a different interpretation.
Examples:
> (replace-int-opands-to-ptr '(module (begin (set! rax 5) (jump r15)))) '(module (begin (set! rax 40) (jump r15)))
> (replace-int-opands-to-ptr '(module (begin (set! rbp (+ rbp 8)) (set! rax 5) (jump r15)))) '(module (begin (set! rbp (+ rbp 8)) (set! rax 40) (jump r15)))