Backout a592d7dfb470 for Android crashes

This commit is contained in:
Ed Morley 2012-12-03 11:17:49 +00:00
Родитель 299d925ad9
Коммит 6191540667
5 изменённых файлов: 4 добавлений и 20 удалений

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

@ -55,8 +55,6 @@ class Linker
bytesNeeded - headerSize, pool);
if (!code)
return NULL;
if (masm.oom())
return fail(cx);
code->copyFrom(masm);
masm.link(code);
return code;

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

@ -504,7 +504,7 @@ class MacroAssembler : public MacroAssemblerSpecific
}
void link(IonCode *code) {
JS_ASSERT(!oom());
// If this code can transition to C++ code and witness a GC, then we need to store
// the IonCode onto the stack in order to GC it correctly. exitCodePatch should
// be unset if the code never needed to push its IonCode*.

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

@ -1637,10 +1637,6 @@ Assembler::as_b(BOffImm off, Condition c, bool isPatchable)
BufferOffset
Assembler::as_b(Label *l, Condition c, bool isPatchable)
{
if (m_buffer.oom()) {
BufferOffset ret;
return ret;
}
m_buffer.markNextAsBranch();
if (l->bound()) {
BufferOffset ret = as_nop();

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

@ -77,7 +77,7 @@ struct BufferSlice : public InlineForwardListNode<BufferSlice<SliceSize> > {
template<int SliceSize, class Inst>
struct AssemblerBuffer {
public:
AssemblerBuffer() : head(NULL), tail(NULL), m_bail(false), m_oom(false), bufferSize(0) {}
AssemblerBuffer() : head(NULL), tail(NULL), m_oom(false), bufferSize(0) {}
protected:
typedef BufferSlice<SliceSize> Slice;
typedef AssemblerBuffer<SliceSize, Inst> AssemblerBuffer_;
@ -85,7 +85,6 @@ struct AssemblerBuffer {
Slice *tail;
public:
bool m_oom;
bool m_bail;
// How much data has been added to the buffer thusfar.
uint32 bufferSize;
uint32 lastInstSize;
@ -149,17 +148,11 @@ struct AssemblerBuffer {
return size();
}
bool oom() const {
return m_oom || m_bail;
}
bool bail() const {
return m_bail;
return m_oom;
}
void fail_oom() {
m_oom = true;
}
void fail_bail() {
m_bail = true;
}
Inst *getInst(BufferOffset off) {
unsigned int local_off = off.getOffset();
Slice *cur = NULL;

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

@ -431,7 +431,7 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
}
BufferOffset insertEntry(uint32 instSize, uint8 *inst, Pool *p, uint8 *data, PoolEntry *pe = NULL) {
if (this->oom() && !this->bail())
if (this->oom())
return BufferOffset();
int token;
if (p != NULL) {
@ -726,12 +726,9 @@ struct AssemblerBufferWithConstantPool : public AssemblerBuffer<SliceSize, Inst>
// the last pool, which means it cannot affect the alignment of any other
// Sub Pools.
IonSpew(IonSpew_Pools, "[%d]***Offset was still out of range!***", id, codeOffset - magicAlign);
IonSpew(IonSpew_Pools, "[%d] Too complicated; bailingp", id);
this->fail_bail();
outcasts[poolIdx].append(iter->getOffset());
memcpy(&outcastEntries[poolIdx][numSkips * p->immSize], &p->poolData[idx * p->immSize], p->immSize);
numSkips++;
return;
} else {
preservedEntries[idx] = true;
}