{
ExecutionContext *ctx;
FunctionObject *replacerFunction;
- QVector<String *> propertyList;
+ // ### GC
+ QVector<Heap::String *> propertyList;
QString gap;
QString indent;
- QStack<Object *> stack;
+ // ### GC
+ QStack<Heap::Object *> stack;
Stringify(ExecutionContext *ctx) : ctx(ctx), replacerFunction(0) {}
QString Stringify::JO(Object *o)
{
- if (stack.contains(o)) {
+ if (stack.contains(o->d())) {
ctx->engine()->throwTypeError();
return QString();
}
Scope scope(ctx);
QString result;
- stack.push(o);
+ stack.push(o->d());
QString stepback = indent;
indent += gap;
QString Stringify::JA(ArrayObject *a)
{
- if (stack.contains(a)) {
+ if (stack.contains(a->d())) {
ctx->engine()->throwTypeError();
return QString();
}
Scope scope(a->engine());
QString result;
- stack.push(a);
+ stack.push(a->d());
QString stepback = indent;
indent += gap;
v = RuntimeHelpers::toString(scope.engine, v);
if (v->isString()) {
String *s = v->stringValue();
- if (!stringify.propertyList.contains(s))
- stringify.propertyList.append(s);
+ if (!stringify.propertyList.contains(s->d()))
+ stringify.propertyList.append(s->d());
}
}
}