Commit 41ab2ae2 by Nathan Sidwell Committed by Nathan Sidwell

tree.c (build_shared_int_cst): Make cache file scope, and GTY it.

	* tree.c (build_shared_int_cst): Make cache file scope, and
	GTY it.

From-SVN: r55992
parent 055dd007
2002-08-02 Nathan Sidwell <nathan@codesourcery.com>
* tree.c (build_shared_int_cst): Make cache file scope, and
GTY it.
2002-08-02 Jason Merrill <jason@redhat.com> 2002-08-02 Jason Merrill <jason@redhat.com>
* cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define. * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
......
...@@ -1505,19 +1505,19 @@ build_min VPARAMS ((enum tree_code code, tree tt, ...)) ...@@ -1505,19 +1505,19 @@ build_min VPARAMS ((enum tree_code code, tree tt, ...))
same node; therefore, callers should never modify the node same node; therefore, callers should never modify the node
returned. */ returned. */
static GTY(()) tree shared_int_cache[256];
tree tree
build_shared_int_cst (i) build_shared_int_cst (i)
int i; int i;
{ {
static tree cache[256];
if (i >= 256) if (i >= 256)
return build_int_2 (i, 0); return build_int_2 (i, 0);
if (!cache[i]) if (!shared_int_cache[i])
cache[i] = build_int_2 (i, 0); shared_int_cache[i] = build_int_2 (i, 0);
return cache[i]; return shared_int_cache[i];
} }
tree tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment