aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@me.com>2013-09-26 14:49:44 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-30 11:28:55 +0200
commit7c3f891c454971ed0150e66c2261e6e5c36664a3 (patch)
tree067a59085a30ddf7ade38dd1cad078033a886486 /src/qml/jsruntime/qv4runtime.cpp
parent9194779ef37187b1b38d73099747459f9f5e745c (diff)
V4: remove inplace operations
Inplace operations are expanded when building the IR, so the neither the IR, nor the instruction selection backends or runtime need to handle them. Change-Id: Id01f9544e137dd52364cf2ed2c10931c31ddfff3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp210
1 files changed, 0 insertions, 210 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 09fe578c19..8187da6556 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -314,216 +314,6 @@ QV4::ReturnedValue __qmljs_in(ExecutionContext *ctx, const ValueRef left, const
return Encode(r);
}
-static void inplaceBitOp(ExecutionContext *ctx, const StringRef name, const ValueRef value, BinOp op)
-{
- Scope scope(ctx);
- ScopedValue lhs(scope, ctx->getProperty(name));
- ScopedValue result(scope, op(lhs, value));
- ctx->setProperty(name, result);
-}
-
-
-void __qmljs_inplace_bit_and_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_bit_and);
-}
-
-void __qmljs_inplace_bit_or_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_bit_or);
-}
-
-void __qmljs_inplace_bit_xor_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_bit_xor);
-}
-
-void __qmljs_inplace_add_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- Scope scope(ctx);
- ScopedValue lhs(scope, ctx->getProperty(name));
- ScopedValue result(scope, __qmljs_add(ctx, lhs, value));
- ctx->setProperty(name, result);
-}
-
-void __qmljs_inplace_sub_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_sub);
-}
-
-void __qmljs_inplace_mul_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_mul);
-}
-
-void __qmljs_inplace_div_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_div);
-}
-
-void __qmljs_inplace_mod_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_mod);
-}
-
-void __qmljs_inplace_shl_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_shl);
-}
-
-void __qmljs_inplace_shr_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_shr);
-}
-
-void __qmljs_inplace_ushr_name(ExecutionContext *ctx, const StringRef name, const ValueRef value)
-{
- inplaceBitOp(ctx, name, value, __qmljs_ushr);
-}
-
-void __qmljs_inplace_bit_and_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_bit_and, index, rhs);
-}
-
-void __qmljs_inplace_bit_or_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_bit_or, index, rhs);
-}
-
-void __qmljs_inplace_bit_xor_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_bit_xor, index, rhs);
-}
-
-void __qmljs_inplace_add_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_add, index, rhs);
-}
-
-void __qmljs_inplace_sub_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_sub, index, rhs);
-}
-
-void __qmljs_inplace_mul_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_mul, index, rhs);
-}
-
-void __qmljs_inplace_div_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_div, index, rhs);
-}
-
-void __qmljs_inplace_mod_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_mod, index, rhs);
-}
-
-void __qmljs_inplace_shl_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_shl, index, rhs);
-}
-
-void __qmljs_inplace_shr_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_shr, index, rhs);
-}
-
-void __qmljs_inplace_ushr_element(ExecutionContext *ctx, const ValueRef base, const ValueRef index, const ValueRef rhs)
-{
- Object *obj = base->toObject(ctx);
- obj->inplaceBinOpValue(ctx, __qmljs_ushr, index, rhs);
-}
-
-void __qmljs_inplace_bit_and_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_bit_and, name, rhs);
-}
-
-void __qmljs_inplace_bit_or_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_bit_or, name, rhs);
-}
-
-void __qmljs_inplace_bit_xor_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_bit_xor, name, rhs);
-}
-
-void __qmljs_inplace_add_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_add, name, rhs);
-}
-
-void __qmljs_inplace_sub_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_sub, name, rhs);
-}
-
-void __qmljs_inplace_mul_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_mul, name, rhs);
-}
-
-void __qmljs_inplace_div_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_div, name, rhs);
-}
-
-void __qmljs_inplace_mod_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_mod, name, rhs);
-}
-
-void __qmljs_inplace_shl_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_shl, name, rhs);
-}
-
-void __qmljs_inplace_shr_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_shr, name, rhs);
-}
-
-void __qmljs_inplace_ushr_member(ExecutionContext *ctx, const ValueRef base, const StringRef name, const ValueRef rhs)
-{
- Scope scope(ctx);
- ScopedObject o(scope, base->toObject(ctx));
- o->inplaceBinOp(ctx, __qmljs_ushr, name, rhs);
-}
-
double __qmljs_string_to_number(const QString &string)
{
QString s = string.trimmed();