fez-lisp 1.5.202 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +233 -0
- package/lib/baked/macros.js +3 -3
- package/lib/baked/std.js +1 -1
- package/package.json +1 -1
- package/src/enhance.js +2 -2
- package/src/utils.js +1 -1
package/package.json
CHANGED
package/src/enhance.js
CHANGED
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
import { getPrefix, shake, wrapInBlock } from './utils.js'
|
12
12
|
import std from '../lib/baked/std.js'
|
13
13
|
export const OPTIMIZATIONS = {
|
14
|
-
|
14
|
+
TAILCALL: 'tail-call',
|
15
15
|
CACHE: 'memoized'
|
16
16
|
}
|
17
17
|
export const OPTIMIZED_PREFIX = 'optimized-lambda::'
|
@@ -53,7 +53,7 @@ const opt = (ast) => {
|
|
53
53
|
) {
|
54
54
|
const name = exp[1][VALUE]
|
55
55
|
const prefix = getPrefix(name)
|
56
|
-
if (prefix === OPTIMIZATIONS.
|
56
|
+
if (prefix === OPTIMIZATIONS.TAILCALL) {
|
57
57
|
const args = last.slice(1, -1)
|
58
58
|
const newName = `${OPTIMIZED_PREFIX}${name}::*${performance
|
59
59
|
.now()
|
package/src/utils.js
CHANGED
@@ -119,7 +119,7 @@ const KEYWORDS_SET = Object.values(KEYWORDS).reduce((a, b) => {
|
|
119
119
|
export const isForbiddenVariableName = (name) => {
|
120
120
|
switch (name) {
|
121
121
|
case '_':
|
122
|
-
case OPTIMIZATIONS.
|
122
|
+
case OPTIMIZATIONS.TAILCALL:
|
123
123
|
case OPTIMIZATIONS.CACHE:
|
124
124
|
return true
|
125
125
|
default:
|