Justin Ethier
9727e9f86c
Use memq instead of member
...
We are looking up symbols so memq can be used instead, which is must faster at scale.
2018-12-18 22:01:27 -05:00
Justin Ethier
70b27ccd22
Speed up free-vars checking for primitives
...
We know prims are only symbols, so instead of checking for primitives in the top-level cond (which is expensive) we check for it as a sub-condition off of the (ref?) condition. This lets us avoid a call to memq unless we already are inspecting a symbol.
2018-12-18 22:00:19 -05:00
Justin Ethier
a46a9e92d3
Pre-sort the list of globals
...
This cuts down on the amount of work that must be done by the alpha conversion.
2018-12-18 16:33:24 -05:00
Justin Ethier
e864049136
Remove experimental code
2018-12-18 16:25:24 -05:00
Justin Ethier
49017f5731
Latest attempt to speed this up
2018-12-18 13:20:43 -05:00
Justin Ethier
41d35279d0
Added TODO, comments
2018-12-18 10:08:53 -05:00
Justin Ethier
cbb8357f66
WIP - fast insert
2018-12-17 18:32:25 -05:00
Justin Ethier
68e91f2408
WIP
2018-12-16 19:03:15 -05:00
Justin Ethier
506452654f
Issue #286
2018-12-14 17:50:29 -05:00
Justin Ethier
991172ed88
Increment the year
2018-12-14 17:15:50 -05:00
Justin Ethier
d54a0130c0
Issue #284 - Fix how udf:prims are compiled
2018-12-14 14:04:19 -05:00
Justin Ethier
c6aa29d7ab
Extend case for udf's
2018-12-14 13:28:37 -05:00
Justin Ethier
dbca1ee36e
Get back up-and-running as a program
2018-12-13 18:22:46 -05:00
Justin Ethier
0862070e52
Reorganize, disable new code for now
2018-12-12 18:55:41 -05:00
Justin Ethier
27d4c3e95f
Added TODO
2018-12-12 17:33:43 -05:00
Justin Ethier
2d9ba5a9e3
New version of (list?)
2018-12-12 13:43:47 -05:00
Justin Ethier
9eddbb812b
Version bump
2018-12-12 13:30:40 -05:00
Justin Ethier
c625e8b0e6
Second try with fast list
2018-12-05 17:39:09 -05:00
Justin Ethier
de5d83f21a
Added comment
2018-12-04 22:58:51 -05:00
Justin Ethier
1a586b188c
Disable fast list functions
...
Having problems getting macros to work in a safe way with Cyc-seq. Since these functions were never a big win anyway, we are going to disable them for now.
2018-12-04 17:51:35 -05:00
Justin Ethier
c65977a6a2
Cut over list_2 to new macro
2018-12-04 14:51:03 -05:00
Justin Ethier
f7d76bd90a
Do not use make_cell
2018-12-03 18:06:59 -05:00
Justin Ethier
01a73839ac
Cut cons over to new expr-safe code
...
Want to ensure cons can be used safely as part of a Cyc-seq. This cannot happen if the cons used the previous make_pair macro as that can only be called at the top of a function as part of a declaration.
2018-12-03 13:17:17 -05:00
Justin Ethier
f9d03342f2
Issue #282 - assign to temporary variables
...
Do this to prevent issues when one variable's value depends upon another's.
2018-12-02 22:21:27 -05:00
Justin Ethier
69a35f7d2e
Revert I/O changes for now
2018-11-30 17:50:34 -05:00
Justin Ethier
f5b7c75184
Temporarily revert previous changes for cons
2018-11-30 17:26:45 -05:00
Justin Ethier
8ccd2b3525
WIP, seq safe allocation/assignment of pairs
2018-11-30 13:38:10 -05:00
Justin Ethier
e6e6527be7
WIP
2018-11-29 18:51:08 -05:00
Justin Ethier
a918f2cb2d
issue #282 - Put numeric operations in body
...
This avoids ordering issues. But I think we still have trouble with other primtives. Is there ever a legitimate need to declare a c var for a prim??? I am not seeing it, especially with our changes now for Cyc-seq.
2018-11-29 13:36:07 -05:00
Justin Ethier
32a2024094
Version bump
2018-11-28 18:59:37 -05:00
Justin Ethier
984ddc76dc
check for list before calling (length)
2018-11-27 18:59:28 -05:00
Justin Ethier
27ca613d0a
Remove dead code
2018-11-27 18:46:29 -05:00
Justin Ethier
bdcfea1989
Version bump
2018-11-26 10:48:22 -05:00
Justin Ethier
1145d1f8e2
Only generate a let if local var is used
...
If the variable is not used we will get a warning from the C compiler. So let's not generate a let unless the var is actually used.
We may want to revisit this later for a related optimization, maybe via Cyc-seq.
2018-11-23 21:46:51 -05:00
Justin Ethier
729c0d4025
Add check for CPS prims
2018-11-22 23:15:12 -05:00
Justin Ethier
931b449579
Extra cases for prim use-alloca and & operator
2018-11-22 17:40:46 -05:00
Justin Ethier
b0e6c42eb1
Added prim->c-func-uses-alloca?
2018-11-22 17:33:06 -05:00
Justin Ethier
1f1b032641
Support alloca for all literals
2018-11-21 19:19:00 -05:00
Justin Ethier
e63349b830
Remove debug code
2018-11-21 19:13:32 -05:00
Justin Ethier
7a1b28db37
WIP
2018-11-21 19:08:45 -05:00
Justin Ethier
03b2dd7181
WIP
2018-11-21 18:53:50 -05:00
Justin Ethier
ab4f9ee7a4
WIP - alloca support for literals
2018-11-21 13:05:29 -05:00
Justin Ethier
16e1600662
Propagate use-alloca parameter for constants
2018-11-20 18:54:47 -05:00
Justin Ethier
bab9acd49e
Added c-compile-string
2018-11-20 18:07:29 -05:00
Justin Ethier
90c0d79887
Added TODO
2018-11-20 17:21:05 -05:00
Justin Ethier
16149d1492
Added failsafe
2018-11-20 13:23:10 -05:00
Justin Ethier
244f569df0
Properly handle quoted expressions
2018-11-19 18:52:11 -05:00
Justin Ethier
435bbb3a95
Revert debug code
2018-11-19 17:10:55 -05:00
Justin Ethier
4b0466f37b
Use alloca for any allocations with let/local-vars
...
This prevents situations where local variables are allocated within local scope blocks and then are assigned to pointers. This is necessary as those locals are not guaranteed to remain on the stack once the block ends, so the pointer can easily point to random memory, leading to GC corruption and/or undefined behavior.
2018-11-19 17:09:17 -05:00
Justin Ethier
4863f0d4d1
Added a DEBUG line
2018-11-19 10:32:30 -05:00