functionPrototype->prototype = objectPrototype;
regExpPrototype->prototype = objectPrototype;
errorPrototype->prototype = objectPrototype;
- evalErrorPrototype->prototype = errorPrototype;
- rangeErrorPrototype->prototype = errorPrototype;
- referenceErrorPrototype->prototype = errorPrototype;
- syntaxErrorPrototype->prototype = errorPrototype;
- typeErrorPrototype->prototype = errorPrototype;
- uRIErrorPrototype->prototype = errorPrototype;
+ evalErrorPrototype->prototype = objectPrototype;
+ rangeErrorPrototype->prototype = objectPrototype;
+ referenceErrorPrototype->prototype = objectPrototype;
+ syntaxErrorPrototype->prototype = objectPrototype;
+ typeErrorPrototype->prototype = objectPrototype;
+ uRIErrorPrototype->prototype = objectPrototype;
objectCtor = Value::fromObject(new (memoryManager) ObjectCtor(rootContext));
stringCtor = Value::fromObject(new (memoryManager) StringCtor(rootContext));
Object *ExecutionEngine::newSyntaxErrorObject(ExecutionContext *ctx, DiagnosticMessage *message)
{
- SyntaxErrorObject *object = new (memoryManager) SyntaxErrorObject(ctx, message);
- object->prototype = syntaxErrorPrototype;
- return object;
+ return new (memoryManager) SyntaxErrorObject(ctx, message);
}
Object *ExecutionEngine::newReferenceErrorObject(ExecutionContext *ctx, const QString &message)
{
- ReferenceErrorObject *object = new (memoryManager) ReferenceErrorObject(ctx, message);
- object->prototype = referenceErrorPrototype;
- return object;
+ return new (memoryManager) ReferenceErrorObject(ctx, message);
}
Object *ExecutionEngine::newTypeErrorObject(ExecutionContext *ctx, const QString &message)
{
- TypeErrorObject *object = new (memoryManager) TypeErrorObject(ctx, message);
- object->prototype = typeErrorPrototype;
- return object;
+ return new (memoryManager) TypeErrorObject(ctx, message);
}
Object *ExecutionEngine::newRangeErrorObject(ExecutionContext *ctx, const QString &message)
{
- RangeErrorObject *object = new (memoryManager) RangeErrorObject(ctx, message);
- object->prototype = rangeErrorPrototype;
- return object;
+ return new (memoryManager) RangeErrorObject(ctx, message);
}
Object *ExecutionEngine::newMathObject(ExecutionContext *ctx)
: ErrorObject(ctx->argument(0))
, msg(message)
{
+ prototype = ctx->engine->syntaxErrorPrototype;
if (message)
value = Value::fromString(message->buildFullMessage(ctx));
setNameProperty(ctx);
tmpProperty.value = Value::fromString(result);
return &tmpProperty;
}
+
+
+EvalErrorObject::EvalErrorObject(ExecutionContext *ctx)
+ : ErrorObject(ctx->argument(0))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->evalErrorPrototype;
+}
+
+RangeErrorObject::RangeErrorObject(ExecutionContext *ctx)
+ : ErrorObject(ctx->argument(0))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->rangeErrorPrototype;
+}
+
+RangeErrorObject::RangeErrorObject(ExecutionContext *ctx, const QString &msg)
+ : ErrorObject(Value::fromString(ctx,msg))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->rangeErrorPrototype;
+}
+
+ReferenceErrorObject::ReferenceErrorObject(ExecutionContext *ctx)
+ : ErrorObject(ctx->argument(0))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->referenceErrorPrototype;
+}
+
+ReferenceErrorObject::ReferenceErrorObject(ExecutionContext *ctx, const QString &msg)
+ : ErrorObject(Value::fromString(ctx,msg))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->referenceErrorPrototype;
+}
+
+TypeErrorObject::TypeErrorObject(ExecutionContext *ctx)
+ : ErrorObject(ctx->argument(0))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->typeErrorPrototype;
+}
+
+TypeErrorObject::TypeErrorObject(ExecutionContext *ctx, const QString &msg)
+ : ErrorObject(Value::fromString(ctx,msg))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->typeErrorPrototype;
+}
+
+URIErrorObject::URIErrorObject(ExecutionContext *ctx)
+ : ErrorObject(ctx->argument(0))
+{
+ setNameProperty(ctx);
+ prototype = ctx->engine->uRIErrorPrototype;
+}
};
struct EvalErrorObject: ErrorObject {
- EvalErrorObject(ExecutionContext *ctx)
- : ErrorObject(ctx->argument(0)) { setNameProperty(ctx); }
+ EvalErrorObject(ExecutionContext *ctx);
virtual QString className() { return QStringLiteral("EvalError"); }
};
struct RangeErrorObject: ErrorObject {
- RangeErrorObject(ExecutionContext *ctx)
- : ErrorObject(ctx->argument(0)) { setNameProperty(ctx); }
- RangeErrorObject(ExecutionContext *ctx, const QString &msg)
- : ErrorObject(Value::fromString(ctx,msg)) { setNameProperty(ctx); }
+ RangeErrorObject(ExecutionContext *ctx);
+ RangeErrorObject(ExecutionContext *ctx, const QString &msg);
virtual QString className() { return QStringLiteral("RangeError"); }
};
struct ReferenceErrorObject: ErrorObject {
- ReferenceErrorObject(ExecutionContext *ctx)
- : ErrorObject(ctx->argument(0)) { setNameProperty(ctx); }
- ReferenceErrorObject(ExecutionContext *ctx, const QString &msg)
- : ErrorObject(Value::fromString(ctx,msg)) { setNameProperty(ctx); }
+ ReferenceErrorObject(ExecutionContext *ctx);
+ ReferenceErrorObject(ExecutionContext *ctx, const QString &msg);
virtual QString className() { return QStringLiteral("ReferenceError"); }
};
};
struct TypeErrorObject: ErrorObject {
- TypeErrorObject(ExecutionContext *ctx)
- : ErrorObject(ctx->argument(0)) { setNameProperty(ctx); }
- TypeErrorObject(ExecutionContext *ctx, const QString &msg)
- : ErrorObject(Value::fromString(ctx,msg)) { setNameProperty(ctx); }
+ TypeErrorObject(ExecutionContext *ctx);
+ TypeErrorObject(ExecutionContext *ctx, const QString &msg);
virtual QString className() { return QStringLiteral("TypeError"); }
};
struct URIErrorObject: ErrorObject {
- URIErrorObject(ExecutionContext *ctx)
- : ErrorObject(ctx->argument(0)) { setNameProperty(ctx); }
+ URIErrorObject(ExecutionContext *ctx);
virtual QString className() { return QStringLiteral("URIError"); }
};
S11.9.4_A2.4_T3 failing
S11.9.5_A2.4_T1 failing
S11.9.5_A2.4_T3 failing
-S12.14_A19_T1 failing
-S12.14_A19_T2 failing
S12.14_A7_T1 failing
S12.14_A7_T3 failing
12.14.1-1-s failing
15.2.3.5-4-145 failing
15.2.3.5-4-173 failing
15.2.3.5-4-199 failing
-15.2.3.5-4-2 failing
15.2.3.5-4-224 failing
15.2.3.5-4-252 failing
15.2.3.5-4-67 failing
15.2.3.5-4-287 failing
15.2.3.5-4-315 failing
15.2.3.5-4-36 failing
-15.2.3.5-4-40 failing
15.2.3.6-3-119 failing
15.2.3.6-3-147-1 failing
15.2.3.6-3-147 failing
15.4.4.14-9-b-i-26 failing
15.4.4.14-9-b-i-27 failing
15.4.4.14-9-b-i-29 failing
-15.4.4.14-9-b-i-30 failing
15.4.4.14-9-b-i-31 failing
15.4.4.14-9-b-i-4 failing
15.4.4.14-9-b-i-6 failing
15.4.4.16-7-c-i-29 failing
15.4.4.16-7-c-i-3 failing
15.4.4.16-7-c-i-30 failing
-15.4.4.16-7-c-i-31 failing
15.4.4.16-7-c-i-5 failing
15.4.4.16-7-c-i-7 failing
15.4.4.16-7-c-i-9 failing
15.4.4.17-7-c-i-29 failing
15.4.4.17-7-c-i-3 failing
15.4.4.17-7-c-i-30 failing
-15.4.4.17-7-c-i-31 failing
15.4.4.17-7-c-i-5 failing
15.4.4.17-7-c-i-7 failing
15.4.4.17-7-c-i-9 failing
15.4.4.18-7-c-i-29 failing
15.4.4.18-7-c-i-3 failing
15.4.4.18-7-c-i-30 failing
-15.4.4.18-7-c-i-31 failing
15.4.4.18-7-c-i-5 failing
15.4.4.18-7-c-i-7 failing
15.4.4.18-7-c-i-9 failing
15.4.4.19-8-c-i-29 failing
15.4.4.19-8-c-i-3 failing
15.4.4.19-8-c-i-30 failing
-15.4.4.19-8-c-i-31 failing
15.4.4.19-8-c-i-5 failing
15.4.4.19-8-c-i-7 failing
15.4.4.19-8-c-i-9 failing
15.4.4.20-9-c-i-29 failing
15.4.4.20-9-c-i-3 failing
15.4.4.20-9-c-i-30 failing
-15.4.4.20-9-c-i-31 failing
15.4.4.20-9-c-i-5 failing
15.4.4.20-9-c-i-7 failing
15.4.4.20-9-c-i-9 failing
15.4.4.21-8-b-iii-1-3 failing
15.4.4.21-8-b-iii-1-31 failing
15.4.4.21-8-b-iii-1-32 failing
-15.4.4.21-8-b-iii-1-33 failing
15.4.4.21-8-b-iii-1-5 failing
15.4.4.21-8-b-iii-1-7 failing
15.4.4.21-8-b-iii-1-9 failing
15.4.4.21-9-c-i-30 failing
15.4.4.21-9-c-i-31 failing
15.4.4.21-9-c-i-32 failing
-15.4.4.21-9-c-i-33 failing
15.4.4.21-9-c-i-4 failing
15.4.4.21-9-c-i-5 failing
15.4.4.21-9-c-i-6 failing
15.4.4.22-8-b-iii-1-3 failing
15.4.4.22-8-b-iii-1-31 failing
15.4.4.22-8-b-iii-1-32 failing
-15.4.4.22-8-b-iii-1-33 failing
15.4.4.22-8-b-iii-1-5 failing
15.4.4.22-8-b-iii-1-7 failing
15.4.4.22-8-b-iii-1-9 failing
15.4.4.19-8-c-i-6 failing
15.4.4.20-9-c-i-6 failing
15.4.4.21-8-b-iii-1-6 failing
-15.4.4.22-9-c-i-33 failing
15.4.4.22-8-b-iii-1-6 failing
15.4.4.16-7-b-16 failing