Re: Re: New project announce (ECG) using ASM

Peich <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <CAHUVJvFvA77f9WNY3O-5Ws0Z5Ba7pT1YVtWH3eoUEt00mLBP2w@mail.gmail.com>
Thank you for your reply!

My approach in ECG is that the developer will create a model that will be
analog to java code, and a Class generator will use that model to, using
ASM, create the bytecode. That model would be our AST.

And, of course, we can do optimizations on the model before the bytecode
generation.

For 1.0 version, i want just a working version with basic functionality,
optimization and transformations of the model are a great idea, and i'll
target them for a later milestone.

About the code blocks, as their name says, are just a collection of other
code parts (as java code lines). For example, you can create a code block of
java instructions that would be the "body" of a try block. I'm not thinking
of bytecode in these blocks, so no jumps on them.

These blocks, and smalls "code parts" as java lines, can be created using
factories, and reused if they are composed of other code parts. And you can
create your own "code parts" if the existing ones do not provide all that
you need, just need to implement or extend the interfaces and base classes
of the framework (and, if possible, contribute it to the framework, of
course :)).



2011/8/18 Charles Oliver Nutter <[email protected]>

> Interesting!
>
> This reminds me of a project I've always wanted: an LLVM-like API atop
> JVM bytecode. LLVM has very nice high-level operations defined for
> basic blocks of code, flow-control, allocation, etc, while in the JVM
> world we're forced to basically write our own versions of those APIs
> atop ASM and friends. We also each have to write our own optimizers or
> run the risk of emitting inefficient bytecode (or questionable
> bytecode with dead code, for example) over and over again for each
> project. If we had a nice intermediate representation above JVM
> bytecode, we could do optimization passes, code emitting, stack/local
> var allocation, and so on very easily, avoiding stack manipulation
> bugs and simply "bad code" being emitted.
>
> What are your goals with this? You're already starting to represent
> basic "Java" operations like construction and calls, yes? And I see
> you have "code blocks" in your example, which presumably can be used
> as the target of jumps. Is this something that could grow into a
> high-level intermediate representation above bytecode?
>
> Another interesting parallel is with .NET's DLR, which provides a
> common "abstract semantic tree" they hoped could represent operations
> in any arbitrary language. You emit that "AST" and their
> compiler/optimizer can take it and produce the best possible IL. I
> want that capability, and maybe ECG is a path to getting it...
>
> - Charlie
>
> On Thu, Aug 18, 2011 at 6:39 AM, Peich <[email protected]> wrote:
> > Sorry, i forgot about it :)
> >
> > http://code.google.com/p/ecg/
> >
> > http://easyclassgenerator.blogspot.com/
> >
> > 2011/8/18 Paul Hammant <[email protected]>
> >>
> >> github link ?
> >>
> >> On Thu, Aug 18, 2011 at 6:35 AM, <[email protected]> wrote:
> >>>
> >>> Hi all!
> >>>
> >>> I've recently started a new open source project called Easy Class
> >>> Generator
> >>> (ECG).
> >>>
> >>> It's a framework to help generate and manipulate bytecode, the same
> that
> >>> ASM
> >>> does, but from a different approach.
> >>>
> >>> The main target is that que user dont need to knows about bytecode,
> >>> stack,
> >>> frames, etc, just about java programming..
> >>>
> >>> It's not an ASM replacement (it uses it internally), but a "decorator"
> >>> above
> >>> it.
> >>>
> >>> it's still in active development, far from a first version, but i'll
> like
> >>> to
> >>> introduce it to you. I'll glad if you could send some feedback or
> >>> colaboration
> >>> request.
> >>>
> >>> Thank you!
> >>>
> >>>
> >>> --
> >>> You receive this message as a subscriber of the [email protected] mailing
> list.
> >>> To unsubscribe: mailto:[email protected]
> >>> For general help: mailto:[email protected]?subject=help
> >>> OW2 mailing lists service home page: http://www.ow2.org/wws
> >>>
> >>
> >
> >
> >
> > --
> > You receive this message as a subscriber of the [email protected] mailing
> list.
> > To unsubscribe: mailto:[email protected]
> > For general help: mailto:[email protected]?subject=help
> > OW2 mailing lists service home page: http://www.ow2.org/wws
> >
> >
>
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.