Comment pousser entier sur la pile à BCEcl
Question
Je suis confronté à un problème dans le contexte de
ilist = new InstructionList();
ilist.append(InstructionConstants.ALOAD_0);
ilist.append(new GETFIELD(findex));
//I am trying to push some value using createLoad but it is not working
ilist.append(InstructionConstants.ALOAD_1);
ilist.append(ifact.createInvoke("mathClass", _square, Type.INT,
new Type[] { Type.INT }, Constants.INVOKEVIRTUAL));
merci
La solution
J'utilise
new InstructionList.append(new PUSH(constantPool,23));
La méthode de la poussée utilise pour appuyer sur les données de type primitif sur la pile.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow