Skip to content

Releases: uuk0/PyBytecodeManipulator

0.3.5

13 Jul 14:48
Compare
Choose a tag to compare
0.3.5 Pre-release
Pre-release
  • std:comprehension:list is now using internally a generator wrapped in a list() call
  • added std:comprehension:generator, :set, :tuple and :map
  • fixed YIELD in function definition blocks
  • fix macro-in-macro calls
  • removed std:print as it can be implemented using ~print(...) in the same way
  • rewritten how exceptions are emitted, making it possible to generate good trace backs without
    all the internal stuff; added more exceptions in the process
  • fixed some opcode stack effects
  • more test coverage
  • AttributeAccess itself is no longer evaluated statically, as it may lead to unwanted side effects
  • added std:stream:reduce with start value and std:stream:grouped
  • fixed issue with the lexer when parsing negativ integers
  • std:stream:to_list no longer takes the $output parameter; it is MACRO_RETURN-ed
  • removed check for macro for stack effect; using BYTECODE_LABEL's will invalidate them instantly
  • added std:stream:to_tuple and std:stream:to_set

0.3.4

05 Jul 10:59
Compare
Choose a tag to compare
0.3.4 Pre-release
Pre-release
  • improved error messages
  • label names can now contain ':' entries in them (used when generating multiple labels from a single base name, e.g. for for-loop labels)
  • CODE_BLOCK can now be parameterized, expanded like macro-parameters into the calling code (only differnce beeing the outer macro caller will define in which locals the macro CODE_BLOCK parameters will be stored)
  • added constants: ~PY_VERSION, ~BCM_VERSION
  • IF assembly tries now to evaluate conditions statically
  • added new operators for constructing the related data type: tuple, list, set and dict
  • fixed some issues with static operator optimisation
  • improved local capturing code for function definitons / free variables
  • std:comprehension:list is finally working

Version 0.3.3

23 Jun 14:20
Compare
Choose a tag to compare
Version 0.3.3 Pre-release
Pre-release
  • Compare operations are split into virtual opcodes now for better use
  • exception handles are now stored in the ExceptionTable structure
  • added "andeval" operator, analog to the "oreval" operator already defined
  • Instruction constructor no longer takes the function and offset; the function is no longer present, offset can be set afterwards
  • fixed the assembly code for accessing globals statically (@!) and locals statically
  • Macro local name resolution is changed to private-default, only when the ':' interfix ($:) is used, it will be exported
    ** CODE_BLOCK arguments are not affected; they may use the '|' interfix for accessing macro-internal locals
  • there will now be a warning when we detect local usage before a STORE_FAST instruction
  • improved error messages for assembly code
  • keyword argument names in both function calls and definitions can now be macro-expanded (e.g. &key=10)

Version 0.3.1

04 Jun 20:18
Compare
Choose a tag to compare
Version 0.3.1 Pre-release
Pre-release

Rewrite of Instruction data structure
(now using a graph, not a list)

added oreval operator and ASSERT_STATIC assembly

0.2.9

11 May 11:40
Compare
Choose a tag to compare
0.2.9 Pre-release
Pre-release

What's Changed

  • added RAW assembly instruction
  • refactored operator system
  • added new operators: and, or, nand, nor, =:, sum, prod, avg, avgi
  • removed operator: getattr
  • rewritten operator: xor, xnor (now using __bool__ instead of __eq__)
  • classes do no longer have their own namespace, if you still want a namespace, you may use '<' <namespace name> '>' after the class name
  • functions and classes support now macro expansions for their names
  • macro expanded names can now be correctly compared, hashed, etc.
  • setting ASSERT_TYPE_CASTS in builtin_spec to True will now enforce types in specialization, not like a no-op like default
  • partial support for inlining function calls
  • added ASSERT <expression> [<message>] instruction

Full Changelog: 0.2.8...0.2.9

0.2.8

06 May 15:07
Compare
Choose a tag to compare
0.2.8 Pre-release
Pre-release
  • added FOREACH loops with automatically zip() when multiple iterable are given
  • changed the macro prefix from § to &
  • using &<name> in places for identifiers is now allowed in some places
  • added std:comprehension:list to feel like python list comprehension
  • refactored assembly part of the project

0.2.4

04 May 14:25
Compare
Choose a tag to compare
0.2.4 Pre-release
Pre-release
  • added more assembly code
  • fixed some issues with the bytecode part
  • added some more specializations
  • added error locations to assembly code

Full Changelog: https://github.com/uuk0/PyBytecodeManipulator/commits/0.2.4