Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

2024-12-27: Fuzion December Update

December is almost over and was so busy that we almost failed to deliver this months news. But, here we go:

The Focus last month was performance of the fz command, in particular the DFA analysis could be improved, but there is still a long way to go. A lot is happening in the base library, where we are trying different ways to make best use of effect handlers. Also, much work goes into usability, better error reporting and plain bug fixes.

  • General
  • Fuzion language
    • forbid definition of types (constructors, choices) in type features (#3975). Even though it sometimes seems convenient, having types whose outer types are type features and cotypes causes a major complication of the language.

    • forbid unused fields (#4086). A field that is never read is typically an error. If, e.g., during development, a field a := f xis currently unused, it either has to be ignored explicitly using ignore a, or it has to be renamed as -, i.e., using _ := f x.

  • Base library
    • New features

      • add infix version of instate_self (#4097) and effect_type <- effect_instance ! code (#4105)

        This permits instating an effect as follows

                      my_mutate ! ()->
                        counter <- my_mutate.env.new 0
                        while there_is_more do
                          counter <- 1 + counter
                        say counter
                    

        instead of

                      my_mutate.instate_self ()->
                        counter <- my_mutate.env.new 0
                        while there_is_more do
                          counter <- 1 + counter
                        say counter
                    

        as well as

                      Output <- my_output_handler ! ()->
                        Output.env.print "hi"
                    

        instead of

                      Output.instate my_output_handler ()->
                        Output.env.print "hi"
                    
      • add container.mutable_tree_map.replace returning old value, change put to return nothing (#4317)

      • add process effect (#4111)

      • freeze backing internal arrays of array2, array3 etc. (#4311)

      • structured concurrency (#4095)

    • Changed features

      • base/net/connection: do not depend on net.connections effect (#4326)

      • Fix as_string for wrapped java arrays by adding check for java primitive to array_to_java_object's T (#4151)

      • change lock_free.map to lock_free.Map ref (#4178)

      • change Write_Provider.write to accept Sequence of bytes (#4085)

      • fix order_map.index [] (#4122)

      • io.reader/io.writer add precondition (#4089)

      • io.file make use of io.buffered (#4074)

      • io.file/io.dir use inheritance instead of type parameter for distinguishing files (#4113)

      • move or, and_then, or_else, and to switch (#4170)

      • move array2/array3 instatiation to type feature (type.new) (#4207)

      • repository restructuring: move lib to modules/base (#4315)

      • move mapped_buffer to its own effect (#4150)

      • reader, change result types to switch instead of plain choice (#4090)

      • rename String.concat1 as String.concat (#4185)

      • rename TRUE/FALSE to true_/false_ to conform to fuzion naming conventions(#4024)

      • Sequence implement sort via pre T:property.partially_orderable (#3963)

      • remove local mutate param LM from buffered.writer (#4121)

  • Parser
    • fix parsing of infix ! operator that was falsely skipped by skipEffects (#4198)

    • require dots ... after open type parameters to make their use more obvious (#4298)

    • create error if constructor is marked abstract, intrinsic or native (#4284)

    • fix syntax error when fully qualifying inheritance calls (#4234)

    • fix scoping for blocks in braces (#4276)

  • Front End
    • Allow features with equal names if visibility avoids ambiguity (#4125)

    • fix result type inference in ternary (#4051)

    • write cotype origin to fum-file (#4190)

    • check effect signatures for existence of types and flag error if type given is not an effect (#4129, #4138)

    • Suppress follow-up errors in jenkins' man_or_boy2 and tya_field tests (#4158)

    • Allow .this as a function result type, fix #3731 by allowing that case instead of producing an error (#4196, #4294)

    • bug fixes

      • Fixed actual type parameter checking that was not strict enough (#4238)

      • Suppress subsequent errors in actual arguments (#4031)

      • enable post conditions for abstract features and constructors (#4249)

      • fix bug in type inference for recursive feature (#4152)

      • fix boxing when passing this-type to a ref feature (#4265)

      • fix NullPointerException when fully qualifying types in base.fum (#4232)

      • fix resolveFormalArg, when target type is generic argument (#4066)

      • fix unjustified partial ambiguity (#4286)

      • allow use of free types in type constraints (#4230)

      • do not permit feature result type inference for abstract features since these would always be unit and seldom useful (#4060)

      • relax check that findInheritanceChain is successful (#4321)

    • cleanup

      • rename featureIsThisRef -> featureIsRef (#4293)

      • simplify AbstractType.isFunctionType (#4067)

      • add method selfOrConstraint for common pattern (#4124)

      • avoid repeated immediate function call if resolveTypes called repeatedly (#4330)

      • change outer ref names from #^x.y to #^<x.y>, fix #4316 (#4329)

      • make selfOrConstraint instance methods (#4140)

      • better precondition for AbstractFeature.findInheritanceChain (#4318)

      • fix merge conflict: fix call to selfOrConstraint (#4157)

      • rename AbstractFeature.isThisRef -> isRef (#4126)

  • Util
    • Fixed handling of Source range that crashed in case source position is not available #4180 (#4182)

  • DFA
    • performance

      • Performance improvements (about 3%): added version of AbstractInterpreter without RESULT (#4241)

      • At end of DFA, do not run extra iterations after _fuir.lookupDone() was called (#4117)

      • Disable escape analysis during DFA for jvm/interpreter backends (#4177)

      • Do not cache TaggedValue twice (#4166)

      • Fully suppress the generation of EmbeddedValue if escape analysis not needed (#4213)

      • Performance improvement by originally treating calls as unit type calls (#4103)

      • Site-insensitive analysis for non-constructors, improve #4028 (#4148)

    • debugging

      • Add infrastructure to show values produced during DFA (#4161)

      • catch endless recursion in Call.toString, better env debug output (#4153)

    • bug fixes

      • allow set field in UNIT value if field remove or of unit type, fix 4216 (#4217)

      • Improve the fixpoint loop: run one more iteration after lookupDone (#4102)

      • Use FUIR.clazzArg instead of FUIR.clazzArgClazz to get arg field (#4160)

    • enhanced creating generic results (#4227)

    • remove fz option -Xdfa=on/off (#4135)

  • FUIR
    • turn env into a call to an intrinsic (#4189)

    • During monomorphization, check for ambiguous result types due to ref targets and this-types, fix #4273 (#4274)

    • Add precondition for Clazz of Types.t_ERROR not to be created. (#4101)

    • better error output in case of cyclic value fields (#4319)

    • cache result of GeneratingFUIR.constClazz (#4167)

    • cache results of clazzResultClazz, clazzArgClazz and clazzArgCount (#4212)

    • fix Clazz.findOuter (#4144)

    • fix Index out of bounds (#4240)

  • All back ends
    • replace intrinsics nano_time/nano_sleep by native (#4245)

    • turn unique_id from intrinsic to native (#4269)

    • replace fuzion.sys.net intrinsics by native (#4327)

    • support void * result types (#4325)

    • support passing array data to native call (#4323)

  • JVM back end
    • add invoke static for interface method (#4224)

    • call native code (#4219)

    • no effect of <str> instated (#4275)

    • A staticAccess in a stub was falsely optimized as a tail call (#4147)

  • C back end
    • add more cases for native test (#4229)

    • add small test for native function calling (#4211)

    • add void, for functions with no args (#4210)

    • do not expose get_family, get_socket_type, get_protocol (#4226)

    • split generated code in .h and .c file (#4208)

    • fix ArrayIndexOutOfBounds in tutorial/examples/match_example1.fz (#4225)

    • remove Const_String from clazzNeedsCode in C and JVM backends (#4236)

  • Interpreter back end
    • call native code (#4222)

    • fix set casefield in case result type is unittype (#4282)

  • Windows
    • fix build issue, patch not installed (#4256)

    • fix building fuzion.dll (#4279)

    • fix building shared library (#4280)

    • fix fzE_nanotime/fzE_nanosleep (#4299)

    • fix missing include dir (#4194)

    • try fix actions (#4289)

  • fz command
    • improved command line option handling: checks for invalid values (#4159) and handling of duplicate options (#4184)

    • Improved handling of errors and warnings:

      • always show total error count with -XmaxErrors (#4112)

      • show total warning count, even when warning count is limited (#4186)

      • start numbering of warnings with 1, not 0. fix #4214, fix #4188 (#4215)

      • highlight that -XmaxErrors requires a value in max error warning (#4155)

    • Fix handling for file argument of -XjavaProf= option. (#4204)

  • Tests
    • add regression tests(#4262, #4258, #4287, #4257, #4259, )

    • add name_but_not_visi_conflict (#4133)

    • extend test for duplicate but invisible names by test if features can be called (#4139)

    • fix redef_with_type_parameters case2 (#4277)

    • output to rerun failed tests only (#4174)

    • update syntax of test #37 (#4175)

Cheers,

--The Fuzion Team.

last changed: 2024-12-27