logoalt Hacker News

U1F984today at 10:25 AM1 replyview on HN

Java does use dup in some cases, e.g.

   public static void test() { 
      new Object();
   }

         0: new           #2                  // class java/lang/Object
         3: dup
         4: invokespecial #1                  // Method java/lang/Object."<init>":()V
         7: pop
         8: return

Replies

asibahitoday at 11:55 AM

This `dup` seems entirely useless it actually supports the case for omitting it fron the instruction set.

show 1 reply