gpt4 book ai didi

java - 如何在 BCEL 中将整数压入堆栈

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:16:49 31 4
gpt4 key购买 nike

我在 在 BCEL 中将整数压入堆栈 时遇到问题。我有一个方法 _square 的 someClass 即“ma​​thClass

    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));

谢谢

最佳答案

我用

new InstructionList.append(new PUSH(constantPool,23));

push 方法用于将基本类型数据压入堆栈。

关于java - 如何在 BCEL 中将整数压入堆栈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6069915/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com