src/share/classes/com/sun/tools/javac/jvm/Items.java

changeset 1670
29c6984a1673
parent 1393
d7d932236fee
child 2027
4932bb04c4b8
equal deleted inserted replaced
1669:d3648557391b 1670:29c6984a1673
1 /* 1 /*
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
569 569
570 private void ldc() { 570 private void ldc() {
571 int idx = pool.put(value); 571 int idx = pool.put(value);
572 if (typecode == LONGcode || typecode == DOUBLEcode) { 572 if (typecode == LONGcode || typecode == DOUBLEcode) {
573 code.emitop2(ldc2w, idx); 573 code.emitop2(ldc2w, idx);
574 } else if (idx <= 255) {
575 code.emitop1(ldc1, idx);
576 } else { 574 } else {
577 code.emitop2(ldc2, idx); 575 code.emitLdc(idx);
578 } 576 }
579 } 577 }
580 578
581 Item load() { 579 Item load() {
582 switch (typecode) { 580 switch (typecode) {

mercurial