aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-09 20:34:30 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-12 21:52:16 +0200
commit525c4ee8a9d436a7ce2f785cdb908735271486a4 (patch)
tree759a89ab696660e1db8f9e31d249942fb4f116e7 /src/qml/jsruntime/qv4runtime.cpp
parent87d2362a6b156eef7b67832c24adc7a2d3fc2d5c (diff)
Remove unused code to generate post increment and decrement expressions
We generate lower level code in codegen and don't use these runtime methods anymore. Change-Id: If1023ce5295431305f4528839bcf2a3031fa7ad2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp160
1 files changed, 0 insertions, 160 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 76ab06cabe..e7760548a0 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -1155,166 +1155,6 @@ QV4::ReturnedValue __qmljs_builtin_typeof_element(ExecutionContext *context, con
return __qmljs_builtin_typeof(context, prop);
}
-void __qmljs_builtin_post_increment(ValueRef result, ValueRef val)
-{
- if (val->isInteger() && val->integerValue() < INT_MAX) {
- if (result)
- *result = *val;
- val->int_32 += 1;
- return;
- }
-
- double d = val->toNumber();
- *val = Value::fromDouble(d + 1);
- if (result)
- *result = Value::fromDouble(d);
-}
-
-void __qmljs_builtin_post_increment_name(ExecutionContext *context, ValueRef result, String *name)
-{
- Value v = context->getProperty(name);
-
- if (v.isInteger() && v.integerValue() < INT_MAX) {
- if (result)
- *result = v;
- v.int_32 += 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d + 1);
- }
-
- context->setProperty(name, v);
-}
-
-void __qmljs_builtin_post_increment_member(ExecutionContext *context, ValueRef result, const ValueRef base, String *name)
-{
- Object *o = base->toObject(context);
-
- Value v = o->get(name);
-
- if (v.isInteger() && v.integerValue() < INT_MAX) {
- if (result)
- *result = v;
- v.int_32 += 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d + 1);
- }
-
- o->put(name, v);
-}
-
-void __qmljs_builtin_post_increment_element(ExecutionContext *context, ValueRef result, const ValueRef base, const ValueRef index)
-{
- Object *o = base->toObject(context);
-
- uint idx = index->asArrayIndex();
-
- if (idx == UINT_MAX) {
- String *s = index->toString(context);
- return __qmljs_builtin_post_increment_member(context, result, base, s);
- }
-
- Value v = o->getIndexed(idx);
-
- if (v.isInteger() && v.integerValue() < INT_MAX) {
- if (result)
- *result = v;
- v.int_32 += 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d + 1);
- }
-
- o->putIndexed(idx, v);
-}
-
-void __qmljs_builtin_post_decrement(ValueRef result, ValueRef val)
-{
- if (val->isInteger() && val->integerValue() > INT_MIN) {
- if (result)
- *result = *val;
- val->int_32 -= 1;
- return;
- }
-
- double d = val->toNumber();
- *val = Value::fromDouble(d - 1);
- if (result)
- *result = Value::fromDouble(d);
-}
-
-void __qmljs_builtin_post_decrement_name(ExecutionContext *context, ValueRef result, String *name)
-{
- Value v = context->getProperty(name);
-
- if (v.isInteger() && v.integerValue() > INT_MIN) {
- if (result)
- *result = v;
- v.int_32 -= 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d - 1);
- }
-
- context->setProperty(name, v);
-}
-
-void __qmljs_builtin_post_decrement_member(ExecutionContext *context, ValueRef result, const ValueRef base, String *name)
-{
- Object *o = base->toObject(context);
-
- Value v = o->get(name);
-
- if (v.isInteger() && v.integerValue() > INT_MIN) {
- if (result)
- *result = v;
- v.int_32 -= 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d - 1);
- }
-
- o->put(name, v);
-}
-
-void __qmljs_builtin_post_decrement_element(ExecutionContext *context, ValueRef result, const ValueRef base, const ValueRef index)
-{
- Object *o = base->toObject(context);
-
- uint idx = index->asArrayIndex();
-
- if (idx == UINT_MAX) {
- String *s = index->toString(context);
- return __qmljs_builtin_post_decrement_member(context, result, base, s);
- }
-
- Value v = o->getIndexed(idx);
-
- if (v.isInteger() && v.integerValue() > INT_MIN) {
- if (result)
- *result = v;
- v.int_32 -= 1;
- } else {
- double d = v.toNumber();
- if (result)
- *result = Value::fromDouble(d);
- v = Value::fromDouble(d - 1);
- }
-
- o->putIndexed(idx, v);
-}
-
ExecutionContext *__qmljs_builtin_push_with_scope(const ValueRef o, ExecutionContext *ctx)
{
Object *obj = o->toObject(ctx);