[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jilc-dev] "switch-case" Causing Problems
From: |
Gaurav Vaish |
Subject: |
Re: [Jilc-dev] "switch-case" Causing Problems |
Date: |
Mon, 25 Feb 2002 15:43:10 +0530 |
----- Original Message -----
From: "Gopal.V" <address@hidden>
To: <address@hidden>
Sent: Monday, February 25, 2002 19:40
Subject: Re: [Jilc-dev] "switch-case" Causing Problems
: I think I'll cvs up before starting on the patch.... Also I think
: we are missing an important part here "Exception" table. Will work
: that out....
I have deliberately not taken into account the Exception part. No reasons
behind that. ;-)
: BTW try the following Java program....
Amazing. It works well.
-------------------------------------
.source foo.java
.class public synchronized foo
.super java/lang/Object
.method public <init>()V
.limit stack 1
.limit locals 1
0 aload_0
1 invokenonvirtual java/lang/Object/<init> ()V
4 return
.end method
.method baz(I)I
.limit stack 1
.limit locals 3
0 bipush 10
2 istore_2
3 iload_1
4 lookupswitch //2 key-values
12 : 32
54 : 37
default: 42
32 iconst_1
33 istore_2
34 goto 45 //code offset
37 iconst_0
38 istore_2
39 goto 45 //codeoffset
42 bipush 12
44 istore_2
45 iload_2
46 ireturn
.end method
-------------------------------------
Cheers,
Gaurav Vaish
http://home.iitk.ac.in/student/gvaish
http://calendar.yahoo.com/mastergaurav
-----------------------
:
: Gopal.V