Skip to content

1.6.0

Compare
Choose a tag to compare
@beta-ziliani beta-ziliani released this 06 Oct 20:16
· 1437 commits to master since this release
1.6.0
41573fa

Language

Standard Library

Collection

  • Refactor and improve NamedTuple deserialization from JSON and YAML (#12008, thanks @HertzDevil)
  • (performance) Optimize BitArray#tally(hash) (#11909, thanks @HertzDevil)
  • Use Slice#unsafe_slice_of and #to_unsafe_bytes in the standard library and compiler (#12280, thanks @HertzDevil)
  • (performance) Optimize block-less overloads of BitArray#index and #rindex (#12087, thanks @HertzDevil)
  • Support tuple metaclass indexers with non-literal arguments (#11834, thanks @HertzDevil)
  • Add Indexable#index! overloads with offset parameter (#12089, thanks @HertzDevil)

Concurrency

Crypto

Files

Macros

Networking

Numeric

Runtime

Serialization

  • Fix YAML serialization class name ambiguity (#12537, thanks @hugopl)
  • Allow non-type converter instances in ArrayConverter and HashValueConverter (#10638, thanks @HertzDevil)
  • Document after_initialize method for yaml and json serializers (#12530, thanks @analogsalad)

System

Text

Compiler

  • Improve recursive splat expansion detection (#11790, thanks @asterite)
  • Compiler: fix #to_s for empty parameters of lib funs (#12368, thanks @HertzDevil)
  • Compiler: transform Proc(*T, Void) to Proc(*T, Nil) (#12388, thanks @asterite)
  • Compiler: indent begin Expressions that are direct node children (#12362, thanks @HertzDevil)
  • Compiler: add missing location to node on literal expander for array (#12403, thanks @asterite)
  • Compiler: a generic class type can also be reference-like (#12347, thanks @asterite)
  • Hoist complex element expressions outside container literals (#12366, thanks @HertzDevil)
  • (performance) Compiler: bind to tuple, not array (#12423, thanks @asterite)
  • Use Path.new(string) instead of Path.new([string]) (#12419, thanks @asterite)
  • Decouple warning detection from program instances (#12293, thanks @HertzDevil)
  • (performance) Compiler: only have freeze_type in select AST nodes (#12428, thanks @asterite)
  • Correctly display codegen when cross-compiling (#12414, thanks @luislavena)
  • Compiler: simplify some calls (#12417, thanks @asterite)
  • (performance) Compiler: optimizations in merge_if_vars (#12432, #12433, thanks @asterite)
  • Compiler refactor: extract type_from_dependencies (#12437, thanks @asterite)
  • (performance) Compiler: refactor and slightly optimize merging two types (#12436, thanks @asterite)
  • (performance) Compiler optimization: don't create call for hook unless needed (#12452, thanks @asterite)
  • (performance) CrystalPath: Cache Dir.current to avoid thousands of allocations (#12455, thanks @yxhuvud)
  • Better call error messages (#12469, thanks @asterite)
  • (performance) Compiler optimization: avoid intermediate array when matching call arg types (#12485, thanks @asterite)

Codegen

Debugger

Interpreter

  • Interpreter: handle the case of a def's body with no type (#12220, thanks @asterite)
  • Interpreter: simplify ivar initialization (#12222, thanks @asterite)
  • Interpreter: fix autocasting in multidispatch (#12223, thanks @asterite)
  • Interpreter: handle next inside captured block (#12237, thanks @asterite)
  • Interpreter: fix crystal_type_id for virtual metaclass type (#12246, thanks @asterite)
  • Interpreter: handle yield with splat combined with tuple unpacking (#12247, thanks @asterite)
  • Interpreter: handle inlined call that returns self for structs (#12259, thanks @asterite)
  • Interpreter: implement Int128/UInt128 intrinsics (#12258, thanks @asterite)
  • Interpreter: fix some conversion primitives (#12257, thanks @asterite)
  • Interpreter: don't override special vars inside block (#12251, thanks @asterite)
  • Interpreter: add missing cast from tuple to other tuple inside union (#12249, thanks @asterite)
  • Interpreter: allow declaring local vars during a pry session (#12180, thanks @asterite)
  • Interpreter: handle bitreverse intrinsics (#12273, thanks @asterite)
  • Interpreter: cache methods with captured block (#12285, thanks @asterite)
  • Interpreter: missing downcast from MixedUnionType to NilableProcType (#12286, thanks @asterite)
  • Interpreter: fix with ... yield with extra arguments (#12301, thanks @asterite)
  • Interpreter: consider nodes without a type as NoReturn (#12275, thanks @asterite)
  • Interpreter: take with ... yield scope into account for args bytesize (#12317, thanks @asterite)
  • Fix loader spec on FreeBSD (#12323, thanks @dmgk)
  • Interpreter: inline ivar access for virtual call with a single child (#12321, thanks @asterite)
  • Interpreter: fix as? when there's no resulting type (#12328, thanks @asterite)
  • Interpreter: handle missing closured struct self (#12345, thanks @asterite)
  • Interpreter: use non_nilable_type in NilableCast (#12348, thanks @asterite)
  • Interpreter: implement mixed union cast with compatible tuple types (#12349, thanks @asterite)
  • Interpreter: fix missing upcast_distinct from A+ to B (Crystal::VirtualType to Crystal::NonGenericClassType) (#12374, thanks @asterite)
  • Interpreter: discard tuple and named tuple (#12387, thanks @asterite)
  • Interpreter: cast proc call arguments to proc arg types (#12375, thanks @asterite)
  • Interpreter: set correct scope for class var initializer (#12441, thanks @asterite)
  • Interpreter (repl): use new MainVisitor each time we need to interpret code (#12512, thanks @asterite)
  • Interpreter: allow inspecting block vars without affecting program (#12520, thanks @asterite)
  • Interpreter: check upcast in nilable cast (#12533, thanks @asterite)
  • Interpreter: implement variable autocast (#12563, thanks @asterite)
  • Interpreter: handle missing upcast from GenericClassInstanceMetaclassType to VirtualMetaclassType (#12562, thanks @asterite)
  • Interpreter: let local vars be seen by macros in repl and pry (#12240, thanks @asterite)
  • Interpreter: handle local variable type declaration (#12239, thanks @asterite)
  • Support libffi on Windows (#12200, thanks @HertzDevil)
  • Add $CRYSTAL_INTERPRETER_LOADER_INFO to show loaded libraries (#12221, thanks @straight-shoota)
  • Interpreter: node override (#12287, thanks @asterite)
  • Interpreter: introduce a Prompt type (#12288, thanks @asterite)
  • Interpreter: missing i += 1 (#12381, thanks @asterite)
  • Support building the interpreter on Windows (#12397, thanks @HertzDevil)
  • Don't exit in interpreter spec and change type from Nil to NoReturn in FixMissingTypes (#12230, thanks @asterite)
  • Interpreter: fix multidispatch with captured block (#12236, thanks @asterite)
  • Interpreter: don't change compiled mode logic (#12252, thanks @asterite)
  • Wait more in HTTP::Server specs in interpreted mode (#12420, thanks @asterite)

Parser

Semantic

  • (breaking-change) Allow Union restrictions to be ordered before all other restrictions (#12335, thanks @HertzDevil)
  • (breaking-change) Use more robust ordering between def overloads (#10711, thanks @HertzDevil)
  • Fix: Instance vars should not be allowed on Class, Tuple, NamedTuple, Enum, Pointer , Proc, StaticArray and Union. (#12160, thanks @I3oris)
  • Compiler and interpreter: fix is_a? from virtual metaclass to generic metaclass (#12306, thanks @asterite)
  • Compiler: fix type descendent for union metaclass (#12308, thanks @asterite)
  • Compiler: fix is_a? from generic class against generic class instance type (#12312, thanks @asterite)
  • Fix self in restrictions when instantiating macro def in subtypes (#10954, thanks @HertzDevil)
  • Never resolve free variables as types during overload ordering (#11973, thanks @HertzDevil)
  • Use instantiated type as self when inferring instance variable types (#12466, thanks @HertzDevil)
  • Fix restriction comparison between Metaclass and Path (#12523, thanks @HertzDevil)
  • (performance) Compiler: don't always use Array for node dependencies and observers (#12405, thanks @asterite)
  • Compiler: better error message for symbol against enum (#12478, thanks @asterite)

Tools

Docs-generator

  • Fix docs generator search constants id (#12262, thanks @GeopJr)

Formatter

  • Formatter: format comment after select (#12506, thanks @asterite)
  • Formatter: try to format macros that don't interpolate content (#12378, thanks @asterite)

Playground

  • Playground: Fix pass bound hostname to run sessions (#12356, thanks @orangeSi)
  • Don't show stacktrace when playground port is already in use. (#11844, thanks @hugopl)
  • Indent playground code using spaces (#12231, thanks @potomak)

Other