Permalink
Browse files

Use our conditional jmp machinery to make IterInit nice.

We were emitting slightly bad code for IterInit. The same trick
we do for other conditional branches can improve it.
  • Loading branch information...
1 parent ac85dff commit 34bc4847b20b7948e5cd5e8f79fee3e193219971 kma committed with joelpob Sep 28, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/runtime/vm/translator/translator-x64.cpp
@@ -12618,13 +12618,7 @@ TranslatorX64::translateIterInit(const Tracelet& t,
// new_iter returns 0 if an iterator was not created, otherwise it
// returns 1
a. test_reg64_reg64(rax, rax);
- TCA toPatch = a.code.frontier;
- a. jz(a.code.frontier); // 1f
- emitBindJmp(notTaken);
- // 1:
- a.patchJcc(toPatch, a.code.frontier);
- emitBindJmp(taken);
- translator_not_reached(a);
+ emitCondJmp(taken, notTaken, CC_Z);
}
void

0 comments on commit 34bc484

Please sign in to comment.