summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-14 07:22:16 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-14 07:22:16 -0800
commitee7866ae60fe4357bbcd453dbfdf5a90528dda7b (patch)
treeaa53042bc2d2076fd8d32d3c80400cd977a483c1 /parser.y
parent8c25a6210a1fc44901fd6ebf7fb3f63c0ca5eec0 (diff)
downloadtxr-ee7866ae60fe4357bbcd453dbfdf5a90528dda7b.tar.gz
txr-ee7866ae60fe4357bbcd453dbfdf5a90528dda7b.tar.bz2
txr-ee7866ae60fe4357bbcd453dbfdf5a90528dda7b.zip
gethash_c: review uses and improve or replace.
* eval.c (env_fbind, env_vbind, reg_symacro): Use gethash_l instead of gethash_c to eliminate repeated cdr operations on the same cell. * hash.c (sethash): Since new_p is never used, eliminated it and use nulloc. (group_reduce): Use gethash_l instead of gethash_c. * lib.c (obj_init): Replace rplacd(gethash_c(...)) pattern whose return value is not used with with sethash. We lose some diagnosability here since sethash doesn't take a "self" argument. (obj_print_impl, obj_hash_merge): Use gethash_l instead of gethash_c. * parser.y (ensure_parser, parser_circ_def, get_visible_syms, rlset): Use gethash_l instead of gethash_c.
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y3
1 files changed, 1 insertions, 2 deletions
diff --git a/parser.y b/parser.y
index d29944e1..4318e660 100644
--- a/parser.y
+++ b/parser.y
@@ -1628,8 +1628,7 @@ static val rlviable(val form)
val rlset(val form, val info)
{
if (rlviable(form)) {
- val cell = gethash_c(lit("rlcp"), form_to_ln_hash, form, nulloc);
- loc place = cdr_l(cell);
+ loc place = gethash_l(lit("rlcp"), form_to_ln_hash, form, nulloc);
if (nilp(deref(place)))
set(place, info);
}