mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 12:11:11 +00:00
AS3 P-code: do not show Undefined() in slot/const value
This commit is contained in:
+9
-4
@@ -212,12 +212,17 @@ public class ASM3Parser {
|
||||
int slotid = (int) (long) (Long) symb.value;
|
||||
expected(ParsedSymbol.TYPE_KEYWORD_TYPE, "type", lexer);
|
||||
int type = parseMultiName(constants, lexer);
|
||||
expected(ParsedSymbol.TYPE_KEYWORD_VALUE, "value", lexer);
|
||||
ValueKind val = parseValue(constants, lexer);
|
||||
symb = lexer.lex();
|
||||
if (symb.type == ParsedSymbol.TYPE_KEYWORD_VALUE) {
|
||||
ValueKind val = parseValue(constants, lexer);
|
||||
tsc.value_kind = val.value_kind;
|
||||
tsc.value_index = val.value_index;
|
||||
} else {
|
||||
tsc.value_kind = ValueKind.CONSTANT_Undefined;
|
||||
tsc.value_index = 0;
|
||||
}
|
||||
tsc.slot_id = slotid;
|
||||
tsc.type_index = type;
|
||||
tsc.value_kind = val.value_kind;
|
||||
tsc.value_index = val.value_index;
|
||||
tsc.name_index = name_index;
|
||||
return true;
|
||||
}
|
||||
|
||||
+5
-3
@@ -240,9 +240,11 @@ public class TraitSlotConst extends Trait implements TraitWithSlot {
|
||||
writer.appendNoHilight("type ");
|
||||
writer.hilightSpecial(abc.constants.multinameToString(type_index), HighlightSpecialType.TRAIT_TYPE_NAME);
|
||||
writer.newLine();
|
||||
writer.appendNoHilight("value ");
|
||||
writer.hilightSpecial((new ValueKind(value_index, value_kind).toASMString(abc.constants)), HighlightSpecialType.TRAIT_VALUE);
|
||||
writer.newLine();
|
||||
if (value_kind != ValueKind.CONSTANT_Undefined) {
|
||||
writer.appendNoHilight("value ");
|
||||
writer.hilightSpecial((new ValueKind(value_index, value_kind).toASMString(abc.constants)), HighlightSpecialType.TRAIT_VALUE);
|
||||
writer.newLine();
|
||||
}
|
||||
return writer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user