diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-06 22:07:52 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-08 18:59:47 +0000 |
commit | 01c338023a3a604bb24c2efb18d48f9bac33e6bc (patch) | |
tree | dd5fbedf26dd680323a64bdc5bfe82263199d413 /src/qml/jsruntime/qv4runtime.cpp | |
parent | a0720e562c464a5b22e4cbd74b48212e5d3bf6e4 (diff) |
Inline more of the runtime code into the interpreter
Change-Id: I4744c9b39d4de599f02dd91622dd19713c8cc7eb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4runtime.cpp | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp index d310eba434..8def6ecdae 100644 --- a/src/qml/jsruntime/qv4runtime.cpp +++ b/src/qml/jsruntime/qv4runtime.cpp @@ -1324,30 +1324,6 @@ QV4::ReturnedValue Runtime::method_setupArgumentsObject(ExecutionEngine *engine) #endif // V4_BOOTSTRAP -QV4::ReturnedValue Runtime::method_increment(const Value &value) -{ - TRACE1(value); - - if (value.isInteger() && value.integerValue() < INT_MAX) - return Encode(value.integerValue() + 1); - else { - double d = value.toNumber(); - return Encode(d + 1.); - } -} - -QV4::ReturnedValue Runtime::method_decrement(const Value &value) -{ - TRACE1(value); - - if (value.isInteger() && value.integerValue() > INT_MIN) - return Encode(value.integerValue() - 1); - else { - double d = value.toNumber(); - return Encode(d - 1.); - } -} - ReturnedValue Runtime::method_toDouble(const Value &value) { TRACE1(value); @@ -1455,19 +1431,6 @@ void Runtime::method_convertThisToObject(ExecutionEngine *engine) } } -ReturnedValue Runtime::method_uPlus(const Value &value) -{ - TRACE1(value); - - if (value.isNumber()) - return value.asReturnedValue(); - if (value.integerCompatible()) - return Encode(value.int_32()); - - double n = value.toNumberImpl(); - return Encode(n); -} - ReturnedValue Runtime::method_uMinus(const Value &value) { TRACE1(value); @@ -1482,49 +1445,7 @@ ReturnedValue Runtime::method_uMinus(const Value &value) } } -ReturnedValue Runtime::method_complement(const Value &value) -{ - TRACE1(value); - - int n = value.toInt32(); - return Encode((int)~n); -} - -ReturnedValue Runtime::method_uNot(const Value &value) -{ - TRACE1(value); - - bool b = value.toBoolean(); - return Encode(!b); -} - // binary operators -ReturnedValue Runtime::method_bitOr(const Value &left, const Value &right) -{ - TRACE2(left, right); - - int lval = left.toInt32(); - int rval = right.toInt32(); - return Encode(lval | rval); -} - -ReturnedValue Runtime::method_bitXor(const Value &left, const Value &right) -{ - TRACE2(left, right); - - int lval = left.toInt32(); - int rval = right.toInt32(); - return Encode(lval ^ rval); -} - -ReturnedValue Runtime::method_bitAnd(const Value &left, const Value &right) -{ - TRACE2(left, right); - - int lval = left.toInt32(); - int rval = right.toInt32(); - return Encode(lval & rval); -} #ifndef V4_BOOTSTRAP ReturnedValue Runtime::method_add(ExecutionEngine *engine, const Value &left, const Value &right) |