]> sourceware.org Git - systemtap.git/commit
PR18079: support nested autocast / @defined
authorFrank Ch. Eigler <fche@redhat.com>
Wed, 22 Jun 2016 15:43:33 +0000 (11:43 -0400)
committerCody Santing <csanting@redhat.com>
Mon, 25 Jul 2016 14:06:55 +0000 (10:06 -0400)
commitc3b8d8a8a2dea064b4509d402851d6d32d1dbb1a
tree1d19d9ed852e88ca65476ee176fb4a25f885adfa
parentdb8daf1fd5606658baaf9382696938293680e706
PR18079: support nested autocast / @defined

We now perform const-folding & dead-code-elision during the type
resolution loop, whenever an autocast expression gets evaluated.  This
way, @defined(foo()->mm) type expressions can work as nature intended.

This requires @defined() not to be short-circuit evaluated to 0 during
a random const_folding process, so a flag is introduced to control its
preservation or collapsing.  For the last (assert_resolvability) pass
in the type resolution loop, this flag is set to true, so that
genuinely unresolvable @defined($expressions) do get mapped to 0 in
time for a last elision.
elaborate.cxx
testsuite/semok/autocast14.stp
This page took 0.029976 seconds and 5 git commands to generate.