www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chonton <...@git.apache.org>
Subject [GitHub] commons-bcel pull request: Use InstructionHandle as target instead...
Date Tue, 25 Aug 2015 05:23:27 GMT
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 <chas@apache.org>
Date:   2015-08-25T05:08:00Z

    Change targeting model from instructions as target to InstructionHandle as target

commit 08702660216b43aa46bc93030fc6a2fded37230c
Author: Chas Honton <chas@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.
---

Mime
View raw message