aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
AgeCommit message (Collapse)AuthorFilesLines
2012-12-25Implement ellipses as in R*RS.David Robillard1-10/+17
Let macro is now the one from R7RS, but missing the second clause (no letrec yet). git-svn-id: http://svn.drobilla.net/resp/trunk@446 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-25Support multiple ellipses in macros.David Robillard1-12/+44
Support lambda expressions with empty argument lists. git-svn-id: http://svn.drobilla.net/resp/trunk@445 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-25Use C++11 range-based for loops.David Robillard1-31/+29
git-svn-id: http://svn.drobilla.net/resp/trunk@444 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-25Preliminary syntax-rules macro implementation.David Robillard1-2/+31
git-svn-id: http://svn.drobilla.net/resp/trunk@443 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-17Fix calling functions that lexically enclose the current function.David Robillard1-0/+14
In particular this makes it possible to walk lists with match, since match clauses expand to fns. git-svn-id: http://svn.drobilla.net/resp/trunk@441 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-15Write forward declarations for all types and functions for mutual and/or ↵David Robillard1-0/+5
nested recursion. git-svn-id: http://svn.drobilla.net/resp/trunk@440 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-15Compile constructors as LLVM struct types.David Robillard1-1/+3
Use LLVM type names instead of hyper verbose literal types in more places in general. More work on quoting. git-svn-id: http://svn.drobilla.net/resp/trunk@439 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-15Add Subst::augment function.David Robillard1-0/+1
git-svn-id: http://svn.drobilla.net/resp/trunk@438 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-14More flexible and unified code pass design.David Robillard1-2/+6
git-svn-id: http://svn.drobilla.net/resp/trunk@435 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-12-14Real implementation of algebraic data types, and parametric types.David Robillard1-0/+11
git-svn-id: http://svn.drobilla.net/resp/trunk@434 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2012-10-15Update for LLVM 3.1David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/trunk@433 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-05-15Generate code entirely via emitting flat IR (don't special case main/repl).David Robillard1-5/+2
git-svn-id: http://svn.drobilla.net/resp/trunk@427 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-05-14Create 'main' in IR and compile it like any other function.David Robillard1-2/+6
git-svn-id: http://svn.drobilla.net/resp/trunk@423 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-05-14Make currentFn private to the backend.David Robillard1-5/+3
git-svn-id: http://svn.drobilla.net/resp/trunk@421 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-05-14Add flatten stage to generate flat s-expression IR for the (now simpler) ↵David Robillard1-3/+4
compilation stage. git-svn-id: http://svn.drobilla.net/resp/trunk@417 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-05-14Update header for new Engine APIDavid Robillard1-3/+6
git-svn-id: http://svn.drobilla.net/resp/trunk@413 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-01-13Tidier FreeVars::index.David Robillard1-9/+4
git-svn-id: http://svn.drobilla.net/resp/trunk@409 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2011-01-09Partially resurrect CPS translation pass.David Robillard1-0/+1
git-svn-id: http://svn.drobilla.net/resp/trunk@405 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-31Only compile symbols once (cache compiled symbol values specially for this).David Robillard1-0/+3
Working pattern matching / deconstruction when object is a function parameter. git-svn-id: http://svn.drobilla.net/resp/resp@396 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-31Fix parsing of #f.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@393 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-31Define named (and possibly recursive) types for closures and functions.David Robillard1-0/+19
Compile type definitions all the way to LLVM IR (including recursive types). git-svn-id: http://svn.drobilla.net/resp/resp@388 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-31Remove unused Engine::objectType().David Robillard1-2/+0
git-svn-id: http://svn.drobilla.net/resp/resp@386 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-30Add rrst().David Robillard1-0/+1
git-svn-id: http://svn.drobilla.net/resp/resp@384 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-29Destructuring (i.e. working `match').David Robillard1-2/+3
git-svn-id: http://svn.drobilla.net/resp/resp@374 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-29Literal lists (i.e. list quoting).David Robillard1-18/+30
Compile type expressions. Only compile a top-level function if program has code to run (i.e. isn't just definitions). Cast tuples to Object when necessary to avoid LLVM IR type mismatches (for cons stores and return values). Fix memory leaks. git-svn-id: http://svn.drobilla.net/resp/resp@369 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-28Use fst ("first") instead of head and rst ("rest") instead of tail.David Robillard1-15/+7
git-svn-id: http://svn.drobilla.net/resp/resp@366 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Remove weird __tag_is form by adding a T_LITSYM type and using = operator.David Robillard1-4/+5
Step towards having first class symbols... git-svn-id: http://svn.drobilla.net/resp/resp@362 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Less code.David Robillard1-38/+18
git-svn-id: http://svn.drobilla.net/resp/resp@361 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Make ATuple a normal LISPey cons cell (it always was anyway).David Robillard1-32/+22
git-svn-id: http://svn.drobilla.net/resp/resp@360 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-27Kill AType.David Robillard1-131/+106
git-svn-id: http://svn.drobilla.net/resp/resp@359 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove AType::DOTS.David Robillard1-3/+2
git-svn-id: http://svn.drobilla.net/resp/resp@358 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove AType::PRIM.David Robillard1-4/+3
git-svn-id: http://svn.drobilla.net/resp/resp@357 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove apparently unnecessary concrete_type.David Robillard1-18/+2
git-svn-id: http://svn.drobilla.net/resp/resp@356 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Remove AType copy constructor.David Robillard1-3/+2
git-svn-id: http://svn.drobilla.net/resp/resp@354 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Begin killing AType.David Robillard1-17/+17
git-svn-id: http://svn.drobilla.net/resp/resp@353 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-26Update headers.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@352 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-25Simplify let to fn, rather than deal with it through to compilation.David Robillard1-1/+3
The previous implementation of let was a premature optimization intended to make let cheap/free, but screws up closure creation and variable indexing because a new scope is created by something other than fn. Only compile top level expressions to globals (with associated store/retrieve overhead) in a REPL when it is necessary. Add `do' form (ala scheme `begin') to backend (used by `match' simplify). git-svn-id: http://svn.drobilla.net/resp/resp@348 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-10Simplify if into nested 2-branch (scheme style) ifs at simplify stage.David Robillard1-13/+14
git-svn-id: http://svn.drobilla.net/resp/resp@346 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-10Move simplification from lift stage to a new (post-typing) simplify stage.David Robillard1-0/+1
git-svn-id: http://svn.drobilla.net/resp/resp@344 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-10Convert match form to if at lift stage (remove knowledge of match from ↵David Robillard1-0/+4
compile stage and backends). git-svn-id: http://svn.drobilla.net/resp/resp@342 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Strip trailing whitespace.David Robillard1-12/+12
git-svn-id: http://svn.drobilla.net/resp/resp@336 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Document the free variable implementation (mostly in lift_symbol) better.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@335 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Fix cpplint warnings.David Robillard1-12/+12
git-svn-id: http://svn.drobilla.net/resp/resp@329 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Add let form.David Robillard1-1/+5
git-svn-id: http://svn.drobilla.net/resp/resp@328 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09read_expression => PEnv::parse.David Robillard1-9/+3
git-svn-id: http://svn.drobilla.net/resp/resp@325 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Make environment always referenced by symbols.David Robillard1-58/+69
Intern symbol strings, but not ASymbol objects themselves, so each symbol can have a different Cursor. Fixes missing locations in error reporting. git-svn-id: http://svn.drobilla.net/resp/resp@324 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Const-correct parser.David Robillard1-2/+1
git-svn-id: http://svn.drobilla.net/resp/resp@323 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09ValVec => CVals.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/resp/resp@322 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Consistent engine global[Set|Get] interface.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/resp/resp@321 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-09Clean up engine code.David Robillard1-20/+19
git-svn-id: http://svn.drobilla.net/resp/resp@320 ad02d1e2-f140-0410-9f75-f8b11f17cedd