Bug 1029132 - Use IsInRange for FAKE_JIT_TOP_FOR_BAILOUT range assertions to silence a compiler warning. r=nbp

--HG--
extra : rebase_source : 187e3b4c4266e6e80f9a499973084ad0327ea696
This commit is contained in:
Jeff Walden 2014-06-23 14:14:27 -07:00
Родитель 2c5ed1828b
Коммит d21b951d40
2 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -22,6 +22,8 @@
using namespace js;
using namespace js::jit;
using mozilla::IsInRange;
// These constructor are exactly the same except for the type of the iterator
// which is given to the SnapshotIterator constructor. Doing so avoid the
// creation of virtual functions for the IonIterator but may introduce some
@ -76,8 +78,8 @@ jit::Bailout(BailoutStack *sp, BaselineBailoutInfo **bailoutInfo)
JS_ASSERT(bailoutInfo);
// We don't have an exit frame.
MOZ_ASSERT(size_t(FAKE_JIT_TOP_FOR_BAILOUT + sizeof(IonCommonFrameLayout)) < 0x1000 &&
size_t(FAKE_JIT_TOP_FOR_BAILOUT) >= 0,
MOZ_ASSERT(IsInRange(FAKE_JIT_TOP_FOR_BAILOUT, 0, 0x1000) &&
IsInRange(FAKE_JIT_TOP_FOR_BAILOUT + sizeof(IonCommonFrameLayout), 0, 0x1000),
"Fake jitTop pointer should be within the first page.");
cx->mainThread().jitTop = FAKE_JIT_TOP_FOR_BAILOUT;
gc::AutoSuppressGC suppress(cx);

Просмотреть файл

@ -18,6 +18,8 @@
using namespace js;
using namespace jit;
using mozilla::IsInRange;
using JS::AutoCheckCannotGC;
using parallel::Spew;
@ -524,8 +526,8 @@ jit::BailoutPar(BailoutStack *sp, uint8_t **entryFramePointer)
ForkJoinContext *cx = ForkJoinContext::current();
// We don't have an exit frame.
MOZ_ASSERT(size_t(FAKE_JIT_TOP_FOR_BAILOUT + sizeof(IonCommonFrameLayout)) < 0x1000 &&
size_t(FAKE_JIT_TOP_FOR_BAILOUT) >= 0,
MOZ_ASSERT(IsInRange(FAKE_JIT_TOP_FOR_BAILOUT, 0, 0x1000) &&
IsInRange(FAKE_JIT_TOP_FOR_BAILOUT + sizeof(IonCommonFrameLayout), 0, 0x1000),
"Fake jitTop pointer should be within the first page.");
cx->perThreadData->jitTop = FAKE_JIT_TOP_FOR_BAILOUT;