[phc-internals] Issue 114 in phc: $php_errormsg is not working
inside a function
codesite-noreply at google.com
codesite-noreply at google.com
Mon Oct 5 14:33:30 IST 2009
Updates:
Status: Accepted
Labels: -Priority-Medium Priority-High Component-Codegen Difficulty-Trivial
Comment #1 on issue 114 by paul.biggar: $php_errormsg is not working inside
a function
http://code.google.com/p/phc/issues/detail?id=114
Thanks for the report. Try the following patch:
Index: src/optimize/Prune_symbol_table.cpp
===================================================================
--- src/optimize/Prune_symbol_table.cpp (revision 3300)
+++ src/optimize/Prune_symbol_table.cpp (working copy)
@@ -111,6 +111,11 @@
// record variable names for removing globals
if (record_globals)
(*vars)[*in->value] = true;
+
+ // Dont do this optimization in the presence of
php_errormsg.
+ // There are much better ways of doing this, but this is
the simplest.
+ if (*in->value == "php_errormsg")
+ prune = false;
}
void post_variable_variable (Variable_variable* in)
It seems to work for me, but I'm running more tests now to make sure it
doesnt break
anything.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
More information about the phc-internals
mailing list