Branch: Tag:

2018-02-09

2018-02-09 14:00:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Reduce constant folding of '.'.

Constant folding of indexing of OPT_EXTERNAL_DEPEND expressions
is typically not a good idea...

Fixes PIKE-63 (#8063).

1617:       check_tree(n,0);    -  if (!is_const(n) && !TEST_COMPAT(7, 6)) { +  if ((!is_const(n) || (n->tree_info & OPT_EXTERNAL_DEPEND)) && +  !TEST_COMPAT(7, 6)) +  {    /* Index dynamically. */    return mknode(F_INDEX, copy_node(n), mkstrnode(id));    }