Automatic local variable initialization for methods

3 views
Skip to first unread message

Rodrigo B. de Oliveira

unread,
Jan 20, 2009, 6:15:04 PM1/20/09
to jvm-la...@googlegroups.com
Does the jvm has something like a flag to enable automatic local
variable initialization for methods?

Best wishes,
Rodrigo

Charles Oliver Nutter

unread,
Jan 20, 2009, 6:25:54 PM1/20/09
to jvm-la...@googlegroups.com
Rodrigo B. de Oliveira wrote:
> Does the jvm has something like a flag to enable automatic local
> variable initialization for methods?

No, there's nothing like that. What do you need it for?

Rodrigo B. de Oliveira

unread,
Jan 20, 2009, 7:24:12 PM1/20/09
to jvm-la...@googlegroups.com

Less code to emit (and write emitting code for).

Charles Oliver Nutter

unread,
Jan 20, 2009, 11:39:15 PM1/20/09
to jvm-la...@googlegroups.com
Rodrigo B. de Oliveira wrote:
> On Tue, Jan 20, 2009 at 9:25 PM, Charles Oliver Nutter
> <charles...@sun.com> wrote:
>> Rodrigo B. de Oliveira wrote:
>>> Does the jvm has something like a flag to enable automatic local
>>> variable initialization for methods?
>> No, there's nothing like that. What do you need it for?
>>
>
> Less code to emit (and write emitting code for).

I guess you'll just have to emit it... only fields and array elements
are automatically initialized.

BTW, if someone wanted to help out with Boojay, where would be a good
place to start?

- Charlie

Rodrigo B. de Oliveira

unread,
Jan 28, 2009, 10:58:09 AM1/28/09
to jvm-la...@googlegroups.com
On Wed, Jan 21, 2009 at 2:39 AM, Charles Oliver Nutter
<charles...@sun.com> wrote:
>> ...

>> Less code to emit (and write emitting code for).
>
> I guess you'll just have to emit it... only fields and array elements
> are automatically initialized.
>

OK. Thanks.

> BTW, if someone wanted to help out with Boojay, where would be a good
> place to start?
>

:)

I'm putting together a blog post on that. Had to release boo first*.

Best wishes,
Rodrigo

* http://blogs.codehaus.org/people/bamboo/archives/001749_boo_09_is_here.html

Reply all
Reply to author
Forward
0 new messages