Commit 1f7b7ea5 authored by Kevin Modzelewski's avatar Kevin Modzelewski

xxx: testing / workarounds

parent 3cc1f4d8
......@@ -1141,6 +1141,7 @@ void Assembler::skipBytes(int num) {
ForwardJump::ForwardJump(Assembler& assembler, ConditionCode condition)
: assembler(assembler), condition(condition), jmp_inst(assembler.curInstPointer()) {
assembler.jmp_cond(JumpDestination::fromStart(assembler.bytesWritten() + max_jump_size), condition);
jmp_end = assembler.curInstPointer();
}
ForwardJump::~ForwardJump() {
......@@ -1149,6 +1150,8 @@ ForwardJump::~ForwardJump() {
RELEASE_ASSERT(offset < max_jump_size, "");
assembler.setCurInstPointer(jmp_inst);
assembler.jmp_cond(JumpDestination::fromStart(assembler.bytesWritten() + offset), condition);
while (assembler.curInstPointer() < jmp_end)
assembler.nop();
assembler.setCurInstPointer(new_pos);
}
}
......
......@@ -216,10 +216,11 @@ public:
// generated conditional jump with the correct offset depending on the number of bytes emitted in between.
class ForwardJump {
private:
const int max_jump_size = 128;
const int max_jump_size = 1048587;
Assembler& assembler;
ConditionCode condition;
uint8_t* jmp_inst;
uint8_t* jmp_end;
public:
ForwardJump(Assembler& assembler, ConditionCode condition);
......
......@@ -561,7 +561,9 @@ void JitFragmentWriter::emitSetLocal(InternedString s, int vreg, bool set_closur
} else {
RewriterVar* prev = vregs_array->getAttr(8 * vreg);
vregs_array->setAttr(8 * vreg, v);
prev->xdecref();
// XXX: this either needs to be an xdecref or we should check liveness analysis.
prev->decref();
//prev->xdecref();
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment