aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-01-22 09:38:22 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-01-22 12:11:40 +0100
commitffe0f153f9c084170a249ffddd4c9ea7339572e3 (patch)
treeee574e99d356c6ec4f68545b93cbb9edd6198b32 /src/qml/jit
parent66fa6faff18c302900395a7b1ae3ba487ed8b114 (diff)
QML: Fix MSVC 2013/64bit warnings.
compiler\qv4ssa.cpp(687) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(950) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(1117) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1120) : warning C4267: 'return' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1148) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1266) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(1622) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(2246) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data compiler\qv4ssa.cpp(4289) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data compiler\qv4ssa.cpp(4351) : warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data jit\qv4regalloc.cpp(1383) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1769) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jit\qv4regalloc.cpp(1814) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(496) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(503) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4mm.cpp(506) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data jsruntime\qv4regexp.cpp(60) : warning C4267: 'return' : conversion from 'size_t' to 'uint', possible loss of data jsruntime\qv4typedarray.cpp(85) : warning C4309: '=' : truncation of constant value Change-Id: I0b04e1a9d379c068fb3efe90a9db8b592061e448 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jit')
-rw-r--r--src/qml/jit/qv4regalloc.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp
index 64cbdf9f3b..cd85e7d1a6 100644
--- a/src/qml/jit/qv4regalloc.cpp
+++ b/src/qml/jit/qv4regalloc.cpp
@@ -1380,7 +1380,7 @@ LifeTimeInterval *RegisterAllocator::cloneFixedInterval(int reg, bool isFP, cons
// saved registers.
void RegisterAllocator::prepareRanges()
{
- LifeTimeInterval ltiWithCalls = createFixedInterval(_info->calls().size());
+ LifeTimeInterval ltiWithCalls = createFixedInterval(int(_info->calls().size()));
foreach (int callPosition, _info->calls())
ltiWithCalls.addRange(callPosition, callPosition);
@@ -1765,9 +1765,12 @@ int RegisterAllocator::nextIntersection(const LifeTimeInterval &current,
/// Find the first use after the start position for the given temp.
int RegisterAllocator::nextUse(const Temp &t, int startPosition) const
{
+ typedef std::vector<Use>::const_iterator ConstIt;
+
const std::vector<Use> &usePositions = _info->uses(t);
- for (int i = 0, ei = usePositions.size(); i != ei; ++i) { //### FIXME: use an iterator
- const int usePos = usePositions.at(i).pos;
+ const ConstIt cend = usePositions.end();
+ for (ConstIt it = usePositions.begin(); it != cend; ++it) {
+ const int usePos = it->pos;
if (usePos >= startPosition)
return usePos;
}
@@ -1811,7 +1814,7 @@ void RegisterAllocator::split(LifeTimeInterval &current, int beforePosition,
int lastUse = firstPosition;
int nextUse = -1;
const std::vector<Use> &usePositions = _info->uses(current.temp());
- for (int i = 0, ei = usePositions.size(); i != ei; ++i) {
+ for (size_t i = 0, ei = usePositions.size(); i != ei; ++i) {
const Use &usePosition = usePositions.at(i);
const int usePos = usePosition.pos;
if (lastUse < usePos && usePos < beforePosition) {