Backed out changeset 162e2608bd3c (bug 805299) for breaking debug builds

This commit is contained in:
Ehsan Akhgari 2012-12-02 23:47:36 -05:00
parent 6e32183182
commit 5283101fb6
5 changed files with 4 additions and 20 deletions

View File

@ -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;

View File

@ -504,7 +504,7 @@ class MacroAssembler : public MacroAssemblerSpecific
}
void link(IonCode *code) {
JS_ASSERT(!m_buffer.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*.

View File

@ -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();

View File

@ -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;

View File

@ -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;
}