Commit Graph

580 Commits

Author SHA1 Message Date
Sam Tobin-Hochstadt
ebb0770edf v6.9 HISTORY 2017-04-21 17:01:52 -04:00
Scott Moore
214d597e4b Use code-inspectors to prevent optimization in unsafe contexts. (#531)
The optimizer should only run when the code being compiled could
directly access racket/unsafe/ops. This prevents unsoundness in Typed
Racket from giving untrusted code access to dangerous operations.
2017-04-12 15:17:41 -04:00
Andrew Kent
5fbf4d30a8 singleton char types if expected type (#527) 2017-03-31 18:04:05 -04:00
Andrew Kent
20a73e479f fix minor bug, make funapp code more readable (#521)
* make our inference abstraction macro readable by mere mortals
2017-03-29 21:48:03 -04:00
Andrew Kent
52caac26e8 be more reasonable about constructor contract checking (#522) 2017-03-29 19:15:22 -04:00
Vincent St-Amour
52b4507585 Fix filters of comparisons in the presence of NaN.
Closes #112.
2017-03-28 15:48:37 -05:00
Andrew Kent
1f28ae53cd fix some lexp function contracts (#520) 2017-03-28 13:20:41 -04:00
Andrew Kent
81b134cbb9 add refinement types, linear expr objs, and ineq props (#510)
This PR adds about half of the needed primitives and logic for
reasoning about linear integer arithmetic in programs with interesting
dependent types. Things have been added in a way s.t. programs will
still continue to typecheck as they did, but if you want integer literals
and certain operations (e.g. *,+,<,<=,=,>=,>) to include linear inequality
information by default, you need to include the
'#:with-linear-integer-arithmetic' keyword at the top of your module.

The other features needed to get TR to be able to check things like
verified vector operations will be to ajust function types so
dependencies can exist between arguments and a minor tweak to get
type inference to consider the symbolic objects of functions arguments.
These features should be coming shortly in a future pull request.
2017-03-27 14:32:29 -04:00
Ben Greenman
2804bd4a93 update path-add-extension type with new optional argument (#519) 2017-03-27 10:18:53 -04:00
Andrew Kent
f4aff224a8 update find-relative-path type w/ new keyword (#518) 2017-03-26 09:11:12 -04:00
Andrew Kent
bf0761b500 fix serialization of objects (#516) 2017-03-20 20:57:28 -04:00
Andrew Kent
c174ba655c fix port-> functions to match new kw args in impl (#514) 2017-03-17 13:25:32 -04:00
Andrew Kent
a103ec257b remove broken subtype caching (#513) 2017-03-16 14:09:23 -04:00
Vincent St-Amour
1d7b7b5a00 Use new DrRacket opt-in buttons for OC. 2017-03-09 17:12:49 -06:00
Sam Tobin-Hochstadt
b24507a71b Allow disabling TR optimization with an environment variable. (#504) 2017-03-01 13:19:15 +00:00
Sam Tobin-Hochstadt
b3ab93768f Add types for loop precondition checking functions. (#501)
This is primarily intended for use on the `linklet` branch,
but does not cause problems in other contexts.
2017-02-24 00:33:47 +00:00
Andrew Kent
6334dfb939 fix the maximum range for type-masks 2017-01-30 18:57:04 -05:00
Sam Tobin-Hochstadt
25419f9a9a Add 6.8 HISTORY. 2017-01-17 08:55:20 -05:00
Vincent St-Amour
41eabc9195 Use existing contract combinators.
To cooperate better with the contract system.
2017-01-10 13:55:13 -06:00
Andrew Kent
b0f707b576 fix Union-fmap bug that skipped some base arg results 2017-01-07 21:43:07 -05:00
Andrew Kent
81255d9a14 misc contract fix 2017-01-07 12:44:48 -05:00
Eric Dobson
3b80ae71f9 correct keyword function conversion
Keyword functions are a little tricky. This PR addresses issues
checking the body of kw functions.

Basically, a function with keyword arguments such as inc:

(define (inc x #:n [n 1])
  (+ x n))

actually expands into a more complex function with 3 arguments that
looks something resembling the following:

(define (inc-expanded n* n-given? x)
   (let ([n (if n-given? n* 1)]) (+ x n)))

and calls to inc are converted to match this form:

(inc 42) => (inc-expanded #f #f 42)

(inc 42 #:n 2) => (inc-expanded 2 #t 42)

Note that each optional keyword argument has a boolean flag argument
that signals whether or not the caller provided that keyword argument.

This PR takes advantage of the observation that the value for the n*
argument in inc is only reachable in code when n-given? is #t, and so,
assuming the kw-expansion protocol always only accesses n* if n-given?
is #t, we can actually safely check the body of the function against
the following simple but correct type:

(-> Number Boolean Number Number)

An alternative previous approach expanded the function type into every
possible combination of optional argument and optional argument flag,
but this was prohibitively expensive.
2017-01-07 12:36:01 -05:00
Asumu Takikawa
e2be0382d1 Remove many uses of dict functions for performance 2017-01-06 15:18:46 -05:00
WarGrey Gyoudmon Ju
3cafa94801 Add type annotation for (make-parent-directory*) (#483) 2017-01-06 11:27:42 -05:00
Ben Greenman
3e2d020a19 Implement object/c-opaque-stronger
An opaque object contract is stronger than another (opaque) object contract if:
- it has stronger field/method contracts on fields/methods common to both
- and it has no more field/method contracts than the other, if the other is opaque
2017-01-06 02:41:59 -05:00
Ben Greenman
7c495eea62 fix bug in object/c-clause syntax-class
`field` needs to be a literal; with the bug, the following syntax

```
  (object/c-opaque (any-var (->m any/c)))
```

made a contract with 1 field (named `->m`, value `any/c`)
2017-01-06 02:41:59 -05:00
Andrew Kent
4bfb101677 use bits for base unions, make unions deterministic
This PR primarily changes how we represent Base types and unions of
Base types. Basically, Base types now contain a bits field, which
contains an exact-nonnegative-integer? with exactly one bit set to
1. This allows us to represent unions of Base types by simply OR-ing
together the various base bits. We store these unions in a new type
called a BaseUnion (which contains a field for numeric Base type bits
and a field for non-numeric Base type bits). We can perform set
operations on BaseUnion types rather quickly (using simple bitwise
arithmetic operations).

To make Union and BaseUnion work together nicely, the Union type now
has a field for non-Base types, and a field which contains any and all
Base types placed directly in the Union ( either as a Base if there is
only one, or as a BaseUnion if there are more than one).

Other changes present in this PR:

Base types are now "closed" -- i.e. Base types are only declared in
base-types.rkt and numeric-base-types.rkt with a special macro that
assigns them their respective bits. The constructor make-Base is no
longer provided for miscellaneous usages.

Some singleton Value types were moved to Base so all of our common
unions of basic types can fit into the new BaseUnion type (namely
Null, Void, One, Zero, and the booleans).

A new Val-able match expander lets us match on singleton types that
used to all be Value types, but, as described above, now some are Base
types.

Unions contain deterministically ordered, duplicate free lists (in
addition to sets for equality and constant time membership checks), so
iterating over Unions can be done deterministically (yay!) -- this
gets rid of some otherwise problematic behavior in areas like type
inference, where the order Unions are iterated over can actually
affect the results (i.e. if two valid type inferences are possible,
nondeterministic ordering means we can sometimes get one and sometimes
get another, which makes for particularly difficult to debug issues
and in general has no immediate solution (both substitutions are
valid, after all!))
2017-01-05 20:45:17 -05:00
Phil Nguyen
2bb0698388 add types for hash-clear, hash-clear!, and hash-copy-clear (#466) 2017-01-04 15:16:49 -05:00
WarGrey Gyoudmon Ju
5b546e1b2c Add type annotations for port line counting (#479) 2017-01-04 14:47:44 -05:00
WarGrey Gyoudmon Ju
fdb79d9a34 Add type annotation for (vector-set-performance-stats) (#480) 2017-01-04 14:47:25 -05:00
Sam Tobin-Hochstadt
565f7ec233 Fix range type after racket/racket#1558.
Closes racket/racket#1560.
2017-01-04 14:29:00 -05:00
Andrew Kent
3e13359ef3 fix errors from 8e7f390 2016-12-20 12:36:26 -05:00
Andrew Kent
be155fa3e3 propagate expected type info further down AST
Previously expected propositions were erased frequently
(at lets and ifs) and checking for logical entailment
was unidirectional instead of bidirectional. In other words,
instead of checking if propositions held at the leaves
of the AST, we would typecheck the AST and blindly propagate
up ALL logical info we learned at each step. This meant that
we would get exponential blow up of propositions even when
we didn't care about their content.

With this commit, instead now we send down expected types
*and* propositions so we can verify expected types and
propisitions are satisfied at leaves, thereby relieving the
need to constantly report up huge amounts of logical info
while typechecking.
2016-12-20 07:43:21 -05:00
Andrew Kent
aa1d36f44e add type syntax for Union/Intersection 2016-12-19 20:16:36 -05:00
Andrew Kent
da30fb6f74 be less eager about bottom propogation
Moving to eager propagating of bottom works for most cases,
but in some cases flattening types such as (Pairof Bottom Any)
to Bottom made things like type inference break for some cases
(since (Listof Nothing) == Null, and (Listof A) did not structurally
like up like it used to). Perhaps w/ a little more effort
inference and any other potential issues could work better
with propagating bottom, but for now we'll be slightly less
aggressive about it.

i.e. this fixes pfds, which commit 8e7f390 broke.
2016-12-19 08:28:49 -05:00
Andrew Kent
708e0782fa make name table non-weak 2016-12-16 22:36:02 -05:00
Andrew Kent
09b78c6ab2 remove unneeded nondeterminism 2016-12-16 22:35:30 -05:00
Andrew Kent
8e7f39025a remove interning for most Reps in TR
Prior to this change (which was Typed Racket PR 469) all internal TR
objects (Reps) were interned and kept around for the entire duration
of type checking.  Because of this, frequent operations that rebuilt
types were particularly costly (e.g. various forms of
substitution). To recoup some of this cost, caching was being used in
a lot of places. This PR sought to remove interning as the default
behavior for Reps and allow for more flexibility in how we approach
time/space performance needs going forward.

The following changes were included in this overhaul:

Interning: All Reps are no longer interned. Right now we only intern
unions and some propositions.

Rep generic operations: we now use racket/generic so we're not
reinventing this wheel.

Singletons: Reps (e.g. TrueProp, Univ, etc) can be declared singleton,
which creates a single instance of the rep that all visible operations
(even within the declaring module) are defined in terms of
(e.g. predicates are defined as (λ (x) (eq? x singleton-instance)),
etc).

Custom constructors: Custom constructors can be specified for Reps,
which allows for simple normalization, interning, or other invariants
to be enfored whenever a Rep is created.

Union: Unions used to try to ensure no obviously overlaping types
would inhabit the same Union (e.g. (U String (Pairof Any Any) (Pairof
Int Int)) would be simplified to (U String (Pairof Any Any))). This,
however, required frequent calls to subtyping every time a Union was
modified and working with Unions thus had a high cost (another thing
that caching was used to reduce). Instead of this, Unions now enforce
a much simpler set of invariants on their members: (1) No duplicates
(by virtue of using a hash-based set), (2) Any and Nothing do not
appear in unions, and (3) Nested unions are flattened. Also, using a
hashset as the internal data structure meant that we could easily
intern unions w.r.t. equal? equality. NOTE: we do reduce unions to not
contain obviously overlapping terms when printing to users and when
generating contracts (so obviously and avoidable inneficient contracts
are not generated – See union.rkt for 'normalize-type').

Subtyping changes: Subtyping has been designed to reduce dispatch time
w/ a switch since we no longer cache _all_ subtyping calls (we only
cache subtyping results for unions since they have some costly
subtyping).

prop-ops changes: AndProps now are careful to sort OrProps by length
before building the resulting proposition. This is done because
OrProp implication only checks if one Or is a subset of another Or.
By ordering Or props by size, we only ever check if an OrProp implies
another if its size is <= the other OrProp. This also makes the
smart constructor '-and' more robust, since the order the props
appear does not affect if some Ors are kept or not.

Testing: More subtype tests have been added (we are still probably
relying too much on typecheck-tests.rkt and not the more granular unit
tests in general).  Also, typecheck-tests.rkt has been changed to
check for type-equivalence (i.e. subtyping in both directions)
instead of equal? equivalence.
2016-12-16 15:18:50 -05:00
Matthew Flatt
0be76c5537 sync with change to for expansion
The expansion of `for` for a generic sequence has changed to receive
and use an extra result from the internal `make-sequence` function.
2016-12-13 20:04:29 -07:00
Tim Brown
d97243b1e8 Update base-env-numeric.rkt (#464)
Added `-Index` to second `varop` list for max so that max is typed for: `(-> Index * Index))`
2016-12-01 09:16:15 -05:00
Sam Tobin-Hochstadt
6a57af77b7 Improve type for dump-memory-stats. 2016-11-28 12:01:07 -05:00
Andrew Kent
7b6013272b fix contract bug 2016-11-22 11:05:43 -05:00
Andrew Kent
f9385af461 clean up tc-let-unit
This commit cleans up some helper functions that have been
pretty awful for a while. The code is (hopefully) more readable
and it does less work (i.e. unneeded substitutions are no longer
performed).
2016-11-21 19:49:33 -05:00
Sam Tobin-Hochstadt
0678743e3d Fix errors in a9ae85d3. 2016-11-05 20:02:15 -04:00
Sam Tobin-Hochstadt
a9ae85d3fd Fix #378 more comprehensively. (#453)
The previous fix relied on finding and manipulating all dead code.
But we missed some; in particular code of the form:

    (begin (error 'x) ...dead...)

So switch to a different strategy that tolerates untraversed
dead code.
2016-11-05 13:11:25 -04:00
Andrew Kent
6f1eff8d2a less dynamic dispatch in contract gen 2016-10-31 12:53:48 -04:00
Phil Nguyen
a8b20d87aa simplify hash-count's type 2016-10-28 17:15:00 -04:00
Phil Nguyen
c85515e258 type for hash-empty? 2016-10-28 00:19:09 -04:00
Andrew Kent
9c33a54c6a fix intersect, make it (hopefully) commutative 2016-10-25 19:25:28 -04:00
Andrew Kent
db1e7183aa provide less from type-rep 2016-10-24 14:56:44 -04:00
Andrew Kent
9df3a1dab5 fix resolve for names being defined 2016-10-23 21:47:00 -04:00
Andrew Kent
4bfebbda98 fix contract provide ordering bug 2016-10-23 19:50:24 -04:00
Sam Tobin-Hochstadt
a396880bda 6.7 HISTORY. 2016-10-23 17:27:52 -04:00
Andrew Kent
40143109ec remove contract overhead from static-contract code 2016-10-22 19:50:06 -04:00
Andrew Kent
24c64e9de0 new representation scheme for typed racket internals
This is a major to some of the internal representation of things
within Typed Racket (mostly affecting structs that inherited from Rep
(see rep/rep-utils.rkt)), and lots of tweaks and bug fixes that
happened along the way.

This PR includes the following major changes:

A new rep-utils implementation, which uses struct properties for the
generic operations and properties of the various Reps (see
rep-utils.rkt)

More specific Rep inheritance (i.e. arr no longer inherits from Type,
because it is not a Type, etc ...) (see type-rep.rkt, core-rep.rkt,
values-rep.rkt), and thus things like Type/c no longer exist

New Rep's to classify the things that are no longer Type or Prop,
(such as PropSets, SomeValues, Results, etc -- see core-rep.rkt and
values-rep.rkt)

uses of type-case now replaced by uses of Rep-fold and Rep-walk

structural types can specify their fields' variance and operations
like subtyping and free-vars can generically operate over these types
(see type-rep.rkt)

type-mask replaces types key -- types masks are described in detail in
(rep/type-mask.rkt)

Types can specify a predicate to recognize their "top type" via [#:top
pred])

There is an explicit 'Bottom' type now (i.e. neither union or
intersection are used)

subtyping re-organized, slight tweaking to inference

various environments got for-each functions in addition to the map
functions they had (e.g. type-name-env.rkt)

Empty is no longer an Object? -- the OptObject? predicate checks for
either Object or Empty, and so it is easier to be clear about where
Empty makes sense appearing and where it does not

Previously signatures were created with promises in their fields, now
we create a promise around each signature (this way the contracts for
Signature fields are cleaner)

Names for structs now use the args field to describe how many type
arguments they take (Note: this could use further tidying for sure!)

simplified the propositional logic code in several places, got rid of
escape continuations, etc (see prop-ops.rkt, tc-envops.rkt,
tc-metafunctions.rkt)

we now use subsumption more to simplify type results from type
checking, e.g. if the type does not overlap w/ false, it's false
proposition is FalseProp, etc (see tc-expr-unit.rkt and prop-ops.rkt,
the function is called reduce-tc-results/subsumption)

updating along a path will now intersect with the expected structural
type if it is not encountered (e.g. updating Any with (Int @ car) now
produces (Pairof Int Any) instead of Any -- see update.rkt)

lots of tests were tweaked to match up w/ the new prop subsumption
that occurs

remove was renamed subtract (so as to not conflict w/ racket/base's
remove)

a restrict function was added, which acts like intersect but is never
additive (i.e. it will never create an intersection if it can't figure
out how the two types relate -- see intersect.rkt)

tc-subst was modified to substitute out all the variables leaving
scope at once (and I simplified/tweaked some of the logic in there a
little, see tc-subst.rkt)

Type checking function applications now propagates information learned
why type checking the arguments, (e.g. (begin (f (assert x boolean?))
...)) ; the remainder of the begin is aware that x is a boolean)
2016-10-21 14:24:27 -04:00
Vincent St-Amour
4773283f8f Extend type of vector->list.
Closes #436.
2016-10-08 18:33:39 -05:00
Vincent St-Amour
2fc83b2868 Add missing source locations.
Closes #428.
2016-09-28 13:27:12 -05:00
Alex Knauth
bbb62da731 fix type of non-empty-string? (#427)
fixes #426
2016-09-12 09:17:57 -04:00
Alex Knauth
dfd61642b6 unsafe-require/typed #:opaque doesn't warn about opaque structs passed as Any (#418) 2016-08-31 11:37:05 -04:00
Matthew Flatt
6b10a5480d accomodate a revised expansion of mandatory keyword arguments 2016-08-07 15:58:40 -06:00
Matthew Flatt
9a9c7d3d91 work with macros that use syntax-local-lift-values-expression
Using `syntax-local-lift-values-expression` creates a lifted
`define-values` form with multiple binding variables.
2016-08-07 15:57:40 -06:00
Vincent St-Amour
c256e47e27 Have literal-related optimizations see through ann. 2016-08-04 13:05:27 -05:00
Sam Tobin-Hochstadt
66da5eef00 Traverse #%expression when looking for annotations.
Bug found by @mflatt's change to `syntax-parameterize`.
2016-08-01 10:43:49 -04:00
Matthew Flatt
43aa1023c1 adjust unit expansion patterns to be more flexible
Like e707b64db1, but for units.

Also, adjust the `class` change to avoid duplicating patterns
and make it slightly more flexible.
2016-07-31 08:54:05 -06:00
Matthew Flatt
e707b64db1 adjust class expansion patterns to be more flexible
Accomodate a potential changes to `syntax-parameterize`
and the way it's use by `class`, where the changes
mostly introduce some `#%expression` wrappers.
2016-07-30 21:39:12 -06:00
Asumu Takikawa
164b22de59 Add and document row-inst form, Row syntax
Before this, row instantiation was done with an ad-hoc
and undocumented syntax. Adding a new form works better
because rows should not be parsed as types.
2016-07-21 18:29:30 -04:00
Asumu Takikawa
10eb2542c6 Add syntax for poly structs in require/typed
Currently only works in unsafe requires. In other cases
it will emit an error instead.

Also bump version
2016-07-21 12:00:08 -04:00
Asumu Takikawa
98d0657141 Fix contracts for structs with the same name (PR 15330) (#410)
Fix contracts for structs with the same name

Closes PR 15330
2016-07-21 11:14:05 -04:00
Andrew Kent
0d577b78ce fix silly subtype cache bug 2016-07-20 09:28:20 -04:00
Sam Tobin-Hochstadt
5cc02a7592 Typed Racket history for 6.6. 2016-07-18 10:21:49 -04:00
Sam Tobin-Hochstadt
d1df2881ea Don't try to name casted values in the contract.
Relevant to Racket bug 15323.
2016-07-18 10:21:49 -04:00
Andrew Kent
a5c4ad2f77 have overlap use a current-seen list 2016-07-13 15:21:17 -04:00
WarGrey Gyoudmon Ju
8aa12e48df Add filesystem related functions (#397) 2016-07-12 08:33:59 -04:00
Ben Greenman
2409457930 type for #:limit-prefix? formatting option 2016-07-10 20:42:57 -04:00
Sam Tobin-Hochstadt
3d80322d27 Merge pull request #388 from AlexKnauth/allow-opaque
add a version of any-wrap/c that displays a warning on opaque structs
2016-07-09 20:17:16 -04:00
Sam Tobin-Hochstadt
c3a1202df1 Don't set current-inspector in Typed Racket.
There's not a good way to do this dynamically, and the initial
approach breaks programs.

Reverts part of 191ec136b6.

Relevant to #385.
2016-07-09 20:08:20 -04:00
AlexKnauth
8a3400eeee set include-extra-requires? in require/opaque-type 2016-07-09 15:50:15 -04:00
AlexKnauth
50aab9806f warning instead of error on opaque structs passed to #:opaque predicates
This fixes a math library error discussed here:
https://github.com/racket/typed-racket/pull/385#issuecomment-231354377
2016-07-08 23:04:31 -04:00
WarGrey Gyoudmon Ju
5175f9d873 add or improve lots of base definitions (#372) 2016-07-08 20:41:54 -04:00
Sam Tobin-Hochstadt
88f896c121 Support environment variable procedures. 2016-07-08 16:27:16 -04:00
Sam Tobin-Hochstadt
b1818723dc Allow environment-variables? values as flat in any-wrap/c.
Fixes the `envy` package by @lexi-lambda.
2016-07-08 14:50:00 -04:00
Sam Tobin-Hochstadt
977b9e16a2 Allow cpointer predicates as struct predicates.
Fixes the math library failure here:
  http://drdr.racket-lang.org/35897/racket/share/pkgs/math-lib/math/private/bigfloat/bigfloat-hurwitz-zeta.rkt

Relies on racket/racket#1368.

Relevant to #385.
2016-07-08 11:02:57 -04:00
Alex Knauth
191ec136b6 fix any-wrap/c unsoundness on opaque structures (#385) 2016-07-07 20:58:26 -04:00
Alex Knauth
9f3cf01d26 don't throw internal errors for unreachable cast exprs (#386)
This fills the corresponding entries in the cast table with a Dead-Code
type so that when the contract-generation pass calls the contract-def
thunk, it finds that in the table.
2016-07-07 16:51:08 -04:00
Alex Knauth
e3f56c8a25 check for free-vars in types of casted-exprs (#384) 2016-07-07 14:45:07 -04:00
Andrew Kent
39d6a6047a better rec type intersection 2016-07-07 12:53:31 -04:00
Alex Knauth
a1f8908a29 call compute-constraints instead of sc->constraints in get-max-contract-kind (#382)
* call compute-constraints instead of sc->constraints in get-max-contract-kind

* test cast on an intersection type involving Rec

* remove memory limit on sandboxed-unsafe-ops test
2016-07-07 12:16:15 -04:00
Alex Knauth
76cb6ae53d implement sc->constraints for recursive-sc (#381) 2016-07-03 22:47:52 -04:00
Alex Knauth
d7670250d4 add (and/c vector? any-wrap/c) -like contracts
for VectorTop, HashTableTop, etc. going from typed to untyped
2016-06-29 17:04:11 -04:00
Alex Knauth
9bda1bfcbc fix the error message in issue #375 2016-06-29 17:04:06 -04:00
Sam Tobin-Hochstadt
79ab11a079 listof not listof/c. 2016-06-23 12:09:08 -04:00
Sam Tobin-Hochstadt
8bcfc71fa8 Avoid overlap with sequences of the wrong arity.
Fixes #371.
2016-06-23 12:00:53 -04:00
Asumu Takikawa
b8225e1100 Factor out type alias error helper
Mainly for single point of control.
2016-06-22 18:53:04 -04:00
Asumu Takikawa
c29eb20efc Decide to lift common types based on popularity
Instead of looking at the size of the type, check to see
how many times each type is referenced in other types.
Only lift a type out as a definition if it reaches a
threshold (currently set to 5 refs).

This reduces the zo size of typed/private/framework-types
by roughly 1MB (more than half).

Also move more of the env code generation into the
init-envs.rkt file itself.
2016-06-22 18:53:04 -04:00
Asumu Takikawa
11439eb653 Move struct table code gen to init-envs.rkt
This keeps all the code generation in one place.
2016-06-22 18:50:41 -04:00
Asumu Takikawa
ee02c26020 Fix bug in init-envs (need to generate Rows too)
Also simplified Class case a bit
2016-06-22 17:47:46 -04:00
Asumu Takikawa
ca26d22d1c Fix optimizer fix
Fixed spurious syntax quoting and a test
2016-06-22 00:24:31 -04:00
Sam Tobin-Hochstadt
34ff91b3ca Avoid misoptimizing vector-set! of immutable vectors. 2016-06-21 18:05:38 -04:00
Asumu Takikawa
3b5ea8dc39 Improve how memoization in init-envs is done
Instead of storing a parameter with a box, use a
module-level variable with a hash table and a separate
queue. This separates memoization and the generation
of definitions, which is cleaner.
2016-06-21 16:37:17 -04:00
Asumu Takikawa
c5ec933bb8 Add more predefined types 2016-06-21 16:37:17 -04:00