7.9 KiB
7.9 KiB
Changelog
Each version's changes, newest first. Versions follow semantic versioning.
Unreleased
- The containers lend what they did as properties, as
core's do, modeled on one array:span,slice, which only what can be written reads,iterator,mutator, likewise,first,last,empty, andfull, where each has them. So:- Each container's iterator type is its
iterator, asiterablenow asks, rather than itscursor, anddict'skey_cursorandvalue_cursorarekey_iteratorandvalue_iterator.yaml::document's isiteratortoo. deque,list, andchaingivefirstandlast, which a container that can be written writes through, rather thanfront()andback().stackandqueuegive them too, besidepeek().is_emptyandis_fullareemptyandfull.stack,heap, andinternerlendspan, withspan_of, asspannableasks, rather thanview(), andstacklendsslice, withslice_of, assliceableasks, rather thanslice().byte_writerlendsspanandslice, andio::pathandnet::urilendspan, rather thanview().span_ofandslice_oftake a start and a count, whichspannableandsliceablenow ask for, sostack,heap, andinternerare sliced as a view is, ass[1:]orh[:3], through them.
- Each container's iterator type is its
- The containers, and
byte_writer, check what they're asked for with contracts, asexpects(index < this._len)andexpects(!this.empty, "The deque is empty."), rather thanif const checking()and apast_endof their own, sincecorehas nochecking(). A checked program stops where one is asked for what it doesn't hold, as it did, with the contract's report, asA pre-condition failed: The deque is empty., and one built without--checkstrusts the program, as it did. - Contracts are checked where the program is, as the compiler checks them now,
so
std::time's range andstd::args' marks, which contracts check, stop a checked program, and one built without--checkstrusts them, where they stopped every program but one built with--contracts off. runs' andgroups' views, andread_all's reads, take the slice of the vector beneath, asthis._items[start:count], rather than a view made over its data.interner'sintern_viewandfind_viewask for values that arespannable, rather thanviewable.
- What names
core's containers and views names them as they are named now:.spanrather than.view(),blank()rather thanempty(),iter<T>rather thaniterator<T>, and so on. dequelendscore'spositions_iteratorandposition_mutatoras itsiteratorandmutator, rather than iterators of its own, which walked it the same way. Each refers to the deque itself, so it is only good while the deque stays where it is.deque,list,chain, anddictnameassignable,core's trait for theatthat writes, besideindexable.- Each container's iterator that writes is its
mutator, asiterablenow names it:deque's,queue's,list's,chain's, andstack's, where it was theirmut_cursor. math::wrapping_add,wrapping_sub, andwrapping_mulwrap where an integer overflows its type, for a program's own code meaning to, which--checksstops at otherwise.thread::spawnandspawn_withsay their function is@kept, so a handle outliving the locals the function names is warned of.math::fmaoff32s andf64s works with the processor's FMA3 instruction where it has one, which rounds once as the software does, and gives the same bits.math::fmagives the NaN FMA3 does, worked by the instruction or not: a factor's,x's beforey's, and otherwisez's, even where the product is NaN, as∞ * 0is, where it gave the product's.math::floor,ceil,trunc,round_even, androundof one number work with SSE4.1'sroundsdorroundsswhere the processor has it, andfmaof one number withvfmadd231sdorvfmadd231ss, splatting nothing. Each gives the bits the code gives without them, which quiets a NaN it's given as the instructions do.simd'sroundworks with SSE4.1's instructions, truncating and then moving each lane one away from zero where a half or more was left, rather than a lane at a time.serial::encodewrites anf32as the shortest text that reads back as it, as0.1, where it wrote every digit of thef64it widened to, as0.10000000149011612.serial::options::defaultsreads a member missing for a marked field as the field's default, rather than as amissing_membererror, as a file written before its type gained the field asks.
1.0.0 - Unreleased
- The standard library, moved out of the Sakura compiler's repository into one
of its own, each module a library of its own in the folder of its name:
std::containers,std::allocators,std::io,std::math,std::time,std::thread,std::process,std::serial,std::testing,std::text,std::net,std::semver,std::json,std::yaml, andstd::args. A program requires the repository and names among itsdepsthe modules it reads, asstd.io. - There is no module
stditself. What its root held went to modules of their own:deque,list,chain,heap,queue,stack,groups,runs, andinternertostd::containers, andpooltostd::allocators;byte_writertostd::io, where it's the stream that writes to memory, with awrite, so it'swritable;- regular expressions to
std::text, URIs tostd::net, withstd::io'suri::from_pathanduri::to_path, and versions tostd::semver; predicate, which nothing used, went.
std::ioreads nothing of URIs or containers now, so a program printing a line reads less.- What
coreheld that the compiler doesn't name, and thatcore,system, and the runtime aren't built from, is std's:dict,hashset,rc,arc,rc_weak, andarc_weakarestd::containers', andarenaisstd::allocators';- the streams' traits,
readable,writable, andflushable, arestd::io's, withstring'swriteandstrview'sread, so a string iswritablewhere a file importsstd::io; io_errorissystem's, which reports it, so a file naming it importssystem.
- std declares no intrinsic:
std::mathbuilds oncore::intrinsics'ssquare_root,lanes_have, andlanes_apply, and its owncount_ones,leading_zeros,trailing_zeros, andswap_byteswent, sincecore's are the same.std::threadstarts its threads withsystem::start. std::json,std::yaml, andstd::args, packages of their own since 2026-10-24, joined again, keeping their names, with their tests and JSON's and YAML's conformance suites.std::io::glob, globs read, matched, and found, which wasmalunal::glob, a package of its own, is a module withinstd::io, which the librarystd.ioholds.- Each module's tests, in
tests/in the folder of its name, built and run as executables,std::serial's through JSON and YAML among them. Those ofcoreandsystemstayed with the compiler, but for those testing what came here fromcore. std::xml, which reads XML 1.0 strictly, with Namespaces in XML 1.0:xml::parseinto axml::documentof elements, attributes, text, comments, and processing instructions, andxml::reader, one token at a time. The document type's internal subset is read, and its entities, attributes' defaults, and attribute types used; nothing outside the text is. Limits on depth and on what entities expand to stop text written to exhaust a reader.- A program built without blossom finds the standard library as
sakuracdoes: the folder--lib std=DIRnames, or astdfolder beside the compiler or above it, or its libraries in theshare/sakurafolder above it, whereblossom installputs them.