aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4runtime_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtime_p.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/qml/jsruntime/qv4runtime_p.h b/src/qml/jsruntime/qv4runtime_p.h
index 9524b2459c..3c2824ee23 100644
--- a/src/qml/jsruntime/qv4runtime_p.h
+++ b/src/qml/jsruntime/qv4runtime_p.h
@@ -42,9 +42,10 @@
#define QMLJS_RUNTIME_H
#include "qv4global_p.h"
-#include "qv4value_p.h"
+#include "qv4value_inl_p.h"
#include "qv4math_p.h"
#include "qv4scopedvalue_p.h"
+#include "qv4context_p.h"
#include <QtCore/QString>
#include <QtCore/qnumeric.h>
@@ -141,7 +142,7 @@ QV4::ExecutionContext *__qmljs_builtin_pop_scope(QV4::ExecutionContext *ctx);
ReturnedValue __qmljs_builtin_unwind_exception(ExecutionContext *ctx);
void __qmljs_builtin_declare_var(QV4::ExecutionContext *ctx, bool deletable, const QV4::StringRef name);
void __qmljs_builtin_define_property(QV4::ExecutionContext *ctx, const QV4::ValueRef object, const QV4::StringRef name, QV4::ValueRef val);
-QV4::ReturnedValue __qmljs_builtin_define_array(QV4::ExecutionContext *ctx, QV4::Value *values, uint length);
+QV4::ReturnedValue __qmljs_builtin_define_array(QV4::ExecutionContext *ctx, Value *values, uint length);
void __qmljs_builtin_define_getter_setter(QV4::ExecutionContext *ctx, const QV4::ValueRef object, const QV4::StringRef name, const QV4::ValueRef getter, const QV4::ValueRef setter);
QV4::ReturnedValue __qmljs_builtin_define_object_literal(QV4::ExecutionContext *ctx, const QV4::Value *args, int classId);
QV4::ReturnedValue __qmljs_builtin_setup_arguments_object(ExecutionContext *ctx);
@@ -305,12 +306,7 @@ inline QV4::ReturnedValue __qmljs_compl(const QV4::ValueRef value)
{
TRACE1(value);
- int n;
- if (value->integerCompatible())
- n = value->int_32;
- else
- n = value->toInt32();
-
+ int n = value->toInt32();
return Encode((int)~n);
}
@@ -327,9 +323,6 @@ inline ReturnedValue __qmljs_bit_or(const QV4::ValueRef left, const QV4::ValueRe
{
TRACE2(left, right);
- if (QV4::Value::integerCompatible(*left, *right))
- return Encode(left->integerValue() | right->integerValue());
-
int lval = left->toInt32();
int rval = right->toInt32();
return Encode(lval | rval);
@@ -339,9 +332,6 @@ inline ReturnedValue __qmljs_bit_xor(const QV4::ValueRef left, const QV4::ValueR
{
TRACE2(left, right);
- if (QV4::Value::integerCompatible(*left, *right))
- return Encode(left->integerValue() ^ right->integerValue());
-
int lval = left->toInt32();
int rval = right->toInt32();
return Encode(lval ^ rval);
@@ -351,9 +341,6 @@ inline ReturnedValue __qmljs_bit_and(const QV4::ValueRef left, const QV4::ValueR
{
TRACE2(left, right);
- if (QV4::Value::integerCompatible(*left, *right))
- return Encode(left->integerValue() & right->integerValue());
-
int lval = left->toInt32();
int rval = right->toInt32();
return Encode(lval & rval);