path: root/parse
AgeCommit message (Collapse)Author
2019-04-28Fix float conversions in casts.Ori Bernstein
We were dropping the intness, and didn't registerize the args to comisd.
2019-04-28Revert "Add a missing tysearch."Ori Bernstein
This reverts commit b31626248ea64c23d2020846e2cac1c751348b61.
2019-04-12Rename traits correctly.Ori Bernstein
2019-03-14Get a bit better at wrangling type bindings.Ori Bernstein
2019-03-03Give traits the necessary env.Ori Bernstein
2019-03-03Don't set the env on typedef psuedodecls.Ori Bernstein
We want to specialize the args in the parent env.
2019-03-03Merge envs correctly.Ori Bernstein
Still a couple of straggling issues, but almost there.
2019-02-28Fix type substitution in sizeof.Ori Bernstein
2019-02-26Accept that `file` isn't a node.Ori Bernstein
Shrink node sizes, simplify code a bit.
2019-02-26Add support for `__fini__` functions.Ori Bernstein
2019-02-18We don't need the last array, just the count.Ori Bernstein
Fixes #187
2019-02-16Clean up redundant code.Ori Bernstein
2019-02-10Pass the type envs through properly in delayed unification.Ori Bernstein
2019-02-10Work towards removing the streq check.Ori Bernstein
2019-02-10Boundtype should be harmless on non-params.Ori Bernstein
2019-02-09Work towards removing the streq check.Ori Bernstein
2019-02-07Fix declaration of mktraitmapOri Bernstein
2019-02-06Fix indentation.Ori Bernstein
2019-02-05Add a missing tysearch.Ori Bernstein
2019-01-28Bump ABI version.Ori Bernstein
Fixes bug for slices in varargs.
2019-01-12Allow folding character-typed designated array inits.Ori Bernstein
2019-01-07Change indexed array literal syntax.Ori Bernstein
2018-12-20Ignore shebang lines in the compiler.Ori Bernstein
2018-10-27Not all arrays have defined sizes.Ori Bernstein
2018-10-27Merge branch 'master' of git+ssh:// Bernstein
2018-10-18Remove bogus assert.Ori Bernstein
2018-10-15Disallow negative array sizes. And do some cleanup.Ori Bernstein
2018-08-03Record the closure into all nested funcs.Ori Bernstein
Funcs can go inside funcs.
2018-07-19Support direct tuple access operators "tuple.N"Quentin Carbonneaux
This patch adds tuple access expressions. If t is a tuple, its N-th component can be retrieved with the syntax t.N. Of course, the components are zero indexed. I believe the code also works if 't' is a pointer to a tuple (but I have not checked this).
2018-07-18Top level anonymous unions may not have their type set.Ori Bernstein
2018-07-14Fix stupid mistake.Ori Bernstein
2018-07-14Push down named unions types into union tagsOri Bernstein
Currently, union tags are given the type of their enclosing union, by default: type u = union `Foo ;; var x = `Foo will currently infer the variable 'x' as having type 'union `Foo ;;'. To make the type of 'x' infer as 'foo', the code needs to force 'x' to unify with something that is explicitly declared as a 'u'. This change makes it so that union tags declared in the manner above will default to type 'u', instead. This is a special case, but it makes the behavior less surprising.
2018-07-04Fix infinite recursion in type inference.Ori Bernstein
2018-06-11Fix type env assertion.Ori Bernstein
If a subtype has args, it should introduce an env.
2018-06-09Consistently and corretly add Oundef.Ori Bernstein
2018-05-29Retroactively update the ABI version.Ori Bernstein
Auto expressions changed the usefile layout, but we forgot to bump ABI.
2018-04-18Merge remote-tracking branch 'ori/master' into HEADS. Gilles
2018-04-17Don't mutate the traits on builtin types.Ori Bernstein
mktylike() should return a generic type based on the builtin, and that means that if we mutate the builtin, we will be adding traits to our literals. This is wrong on multiple levels. First off, it means that '@t :: numeric,integral @t' will now require whatever other types are implemented over literals. And second, it means that if, for example, a trait is implemented for flt64, flt32 literals will also need it.
2018-04-17Remove stray ',' from error message.Ori Bernstein
2018-04-17Merge trait specs if provided.Ori Bernstein
This is a bit ugly, since if there are duplicate specs for a trait, we'll end up duplicating the constraints. On the other hand, since we put them into a set, it's mostly an esthetic issue.
2018-04-08Add support for `-T` option to compile in test mode.Ori Bernstein
Tests can now access hidden declarations.
2018-03-25Make output buffers bigger.Ori Bernstein
Shuts up warning on GCC 8.
2018-03-13Merge branch 'autoexpr' into libmathS. Gilles
2018-03-12Bump ABI retroactively.Ori Bernstein
Forgot to do it when adding ternary operator.
2018-03-06Add ternary operator.Ori Bernstein
2018-02-18Resolve the impl() type.Ori Bernstein
2018-01-31Check that if we default to int, all necessary traits are there.Ori Bernstein
2018-01-26New auto operator.Quentin Carbonneaux
Summary: -------- During the Myrcon in September Ori suggested an 'auto' operator that would evaluate what it applies to, store the result in a temporary t, and call __dispose__(t) when the current block exits. This patch implements this idea under the form of a unary operator. This, for instance, allows to have: impl disposable regex# = __dispose__ = {r;} ;; regex.exec(auto std.try(regex.compile("")), "foobar") Like before, it is guaranteed that __dispose__ is called in reverse order of auto appearance. Backward compatibility: ----------------------- Nope. Auto variables are now gone. This should not be a problem, simply rewrite: var auto x = foo() into: var x = auto foo() Implementation: --------------- It largely reuses the code I had written for 'auto' variables but needs a little finer grain tracking because we don't always want to call __dispose__ for *all* auto expression results when leaving a block (some might not be evaluated yet). For example: auto 1 if b -> void ;; auto 2 Only __dispose__(1) must be called when '-> void' is executed. If the block falls through, __dispose__(2) and __dispose__(1) will be called in sequence. TODO: ----- - Err when goto jumps in/out of a block that has auto expressions. - Support auto in patterns. match ... | `std.Some (auto x): ... is essentially rewritten to: match ... | `std.Some (auto x): auto x ... - Test edge cases (e.g., auto in loop condition) Actually, test. Cheers,
2018-01-25Improve error message.Ori Bernstein
2018-01-21Cheap enums.Quentin Carbonneaux