Fixing a regression in Codegen.transform which effectively disabled direct call optimization: FunctionNode.FUNCTION_STATEMENT should be compared against fn.getFunctionType(), not fn.getType()

This commit is contained in:
igor%mir2.org 2003-03-11 17:17:57 +00:00
parent ca96d4b9c0
commit 3bbdba7f56

View File

@ -95,7 +95,9 @@ public class Codegen extends Interpreter {
for (int i = 0; i != functionCount; ++i) {
OptFunctionNode fn;
fn = (OptFunctionNode)tree.getFunctionNode(i);
if (fn.getType() == FunctionNode.FUNCTION_STATEMENT) {
if (fn.getFunctionType()
== FunctionNode.FUNCTION_STATEMENT)
{
String name = fn.getFunctionName();
if (name.length() != 0) {
if (possibleDirectCalls == null) {