-
Notifications
You must be signed in to change notification settings - Fork 24
Releases: julelang/jule
Jule 0.2.2
jule
- add: add reserved
extern useidentifiers - rename: the built-in
strtype asstring - rename: the
retkeyword asreturn - rename: the reserved
Strmethod asString - update: all rune literals will always default to the type
rune, even if they fit withinbyte - update: replace
:operator with the=operator of enums
julec
- rename: the
--opt-strcompiler option as--opt-string - imrpove: use deterministic identifier generation for IRs to make it easier to implement incremental compilation and debugging whenever possible
- improve: the
--opt-stringoptimization flag optimizesstring([]byte)andstring([]rune)casting expressions tostringliteral when all slice values are constant - improve: the
--opt-stringoptimization flag optimizes[]byte(string)and[]rune(string)casting expressions to[]byteor[]runeslice literal whenstringvalue is constant - fix: generates IR for fallible error message with an invalid memory access
- fix: semicolon is missing in IR code of some assignment expressions
- parser: improve missing expression errors when handling separated token parts
- sema: improve error messages for declaration associated top directives
- sema: fix strict type aliases structure type will not collect the references of the types, such as built-in implementation of the map type when declared like
type MyMap: map[int]int - sema: fix
#exportdirective allowed for generic structs - sema: eval will not collect references to the traits when evaluating a trait type (thanks for pointing to the issue, @LukyGuyLucky, #158)
Standard Library
- (windows) runtime: fix handling of stdin, stdout and stderr streams may lead crash because it expects only console or pipe but it may be a file kind (thanks for pointing to the issue, @EchoPouet)
- std/bufio: rename
Reader.ReadStrasReader.ReadString - std/bufio: rename
Writer.WriteStrasWriter.WriteString - std/encoding/base32: rename
Encoding.EncodeToStrasEncoding.EncodeToString - std/encoding/base32: rename
Encoding.DecodeStrasEncoding.DecodeString - std/encoding/base64: rename
Encoding.EncodeToStrasEncoding.EncodeToString - std/encoding/base64: rename
Encoding.DecodeStrasEncoding.DecodeString - std/encoding/json: add
Encoder,Decoder - std/encoding/json: add maximum depth limit to encoder
- std/encoding/json: fix literal decoding
- std/encoding/json: fix empty array value decoding
- std/flag: reimplement
- std/html: rename
EscapeStrasEscapeString - std/html: rename
UnescapeStrasUnescapeString - std/integ: rename
UTF16FromStrasUTF16FromString - std/integ: rename
UTF16ToStrasUTF16ToString - std/integ: rename
UTF16PtrToStrasUTF16PtrToString - std/integ: rename
BytePtrToStrasBytePtrToString - std/integ: rename
BytesFromStrasBytesFromString - std/io: rename
StrWriter.WriteStrasStrWriter.WriteString - std/io: rename
StrWriterasStringWriter - std/io: rename
WriteStrasWriteString - std/jule/constant: rename
NewStrasNewString - std/jule/constant: rename
Const.ReadStrasConst.ReadString - std/jule/constant: rename
Const.SetStrasConst.SetString - std/jule/constant: rename
Const.IsStrasConst.IsString - std/jule/constant/lit: rename
ToStrasToString - std/jule/constant/lit: rename
ToRawStrasToRawString - std/jule/sema: rename
FuncIns.GetKindStrasFuncIns.GetKindString - std/jule/mod: add
Parse - std/jule/sema: add
Importer.Mods - std/jule/sema: rename
Prim.IsStrasPrim.IsString - std/jule/sema: rename
Importer.ModByIdasImporter.ModByID - std/jule/token: rename
STRasSTRING - std/jule/types: rename
StrasString - std/math/big: rename
Ing.SetStrasInt.SetString - std/os: rename
File.WriteStrasFile.WriteString - std/os/filepath: add
Split,SplitList - std/strings: rename
Builder.WriteStrasBuilder.WriteString - std/strings: rename
Replacer.WriteStrasReplacer.WriteString - std/sync: rename
OnceasBlockingOnce - std/sync: rename
AsyncOnceasOnce - std/unicode/utf8: rename
FullRuneStrasFullRuneString - std/unicode/utf8: rename
DecodeRuneStrasDecodeRuneString - std/unicode/utf8: rename
DecodeLastRuneStrasDecodeLastRuneString - std/unicode/utf8: rename
RuneCountStrasRuneCountString - std/unicode/utf8: rename
ValidStrasValidString - std/unsafe: rename
StrBytesasStringBytes - std/unsafe: rename
BytesStrasBytesString - std/unsafe: rename
StrFromBytesasStringFromBytes - std/unsafe: rename
BytesFromStrasBytesFromString
API
- rename:
api/str.hasapi/string.h - rename:
__jule_AsyncRetas__jule_AsyncReturn - rename:
__jule_Stras__jule_String - runtime: rename
__jule_ptrToStras__jule_ptrToString - runtime: rename
__jule_boolToStras__jule_boolToString - runtime: rename
__jule_i64ToStras__jule_i64ToString - runtime: rename
__jule_u64ToStras__jule_u64ToString - runtime: rename
__jule_f64ToStras__jule_f64ToString - runtime: rename
__jule_compareStras__jule_compareString - runtime: rename
__jule_panicStras__jule_panicString - runtime: rename
__jule_bytesToStras__jule_bytesToString - runtime: rename
__jule_runesToStras__jule_runesToString - runtime: rename
__jule_strToRunesas__jule_stringToRunes - runtime: rename
__jule_strToBytesas__jule_stringToBytes - runtime: rename
__jule_strFromByteas__jule_stringFromByte - runtime: rename
__jule_strFromRuneas__jule_stringFromRune - runtime: rename
__jule_strBytePtras__jule_stringBytePtr - runtime: rename
__jule_strAsSliceas__jule_stringAsSlice - runtime: rename
__jule_sliceAsStras__jule_sliceAsString
Backwards Compatibility
This version changes some commonly used keywords and the standard library API.
Extra effort is required to upgrade old Jule code to the new version.
Assets 8
Jule 0.2.1
jule
- redesign: deferred scopes
- redesign: pass directives
- redesign:
exceptionalsas fallible functions
julec
- julec: add the
--tagscompile option - julec:
#disable nilptrdisables nil-check for anonymous functions - julec:
#disable boundarydisables boundary-check for slice expressions - julec: rename the
--opt-exceptionalcommand-line option as--opt-fallible - julec: fix
errorpluralization in error count message (#154, thanks to @pgmtx) - julec: fix
breakstatements in select statements can lead to compilation problems due to the lack of a jump-label - julec: fix code-line pointer computation of logger to prevent incorrect positioning or negative repeat count panics in
strings::Repeat - julec: fix nil-check performed when calling a method that has a reference pointer receiver on a smart pointer and in
#disable nilptrscope - julec: fix
--opt-exceptionalmay apply forwarding optimization in the wrong place - julec: fix binary have undefined behavior with no output when compiled for test with no test functions
- julec: improve and optimize float arithmetic
- parser: fix empty generic type list may cause crash
- parser: fix an edge case where expression of a variable declaration assignment placed on the next statement may cause segfault (thanks for pointing to the issue, @PHandradee)
- parser: fix an edge case where expression of a short variable declaration assignment placed on the next statement may cause segfault
- parser: disallow tuple expressions in while and while-next iterations
- parser: fix the error keyword is considered syntax error in assignment statements
- parser: fix missing type error is silently ignored in function return type declarations
- sema: fix import path analysis may log an invalid import path error for import path without a submodule
- sema: fix
Scope.ChildIndexis not set for error-forwarding expressions - sema: fix blank identifier may trigger duplicated identifier error when used in global scope multiple times
- sema: fix goto statements can lead to false positive results in missing return statement analysis
- sema: fix when the builtin
appendfunction is used with incompatible types, such as(dest=[]str,src=[][]str...), the runtime implementation is instantiated, and relevant internal implementation error will show up along with the type error
Standard Library
- add: std/jule/resource
- builtin: update documentation and behavior constraints of
ponic - std/bufio: remove
ErrBufferFull - std/comptime: add
IncludeStrandIncludeBytes(#128) - std/comptime: rename
comptimeDecl.ExceptionalascomptimeDecl.Fallible - std/conv: fix
ParseCmplxerror may be invalid - std/encoding/base64: reimplement
- std/encoding/csv: reimplement
- std/encoding/json: fix
Validmay reporttruefor some invalid JSON encoding - std/encoding/json: fix struct decoding may ignore some fields due to escape sequences in key literals
- std/encoding/json: fix the decoder may scan invalid data as if it were valid, or make scanning errors on valid data
- std/errors: reimplement
- std/integ/c: add
SSize,ConstChar - std/io: reimplement EOF handling
- std/jule/importer: add
CompileInfo.Tags - std/jule/sema: add
ST_ERROR_HANDLER - std/jule/sema: add
GetFile,IncludeFile, andIncludedFilemethods toImporter - std/math/big: add
Int.Rem,Int.SetBytes,Int.FillBytes,Int.Bytes,Int.AppendBytes - std/net:
TCPConn.Readwill not close the connection automatically when reached to EOF - std/os: add
File.RawFD,File.SetReadDeadline,File.SetWriteDeadline - std/os: add
Cmd.Kill - std/os: fix
Cmdignores given stderr file and uses stdout as stderr - (linux) std/sys: add
Fstat - std/unicode: reimplement with Unicode 17.0.0
API
- rename:
exceptional.hppasfallible.hpp - rename:
__jule_VoidExceptionalas__jule_VoidFallible - rename:
__jule_Exceptionalas__jule_Fallible
Backwards Compatibility
This release includes mostly significant changes. Some of Jule's standard library packages have been reimplemented. The handling of EOF (end of file) status for I/O operations is based on errors, not read counts. Some of the C++ API declarations have been renamed.
Also, deferred scopes have been redesigned and behave differently. Therefore, if you have a program with deferred scopes, its behavior may be very different than before.
Assets 8
Jule 0.2.0
jule
- rename:
cppkeyword asextern - rename:
bindterm of the Integrated Jule asextern - add: async runtime and update to the new concurrency model
- add: assignment and short variable declaration support for select statements
julec
- add: the
--COMAXPROCScommand-line argument - add: Assembly file support for extern use declarations
- remove: support for C++ versions
cpp14andcpp17 - update: default C++ version to
cpp20 - fix: code generation for single-case select statements
- fix: code generation for channel receive and send may be invalid when optimizations applied
- fix: deferred calls may not be executed before exceptional forwarding
- fix: use expression in exception handler scopes may ignore dynamic type casting
- fix: type-enums might be casted to a dynamic-type like non-dynamic types and cause dynamic type issues
- fix: the
--opt-stroptimization flag may cause segfault or unexpected results - parser: fix void function type handling in expressions
- sema: fix tuples allowed in type inference of generic constraints
Standard Library
- remove:
std/jule/integrated - add:
std/integ - add:
std/integ/c - add:
std/testing/iotest - reimplement:
std/encoding/base32 - reimplement:
std/math/big - runtime: reimplement channels and select statements
- runtime: add
Yield,COMAXPROCS,Blocking - (windows) runtime: fix
nanotimeworks inconsistent - std/bufio: update as async-first
- std/bufio: add
Reader,Writer - std/io: update as async-first
- std/io: add
ReadSeeker,WriteSeeker,ByteScanner,RuneScanner,ReadWriteSeeker,ReaderFrom,MultiReader,LimitedReader,NopCloser - std/io: rename
StreamasReadWriteCloser - std/io: remove
LimitReader - std/jule/build: add
AssemblyExts,IsValidAssemblyExt - std/jule/mod: fix unsafe string handling causes dangling memory
- std/net: update as async-first
- std/net: add
RawFDtoConn,TCPConn,UDPConn - std/net: use the system's maximum backlog by default for
TCPListener - std/os: update as async-first
- std/slices: add
Grow
API
- fix:
—disable-safetymay cause compile errors __jule_Ptr: fix the memory leak caused by rvalue handling
Backwards Compatibility
This release is almost entirely breaking. Jule's concurrency model has been completely redesigned, and a new runtime model has been introduced. Common operations such as I/O are no longer sync-first and thread-friendly; instead, they are designed to be async-first by default. This means that using std/io and all related packages largely requires running under the async runtime.
In addition, with the new coroutine model, the OS thread has become merely a tool used by the runtime, not for developers. The co keyword creates a coroutine now, not a thread. For this reason, if you have a concurrent program, its behavior may be very different from before.
Assets 8
Jule 0.1.7
Language
- add: module names
- add: the tilde
~operator - add the
nilptrargument to thedisabledirective - add:
uintptrcasting support for functions (low-level programming purposes) - runtime: channels are optimized for high-frequency messaging
- remove:
&,|,^,<,<=,>=and>operators for enums - update: the new
buildcommand compiles a program instead of implicit compile commands
Compiler
- fix: define ordering may iterate infinitely when bind dependency exist
- fix: context data pointer is missing for entry point call when entry point used as anonymous function
- fix: the
--opt-mathoptimizations does not play well with complex numbers - fix: the
mod initcommand overwrites existing module file - rename: the
julenvcommand asenv - improve: the
helpcommand - update: compiler generates output with name
mainby default - parser: fix constant bind variables allowed
- sema: fix variable shadowing analysis
- sema: improve missing return statement analysis for select statements
- sema: improve and fix missing return statement analysis for goto statements
Standard Library
- runtime: add channel type support to the built-in
capfunction - runtime: add map type support to the built-in
makefunction - runtime: fix bind type may cause compile errors when used in built-in string conversion
- runtime: fix reserved Str function will not be handled if value is nil when using built-in string conversion
- std/io: add
ReadAtLeast, andReadFull - std/jule/constant: reimplement API
- std/jule/constant: fix
Const.Divdoes not reports false for divide-by-zero on complex numbers - std/net: add
IPAddr,ParseIP,Resolver,DefaultResolver, andDNSError - std/net: add DNS and port resolve to
TCPAddr.ResolveandUDPAddr.Resolve - (windows) std/net: fix timeout support of
TCPConnandUDPConn - std/net: timeout precision is milliseconds and limited with 40 days for
TCPConnandUDPConn - std/os: add
Hostname - std/slices: add
SortStableFunc - std/sync/atomic:
CompareAndSwaptakes separate memory ordering for success and fail - syd/sync/atomic: add
CompareAndSwapWeak - (macOS) std/sys: fix
GetsockoptandSetsockoptsyscalls - (linux) std/sys: fix
Setsockoptsyscall - std/time: add
Time.UnixMilli,Time.UnixMicro,Time.UnixNano
API
- reimplement
jule::Str: fix string equality comparison for strings with zero-bytesjule::Ptr: fix reference-counting
Backwards Compatibility
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Renaming and reimplementations on the standard library
- New API
Assets 8
Jule 0.1.6
Language
- jule: add the
exportfile tag compiler directive - jule: add the short function literals
- jule: add exceptional forwarding operator
- jule: add the
disabledirective - jule: add the
integer, andcmplxgeneric constraints - jule: add generic type support to strict type aliases
- jule: update module behavior and import paths
- jule: update reference variables to reference pointers
- jule: update receiver parameter syntax
- jule: remove the
statickeyword and update logic of static declarations - jule: allow variable shadowing for anonymous functions
- runtime: fix hash implementation may crash with segfault
Compiler
- various optimizations, improvements and bug fixes
- remove: the
--opt-std-math-cmplxoptimization flag - add: the
--opt-variadicoptimization flag - fix: exception forwarding optimization may optimize non-forwarding expressions as forwarding
- fix: code generation for string literals may represent bytes wrong such as zero-byte
- fix: function call data handling of concurrent calls
- fix: handling of
errorvariable captured for closure - fix: optimizations on next-statement of the while-next iteration may remove the iteration completely
- improve: error handling for type aliases, use type alias name as type-name even for soft type aliases
- parser: fix binary operator handling may handle map type declarations as expressions
- parser: fix variable declaration without type declaration and expression allowed
- parser: fix pointless else block allowed
- parser: switch to scan-based parsing for expressions
- sema: fix dynamic type annotation of generic function calls may leave some types unresolved
- sema: fix some comptime methods returns typed constant expression instead of untyped
- sema: push nil value for implicit empty variadic expression instead of zero-size slice allocation
- sema: fix anonymous functions will not collect references for the owner scope
- sema: fix missing return statement of non-void function scopes might be ignored
- sema: fix missing return statement may cause crash if source code have semantic errors
- sema: fix analysis of bind functions
- sema: fix and improve dynamic type annotation for generic function calls
- sema: fix generic structure instances may remain unchecked after analysis
- sema: fix type compatibility analysis of the built-int append function
- sema: fix function calls with problematic typed parameters may cause crash
- sema: fix multiple-assign statement analysis may crash
- sema: fix import analysis may throw false internal-package access error
Standard Library
- various optimizations, improvements, bug fixes, and refactoring with API breaking changes
- std/jule/ast, std/jule/parser, std/jule/sema: reimplemented for new AST handling, AST and CAST output might be different
- std/fmt: reimplemented
- std/math/rand: reimplemented
- std/conv: add
ParseCmplx,FormatCmplx - std/jule/token: reimplemented
- runtime: fix runtime hashing algorithm does not supports
uintptrtype - runtime: fix runtime hashing algorithm handling memory addresses dangerously
- std/comptime: add
Hash,Source,ActualSourcemethods tocomptimeTypeInfo - std/encoding: remove
JSONEncoder,JSONDecoder - std/encoding/json: fix string literal validation
- std/encoding/json: omit empty value instead of null for nil slice and maps
- std/encoding/json: remove
EncodeJSONandDecodeJSONspecial methods - std/io: add EOF, WriteByte
- std/io: update EOF handling
- std/jule/parser: AST construction may be different
- std/math/cmplx: use native
cmplx128type instead customCmplxstruct - std/os: reimplemented
EnvasEnviron,Getenv,LookupEnv,Setenv - std/os: add
PathSeparator,PathListSeparator,IsPathSeparator - std/os/filepath: rename
IsPathSepasIsPathSeparator - std/sys: add
Addrcall - (windows) std/sys: add
LoadDLL,MustLoadDLL,Proc,DLL
API
jule::Slice<Item>: fix deallocation of slice will not set the slice pointer to nullptrjule::Str: fix deallocation of string will not set the slice pointer to nullptr
Backwards Compatibility
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Renaming and reimplementations on the standard library
- Using reference variables with old semantics
- Using receiver parameters with old syntax
- Using static variables and methods with old semantics and syntax
- Using modules with old behavior and import paths
Assets 8
Jule 0.1.5
Warning
Builds are not statically linked for this version.
Language
- add: grouped constant variables
- add: tags for structure fields
- add: blank identifier support for global variables
- update: goto statement rules
- update: exceptional functions must be used alone
- update: all possible types of type-enums mut be handled in type-match statements
- update: all possible fields of enums mut be handled in match statements
- update: the built-in
copyfunction allows different types if actual types are equal - redesign: enums
- remove: default expressions of structure fields
Compiler
- update: use ThinLTO instead of FatLTO
- fix: strict aliasing optimizations of back-end compiler may cause unexpected behavior
- fix: the
--opt-copymay apply wrong optimizations for mutable values - fix: code generation for multi-return statements with dynamic types
- fix: code generation for captured anonymous function variables from multi-return variables
- fix: inherited type-enums considered valid type for type matching
- parser: fix binary expression operator handling
- parser: fix trailing invalid tokens ignored of use declarations
- sema: fix comptime (obtained by std/comptime) constant value handling for binary expressions
- sema: fix handling of untyped boolean values
- sema: fix evaluation may allow using of blank identifiers
- sema: fix using of non-existent enum field may cause crash during analysis
- sema: fix catching of duplicate package aliases
- sema: fix collection of references to runtime implementations such as slices and maps might be ignored if type source is a type alias
Standard Library
- add:
std/jule/directive - add:
std/jule/dist - add:
std/jule/log - std/comptime: add
comptimeDecl.Tags,comptimeDecl.Tag,comptimeDecl.IsTag - std/encoding/json: add structure field tag support
- std/encoding/json: fix HTML escape handling
- std/encoding/json: nesting depth set to 256
- std/encoding/json: fix the Decode function do not set destination array to zero for empty JSON arrays
- std/jule: add
Blank,Anon,IsBlank,IsAnon - std/jule/ast: add
Var.Group,Var.GroupIndex - std/jule/build: add
SetEnv,PathAPI - std/jule/build: remove
PathApi - std/jule/build: reimplement
PathStdlib,PathExec,PathWd - std/jule/build: remove directive relevant content because of new
std/jule/directivepackage - std/jule/build: remove dist relevant content because of new
std/jule/distpackage - std/jule/build: remove log relevant content because of new
std/jule/logpackage - std/jule/constant/lit: add
GetRune - std/jule/integrated: fix Windows UTF16 encoding/decoding
- std/jule/integrted: rename
U16PtrToStrasUTF16PtrToStr - std/jule/token: refactoring with reimplemented API
- std/jule/sema: remove
Flag - std/jule/sema: add
Default,Shadowing,RetState,Var.RetState - std/jule/sema: update the standard values of
Var.RetOrder - std/jule/sema: remove
EnumItem - std/jule/sema: add
Var.IsEnumField,Var.GroupIndex,Var.Group,Var.Iota - std/os: reimplement standard input/output (see #140)
- std/strings: add
Clone
API
jule::Str: fixoperator+=memory deallocation bugjule::Fnfix ctx-memory handling
Backwards Compatibility
This version is incompatible with source code written for previous versions. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new exceptional handling standard
- Incompatibilities with the new
gotosemantics - Structure fields with default expressions
- Missing/unhandled cases for the enum/type-enum types in match statements
- Renaming and reimplementations on the standard library
Assets 8
Jule 0.1.4
Language
- add: 3-index slicing
- add: type assertion
- update: range iteration behavior of strings
- update: use arbitrary-big numbers for untyped constants
- update: floating-point division behavior
- update: casting works different for dynamic types
- update: type aliases are not considered cycle-risky for type aliases
- update: allow strict type aliases to type any for type enums
- update: strict type aliases to type-enum will not be inherited
- rename:
SmallestNonZerostatic field asSmallestNonzeroof thef64andf32 - remove: named field support of type-enums
Compiler
- numerous optimizations, fixes, and improvements
- fix: code generation for casting expressions from dynamic type to implicitly smart pointer types such as maps and channels
- fix: code generation of trait virtual table for implicitly smart pointer types such as maps and channels
- fix: code generation of dynamic type data for implicitly smart pointer types such as maps and channels
- fix: code generation will not generate iteration break-point for
for in []rune(s)iterations when--opt-iteroptimizations enabled - fix: code generation may be failed for declarative multi-assign expressions if
--opt-assignoptimizations enabled - fix: the
--opt-zcopyand--opt-zappendoptimizations may cause compile issues - fix: integer wrap around behavior might not be implemented in IR and might compile with undefined behavior
- fix: code generation for array comparisons
- fix: the
--opt-mathoptimizations may apply wrong optimizations - fix: code generation for exceptional handler scopes with no use declaration
- fix: location information handling for error messages
- (windows) fix: compiler does not adds
.exeextension if it is missing - (windows) fix: LTO support for Clang (it may cause compile errors with not-MinGW Clang)
- add:
tool targetscommand - update: catch invalid target pairs and complain with error
- token: fix carriage-return characters may cause infinite loop when tokenizing string literals
- token: fix
Fileset.GetRowignores final lines with no new-line - parser: fix function with errors may cause crash
- parser: reused directive causes errors instead of ignoring silently
- parser: fix unary operator handling of binary expressions
- parser: fix missing expressions in brace literal may cause crash instead of compiler error
- sema: untyped constant literals allowed in Safe Jule for binded types
- sema: fix value type determination may ignore the strict type alias sources when evaluation of array and structure literals
- sema: fix evaluation of binary expressions for
comptimeTypeInfo - sema: fix owner define will not reference to the struct if it used via type alias when evaluating expression
- sema: fix type-enums are not considered as mutable types
- sema: fix global variable referencing a function may cause crash due to analysis issue
- sema: fix and improve package analysis
- sema: fix implicit casting handling of the
errorcalls - sema: fix type compatibility checking for constant floating-point expressions
- sema: fix type compatibility checking may ignore whether type is strict type alias for functions
- sema: fix responsive type handling of the built-in append function
- sema: fix reference collection for types referenced from eval
- sema: fix handling of comparable array types
- sema: fix checking of the reserved main and initializer function signatures
Standard Library
- add: std/errors
- (windows) all: all MinGW dependencies are removed, standard library uses Windows API
- all: error handling model updated to latest recommended style
- (windows) runtime: fix #107
- runtime: fix deadcode analysis for mutexes
- runtime: fix the built-in
makefunction does not initialize all capacity (#133) - runtime: fix the built-in
appendfunction does not initialize all capacity if a new slice allocated (#134) - runtime: fix the runtime string conversion function cannot handle reserved
Strfunctions of can-nil types - runtime: smart pointer types supports using of element’s reserved
Strfunction - std/conv: reimplement
- std/jule/types: reimplement
- std/math/cmplx: reimplement
- std/os: reimplement
- std/bufio: add
Scanner.EOF - std/bytes: the split functions limits capacity of parts to its length
- std/comptime: remove
Kind(fields remain as constant variables) - std/encoding/csv: rename
Writer.UseCrlfasWriter.UseCRLF - std/encoding/json: fix
Validfunction reports false for some JSON inputs with spaces - std/encoding/json: fix
DecodeJSONreserved decoder function does not supports JSON objects or arrays - std/encoding/json: numerous minor fixes and improvements
- std/encoding/json: fix
Decodefunction throws UnexpectedToken error if JSON input have trailing spaces - std/encoding/json: fix invalid token may cause panic while decoding array or object (with map type)
- std/encoding/json: fix invalid token case may be reported with
DecodeError.InvalidValueinstead ofDecodeError.InvalidTokenwhile decoding object (with struct type) - std/encoding/json: fix invalid key may cause panic while decoding map
- std/encoding/json: add
Value,Object,Array,Bool,Number, andString - std/encoding/json: add dynamic decoding support
- std/math: minor fixes
- std/math: rename
NextAfter32asNextafter32 - std/math: rename
NextAfterasNextafter - std/math: rename
F64BitsasF64bits - std/math: rename
F32BitsasF32bits - std/math: rename
F64frombitsasF64frombits - std/math: rename
F32frombitsasF32frombits - std/math/big: rename Int.BitNot as Int.Not
- std/math/big: update
Int.Parsedefinition and behavior - std/math/big: add
Accuracy,Int.F64 - std/math/big: fix
Int.Parsedoes not catch invalid separators - std/io: add
ReaderAt,WriterTo,Seeker,WriteStr,ReadAll,LimitReader,SeekStart,SeekCurrent,SeekEnd,Copy,CopyBuffer, andDiscard,ErrShortWrite,ErrShortBuffer,ErrUnexpectedEOF,ErrNoProgress - std/jule/ast: remove
SubIdentType - std/jule/ast: add
TypeAssertionExpr - std/jule/sema: remove
TypeEnumItem.Ident - std/jule/sema: add
Type.SoftStruct,TypeAssertionExpr - std/jule/sema: remove
TypeEnumItem.Ident,TypeEnumItem.FindItem - (windows) std/os: fix long path support after Windows 10.0.15063
- std/os/filepath: update sign of
Abs - std/os/filepath: add
SplitList - std/slices: rename
FindasIndex,FindLastasIndexLast - std/strings: add
Reader - std/sys: reimplement
Errnoand relevant functions - std/testing: add
T.Logf - std/unicode: add
In,IsPrint
API
- remove:
jule::nil,jule::MAX_32,jule::MIN_F32,jule::MAX_F64,jule::MIN_F64,jule::MAX_I64,jule::MIN_I64,jule::MAX_U64variables - remove: the
jule::print,jule::println,jule::append,jule::__append,jule::copy,jule::__copyfunctions - add: the
__jule_print, and__jule_printlnfunctions - fix: slicing error gives length instead of capacity for capacity information
Backwards Compatibility
This version is incompatible with source code written for previous versions, including Jule 0.1.3. Older compiler versions cannot compile this version’s standard library and existing source code may need to be adapted for the new version.
The most common potential issues:
- Incompatibilities with the new error handling standard
- Using dynamic types
- Renaming and reimplementations on the standard library
- Unexpected behavior in range iterations with strings
Assets 8
Jule 0.1.3
Language
- add: map and array literals with explicit type
- add: assertion casting for dynamic types
- update: the built-in
copyfunction now uses mutable slicing for destination arrays - update: deferred scopes
- update: trait memory model
- remove: static constant fields support of
implstatements and structures - remove: manual memory management options
- remove: the
deprecateddirective (see doc comments for deprecation)
Compiler
- numerous minor fixes, optimizations and improvements
- fix: thread runtime initialization
- fix: the
!=operator equals to the==operator for struct types in the object code - fix: code generation for implicit
==operator of struct types - fix: code generation for trait data of strict type aliases
- fix: code generation for postfix statements which uses map lookup as lvalue
- fix: the
--opt-deadcodeoptimizations removes trait methods of structures - fix: the
--opt-dynamicoptimization removes type safety for type casting when optimizing type-match statement case which have a previous case with fall statement - fix: code generation for concurrent function calls when parameter count collisions exist
- fix: initialization of runtime environment data
- fix: code generation for result data with channel type
- fix: code generation for raw pointer type metadata of dynamic types
- fix: code generation for trait virtual table of strict type aliases with smart pointer source type
- it may cause compilation problems with GCC before the patch (see CI of
261b80d)
- it may cause compilation problems with GCC before the patch (see CI of
- add: the
--opt-zcopyand--opt-zappendoptimization flags - improve: the
--opt-deadcodeoptimization removes the following statements after empty select statements - improve: The
--opt-accessoptimization removes the boundary analysis of expressions likearray[i&(len(array)-1)]for arrays whose length is power of two - improve: code generation for select statements
- improve: error messages, with contributions by @adamperkowski (#123)
- parser: fix nested smart pointer types (like
&&int) have nilTokenfield - parser: fix (#119, thanks @puni073 for pointing to the issue) and improve handling of function declarations
- parser: catch repetitive ignoring of an exceptional like
foo()!!! - parser: fix scope analysis will generate error for expression which is already logged
- parser: fix unsafe namespace support of type analysis
- sema: fix interior mutability analysis for structure copy assignments
- sema: fix
implstatement handling for structures - sema: fix strict type alias source type analysis
- sema: fix mutability and comparable state analysis of types
- sema: fix type cycle analysis
- sema: fix map types are not considered as mutable even with mutable key/value type
- sema: fix map indexing expressions considered lvalue
- sema: fix analysis and handling indexing support of comptime types
- sema: fix type inference analysis of untyped slice literals
- sema: fix analysis of strict type alias structures, and type-enums for casting
- sema: fix cycle and type analysis of type-enums
- sema: fix reference handling of scope variables
- sema: fix type safety analysis of unsafe pointer (
*unsafe) type - sema: fix mistyped values may cause crash when evaluating sub-ident expressions
- sema: fix instantiation cycle analysis
- sema: fix generic type and method evaluation
- sema: fix expression evaluation allows non-instantiated generic types for sub-ident expressions
- sema: fix generic type analysis does not supports nested generic type instantiation
- sema: fix generic type analysis of generic define coming from different package
- sema: add responsive expression support for map indexing
- sema: add casting support for traits
- sema: catch unsafe pointer (
*unsafe) type for invalid dynamic generic type annotations
Standard Library
- add:
std/html - add:
std/net/url - add:
std/path - all: refactoring and rehandling with breaking changes
- runtime: fix the string conversion algorithm tries to call
Str(self)!: strmethods like reservedStr(self): strmethods - runtime: fix sema queue implementation (affects
sync::Mutex,sync::WaitGroup, and newsync::RWMutex) - runtime: fix map lookup does not set to default value if record is not exist (#129)
- runtime: fix blocking-select statement may cause deadlock panic even for no-deadlock cases
- runtime: update hashing algorithm and optimize map implementation
- std/conv: rename the
ConvErrorasConv - std/conv: remove the
Okfield ofConv - std/encoding/json: fix custom encoding and decoding method detection
- std/jule/sema: rename
ValueasValueSym - std/jule/sema: rename
DataasValue - std/jule/sema: rename the
Valuefield asValueSymofVarandEnumItem - std/jule/sema: rename the
Datafield asValueofValueSym - std/jule/sema: rename the
Datasfield asValuesofTupleExpr - std/mem: remove
FreeandHeap - std/strings: add the
Replacerstruct - std/sync: add
RWMutex - std/unicode/utf16: remove
MaxRune - std/unicode/utf16: add
RuneLen
API
- remove: deferred scope API
- remove:
jule::Trait jule::Str: removestd::basic_stringsupport (#121, thanks @puni073 for pointing to the issue)
Backwards Compatibility
Jule 0.1.3 includes critical bug fixes, and updating is highly recommended. However, this update may require additional effort. It introduces some breaking changes and modifications that could alter behavior, potentially making debugging more difficult. There are significant additions and removals in the API and standard library. Compiled programs may not behave as expected.
Assets 8
Jule 0.1.2
Language
- add: channels
- add: select statements
- add: mutability responsiveness for functions
- add: thread management runtime
- update: all keywords can used as identifier for bind defines
- update: only constant expressions allowed for default value of struct fields
- comptime: add slice literal support for comptime range iterations
Compiler
- fix: global variable initialization ordering
- fix: exceptional optimizations of
--opt-exceptionalflag - fix: output of the
helpcommand, thanks @lareii for the fix (#118) - fix: code generation for anonymous function calls
- fix: code generation for anonymous functions and other implicit analysis productions
- fix: code generation for empty slice literal
- fix: boundary size variable analysis of the
--opt-accessoptimizations - fix: boundary exhibit variable analysis of the
--opt-accessoptimizations - parser: fix statement separations and insertions
- parser: fix variable parsing invalid syntax error logging
- parser: fix empty case expression detection
- parser: fix
cokeyword allowed without any expression - parser: fix semicolon terminated empty statements may cause crash
- sema: fix map type analysis for cycles
- sema: fix import path analysis may crash when analysis standard library paths
- sema: fix function type string representation conversion
- sema: fix parsing of unicode code points in string literals
- sema: fix collection of variable dependencies for global variables
- sema: fix use declaration to root module may cause crash
- sema: fix cycle analysis of type aliases
- sema: caught initialization cycles for global variables
- sema: generate errors for invalid escape sequences
- sema: improve map type key constraint analysis
- sema: add responsiveness for the key and value pairs of the map literals
- sema: add built-in panic call support for exception handler scopes with no required use statement
Standard Library
- std/bufio: add the
FinalToken - std/bufio: remove the
ScannerCfgstruct - std/bufio: remove the
NewCfgstatic method of theScanner - std/bufio: add the
Split, andBuffermethods to theScanner - std/bufio: rename the
SplitLinesfunction asScanLines - std/bufio: update
SplitFuncandScannerbehavior (add final token support) - std/bytes: reimplemented
- std/comptime: add the
Chanfield toKind - std/comptime: add the channel support to the
Elemmethod ofcomptimeTypeInfo - std/encoding: add the
JSONEncoder,JSONDecoder,TextEncoder, andTextDecodertraits - std/encoding/json: fix string literal validation
- std/encoding/json: add the
EncodeJSONfield toEncodeError - std/encoding/json: add the custom encoder and decoder method support
- std/fmt: use
io::Writerinstead ofos::Filefor theFprint,Fprintln, andFprintffunctions - std/jule: rename the
InitFnasInitFunc - std/jule/ast: add the
CanSend,ChanRecv,ChanType, andSelectstructs - std/jule/ast: rename the
MatchCaseasMatch - std/jule/ast: rename the
VarDeclasVar - std/jule/ast: rename the
TypeDeclasType - std/jule/ast: rename the
TypeDeclKindasTypeKind - std/jule/ast: rename the
IdentTypeDeclasIdentType - std/jule/ast: rename the
SubIdentTypeDeclasSubIdentType - std/jule/ast: rename the
NamespaceTypeDeclasNamespaceType - std/jule/ast: rename the
SptrTypeDeclasSptrType - std/jule/ast: rename the
SlcTypeDeclasSliceType - std/jule/ast: rename the
TupleTypeDeclasTupleType - std/jule/ast: rename the
PtrTypeDeclasPtrType - std/jule/ast: rename the
ArrTypeDeclasArrayType - std/jule/ast: rename the
MapTypeDeclasMapType - std/jule/ast: rename the
RetTypeDeclasRetType - std/jule/ast: rename the
EnumDeclasEnum - std/jule/ast: rename the
TypeEnumDeclasTypeEnum - std/jule/ast: rename the
EnumItemDeclasEnumItem - std/jule/ast: rename the
TypeEnumItemDeclasTypeEnumItem - std/jule/ast: rename the
TypeAliasDeclasTypeAlias - std/jule/ast: rename the
TraitDeclasTrait - std/jule/ast: rename the
StructDeclasStruct - std/jule/ast: rename the
FnDeclasFunc - std/jule/ast: rename the
FnCallExprasFuncCallExpr - std/jule/ast: rename the
GenericDeclasGeneric - std/jule/ast: rename the
UseDeclasUse - std/jule/ast: rename the
ParamDeclasParam - std/jule/ast: rename the
FieldDeclasField - std/jule/ast: rename the
FallStasFall - std/jule/ast: rename the
GotoStasGoto - std/jule/ast: rename the
LabelStasLabel - std/jule/ast: rename the
ContStasContinue - std/jule/ast: rename the
AssignStasAssign - std/jule/constant/lit: add the
Errorstruct - std/jule/parser: rename the
Astfield asASTofFileInfo - std/jule/sema: add the
Select,ChanSend,ChanRecv, andBuiltinCloseCallExprstructs - std/jule/sema: add the
CaseOwnerenum - std/jule/sema: add the
ExprTokenfield toRangeIter - std/jule/sema: update the type of the
Ownerfield ofCaseasCaseOwner - std/jule/sema: update type of the
Elemsfield ofArrayExprandSliceExpr - std/jule/sema: rename the
FnCallExprasFuncCallExpr - std/jule/sema: rename the
FallStasFall - std/jule/sema: rename the
GotoStasGoto - std/jule/sema: rename the
ContStasContinue - std/jule/sema: rename the
SlcasSlice - std/jule/sema: rename the
ArrayasArray - std/jule/sema: rename the
FnasFunc - std/jule/sema: rename the
FnInsasFuncIns - std/jule/sema: rename the
AnonFnExprasAnonFuncExpr - std/jule/sema: rename the
Slcmethod ofTypeasSlice - std/jule/sema: rename the
Arrmethod ofTypeasArray - std/jule/sema: rename the
Fnmethod ofTypeasFunc - std/jule/sema: rename the
Tupmethod ofTypeasTuple - std/jule/sema: rename the
FindFnmethod ofLookupasFindFunc - std/jule/sema: rename the
Mtchfield ofBreakasMatch - std/math/big: fix
Int.Parsereturns zero integer with not exception even if all value have not been consumed - std/math/big: add the
InvalidFormatfield toConvError - std/os: add the
LookupEnv,Getenv, andSetenvfunctions - std/runtime: add the
NumCPUfunction - std/strings: reimplemented
- std/sync: add the
Lockertrait - std/sync: add the
Condstruct - std/sync/atomic: reimplemented
- std/time: add the
ParseErrorenum - std/time: add the
Month, andWeekdaytype aliases - std/time: add the
January,February,March,April,May,June,July,August,September,October,November,December,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Layout,ANSIC,UnixDate,RubyDate,RFC822,RFC822Z,RFC850,RFC1123,RFC1123Z,RFC3339,RFC3339Nano,Kitchen,Stamp,StampMilli,StampMicro,StampNano,DateTime,DateOnly, andTimeOnlyconstants - std/time: add the
UTC, andLocalglobals - std/time: add the
Now,Unix,UnixAbs,Since,Until,LoadLocationFromTZData,FixedZone,Parse,ParseInLocation, andParseDurationfunctions - std/time: reimplement the
TimeandAbsTime - std/time: add the
Locationstruct
Backwards Compatibility
Due to renaming in the standard library, some reimplementations and language update, code from older versions may not compile with the new version. Consequently, you may need to update your code to according to the new version.
Assets 8
Jule 0.1.1
Caution
Due to technical reasons, the release notes for this version have been lost.
The notes here are derived from commit messages.
They may be incomplete or inaccurate.
Language
- reimplement: use declarations
- add file annotation support for test files
- add: casting support to the
anytype for the enum types - remove: operator overloading
- remove: the reserved
Disposemethod - update: smart pointers can point to binded structs now
- update: references can point to functions now
- update: casting binded types require using Unsafe Jule
Compiler
- fix: code generation for multi-return types
- fix: code generation for reference variables
- fix: code generation for wrap-needed function calls
- fix: binded struct handling
- fix: binded type handling
- fix: binary expression optimizations
- fix: conditional structure optimizations
- fix: scope optimizations
- fix: the multi-assign optimizations
- fix:
niltype detection of--opt-dynamicoptimizations - fix: boundary and
niloptimization analysis - fix: code generation for entry point functions
- fix: code generation for uncomparable
anytypes - fix: code generation for inheritance-used traits
- fix: code generation for testing compilations
- fix: code generation for reference variable declared in multi-assign statements
- add: strict type alias structure support for the deadcode optimization
- add: strict type alias support to optimizer
- add: the
--opt-lenoptimization flag - add: the
--opt-arrayoptimization flag - add: the
--opt-std-math-cmplxoptimization flag - add: the
--opt-std-stringsoptimization flag - improve:
--opt-stroptimization flag for the binary expression operands - ast: add the
Endfield toStmt - parser: caught comma separated multi-line expressions
- sema: add blank identifier support for structures
- sema: add untyped function value support for strict type aliases
- sema: fix structure analysis
- sema: fix strict type alias analysis
- sema: fix type equality checkin for enums, type enums, and traits
- sema: fix casting evaluation for constant data and enum types
- sema: fix static field evaluation for strict type aliases
- sema: fix function call argument count checking
- sema: fix assign type analysis for constants
- sema: fix mutability analysis of variadic arguments
- sema: fix type handling of the built-in
mem::SizeOfandmem::AlignOffunctions - sema: fix auto
typedefdirective addition - sema: fix reference collection of eval for structures
- sema: fix type safety analysis for binded types
- sema: fix built-in define handling for packages
- sema: fix alias checking for the
unsafepackage - sema: fix comptime package lookup
- sema: fix package accessibility analysis
- sema: remove
CastingExpr.ExprType - sema: add eval support for identifier eval
- sema: update the built-in
byteandrunetype aliases - sema: improve and fix type analysis of binary expressions
- sema: minor fixes for type compatibility analysis and error messages
- sema: rename
SymbolTableasSymTab - sema: rename the
ExprKindfield asExprTypeof `CastingExprModel - sema: rename the
Kindfield asTypeofCastingExprModel - sema: rename the
Kindfield asTypeofSliceExprModel - sema: rename the
Kindfield asTypeofBuiltinNewCallExprModel - sema: rename the
Kindfield asTypeofBuiltinMakeCallExprModel - sema: rename the
Kindfield asTypeofOperandExprModel - sema: rename the
Kindfield asTypeofFieldIns - sema: rename the
Kindfield asTypeofInsGeneric - sema: rename the
Kindfield asTypeofParamIns - sema: rename the
Kindfield asTypeofData - sema: rename the
Kindfield asTypeSymofVar - sema: rename the
Kindfield asTypeSymofField - sema: rename the
Kindfield asTypeSymofParam - sema: rename the
Kindfield asTypeSymofRetType - sema: rename the
Kindfield asTypeSymofTypeEnumItem - sema: rename the
Kindfield asTypeSymofEnum - sema: rename the
Kindfield asTypeofTypeSym - sema: rename
TypeKindasType - sema: rename
TypeSymbolasTypeSym - token: update data handling method of the
Fileset
Standard Library
- add:
std/bufio - add:
std/os/filepath - remove:
std/env - remove:
std/debug - remove:
std/fs - remove:
std/fs/filepath - remove:
std/process - reimplement:
std/math/big - reimplement:
std/math/rand - reimplement:
std/io - reimplement:
std/jule/lexasstd/jule/token - reimplement:
std/os - runtime: minor fix for structure string conversion
- runtime: fix
toStrfunction for unsigned integer types - runtime: fix runtime string conversion support for the strict type aliases
- runtime: fix the executable function may returns symlink path on darwin
- runtime: fix handling of
NaNand±Infcases for float conversions - runtime: add the
BigEndianandLittleEndianconstants - built-in: make the
copyfunction is overlap-safe - built-in: rename the
outandoutlnfunctions asprintandprintln - std/bytes: add the
ReplaceAllandSplitAllfunctions - std/comptime: add the
FieldByIndexmethod tocomptimeValue - std/comptime: add the
Strictmethod tocomptimeTypeInfo - std/encoding/json: fix compilation issues of numeric type decoding
- std/jule/build: move the
Ext,EntryPoint,InitFn,ModuleFileandImportPathSepconstants to thestd/julepackage - std/math/cmplx: remove the
AddAssign,SubAssign,MulAssign,DivAssign, andPosmethods ofCmplx - std/mem: fix the
Heapimplementation still uses old integrated jule - std/net: adopt new
time::Duration - std/slices: add the
Insertfunction - std/strings: add the
ReplaceAllandSplitAllfunctions - std/sys (Windows): fix the
WriteConsolefunction will not writes result to written parameter - std/sys (Unix): fix the
RecvfromandSendtofunctions returnsuintinstead ofint - std/time: reimplement the
Duration - std/time: reimplement the
Sleepfunction
API
add: the __jule_runeCount runtime function
add: byte buffer conversion runtime functions __jule_strBytePtr and __jule_sliceBytePtr
add: nullptr assignment operator overloading for jule::Ptr<T>
use: built-in str type instead of C++ std::string
fix: reference counting for self-assigned expressions
Backwards Compatibility
This version includes some important semantic changes. For example, a different syntax is now used for the old type alias system, and the old syntax has completely different semantics. In addition there are some renamings and some significant changes to the standard library. All of this may break your existing code, but as always upgrading is recommended.