diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-15 21:54:12 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-23 12:30:38 +0100 |
commit | ef6b4938b9ec309d5faf0c966cb2b58f3de2ca77 (patch) | |
tree | 3d946ad66defb1ec5c60a50e16b6e7883ec33862 /src/qml/jsruntime/qv4regexpobject.cpp | |
parent | 3dbf4e9a6979802fff55e2f5e6aa54a14280e128 (diff) |
Cleanups
Simplify some code in BooleanObject
Simplify access to call arguments and thisObject
Change-Id: I2f8e844019bc587385608beb02f05b15f827535c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4regexpobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4regexpobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4regexpobject.cpp b/src/qml/jsruntime/qv4regexpobject.cpp index 0736056838..c0e4f137ad 100644 --- a/src/qml/jsruntime/qv4regexpobject.cpp +++ b/src/qml/jsruntime/qv4regexpobject.cpp @@ -345,7 +345,7 @@ void RegExpPrototype::init(ExecutionEngine *engine, Object *constructor) ReturnedValue RegExpPrototype::method_exec(CallContext *ctx) { Scope scope(ctx); - Scoped<RegExpObject> r(scope, ctx->d()->callData->thisObject.as<RegExpObject>()); + Scoped<RegExpObject> r(scope, ctx->thisObject().as<RegExpObject>()); if (!r) return ctx->engine()->throwTypeError(); @@ -409,7 +409,7 @@ ReturnedValue RegExpPrototype::method_test(CallContext *ctx) ReturnedValue RegExpPrototype::method_toString(CallContext *ctx) { Scope scope(ctx); - Scoped<RegExpObject> r(scope, ctx->d()->callData->thisObject.as<RegExpObject>()); + Scoped<RegExpObject> r(scope, ctx->thisObject().as<RegExpObject>()); if (!r) return ctx->engine()->throwTypeError(); @@ -419,12 +419,12 @@ ReturnedValue RegExpPrototype::method_toString(CallContext *ctx) ReturnedValue RegExpPrototype::method_compile(CallContext *ctx) { Scope scope(ctx); - Scoped<RegExpObject> r(scope, ctx->d()->callData->thisObject.as<RegExpObject>()); + Scoped<RegExpObject> r(scope, ctx->thisObject().as<RegExpObject>()); if (!r) return ctx->engine()->throwTypeError(); - ScopedCallData callData(scope, ctx->d()->callData->argc); - memcpy(callData->args, ctx->d()->callData->args, ctx->d()->callData->argc*sizeof(Value)); + ScopedCallData callData(scope, ctx->argc()); + memcpy(callData->args, ctx->args(), ctx->argc()*sizeof(Value)); Scoped<RegExpObject> re(scope, ctx->d()->engine->regExpCtor.asFunctionObject()->construct(callData)); |