diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2013-09-25 12:24:36 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-28 13:33:24 +0200 |
| commit | cf2a253f2f60c9f0c61682527d80143e72b355d4 (patch) | |
| tree | d60e8be50437e6f15513e25155817b902a2062c7 /src/qml/jsruntime/qv4functionobject.cpp | |
| parent | 7872b380063d0497ba62fecfdc92148f1ea947af (diff) | |
Move Value::fromBool, ... to a new Primitive class
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 7f4c419ddc..b4c39504f0 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -295,10 +295,10 @@ FunctionPrototype::FunctionPrototype(InternalClass *ic) void FunctionPrototype::init(ExecutionEngine *engine, const Value &ctor) { - ctor.objectValue()->defineReadonlyProperty(engine->id_length, Value::fromInt32(1)); + ctor.objectValue()->defineReadonlyProperty(engine->id_length, Primitive::fromInt32(1)); ctor.objectValue()->defineReadonlyProperty(engine->id_prototype, Value::fromObject(this)); - defineReadonlyProperty(engine->id_length, Value::fromInt32(0)); + defineReadonlyProperty(engine->id_length, Primitive::fromInt32(0)); defineDefaultProperty(QStringLiteral("constructor"), ctor); defineDefaultProperty(engine->id_toString, method_toString, 0); defineDefaultProperty(QStringLiteral("apply"), method_apply, 2); @@ -349,7 +349,7 @@ ReturnedValue FunctionPrototype::method_apply(SimpleCallContext *ctx) for (quint32 i = 0; i < alen; ++i) callData->args[i] = arr->arrayData[i].value; for (quint32 i = alen; i < len; ++i) - callData->args[i] = Value::undefinedValue(); + callData->args[i] = Primitive::undefinedValue(); } } @@ -415,7 +415,7 @@ ScriptFunction::ScriptFunction(ExecutionContext *scope, Function *function) strictMode = function->isStrict(); formalParameterCount = function->formals.size(); formalParameterList = function->formals.constData(); - defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(formalParameterCount)); + defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(formalParameterCount)); varCount = function->locals.size(); varList = function->locals.constData(); @@ -514,7 +514,7 @@ SimpleScriptFunction::SimpleScriptFunction(ExecutionContext *scope, Function *fu strictMode = function->isStrict(); formalParameterCount = function->formals.size(); formalParameterList = function->formals.constData(); - defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(formalParameterCount)); + defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(formalParameterCount)); varCount = function->locals.size(); varList = function->locals.constData(); @@ -675,7 +675,7 @@ BoundFunction::BoundFunction(ExecutionContext *scope, FunctionObject *target, Va len -= boundArgs.size(); if (len < 0) len = 0; - defineReadonlyProperty(scope->engine->id_length, Value::fromInt32(len)); + defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(len)); ExecutionEngine *v4 = scope->engine; |
