You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-dev@apache.org by chonton <gi...@git.apache.org> on 2015/08/25 07:23:27 UTC

[GitHub] commons-bcel pull request: Use InstructionHandle as target instead...

GitHub user chonton opened a pull request:

    https://github.com/apache/commons-bcel/pull/2

    Use InstructionHandle as target instead of Instruction

    The programming model for BCEL instructions is confused.  Although not explicitly documented, the InstructionList is read/written in the 'byte code' model and manipulated in the 'generic' (or perhaps more accurately 'symbolic') model.  The program should edit using InstructionHandles rather than Instruction; except that currently, setTarget uses an Instruction, not an InstructionHandle.
    
    Also, there is an attempt to reuse Instructions and InstructionHandles.  I'm pretty sure this is mostly a bad idea.  An InstructionHandle should exist only once in an InstructionList and should only belong to a single InstructionList.  An Immutable Instruction may be held by multiple InstructionHandles.  The Immutable Instructions should probably be tagged with an interface, etc.
    
    Since these changes could be considered radical, I created this pull request rather than directly committing to svn.  I request that our beta users give this branch and report any major concerns.
    
    thanks,
    chas

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chonton/commons-bcel trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-bcel/pull/2.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2
    
----
commit e4c11bff9d44aa90ebe1d25cd9a0685714f5c18d
Author: Chas Honton <ch...@apache.org>
Date:   2015-08-25T05:08:00Z

    Change targeting model from instructions as target to InstructionHandle as target

commit 08702660216b43aa46bc93030fc6a2fded37230c
Author: Chas Honton <ch...@apache.org>
Date:   2015-08-25T05:09:56Z

    Change targeting model from instructions as target to InstructionHandle as target

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] commons-bcel pull request #2: Use InstructionHandle as target instead of Ins...

Posted by chonton <gi...@git.apache.org>.
Github user chonton closed the pull request at:

    https://github.com/apache/commons-bcel/pull/2


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org