compiler: make xx_constant_value methods non-const
commit597dba85b3e66a0836dd7442edcc2fda7e0703fc
authorIan Lance Taylor <iant@golang.org>
Fri, 20 Oct 2023 01:26:58 +0000 (19 18:26 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 23 Oct 2023 21:13:49 +0000 (23 14:13 -0700)
tree31c33a8a82713c4c5c466ab64dc0523f2447748b
parent45a5ab0503569e57883dca4d8e76d83dc3a60ff6
compiler: make xx_constant_value methods non-const

This changes the Expression {numeric,string,boolean}_constant_value
methods non-const.  This does not affect anything immediately,
but will be useful for later CLs in this series.

The only real effect is to Builtin_call_expression::do_export,
which remains const and can no longer call numeric_constant_value.
But it never needed to call it, as do_export runs after do_lower,
and do_lower replaces a constant expression with the actual constant.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536641
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc
gcc/go/gofrontend/expressions.h