Ignore more code that has no types.

This commit is contained in:
Vincent St-Amour 2015-10-13 15:31:31 -05:00
parent 6245807b7c
commit 4aed44370d
4 changed files with 15 additions and 2 deletions

View File

@ -6,7 +6,7 @@
"utils.rkt"
syntax/parse syntax/stx racket/match racket/set
(typecheck signatures tc-app-helper tc-funapp tc-metafunctions)
(types abbrev utils substitute subtype)
(types abbrev utils substitute subtype type-table)
(rep type-rep)
(utils tc-utils)
(r:infer infer)
@ -35,6 +35,7 @@
;; If #t, then the contract system has inserted an extra argument which we
;; need to ignore
#:attr boundary-ctc? (contract-neg-party-property #'fn)
#:do [(for-each register-ignored! (syntax->list #'form))] ; no type info, so can't optimize
#:with pos-args (if (attribute boundary-ctc?)
(stx-cdr #'*pos-args)
#'*pos-args)

View File

@ -7,7 +7,7 @@
syntax/stx
racket/sequence
(typecheck signatures tc-funapp)
(types abbrev utils)
(types abbrev type-table utils)
(private type-annotation)
(rep type-rep filter-rep)
(utils tc-utils)
@ -26,6 +26,7 @@
;; parameterize
(pattern (extend-parameterization pmz (~seq params args) ...)
(begin
(register-ignored! #'pmz)
(for ([param (in-syntax #'(params ...))]
[arg (in-syntax #'(args ...))])
(match (single-value param)

View File

@ -117,6 +117,7 @@
;; definitions lifted from contracts should be ignored
[(define-values (lifted) expr)
#:when (contract-lifted-property #'expr)
#:do [(register-ignored! #'expr)]
(list)]
;; register types of variables defined by define-values/invoke-unit forms
@ -177,6 +178,7 @@
;; definitions lifted from contracts should be ignored
[(define-values (lifted) expr)
#:when (contract-lifted-property #'expr)
#:do [(register-ignored! #'expr)]
(list)]
[(define-values (var ...) expr)
@ -235,6 +237,7 @@
[expected-type (in-list (map cdr (signature->bindings import-sig)))])
(define lexical-type (lookup-type/lexical member))
(check-below lexical-type expected-type)))
(register-ignored! #'dviu)
'no-type]
;; these forms we have been instructed to ignore
[stx:ignore^
@ -256,6 +259,7 @@
;; definitions lifted from contracts should be ignored
[(define-values (lifted) expr)
#:when (contract-lifted-property #'expr)
#:do [(register-ignored! #'expr)]
'no-type]
;; definitions just need to typecheck their bodies

View File

@ -10,3 +10,10 @@
(define (slicef-at [force? #f])
#f)
;; Similar issue, with static call sites for keyword argument functions.
(define (validate-txexpr-element #:context [txexpr-context #f])
#f)
(define (validate-txexpr x)
(validate-txexpr-element #:context x))