Ejemplo n.º 1
0
        private void AddJumpBack(OpCode jumpOp, string jumpLabel)
        {
            // pop the most recently-added jump with the label
            JumpPatch jump = mJumpBackPatches.Last(j => j.Label == jumpLabel);

            mJumpBackPatches.Remove(jump);

            mBytecode.Write(jumpOp, jump.Location);
        }
Ejemplo n.º 2
0
        public void PatchJump(string jumpLabel)
        {
            // pop the most recently-added jump with the label
            JumpPatch jump = mJumpPatches.Last(j => j.Label == jumpLabel);

            mJumpPatches.Remove(jump);

            int position    = jump.Location;
            int destination = (int)mBytecode.Position;

            mBytecode.SeekTo(position);
            mBytecode.Write(destination);

            mBytecode.SeekToEnd();
        }