Uczę się biblioteki ASM do generowania kodu bajtowego. W pewnym momencie zrobiłem jakiś błąd ze złym lokalnego typu zmiennej i dostaje błąd:Co to jest tabela stackmap w kodzie bajtowym jvm?
Exception in thread "main" java.lang.VerifyError: Bad local variable type
Exception Details:
Location:
Loops.start()V @56: aload_1
Reason:
Type top (current frame, locals[1]) is not assignable to reference type
Stackmap Table:
full_frame(@24,{Object[#2],Object[#9]},{Integer})
full_frame(@25,{Object[#2],Object[#9]},{Integer,Integer})
same_locals_1_stack_item_frame(@44,Integer)
full_frame(@45,{Object[#2],Object[#9]},{Integer,Integer})
full_frame(@48,{Object[#2]},{Integer})
full_frame(@80,{Object[#2],Integer},{Integer})
full_frame(@81,{Object[#2],Integer},{Integer,Integer})
full_frame(@87,{Object[#2]},{Integer})
full_frame(@119,{Object[#2],Integer},{Integer})
full_frame(@120,{Object[#2],Integer},{Integer,Integer})
same_locals_1_stack_item_frame(@123,Integer)
Problemem nie było trudno znaleźć i naprawić, ale jestem ciekaw co jest to stackmap stół rzecz?
Tak, w zasadzie jest to "funkcja", którą Sun dodał, ponieważ ich weryfikator był boleśnie powolny i byli zbyt gęste, aby zobaczyć jakikolwiek inny sposób na przyspieszenie. –