🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #456

java and goto instuction! amazing!

#456
From: Amir Pashazadeh
Date: Sat, 23 Aug 2003 09:06
96 lines
3229 bytes
Hi everybody,
I decompiled a class file (using 3 different decompilers for accurancy), and
every time I got the same source code, there is something amazing in it, it
has "goto" instruction! how can it be?
does JVM (as executor) supports "goto" instruction, but no standard compiler
supports it yet? so a custom compiler can use it?

(I have changed the generated source code refereneced classes for privacy
;))

generated source code (comments are byte-code instuctions, as you can see
there is no byte-code instuctions for "goto"s!)

Amir Pashazadeh.
----------------------------------------------------------------------------

iterator = e.iterator();
// 10 18:aload_0

// 11 19:getfield #19 <Field java.util.List com.e>

// 12 22:invokeinterface #20 <Method java.util.Iterator
java.util.List.iterator()>

// 13 27:astore 4

if(!g.c) goto _L2; else goto _L1

// 14 29:getstatic #195 <Field boolean com.g.c>

// 15 32:ifeq 61

_L1:

com.e e1 = (com.e)iterator.next();

// 16 35:aload 4

// 17 37:invokeinterface #21 <Method java.lang.Object
java.util.Iterator.next()>

// 18 42:checkcast #22 <Class com.e>

// 19 45:astore 5

if(e1.a(s1, this, i))

//* 20 47:aload 5

//* 21 49:aload_2

//* 22 50:aload_0

//* 23 51:iload_3

//* 24 52:invokevirtual #23 <Method boolean com.e.a(java.lang.String, com.a,
int)>

//* 25 55:ifeq 61

return e1;

// 26 58:aload 5

// 27 60:areturn

_L2:

if(!iterator.hasNext())

//* 28 61:aload 4

//* 29 63:invokeinterface #24 <Method boolean java.util.Iterator.hasNext()>

//* 30 68:ifne 35

throw new g(a.b(com.g.b.bf));

// 31 71:new #25 <Class com.g>

// 32 74:dup

// 33 75:getstatic #26 <Field com.a.a>

// 34 78:getstatic #27 <Field java.lang.String com.g.b.bf>

// 35 81:invokevirtual #28 <Method java.lang.String
com.e.b(java.lang.String)>

// 36 84:invokespecial #29 <Method void g(java.lang.String)>

// 37 87:athrow

if(true) goto _L1; else goto _L3

_L3:
Technical Details
Message-ID: <bi77c4$5ja9n$1@ID-170682.news.uni-berlin.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!213.165.108.46!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a146,e1650d725c17806f,start
X-Google-Attributes: gid10a146,public
X-Google-Thread: 1089d0,e1650d725c17806f,start
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,e1650d725c17806f,start
X-Google-Attributes: gidf74b3,public
X-Google-Thread: 10bb9b,e1650d725c17806f,start
X-Google-Attributes: gid10bb9b,public
X-Google-ArrivalTime: 2003-08-23 01:08:17 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!213.165.108.46!not-for-mail
From: "Amir Pashazadeh" <pasha@abdnet.com>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,comp.lang.java.machine,comp.lang.java.programmer
Subject: java and goto instuction! amazing!
Date: Sat, 23 Aug 2003 12:36:48 +0330
Lines: 99
Message-ID: <bi77c4$5ja9n$1@ID-170682.news.uni-berlin.de>
NNTP-Posting-Host: 213.165.108.46
X-Trace: news.uni-berlin.de 1061626095 5876023 213.165.108.46 (16 [170682])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000