Commit Graph

38 Commits

Author SHA1 Message Date
Kartik Agaram 8a6ad45d8d 7100 - tile: render string literals 2020-10-25 18:14:12 -07:00
Kartik Agaram 517ef9f64f 7099 2020-10-25 15:23:49 -07:00
Kartik Agaram f37e7f33e8 7098 - tile: string values
Strings can contain spaces.
2020-10-25 14:34:40 -07:00
Kartik Agaram 1137dd2a99 tile: process space at start of word
This was very difficult to debug.

We still need to process space in the middle of a word.
2020-10-24 16:52:33 -07:00
Kartik Agaram 4568607634 7087 - defining functions now seems to be working 2020-10-20 22:15:32 -07:00
Kartik Agaram 5532ea013b 7066 - tile: some more primitives for testing
Lesson learned: functions store args in _reverse_ order. Since evaluation
is very frequent, it's worth optimizing for it.
2020-10-19 22:41:46 -07:00
Kartik Agaram 1158758f20 7063 - tile: scaffolding for defining functions 2020-10-18 23:41:57 -07:00
Kartik Agaram 956394017e 7059
Cursor now in the right place after rename. But stack still doesn't show
the value of a name.
2020-10-18 22:48:11 -07:00
Kartik Agaram 5f8c473c55 7046 - start of flow for naming words
Names don't stick yet, but we have a scaffolding for printing a dialog
and accepting input.
2020-10-17 11:40:29 -07:00
Kartik Agaram 5fe86b8348 7020
snapshot: migrating call-path to store word handles rather than word indexes.

ctrl-a and ctrl-e are segfaulting. There are likely other problems.

The major new change here is that allocating a call-path-element no longer
initializes it.
2020-10-14 03:31:06 -07:00
Kartik Agaram 598f942624 7010
A new example that better demonstrates the value of named arguments.
2020-10-12 10:10:31 -07:00
Kartik Agaram 1c441baf96 7000 - tile: previous-word also bumps up to caller 2020-10-11 00:11:04 -07:00
Kartik Agaram ae6340f225 6991 - tile: nested calls now expanding
I just needed to remove an obsolete guardrail in render-line.

Still seeing some bugs with left-arrow when playing around with the full
expansion of `1 2+`.
2020-10-10 21:22:00 -07:00
Kartik Agaram 831a133a4b 6990
Bring back definitions for 1+ and 2+. Expanding nested calls still doesn't
work.
2020-10-10 02:08:46 -07:00
Kartik Agaram e8367b2bc2 6987 - left-arrow to jump to caller/callee
Starting to work. I'm still seeing problems in lines with multiple expanded
calls, but perhaps that's a rendering issue.

The code is absolutely ghastly.
2020-10-10 01:42:58 -07:00
Kartik Agaram 7c6bb4d316 6977
Snapshot. We've gotten arrow keys navigating, but segfault when getting
to the second word in an expanded function call body.
2020-10-09 21:17:51 -07:00
Kartik Agaram e9957c78da 6972 - tile: stop persisting cursor-word
Rather surprisingly, this transformation worked the first time!
2020-10-08 20:32:34 -07:00
Kartik Agaram b8fd119b78 6969
Fix and cleanup.
2020-10-06 00:41:20 -07:00
Kartik Agaram ce094a5d82 6968
Snapshot that requires a check in the Mu compiler.

Currently I don't spill a register if it could possibly be over-written
by a function output within. However, find-in-call-path is a good example
of where this constraint is too lenient and results in unsafe code. The
variable `curr` gets clobbered during loop update by the variable `match?`.

What's the answer? Perhaps we should ban all conditional updates to function
outputs? That'd be dashed inconvenient.
2020-10-06 00:36:28 -07:00
Kartik Agaram e41bc160a0 6967
Function expand/contract still works, but the implementation is totally
different under the hood.
2020-10-05 22:21:27 -07:00
Kartik Agaram a9e56c46c6 6966 2020-10-05 21:35:46 -07:00
Kartik Agaram 88e23b97df 6965 2020-10-05 21:32:45 -07:00
Kartik Agaram 6833b4542c 6962
Slowly hoist cursor-word from environment to sandbox. This isn't its final
destination.
2020-10-05 20:44:50 -07:00
Kartik Agaram f3ca0e3cb3 6922 2020-10-01 20:39:56 -07:00
Kartik Agaram 7258083c6f 6884 2020-09-27 07:32:08 -07:00
Kartik Agaram 009559f1fb 6877
Track just whether to step inside or not.
2020-09-26 23:07:11 -07:00
Kartik Agaram 866e6e72a8 6876
Back to commit 6872.
2020-09-26 23:05:36 -07:00
Kartik Agaram e5aa1b3cb6 6875
Snapshot. Caching subsidiary stacks is a dead end; they're just the final
iteration. We need to render all iterations.
2020-09-26 23:02:39 -07:00
Kartik Agaram 78cfd370e5 6873
Now saving the subsidiary stack.
2020-09-26 22:27:09 -07:00
Kartik Agaram ebb93c6d58 6870
Emit a stack of not ints but more complex objects containing the int payload.

Function calls again segfaulting.
2020-09-26 21:59:50 -07:00
Kartik Agaram 65e6633b79 6869 2020-09-26 21:30:04 -07:00
Kartik Agaram 2929ca471b 6857 2020-09-25 16:58:18 -07:00
Kartik Agaram 5914ed31a9 6854 2020-09-25 09:34:24 -07:00
Kartik Agaram 0ecd596b70 6853 - tile: initialize a test function definition 2020-09-24 21:17:25 -07:00
Kartik Agaram a04f816cff 6852 - tile: placeholder for lexical scopes 2020-09-24 20:44:13 -07:00
Kartik Agaram b27a1a2523 6851 2020-09-24 20:39:22 -07:00
Kartik Agaram 3daf4cb3e3 6845 2020-09-23 22:35:00 -07:00
Kartik Agaram 22a7849a5e 6844 - tile: initial data model
I actually deleted a test here! Hard-core prototype mode.
2020-09-23 22:24:51 -07:00