Corrections to typographical errors in the JVM Specification
Thiago Henrique Hupner
thihup at gmail.com
Fri Jun 28 17:53:46 UTC 2024
Dear all,
I hope this message finds you well.
I have identified a few typographical errors in the Verifier section of the
JVM specification, specifically within the Prolog code. Below are the
details of the corrections required:
*4.10.1.6. Type Checking Methods with Code*
*Current:*
isInitHandler(Environment, Handler) :-
Environment = environment(_Class, Method, _, Instructions, _, _),
isInit(Method).
member(instruction(_, invokespecial(CP)), Instructions),
CP = method(MethodClassName, '<init>', Descriptor).
*Correction:*
isInitHandler(Environment, Handler) :-
Environment = environment(_Class, Method, _, Instructions, _, _),
isInit(Method),
member(instruction(_, invokespecial(CP)), Instructions),
CP = method(MethodClassName, '<init>', Descriptor).
*Change:* Corrected the period (.) to a comma (,) after isInit(Method) to
ensure proper clause continuation.
*4.10.1.8. Type Checking for protected Members*
*Current:*
classesInOtherPkgWithProtectedMember(Class, MemberName,
MemberDescriptor, MemberClassName,
[class(MemberClassName, L) | Tail],
T] :-
*Correction:*
classesInOtherPkgWithProtectedMember(Class, MemberName,
MemberDescriptor, MemberClassName,
[class(MemberClassName, L) | Tail],
T) :-
*Change:* Corrected the mismatched bracket from T] to T).
*4.10.1.9. Type Checking Instructions: baload*
*Current:*
instructionIsTypeSafe(baload, Environment, _Offset, StackFrame,
NextStackFrame, ExceptionStackFrame) :
nth1OperandStackIs(2, StackFrame, ArrayType),
isSmallArray(ArrayType),
validTypeTransition(Environment, [int, top], int,
StackFrame, NextStackFrame),
exceptionStackFrame(StackFrame, ExceptionStackFrame).
*Correction:*
instructionIsTypeSafe(baload, Environment, _Offset, StackFrame,
NextStackFrame, ExceptionStackFrame) :-
nth1OperandStackIs(2, StackFrame, ArrayType),
isSmallArray(ArrayType),
validTypeTransition(Environment, [int, top], int,
StackFrame, NextStackFrame),
exceptionStackFrame(StackFrame, ExceptionStackFrame).
*Change:* Corrected the colon (:) to a double colon (:-) to indicate the
correct predicate definition.
*4.10.1.9. Type Checking Instructions: ldc, ldc_w, ldc2_w*
*Current:*
instructionHasEquivalentTypeRule(ldc_w(CP), ldc(CP))
*Correction:*
instructionHasEquivalentTypeRule(ldc_w(CP), ldc(CP)).
*Change:* Added a period (.) at the end to properly terminate the clause.
I hope these corrections are helpful. Please let me know if any further
clarification is needed.
Best regards,
Thiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jls-jvms-spec-comments/attachments/20240628/3141d2ab/attachment.htm>
More information about the jls-jvms-spec-comments
mailing list