#503 √ resolved
pluskid

[PATCH]Iseq::Encoder#replace_instruction bug when instr followed by noops

Reported by pluskid | April 18th, 2008 @ 11:47 AM | in 1.0 preview

Generally replace_instruction doesn't replace an instruction which is wider than the original one. A special case is when the original instructin is followed by enough noop instructions. It can then be safely replaced. The code before this patch can't handle this case (though it was intend to handle).

This patch include spec for this case (and other cases) for InstructionSequence::Encoder#replace_instruction and fixed the problem mentioned above.

The patch is in the attachment. This is my first patch to Rubinius, if this is accepted, I would request the commit right. Here's my public key:

ssh-dss AAAAB3NzaC1kc3MAAACBAKBI1vi+bX2yDV/WCGvnSInLKWnytL8BMRNEq8PxRcCO8XJ+xFmRdlCKKQX0Btuq9s+rZa1aAyYFXrNc/iKaXI3SHV9qTY52qeszZjKuoYBaIkBMpp5Iwv35iEofXwvvsgOSvyqnuuDVh8byfVYqVeN3dRWhZF1b6L2KMVRXSQcpAAAAFQC1yg5jLDLAS8MidfEVwm3ZhyA1BwAAAIBf8PfigKlxj6wF5Kdu15lvveF4Rv/e92PqWs3349u7mF0m3CRdvM+M5tiAtGvKRgk1OhRu+Dq10Oc+DiZAJf67s4SJ4T5cq0zwtZOS2JxML+tFPasGpD+G15vXbTjxVWA6zWqWaMCaVztmFUqHwuG3CQCD/JC5ie2lxl6Tdbbm8QAAAIA0VGrvwWA6h+tTUUptd5jV0sXcroor7OiG128eIphBWMagXj6P4UnPLJTx/ijd/0bd0RlI1cAjlZXQGFoIE/ZuPi73tcny1xS9EBeih9R4KmX0ZLktqutMj18hHFkM9LY0qmN1foCIVufDVixD0QbKOoaLuwyNIAC5vm053RUZLw== "pluskid@thinkpad"

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket