Skip to content

Commit 6c02bf5

Browse files
committed
rename
1 parent 144d573 commit 6c02bf5

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

deobfuscator-api/src/main/java/org/objectweb/asm/tree/AbstractInsnNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ public String namedOpcode() {
640640
/**
641641
* Returns the number of stack values consumed by this instruction
642642
*/
643-
public int sizeOnStack(Frame<? extends Value> frame) {
643+
public int getConsumedStackValuesCount(Frame<? extends Value> frame) {
644644
return switch (this.getOpcode()) {
645645
// Unary operations (one value)
646646
case ISTORE, LSTORE, FSTORE, DSTORE, ASTORE, POP, DUP, DUP_X1, SWAP, INEG,

deobfuscator-api/src/main/java/uwu/narumi/deobfuscator/api/asm/InsnContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ public MethodContext methodContext() {
4444
return methodContext;
4545
}
4646

47-
public int sizeOnStack() {
48-
return this.insn.sizeOnStack(this.frame());
47+
public int getConsumedStackValuesCount() {
48+
return this.insn.getConsumedStackValuesCount(this.frame());
4949
}
5050

5151
/**
5252
* Places POPs instructions before current instruction to remove source values from the stack.
5353
* This method automatically calculates how many stack values to pop.
5454
*/
5555
public void placePops() {
56-
for (int i = 0; i < this.sizeOnStack(); i++) {
56+
for (int i = 0; i < this.getConsumedStackValuesCount(); i++) {
5757
int stackValueIdx = frame().getStackSize() - (i + 1);
5858
OriginalSourceValue sourceValue = frame().getStack(stackValueIdx);
5959

deobfuscator-api/src/main/java/uwu/narumi/deobfuscator/api/helper/MethodHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static Map<AbstractInsnNode, Set<AbstractInsnNode>> computeConsumersMap(M
121121
if (frame == null) continue;
122122

123123
// Loop through stack values and add consumer to them
124-
for (int i = 0; i < consumer.sizeOnStack(frame); i++) {
124+
for (int i = 0; i < consumer.getConsumedStackValuesCount(frame); i++) {
125125
// Get the value from the stack (first consumed value is at the top)
126126
OriginalSourceValue sourceValue = frame.getStack(frame.getStackSize() - (i + 1));
127127

deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/universal/number/InlineConstantValuesTransformer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected void transform() throws Exception {
2020
FramedInstructionsStream.of(this)
2121
.forceSync()
2222
.forEach(insnContext -> {
23-
int stackSize = insnContext.sizeOnStack();
23+
int stackSize = insnContext.getConsumedStackValuesCount();
2424

2525
// Iterate over stack values
2626
for (int i = 0; i < stackSize; i++) {

0 commit comments

Comments
 (0)