aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
AgeCommit message (Collapse)AuthorFilesLines
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
2010-12-08Remove Engine::compileMatch.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@318 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-08Remove Engine::compileIfDavid Robillard1-2/+7
git-svn-id: http://svn.drobilla.net/resp/resp@316 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-08Consistent naming for Engine compile methods.David Robillard1-10/+14
git-svn-id: http://svn.drobilla.net/resp/resp@314 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-08Clean up function compilation stuff.David Robillard1-7/+19
Add some utilities to for using named types. git-svn-id: http://svn.drobilla.net/resp/resp@313 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-08compileTup => compileConsDavid Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@310 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-07Rename 'parse' to the now more accurate 'expand'.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@307 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-07Saner recursive descent lexer/parser.David Robillard1-25/+7
git-svn-id: http://svn.drobilla.net/resp/resp@306 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-05Remove cruft.David Robillard1-26/+8
git-svn-id: http://svn.drobilla.net/resp/resp@303 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-05Simplify parser.David Robillard1-6/+4
git-svn-id: http://svn.drobilla.net/resp/resp@300 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-05Remove worthless "macro" system.David Robillard1-9/+0
git-svn-id: http://svn.drobilla.net/resp/resp@299 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04Tidy up unify.cppDavid Robillard1-0/+5
git-svn-id: http://svn.drobilla.net/resp/resp@298 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04More const-correctness (remove all use of const_cast).David Robillard1-7/+7
git-svn-id: http://svn.drobilla.net/resp/resp@297 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04More const-correctness (remove all use of const_cast from lift.cpp).David Robillard1-11/+9
git-svn-id: http://svn.drobilla.net/resp/resp@296 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04More const-correctness.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/resp/resp@295 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04Make resp_lift const-correct.David Robillard1-3/+3
git-svn-id: http://svn.drobilla.net/resp/resp@294 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04Eliminate tuple/list mutation.David Robillard1-46/+4
Fix AST::str(). git-svn-id: http://svn.drobilla.net/resp/resp@293 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04Tidy.David Robillard1-11/+7
git-svn-id: http://svn.drobilla.net/resp/resp@292 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-04Use saner numeric values for tags.David Robillard1-9/+10
git-svn-id: http://svn.drobilla.net/resp/resp@291 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Remove use of RTTI for AST.David Robillard1-31/+76
git-svn-id: http://svn.drobilla.net/resp/resp@290 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Merge AST::operator==David Robillard1-40/+74
git-svn-id: http://svn.drobilla.net/resp/resp@289 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Make AString, ALexeme, and ASymbol all contain (rather than inherit from) ↵David Robillard1-5/+7
std::string. git-svn-id: http://svn.drobilla.net/resp/resp@288 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Remove AST::constrain.David Robillard1-17/+23
git-svn-id: http://svn.drobilla.net/resp/resp@287 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Merge ACall and ATuple.David Robillard1-21/+12
git-svn-id: http://svn.drobilla.net/resp/resp@285 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Remove AFn.David Robillard1-15/+17
git-svn-id: http://svn.drobilla.net/resp/resp@284 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-03Move AFn and AType prot() methods to ATuple.David Robillard1-6/+4
git-svn-id: http://svn.drobilla.net/resp/resp@283 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Remove ACall subclasses.David Robillard1-52/+7
git-svn-id: http://svn.drobilla.net/resp/resp@282 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Remove use of ACall class hierarchy from compile phase.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/resp/resp@281 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Remove use of ACall subclasses for contrain phase.David Robillard1-9/+1
git-svn-id: http://svn.drobilla.net/resp/resp@279 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Work towards removing different classes for each type of expression.David Robillard1-59/+19
git-svn-id: http://svn.drobilla.net/resp/resp@278 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-02Represent code as list structure (i.e. traditional LISP lists built from ↵David Robillard1-58/+196
pairs), rather than tuple structure. Remove unused/crufty depoly stage. Remove cps from AST interface (but keep cps.cpp code around for later). Improved command line interface for compilation stages (options -T -L -S). git-svn-id: http://svn.drobilla.net/resp/resp@277 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-12-01Add -T option to type-check and pretty-print with type annotations.David Robillard1-12/+10
Rename -p to -P (all 'stage' options, i.e. -P -T -S are uppercase for consistency). Clean up main program. Decent pretty printing. git-svn-id: http://svn.drobilla.net/resp/resp@275 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-11-17Use single uint32_t for GC object header (mark and tag).David Robillard1-9/+13
git-svn-id: http://svn.drobilla.net/resp/resp@272 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-10-14Prefix internal "me" parameter with underscore.David Robillard1-1/+1
git-svn-id: http://svn.drobilla.net/resp/resp@271 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-09-30Preliminary work on algebraic data types and run-time typing.David Robillard1-13/+40
git-svn-id: http://svn.drobilla.net/resp/resp@270 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-08-22Simplify Engine function compilation interface.David Robillard1-4/+4
Removes duplicated code in various backends and reduces Engine code knowledge of AFn specifics (which belongs in compile.cpp). git-svn-id: http://svn.drobilla.net/resp/resp@268 ad02d1e2-f140-0410-9f75-f8b11f17cedd
2010-08-22Simplify Engine::startFunction.David Robillard1-2/+2
git-svn-id: http://svn.drobilla.net/resp/resp@267 ad02d1e2-f140-0410-9f75-f8b11f17cedd