fur
13 months agoAdd symbol and structure support master
David Kerkeslager [Mon, 23 Aug 2021 21:15:33 +0000 (17:15 -0400)]
Add symbol and structure support

13 months agoStart working on the interpeter
David Kerkeslager [Mon, 23 Aug 2021 00:35:05 +0000 (20:35 -0400)]
Start working on the interpeter

13 months agoAdd an interpreter
David Kerkeslager [Sun, 22 Aug 2021 22:47:15 +0000 (18:47 -0400)]
Add an interpreter

20 months agoMake the . operator into an instruction
David Kerkeslager [Sun, 3 Jan 2021 19:45:44 +0000 (14:45 -0500)]
Make the . operator into an instruction

20 months agoMake __field__ take a symbol instead of a string
David Kerkeslager [Sun, 3 Jan 2021 19:28:31 +0000 (14:28 -0500)]
Make __field__ take a symbol instead of a string

20 months agoMake stuctures and lists work
David Kerkeslager [Sun, 3 Jan 2021 19:11:41 +0000 (14:11 -0500)]
Make stuctures and lists work

20 months agoGet all examples compiling, though output is not correct
David Kerkeslager [Sun, 3 Jan 2021 18:27:10 +0000 (13:27 -0500)]
Get all examples compiling, though output is not correct

2 years agoImplemented closures
David Kerkeslager [Tue, 1 Oct 2019 19:31:13 +0000 (15:31 -0400)]
Implemented closures

2 years agoWrap thread properties in getters/setters
David Kerkeslager [Tue, 1 Oct 2019 18:36:10 +0000 (14:36 -0400)]
Wrap thread properties in getters/setters

2 years agoStart implementing functions
David Kerkeslager [Tue, 1 Oct 2019 07:37:11 +0000 (03:37 -0400)]
Start implementing functions

2 years agoImplement variable length arguments, but really only for print
David Kerkeslager [Tue, 1 Oct 2019 06:38:49 +0000 (02:38 -0400)]
Implement variable length arguments, but really only for print

2 years agoImplement and/or, introducing jumps and labels
David Kerkeslager [Tue, 1 Oct 2019 06:27:35 +0000 (02:27 -0400)]
Implement and/or, introducing jumps and labels

2 years agoImplemented integer comparison
David Kerkeslager [Tue, 1 Oct 2019 06:09:09 +0000 (02:09 -0400)]
Implemented integer comparison

2 years agoAdded booleans
David Kerkeslager [Tue, 1 Oct 2019 05:34:04 +0000 (01:34 -0400)]
Added booleans

2 years agoImplement negatives, use typedef
David Kerkeslager [Tue, 1 Oct 2019 05:19:09 +0000 (01:19 -0400)]
Implement negatives, use typedef

2 years agoImplement pow
David Kerkeslager [Tue, 1 Oct 2019 05:06:40 +0000 (01:06 -0400)]
Implement pow

2 years agoVariables and basic math
David Kerkeslager [Tue, 1 Oct 2019 04:32:51 +0000 (00:32 -0400)]
Variables and basic math

2 years agoGenerate a C program (which has a memory error after completion, but still)
David Kerkeslager [Sat, 28 Sep 2019 19:39:05 +0000 (15:39 -0400)]
Generate a C program (which has a memory error after completion, but still)

2 years agoRemove dead namedtuple
David Kerkeslager [Sat, 28 Sep 2019 00:56:20 +0000 (20:56 -0400)]
Remove dead namedtuple

2 years agoHandle anonymous lambdas
David Kerkeslager [Sat, 28 Sep 2019 00:51:51 +0000 (20:51 -0400)]
Handle anonymous lambdas

2 years agoGenerate structures
David Kerkeslager [Sat, 28 Sep 2019 00:36:28 +0000 (20:36 -0400)]
Generate structures

3 years agoSimplify list construction
David Kerkeslager [Wed, 28 Aug 2019 15:54:01 +0000 (11:54 -0400)]
Simplify list construction

3 years agoAdd support for lists to IR, clean up
David Kerkeslager [Wed, 28 Aug 2019 03:37:41 +0000 (23:37 -0400)]
Add support for lists to IR, clean up

3 years agoAdd environments
David Kerkeslager [Sat, 24 Aug 2019 10:11:11 +0000 (06:11 -0400)]
Add environments

3 years agoHandle arguments to functions
David Kerkeslager [Sat, 24 Aug 2019 10:10:48 +0000 (06:10 -0400)]
Handle arguments to functions

3 years agoFix/simplify the generation of if/else statements
David Kerkeslager [Fri, 23 Aug 2019 05:40:00 +0000 (01:40 -0400)]
Fix/simplify the generation of if/else statements

3 years agoFix the generation of function CIR
David Kerkeslager [Fri, 23 Aug 2019 03:42:15 +0000 (23:42 -0400)]
Fix the generation of function CIR

3 years agoAdd Rope_length (mostly as a way to add __attribute__((pure)) to the codebase
David Kerkeslager [Tue, 20 Aug 2019 02:28:18 +0000 (22:28 -0400)]
Add Rope_length (mostly as a way to add __attribute__((pure)) to the codebase

3 years agoBegin adding some C code
David Kerkeslager [Mon, 19 Aug 2019 06:34:59 +0000 (02:34 -0400)]
Begin adding some C code

3 years agoBetter TODOs
David Kerkeslager [Wed, 24 Jul 2019 18:04:21 +0000 (14:04 -0400)]
Better TODOs

3 years agoAdd a very basic optimization pass
David Kerkeslager [Wed, 24 Jul 2019 18:00:40 +0000 (14:00 -0400)]
Add a very basic optimization pass

3 years agoRemove unnecessary pushing/popping for integer literal expressions
David Kerkeslager [Wed, 24 Jul 2019 17:20:35 +0000 (13:20 -0400)]
Remove unnecessary pushing/popping for integer literal expressions

3 years agoRemove unecessary pushing/popping for function calls
David Kerkeslager [Wed, 24 Jul 2019 17:12:30 +0000 (13:12 -0400)]
Remove unecessary pushing/popping for function calls

3 years agoRemove unecessary pushing/popping for function arguments
David Kerkeslager [Wed, 24 Jul 2019 16:58:53 +0000 (12:58 -0400)]
Remove unecessary pushing/popping for function arguments

3 years agoRemove unecessary pushing/popping for string literals
David Kerkeslager [Wed, 24 Jul 2019 16:56:26 +0000 (12:56 -0400)]
Remove unecessary pushing/popping for string literals

3 years agoGenerate lambda expressions
David Kerkeslager [Thu, 18 Jul 2019 13:23:51 +0000 (09:23 -0400)]
Generate lambda expressions

3 years agoUse flatten()
David Kerkeslager [Thu, 18 Jul 2019 03:17:37 +0000 (23:17 -0400)]
Use flatten()

3 years agoAdd crossplatform IR generation for if/else statements
David Kerkeslager [Thu, 18 Jul 2019 03:10:29 +0000 (23:10 -0400)]
Add crossplatform IR generation for if/else statements

3 years agoAdd crossplatform IR generation up to the point of if/else statements
David Kerkeslager [Thu, 18 Jul 2019 01:57:16 +0000 (21:57 -0400)]
Add crossplatform IR generation up to the point of if/else statements

3 years agoMake it easier to run the tests without memory leak tests
David Kerkeslager [Wed, 17 Jul 2019 22:09:46 +0000 (18:09 -0400)]
Make it easier to run the tests without memory leak tests

3 years agoMake it easier to run without memory leak tests
David Kerkeslager [Wed, 17 Jul 2019 22:09:46 +0000 (18:09 -0400)]
Make it easier to run without memory leak tests

3 years agoUpdate Jinja
David Kerkeslager [Sat, 11 May 2019 15:41:06 +0000 (11:41 -0400)]
Update Jinja

3 years agoUpdate the README
David Kerkeslager [Sat, 11 May 2019 15:37:14 +0000 (11:37 -0400)]
Update the README

4 years agoAdd support for nested functions with the same name in different contexts
David Kerkeslager [Sat, 6 Jan 2018 20:12:55 +0000 (15:12 -0500)]
Add support for nested functions with the same name in different contexts

4 years agoDesugar function definitions to assignments to lambda
David Kerkeslager [Sat, 6 Jan 2018 19:50:54 +0000 (14:50 -0500)]
Desugar function definitions to assignments to lambda

4 years agoAdded lambda expressions
David Kerkeslager [Fri, 5 Jan 2018 05:00:52 +0000 (00:00 -0500)]
Added lambda expressions

4 years agoRemove list get expression
David Kerkeslager [Thu, 4 Jan 2018 21:34:50 +0000 (16:34 -0500)]
Remove list get expression

4 years agoAdded a CPS conversion pass (which currently does not actually convert)
David Kerkeslager [Thu, 4 Jan 2018 21:31:21 +0000 (16:31 -0500)]
Added a CPS conversion pass (which currently does not actually convert)

4 years agoDesugaring pass (#9)
David Kerkeslager [Sun, 31 Dec 2017 03:38:04 +0000 (22:38 -0500)]
Desugaring pass (#9)

* Implemented the desugaring pass, except for exception support; also badly needs cleanup of dead code

* Pass through metadata to end of desugaring phase (for error reporting)

* Pass through more metadata, package it at tokenization phase

* Added error handling to desugared code

* Add line numbers to function call errors, clean up

* Delete dead code

4 years agoRemoved one more test using ternary comparison
David Kerkeslager [Sun, 31 Dec 2017 01:41:49 +0000 (20:41 -0500)]
Removed one more test using ternary comparison

4 years agoRemove support for ternary comparison operators
David Kerkeslager [Sun, 31 Dec 2017 00:38:35 +0000 (19:38 -0500)]
Remove support for ternary comparison operators

4 years agoAdded two more compiler passes
David Kerkeslager [Sat, 30 Dec 2017 09:04:48 +0000 (04:04 -0500)]
Added two more compiler passes

4 years agoVisual cleanup
David Kerkeslager [Sat, 30 Dec 2017 08:33:02 +0000 (03:33 -0500)]
Visual cleanup

4 years agoReuse the parent stack in current stack frame
David Kerkeslager [Tue, 12 Dec 2017 23:58:42 +0000 (18:58 -0500)]
Reuse the parent stack in current stack frame

4 years agoUse snapshots of the stack to restore stack to its previous state
David Kerkeslager [Tue, 12 Dec 2017 23:55:15 +0000 (18:55 -0500)]
Use snapshots of the stack to restore stack to its previous state

4 years agoAllocate Fur stacks on the C heap
David Kerkeslager [Tue, 12 Dec 2017 23:44:15 +0000 (18:44 -0500)]
Allocate Fur stacks on the C heap

4 years agoSet the environment to the same variable name
David Kerkeslager [Tue, 12 Dec 2017 23:37:37 +0000 (18:37 -0500)]
Set the environment to the same variable name

5 years agoChange parent_jump to parentJump to conform to previously used code style
David Kerkeslager [Mon, 25 Sep 2017 21:55:10 +0000 (17:55 -0400)]
Change parent_jump to parentJump to conform to previously used code style

5 years agoClean up stacks in the case of an exception
David Kerkeslager [Mon, 25 Sep 2017 21:49:12 +0000 (17:49 -0400)]
Clean up stacks in the case of an exception

5 years agoAdded a shell script that can be used to run Valgrind on Fur programs
David Kerkeslager [Sun, 24 Sep 2017 22:10:17 +0000 (18:10 -0400)]
Added a shell script that can be used to run Valgrind on Fur programs

5 years agoAdd very rudimentary line numbers to exceptions
David Kerkeslager [Sun, 24 Sep 2017 22:08:20 +0000 (18:08 -0400)]
Add very rudimentary line numbers to exceptions

5 years agoSimple exceptions (#6)
David Kerkeslager [Fri, 22 Sep 2017 03:38:34 +0000 (23:38 -0400)]
Simple exceptions (#6)

* Added basic exceptions

5 years agoMove .output.txt to .stdout.txt to reflect which output stream the files contain
David Kerkeslager [Thu, 21 Sep 2017 22:46:41 +0000 (18:46 -0400)]
Move .output.txt to .stdout.txt to reflect which output stream the files contain

5 years agoCapture stderr in integration tests
David Kerkeslager [Thu, 21 Sep 2017 22:40:00 +0000 (18:40 -0400)]
Capture stderr in integration tests

5 years agoStart passing around a jump buffer to handle errors
David Kerkeslager [Wed, 20 Sep 2017 22:32:08 +0000 (18:32 -0400)]
Start passing around a jump buffer to handle errors

5 years agoPass arguments to infix operators via the stack
David Kerkeslager [Thu, 14 Sep 2017 23:43:23 +0000 (19:43 -0400)]
Pass arguments to infix operators via the stack

5 years agoReuse normalize_basic_infix_operation in implementation of normalize_comparison_expre...
David Kerkeslager [Thu, 14 Sep 2017 23:23:06 +0000 (19:23 -0400)]
Reuse normalize_basic_infix_operation in implementation of normalize_comparison_expression

5 years agoMove desugaring ternary comparison operators into the normalization step
David Kerkeslager [Thu, 14 Sep 2017 23:06:05 +0000 (19:06 -0400)]
Move desugaring ternary comparison operators into the normalization step

5 years agoAdd a stack, and use that for function call arguments
David Kerkeslager [Sat, 2 Sep 2017 13:04:02 +0000 (09:04 -0400)]
Add a stack, and use that for function call arguments

5 years agoAdded a future folder to examples
David Kerkeslager [Fri, 1 Sep 2017 21:49:00 +0000 (17:49 -0400)]
Added a future folder to examples

5 years agoFix link
David Kerkeslager [Tue, 29 Aug 2017 18:18:58 +0000 (14:18 -0400)]
Fix link

5 years agoAdd structures, fix link
David Kerkeslager [Tue, 29 Aug 2017 18:17:58 +0000 (14:17 -0400)]
Add structures, fix link

5 years agoOne more thing it supports
David Kerkeslager [Tue, 29 Aug 2017 18:15:09 +0000 (14:15 -0400)]
One more thing it supports

5 years agoAdded basic README
David Kerkeslager [Tue, 29 Aug 2017 18:10:08 +0000 (14:10 -0400)]
Added basic README

5 years agoAdded structs
David Kerkeslager [Sat, 26 Aug 2017 20:00:35 +0000 (16:00 -0400)]
Added structs

5 years agoAdd double-quoted strings
David Kerkeslager [Fri, 25 Aug 2017 03:52:21 +0000 (23:52 -0400)]
Add double-quoted strings

5 years agoAdd a string concatenation operator
David Kerkeslager [Thu, 24 Aug 2017 23:55:20 +0000 (19:55 -0400)]
Add a string concatenation operator

5 years agoAdded list literals
David Kerkeslager [Fri, 18 Aug 2017 22:06:15 +0000 (18:06 -0400)]
Added list literals

5 years agoAdded if expression statements
David Kerkeslager [Thu, 17 Aug 2017 15:33:33 +0000 (11:33 -0400)]
Added if expression statements

5 years agoMake "do" a keyword
David Kerkeslager [Mon, 14 Aug 2017 06:34:41 +0000 (02:34 -0400)]
Make "do" a keyword

5 years agoRemove TODO with unclear reasoning
David Kerkeslager [Mon, 14 Aug 2017 04:19:37 +0000 (00:19 -0400)]
Remove TODO with unclear reasoning

5 years agoNormalize function expressions
David Kerkeslager [Sun, 13 Aug 2017 19:45:45 +0000 (15:45 -0400)]
Normalize function expressions

5 years agoNormalize symbol expressions
David Kerkeslager [Sun, 13 Aug 2017 19:18:11 +0000 (15:18 -0400)]
Normalize symbol expressions

5 years agoFixed some TODOs
David Kerkeslager [Sat, 12 Aug 2017 20:08:21 +0000 (16:08 -0400)]
Fixed some TODOs

5 years agoAdded some todos
David Kerkeslager [Sat, 12 Aug 2017 19:24:15 +0000 (15:24 -0400)]
Added some todos

5 years agoNormalize symbol expressions
David Kerkeslager [Sat, 12 Aug 2017 19:08:28 +0000 (15:08 -0400)]
Normalize symbol expressions

5 years agoNormalize literal expressions
David Kerkeslager [Sat, 12 Aug 2017 18:56:12 +0000 (14:56 -0400)]
Normalize literal expressions

5 years agoPrevent assignment to a builtin variable
David Kerkeslager [Sat, 12 Aug 2017 18:44:01 +0000 (14:44 -0400)]
Prevent assignment to a builtin variable

5 years agoAllow the results of function calls to be immediately called
David Kerkeslager [Sat, 12 Aug 2017 18:28:22 +0000 (14:28 -0400)]
Allow the results of function calls to be immediately called

5 years agoAdd support for parenthesized functions
David Kerkeslager [Sat, 12 Aug 2017 18:01:11 +0000 (14:01 -0400)]
Add support for parenthesized functions

5 years agoJust pass through the internals of parentheses, unwrapped
David Kerkeslager [Fri, 11 Aug 2017 21:55:35 +0000 (17:55 -0400)]
Just pass through the internals of parentheses, unwrapped

5 years agoClosures (and garbage collection for environments, which is required by closures...
David Kerkeslager [Fri, 11 Aug 2017 15:50:11 +0000 (11:50 -0400)]
Closures (and garbage collection for environments, which is required by closures) (#1)

* Add proper reference counting to environments

* It has become clear we need a garbage collector for environments before we can implement closures

* Allow line comments starting with #

* Allocate Environments from a garbage-collected EnvironmentPool

* Wrap closure functions in a struct in preparation for storing the defining environment with them

* Move the instantiation of closures into where they are created

* Fixed a bug in the mark/sweep algorithm:

* It would infinitely recurse in the case of cycles, because nothing was
  checking that Environments had already been marked.
* Simply exiting on self->mark == mark would fix this, but introduce a
  separate, worse bug where recursion wouldn't reach some live objects,
  since some objects might already be marked with the current mark due
  to previous cycles.
* To fix, I introduced a pass over the pool that marks everything false
  so we can reliably assume that self->mark == true means that the
  environment has been marked in the current GC round. It's slower than
  I wanted, but it's better to do the correct thing slowly than the
  wrong thing quickly.

* Store the defining environment on closures and GC it appropriately

* Test a simple case of closures and fix the discovered errors

* Add a test that explicitly demonstrates freeing a cycle

* Allow user-defined functions to take arguments

* Another closure example

5 years agoIgnore symbol folders
David Kerkeslager [Thu, 10 Aug 2017 03:36:13 +0000 (23:36 -0400)]
Ignore symbol folders

5 years agoAdd a suite of memory leak tests
David Kerkeslager [Thu, 10 Aug 2017 03:33:31 +0000 (23:33 -0400)]
Add a suite of memory leak tests

5 years agoFinish conditional compilation of operators
David Kerkeslager [Thu, 10 Aug 2017 01:59:30 +0000 (21:59 -0400)]
Finish conditional compilation of operators

5 years agoDon't compile in some unused operators
David Kerkeslager [Thu, 10 Aug 2017 01:46:12 +0000 (21:46 -0400)]
Don't compile in some unused operators

5 years agoClean up expression transformation a bit
David Kerkeslager [Thu, 10 Aug 2017 01:23:19 +0000 (21:23 -0400)]
Clean up expression transformation a bit

5 years agoAppease -Wall
David Kerkeslager [Thu, 10 Aug 2017 00:19:45 +0000 (20:19 -0400)]
Appease -Wall

5 years agoGo back to constructors and destructors
David Kerkeslager [Wed, 9 Aug 2017 18:46:08 +0000 (14:46 -0400)]
Go back to constructors and destructors

5 years agoGo back to allocating environments on the heap
David Kerkeslager [Wed, 9 Aug 2017 18:37:41 +0000 (14:37 -0400)]
Go back to allocating environments on the heap