Bug 855264 part 2 - Fix some MSVC warnings. r=djvj

This commit is contained in:
Jan de Mooij 2013-03-28 11:10:04 +01:00
parent c0fa622930
commit 9949c4d3dd
5 changed files with 32 additions and 28 deletions

View File

@ -366,32 +366,32 @@ class BaselineFrame
// The reverseOffsetOf methods below compute the offset relative to the
// frame's base pointer. Since the stack grows down, these offsets are
// negative.
static size_t reverseOffsetOfFrameSize() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, frameSize_);
static int reverseOffsetOfFrameSize() {
return -int(Size()) + offsetof(BaselineFrame, frameSize_);
}
static size_t reverseOffsetOfScratchValue() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, loScratchValue_);
static int reverseOffsetOfScratchValue() {
return -int(Size()) + offsetof(BaselineFrame, loScratchValue_);
}
static size_t reverseOffsetOfScopeChain() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, scopeChain_);
static int reverseOffsetOfScopeChain() {
return -int(Size()) + offsetof(BaselineFrame, scopeChain_);
}
static size_t reverseOffsetOfBlockChain() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, blockChain_);
static int reverseOffsetOfBlockChain() {
return -int(Size()) + offsetof(BaselineFrame, blockChain_);
}
static size_t reverseOffsetOfArgsObj() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, argsObj_);
static int reverseOffsetOfArgsObj() {
return -int(Size()) + offsetof(BaselineFrame, argsObj_);
}
static size_t reverseOffsetOfFlags() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, flags_);
static int reverseOffsetOfFlags() {
return -int(Size()) + offsetof(BaselineFrame, flags_);
}
static size_t reverseOffsetOfEvalScript() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, evalScript_);
static int reverseOffsetOfEvalScript() {
return -int(Size()) + offsetof(BaselineFrame, evalScript_);
}
static size_t reverseOffsetOfReturnValue() {
return -BaselineFrame::Size() + offsetof(BaselineFrame, loReturnValue_);
static int reverseOffsetOfReturnValue() {
return -int(Size()) + offsetof(BaselineFrame, loReturnValue_);
}
static size_t reverseOffsetOfLocal(size_t index) {
return -BaselineFrame::Size() - (index + 1) * sizeof(Value);
static int reverseOffsetOfLocal(size_t index) {
return -int(Size()) - (index + 1) * sizeof(Value);
}
};

View File

@ -72,7 +72,7 @@ FrameInfo::numUnsyncedSlots()
// Start at the bottom, find the first value that's not synced.
uint32_t i = 0;
for (; i < stackDepth(); i++) {
if (peek(-(i + 1))->kind() == StackValue::Stack)
if (peek(-int32_t(i + 1))->kind() == StackValue::Stack)
break;
}
return i;

View File

@ -1304,13 +1304,17 @@ class ICTypeMonitor_Fallback : public ICStub
uint32_t argumentIndex)
: ICStub(ICStub::TypeMonitor_Fallback, stubCode),
mainFallbackStub_(mainFallbackStub),
firstMonitorStub_(this),
firstMonitorStub_(thisFromCtor()),
lastMonitorStubPtrAddr_(NULL),
numOptimizedMonitorStubs_(0),
hasFallbackStub_(mainFallbackStub != NULL),
argumentIndex_(argumentIndex)
{ }
ICTypeMonitor_Fallback *thisFromCtor() {
return this;
}
void addOptimizedMonitorStub(ICStub *stub) {
stub->setNext(this);

View File

@ -176,11 +176,11 @@ class IonBaselineStubFrameLayout : public IonCommonFrameLayout
return sizeof(IonBaselineStubFrameLayout);
}
static inline size_t reverseOffsetOfStubPtr() {
return -sizeof(void *);
static inline int reverseOffsetOfStubPtr() {
return -int(sizeof(void *));
}
static inline size_t reverseOffsetOfSavedFramePtr() {
return -(2 * sizeof(void *));
static inline int reverseOffsetOfSavedFramePtr() {
return -int(2 * sizeof(void *));
}
inline ICStub *stubPtr() {

View File

@ -421,11 +421,11 @@ class IonBaselineStubFrameLayout : public IonCommonFrameLayout
return sizeof(IonBaselineStubFrameLayout);
}
static inline size_t reverseOffsetOfStubPtr() {
return -sizeof(void *);
static inline int reverseOffsetOfStubPtr() {
return -int(sizeof(void *));
}
static inline size_t reverseOffsetOfSavedFramePtr() {
return -(2 * sizeof(void *));
static inline int reverseOffsetOfSavedFramePtr() {
return -int(2 * sizeof(void *));
}
inline ICStub *stubPtr() {