This reverts commit 005b3f720f.
The expander's definition of "same context" is not flexible
enough, and introducing an extra `#%expression` wrapper
breaks TR's recognition of expanded classes. Revisit in the
near future.
The optimizer had some reductions of predicates applications, like (pair? X),
only when X was very simple and the type of X was obvious.
Use expr_implies_predicate and make_discarding_sequence to allow
the reduction of more complex expressions.
Also, the reduction of procedure? and fixnum? were special cases in
optimize_application2. Move the checks to expr_implies_predicate
to take advantage of the reductions in more general cases.
I found I wanted this to make a define/stub macro that errors giving the defined identifier:
(define-syntax (define/stub stx)
(syntax-case stx ()
[(_ header)
(let-values ([(id mk-rhs body) (normalize-definition/mk-rhs stx #'lambda #t #t #f)])
#`(define #,id #,(mk-rhs #`(error '#,id "TODO: stub"))))]))
Closes#508.
Looks like, it should be removed, because there is no
such identifier exported from racket/match/gen-match
(a parameter of `define-forms` now).
Closes#808.
Use `syntax-track-origin` and 'disappeared-use properties to
communicate `require` and `provide` form bindings to tools such as
Check Syntax.
Relevant to PR 13186
When a structure type has `prop:inpersonator-of`, follow it
when attemptng to access imperonator properties.
This change fixes a problem with `impersonate-procedure` as
reported by Scott Moore.
The compiler/expander attempted to clear out references in a namespace
used only during macro expansion, but it's possible for references to
be retained (via unusual macros), so get rid of the broken attempt to
help the GC.
Since a module path index is being generated, a module path index
for the referencing module can be used, too, preserving relative
references for as long as possible.
Gustavo's tests in de3fa9a855 illustrate the problem. The solution
is simply passing 1 for `optimized_rator` to optimize_for_inline().
Additional changes generalize optimize_for_inline() a little (although
that generality doesn't seem to be useful at the moment) and collapse
some variables that represent the same value.