Closed 0xF6 closed 1 month ago
The changes introduce improvements to generic type handling, error logging, and type compatibility in various components of the system. Key updates include modifying method signatures and type checks to accommodate VeinComplexType
, refactoring field and method handling, and simplifying method definitions using generics. The improvements primarily focus on ensuring better compatibility and robustness when dealing with generic types across compilation, runtime, and reflection modules.
File/Path | Change Summary |
---|---|
compiler/compilation/parts/bodies.cs |
Updated the logic for emitting OpCodes.RET considering generics. |
compiler/compilation/parts/fields.cs |
Modified field flag generation and type validation for generics. |
lib/vein.std/std/Out.vein |
Consolidated print methods into a single generic method. |
lib/vein.std/std/Testable.vein |
Added new methods and a global alias, updated existing methods. |
runtime/common/exceptions/... |
Refactored exception message construction with generics. |
runtime/common/reflection/Vein... |
Updated to use VeinComplexType instead of VeinClass . |
runtime/ishtar.base/emit/... |
Refactored type handling to use WriteComplexType . |
runtime/ishtar.generator/generators/... |
Added generic type handling and error logging in statements. |
runtime/ishtar.vm/runtime/vm/... |
Updated field type and method handling with RuntimeComplexType . |
PostgenerateBody
Method ChangessequenceDiagram
participant MB as MethodBuilder
participant G as ILGenerator
participant M as Method
MB ->> G: Check _opcodes
alt No opcodes and ReturnType is generic
G ->> MB: Emit RET
else No opcodes and ReturnType is not generic and VOID
G ->> MB: Emit RET
end
MB ->> M: Finalize Method
sequenceDiagram
participant FC as FieldComparator
participant FT as FieldType Validator
participant F as Field
FC ->> FT: Validate Field Type (with generics)
FT -->> FC: Valid/Invalid Type
FC ->> F: Update Field Flags
In fields of code where changes sweep,
The generics now in method deep,
Fields refactored, methods bright,
Bugs are hunted in the night.
Complex types now lead the way,
For a smoother, clearer, coding day.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
print
method in theOut
class into a single generic method for increased flexibility.delMethod
andabobus
methods, and a global aliastestMethod
in theTestable
class.Bug Fixes
Improvements
ConvertNotSupportedException
by using template strings.VeinComplexType
.Refactor
Documentation