Branch: Tag:


2014-07-21 14:44:42 by Per Hedbor <>

Added notes about some more changes

170:    code in code in code, since there is no way to quote the start/end    markers.    + o Added a shorthand syntax for integer rages: xbit, where x is a +  number between 1 and 31. This can be used as an example to indicate +  that a string is 8 bits wide only: string(8bit) +  +  This is equivalent to the range (0..255) but can be easier to parse. +  +  Similarily int(1bit) is an alias for 'bool', and int(12bit) is +  the same as int(0..4095). +  + o The random(), random_string() and random_seed() might be more random +  +  On computers with a hardware pseudo random generator random() can +  return significantly more random numbers, however, this means that +  random_seed is a no-op on those machines. +  +  A side-effect of this is that random_string is now actually +  significantly faster on at least x86 cpu:s with rdrnd. +  +  Note: If you want cryptographically random data please use +  Crypto.Random.random_string unless you know for sure the random data +  returned by the RDRND instruction is random enough. +  +    New preprocessor features   -------------------------   
293:       The same thing happens when clearing values on the stack.    + o Svalue type/subtype setting changed +  +  This halves the number of instructions used to push a value on the +  stack in most cases. +  +  The speedup is not large, but noticeable. +  + o And on a related note, we now lie to the compiler about the +  const:ness of the Pike_interpreter_pointer variable. +  +  This significantly simplifies the code generated by the C-compiler +  for stack manipulation functions, the stack pointer is now only +  loaded once per code block, instead of once per stack operation. +  +  This saves a lot of code when using the stack multiple times in a +  function, and should be safe enough, albeit somewhat unconventional. +  +  If nothing else the binary size shrunk by about 5%. +    o string(x..y) (constant) types       The strings now keep track of the min/max values in addition to two
329:    x86-64 opcodes, there is no need to check the types, do a real    pop_stack etc.    +  + Demacroified some code, resulting in smaller code-size +  +  This makes things faster, it is often better to branch to a small +  block of code than to have it inlined in a lot of different +  locations on modern architectures. +    o Faster hash-function for strings       + Also siphash24 was added and is used in case the string hash table    becomes inefficient    -  +    Deprecated features and modules   -------------------------------   
525:       | foreach( Bz2.File("log.bz2")->line_iterator(); int n; string line )    + o Both sscanf and sprintf can now handle binary floats in little endian format +  +  %-8F would be a 64 bit IEEE float binary value in little endian order. +    o Image.JPEG       + decode now supports basic CMYK/YCCK support
532:    + exif_decode is a new function that will rotate the image    according to exif information    + o Image.BMP now supports some more BMP:s. +  +  + Added support for vertical mirroring (images starting at the +  bottom left) +  +  + Added support for 32-bit (non-alpha) BMP:s. +    o String.Buffer       String.Buffer can now add the storage from a different String.Buffer
544:    The new method addat() allows for writing into the buffer at any    position.    + o String.range(str) +  +  This returns the minimum and maximum character value in the string. +  +  The precision is only 8 bits, so for wide strings only character +  blocks are known. +  + o string_filter_non_unicode(str) +  +  This function replaces all non-unicode characters in a pike string +  with 0xffea. +    o SDL.Music added to SDL.       Allows the playback of audio/music files.
562:       Useful to catch format errors in the decode string.    + o decode_value can no longer decode programs using the 'old style' +  program encoding. +  +  Since the format has been deprecated since feb 2003, and those +  programs could not be decoded anyway due to other issues it is not +  much of a loss. +    o Process.daemon       The daemon() function is for programs wishing to detach themselves
660:       + Fixed grantpt() on Solaris failing with EPERM.    - o Unicode databases updated to 6.3.0 from 5.1.0 + o Unicode databases updated to 7.0.0 from 5.1.0       This is the latest released Unicode database from   
863:      o sizeof() now supports ADT.struct.    + o Standards.JSON.encode can now get the initial indentation level +  specified.    -  +  This is rather useful for recursive calls encode in pretty print +  mode (common for objects with encode_json methods). +  + o Added Pike.identify_cycle(x) +  +  Checks to see if x contains any circular structures. +  +  This can be useful while optimizing to identify reference cycles in +  Pike data structures, so that the need for garbage collection can be +  reduced. +  + o Most math functions (log, pow, exp sin, cos etc) can now take +  integers as arguments in addition to a floating point number. +  +  The result will still be a float, the argument will be converted. +    Crypto and SSL   --------------    -  + o Several identifiers have changed name +  SSL.sslfile -> SSL.File +  SSL.sslport -> SSL.Port +  ... <add more, nilsson. :))> +  + o SSL.File: Changed client/server selection API. +  +  Client and server operation is now selected by calling either +  connect() (client-side) or accept() (server-side) after creating +  the SSL.sslfile object. +  +  Blocking handshaking mode is selected by calling set_blocking() +  before either of the above. +    o SNI client extension support for SSL (Server Name Indicator)      o Standards.PEM
995:    and serial number can be supplied. The hash function defaults to    SHA-2-256.    + o Multiple threads can now call the Backend `() function (the function +  that waits for events).    -  +  The first thread will be the controlling thread, and all callbacks +  will be called in it, the other threads will wake when the +  controlling thread is done. +  +  + Incompatible C-level API changes + -------------------------------- +  + o New svalue layout +  +  The most obvious change is that the macros TYPEOF() and SUBTYPEOF() +  are now actually needed to directly access the type and subtype of +  an svalue, the svalues no have 'type' and 'subtype' members. +  +  There are also a few additional macros used to set both the type and +  subtype of an svalue at the same time: +  +  SVAL_SET_TYPE_SUBTYPE(sval,type,subtype) and +  SVAL_SET_TYPE_DC(sval,type) +  +  (these are only neede if you do not use the usual push_* macros) +  +  They are useful because they (usually) compiles to significantly +  more compact code, especially if the type and subtype are +  compiletime constants. The _DC variant will either leave the subtype +  unchanged or set it to 0, useful when you do not care about the +  actual subtype (which is, really, most of the time). +  + o get_storage() returns void* +  +  There is no need for casts in non-C++ code. +  +    Building and installing   -----------------------   
1020:   Lots of bug fixes   -----------------    -  +    o Fixed symbol resolution with deep inherits and mixins      o Fixed PNG 4bpl indexed mode with alpha      o The _sprintf LFUN now works with %F    -  + o foreach( arr[-two()..], string x), where two() returns 2 will no +  longer iterate over the first element in the array three times or +  crash. +  + o Fixed a typo from 2001-05-05 that caused a lot of countries to +  recide on the continent ',Europa' instead of "Europa" in +  Geography.Countries. +  +  Obviously the continent is not that often checked. +  + o Fixed interresting bug in the constant number parsing for octal +  numbers in escapes. +  +  For whatever reason 8:s were accepted for every location except the +  first in octal numbers, so 078 was considered an alias for 0100. +  +  This could cause issues at times, and will result in string parsing +  being somewhat different: +  +  | Pike v7.8 release 700 running Hilfe v3.5 (Incremental Pike Frontend) +  | > "\078"; +  | (1) Result: "@" +  | Pike v8.0 release 3 running Hilfe v3.5 (Incremental Pike Frontend) +  | > "\078"; +  | (1) Result: "\a8" +    o A lot more, see the (more or less) full changelog for more info: