From ee94b07a4411794102228792eae3423c0a10de1f Mon Sep 17 00:00:00 2001 From: "dvander@traceknight.local" Date: Fri, 20 Jun 2008 13:55:56 -0700 Subject: [PATCH] Fixed cases of the tests not prepping the tracer properly for verbosity --- js/src/nanojit/Tests.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/js/src/nanojit/Tests.cpp b/js/src/nanojit/Tests.cpp index a5d631f7cb9..d774ed926c1 100644 --- a/js/src/nanojit/Tests.cpp +++ b/js/src/nanojit/Tests.cpp @@ -338,8 +338,8 @@ do_test(Test* test) { NIns *code; LIns *instr; + SideExit exit; Fragment *frag; - SideExit *pExit; Fragmento *frago; JIT_ENTRANCE jit; LirBuffer *lirbuf; @@ -358,21 +358,19 @@ do_test(Test* test) state.f = NULL; /* Begin a dummy trace */ + frago->labels = new (gc) LabelMap(core, NULL); frag = frago->getLoop(state); lirbuf = new (gc) LirBuffer(frago, NULL); + lirbuf->names = new (gc) LirNameMap(gc, NULL, frago->labels); frag->lirbuf = lirbuf; lirout = new LirBufWriter(lirbuf); - frag->param0 = lirout->ins2(LIR_param, Assembler::argRegs[0], 0); - frag->param1 = lirout->ins2(LIR_param, Assembler::argRegs[1], 0); - //:TODO: - //frag->param0 = lirout->insImm8(LIR_in, Assembler::argRegs[0]); + lirout->ins0(LIR_trace); + frag->param0 = lirout->insImm8(LIR_param, Assembler::argRegs[0], 0); + frag->param1 = lirout->insImm8(LIR_param, Assembler::argRegs[1], 0); test->Compile(lirout); - instr = lirout->skip(sizeof(SideExit)); - pExit = (SideExit *)instr->payload(); - memset(pExit, 0, sizeof(pExit)); - pExit->target = NULL; - pExit->from = frag; - lirout->ins2(LIR_x, NULL, instr); + memset(&exit, 0, sizeof(exit)); + exit.from = frag; + instr = lirout->insGuard(LIR_x, NULL, &exit); compile(frago->assm(), frag); code = frag->code(); jit = (JIT_ENTRANCE)code;