diff options
| author | Lars Knoll <lars.knoll@digia.com> | 2013-11-03 15:23:05 +0100 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-09 02:01:17 +0100 |
| commit | 412eb94de4cae754130ae855236420ebd5c42482 (patch) | |
| tree | 901af6051691c65a96abe3f69fcd3d5fc57ff80a /src/qml/jsruntime/qv4numberobject.cpp | |
| parent | e367f75d7285d2bcd10cbb35d088c96f33c02aff (diff) | |
Simplify & speed up function calling
Get rid of the SimpleCallContext, instead simply
use the CallContext data structure, but don't
initialize the unused variables.
Change-Id: I11b311986da180c62c815b516a2c55844156d0ab
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4numberobject.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp index 2000297b84..039b790aed 100644 --- a/src/qml/jsruntime/qv4numberobject.cpp +++ b/src/qml/jsruntime/qv4numberobject.cpp @@ -121,7 +121,7 @@ inline double thisNumber(ExecutionContext *ctx) return n->value.asDouble(); } -ReturnedValue NumberPrototype::method_toString(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_toString(CallContext *ctx) { double num = thisNumber(ctx); if (ctx->engine->hasException) @@ -173,7 +173,7 @@ ReturnedValue NumberPrototype::method_toString(SimpleCallContext *ctx) return Primitive::fromDouble(num).toString(ctx)->asReturnedValue(); } -ReturnedValue NumberPrototype::method_toLocaleString(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_toLocaleString(CallContext *ctx) { Scope scope(ctx); ScopedValue v(scope, thisNumberValue(ctx)); @@ -183,12 +183,12 @@ ReturnedValue NumberPrototype::method_toLocaleString(SimpleCallContext *ctx) return str.asReturnedValue(); } -ReturnedValue NumberPrototype::method_valueOf(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_valueOf(CallContext *ctx) { return thisNumberValue(ctx); } -ReturnedValue NumberPrototype::method_toFixed(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_toFixed(CallContext *ctx) { double v = thisNumber(ctx); if (ctx->engine->hasException) @@ -217,7 +217,7 @@ ReturnedValue NumberPrototype::method_toFixed(SimpleCallContext *ctx) return ctx->engine->newString(str)->asReturnedValue(); } -ReturnedValue NumberPrototype::method_toExponential(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_toExponential(CallContext *ctx) { Scope scope(ctx); double d = thisNumber(ctx); @@ -242,7 +242,7 @@ ReturnedValue NumberPrototype::method_toExponential(SimpleCallContext *ctx) return ctx->engine->newString(result)->asReturnedValue(); } -ReturnedValue NumberPrototype::method_toPrecision(SimpleCallContext *ctx) +ReturnedValue NumberPrototype::method_toPrecision(CallContext *ctx) { Scope scope(ctx); ScopedValue v(scope, thisNumberValue(ctx)); |
