Displaying 5 results from an estimated 5 matches for "stringtempl".
2008 Apr 23
1
[LLVMdev] getting closer!
...for structs init. cool.
>> I'm always using the pure text input headline generating everything
>> from Java...
>
> Normally I'd say that's masochism, but you may have a handle on text
> templates. :)
Yep, generating text is my "speciality". http://
www.stringtemplate.org :) ANTLR+StringTemplates makes it pretty darn
easy to generate the IR using any ANTLR target (C, C#, Python,
ActionScript, Java, soon others).
Much better than having to code in C/C++ in my view [ducking]. ;)
>>> For example, something like this:
>>
>> [snip]
>...
2008 Apr 23
0
[LLVMdev] getting closer!
On Apr 22, 2008, at 20:19, Terence Parr wrote:
> On Apr 22, 2008, at 3:27 PM, Gordon Henriksen wrote:
>
>>> 1. How do I know the offset (due to alignment/padding by LLVM) of
>>> a pointer within an object using {...} struct type? GEP
>>> instruction gets an address, of course, but how does my C
>>> collector compute these. Do I need to make a
2008 Apr 23
2
[LLVMdev] getting closer!
On Apr 22, 2008, at 3:27 PM, Gordon Henriksen wrote:
> If you'd like to propose clarified language once you've wrapped your
> head around the framework, I'd be happy to incorporate it. Most
> ideally, submit a patch against GarbageCollection.html in http://llvm.org/svn/llvm-project/llvm/trunk/docs/
> .
Cool. Ok, I have already submitted some svn diffs to Chris to fix
2008 Apr 23
2
[LLVMdev] templates vs code to generate IR
...g byte codes:
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "Hello"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
Either you use templates that render to text or you use a library such
as BCEL to create a data structure that will render to text. Here is a
StringTemplate template definition that will generated byte codes to
print any string.
println(s) ::= <<
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "<s>"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
>>
Then, to generate the byte codes above, just...
2008 Apr 24
0
[LLVMdev] templates vs code to generate IR
...java/lang/System/out Ljava/io/PrintStream;
> ldc "Hello"
> invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
>
> Either you use templates that render to text or you use a library such
> as BCEL to create a data structure that will render to text. Here is a
> StringTemplate template definition that will generated byte codes to
> print any string.
>
> println(s) ::= <<
> getstatic java/lang/System/out Ljava/io/PrintStream;
> ldc "<s>"
> invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
>>>
>
> Then,...