equal
deleted
inserted
replaced
178 } |
178 } |
179 |
179 |
180 static void testInterface() { |
180 static void testInterface() { |
181 System.out.println("linkToInterface"); |
181 System.out.println("linkToInterface"); |
182 |
182 |
183 // Monomorphic case (optimized virtual call) |
183 // Monomorphic case (optimized virtual call), concrete target method |
|
184 run(() -> linkToInterface(new P1(), P1.class)); |
|
185 |
|
186 // Monomorphic case (optimized virtual call), default target method |
184 run(() -> linkToInterface(new T(), I.class)); |
187 run(() -> linkToInterface(new T(), I.class)); |
185 |
188 |
186 // Megamorphic case (virtual call) |
189 // Megamorphic case (virtual call) |
187 Object[][] recv = new Object[][] {{new T(), I.class}, {new P1(), P1.class}, {new P2(), P2.class}}; |
190 Object[][] recv = new Object[][] {{new T(), I.class}, {new P1(), P1.class}, {new P2(), P2.class}}; |
188 run(() -> { |
191 run(() -> { |