diff options
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; } |