return null;
}
private static void addInterpreted(Env env, ArrayValue result, int i)
{
Expr expr = env.peekCall(i);
if (expr instanceof CallExpr) {
CallExpr callExpr = (CallExpr) expr;
String functionName = callExpr.getName();
if ("debug_backtrace".equals(functionName))
return;
ArrayValue call = new ArrayValueImpl();
result.put(call);
if (callExpr.getFileName() != null) {
call.put(FILE,
env.createString(callExpr.getFileName()));
call.put(LINE,
LongValue.create(callExpr.getLine()));
}
call.put(FUNCTION,
env.createString(callExpr.getName()));
// Create "args" argument value array
// evaluating args a second time is problematic, affecting mediawiki
// php/180q
//ArrayValueImpl args = evalArgsArray(env, callExpr);
ArrayValueImpl args = new ArrayValueImpl(env.peekArgs(i));
call.put(ARGS, args);
}
else if (expr instanceof ObjectMethodExpr) {
ObjectMethodExpr callExpr = (ObjectMethodExpr) expr;
ArrayValue call = new ArrayValueImpl();
result.put(call);
if (callExpr.getFileName() != null) {
call.put(FILE,
env.createString(callExpr.getFileName()));
call.put(LINE,
LongValue.create(callExpr.getLine()));
}
call.put(FUNCTION,
env.createString(callExpr.getName()));
call.put(CLASS,
env.createString(env.peekCallThis(i).getClassName()));
call.put(TYPE, env.createString("->"));
call.put(ARGS, new ArrayValueImpl());
}
else if (expr instanceof FunIncludeExpr) {
ArrayValue call = new ArrayValueImpl();
result.put(call);
if (expr.getFileName() != null) {
call.put(FILE, env.createString(expr.getFileName()));
call.put(LINE, LongValue.create(expr.getLine()));
}
call.put(FUNCTION, env.createString("include"));
}
else if (expr instanceof FunIncludeOnceExpr) {
boolean isRequire = ((FunIncludeOnceExpr) expr).isRequire();
ArrayValue call = new ArrayValueImpl();
result.put(call);
if (expr.getFileName() != null) {
call.put(FILE, env.createString(expr.getFileName()));
call.put(LINE, LongValue.create(expr.getLine()));
}
String name;
if (isRequire)