diff options
author | Erik Verbruggen <erik.verbruggen@me.com> | 2013-10-11 15:21:57 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-12 13:14:02 +0200 |
commit | 6f886cd6a841eeb76e1c590b8abd3af6fdd5c494 (patch) | |
tree | b1860d7dd5fbef48624e0699248fe6a7e11c4096 /src/qml/compiler/qv4regalloc.cpp | |
parent | 2fcb8cfcdfb795ab3872146dc56bcacc72abf131 (diff) |
V4 JIT: clean-up conversion functions and add toUInt32.
Change-Id: I7ac685145fa41db2a0e02c4d15d1d287d80621f8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4regalloc.cpp')
-rw-r--r-- | src/qml/compiler/qv4regalloc.cpp | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/qml/compiler/qv4regalloc.cpp b/src/qml/compiler/qv4regalloc.cpp index 210ae686c8..b4ec0f357b 100644 --- a/src/qml/compiler/qv4regalloc.cpp +++ b/src/qml/compiler/qv4regalloc.cpp @@ -242,27 +242,27 @@ protected: // IRDecoder switch (target->type) { case DoubleType: - if (source->type == UInt32Type) { - sourceReg = Use::MustHaveRegister; + switch (source->type) { + case UInt32Type: + case SInt32Type: + case NullType: + case UndefinedType: + case BoolType: needsCall = false; break; - } - case SInt32Type: - if (source->type == DoubleType || source->type == UInt32Type) { - // this might need a call + default: break; } -#if 0 // TODO: change masm to generate code - case UInt32Type: -#endif + break; case BoolType: switch (source->type) { case UInt32Type: - case BoolType: - case DoubleType: sourceReg = Use::MustHaveRegister; needsCall = false; break; + case DoubleType: + case UndefinedType: + case NullType: case SInt32Type: needsCall = false; break; @@ -270,6 +270,28 @@ protected: // IRDecoder break; } break; + case SInt32Type: + switch (source->type) { + case UInt32Type: + case NullType: + case UndefinedType: + case BoolType: + needsCall = false; + default: + break; + } + break; + case UInt32Type: + switch (source->type) { + case SInt32Type: + case NullType: + case UndefinedType: + case BoolType: + needsCall = false; + default: + break; + } + break; default: break; } |