[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Viuavm-commits] [SCM] Viua VM annotated tag v0.9.0 created. v0.9.0
From: |
git |
Subject: |
[Viuavm-commits] [SCM] Viua VM annotated tag v0.9.0 created. v0.9.0 |
Date: |
Sun, 25 Jun 2017 12:10:16 +0200 (CEST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Viua VM".
The annotated tag, v0.9.0 has been created
at 84edefef733a15d1ec25aecae45c30a53792e5c7 (tag)
tagging f1d6b22732e783c7e8c70224cfd921ab9e963881 (commit)
replaces v0.8.4
tagged by Marek Marecki
on Sun Jun 25 11:23:09 2017 +0200
- Log -----------------------------------------------------------------
Release 0.9.0
NEWS
With 1287 commits since 0.8.4 this release is the biggest one in the
history of Viua so far.
And not only in terms of commit count, but also functionality.
CLOSURES
Closures were reworkerd.
The `enclose*` family of instructions was renamed to `capture*`, and
closures got their own assembly directive - `.closure:`.
Functions declared as closures are not directly callable and
must be instantiated first using `closure` instruction.
CONCURRENCY
Concurrency-related aspects of the VM also got some love.
Blocking operations (`join` and `receive`) can now specify a timeout for
how long they should block a process.
The timeout may be specified in seconds, milliseconds, or
as the `infinity` token.
DEFAULT VALUES
Some instructions now can be written in a shortened form and
the assembler will inset default values for omitted tokens.
These include for example `join`, `receive`, `istore`, and `fstore`.
DEFAULT COMPILE-TIME KEYWORD
The new compile-time `default` keyword can be used wherever it is legal
to omit a token.
The assembler will change the `default` keyword into the default value
for that place.
It is useful when usage of the default value should be stated explicitly.
IOTA COMPILE-TIME KEYWORD
The new compile-time `iota` keyword generated an ever-increasing integer
starting from 1.
It can be used to automatically assign register indexes:
.name: %iota answer
istore %answer local 42
print %answer local
It is especially useful when code is changed, as the assembler will
reindex the registers automatically and free the programmer from this
task.
WATCHDOG PROCESSES CANNIBALISE TIME OF CRASHED PROCESSES
Previously, when a process crashed, the VM spawned a watchdog and
run it to completion.
This is now fixed, and crashed processes become their own watchdogs on
failure - so watchdogs are now on the same level as all other processes,
and may be preempted to prevent starvation of "normal" processes.
Before the crashed process becomes a watchdog its stack is unwound.
VOID TARGET REGISTER
The new `void` keyword can be used as a target register.
Using void register as the target register will drop the value that
would by normally produced by the instruction.
Some examples:
; drop the result of function call (if any)
call void foo/0
; delete the value
move void %1 local
EXPLICIT REGISTER SET SPECIFIERS
The `tmpri` and `tmpro` instructions are no longer needed as the VM
supports explicit register set specifiers for register operands.
This means that to move a value from local register set to the static
register set the following instruction can be used:
; move <target> <source>
move %1 static %1 local
...instead of this sequence:
ress local
tmpri %1
ress static
tmpro %1
Explicit register set specifiers make code shorted and more efficient.
ATOMS
Atoms are unique values whose only property is that they may be checked
for equality.
Useful as tags.
Supported in Viua by `atom` and `atomeq` instructions.
TEXT AND UTF-8
Starting with this release, Viua uses UTF-8 as its internal character
set for text values.
What is more, a special text type was added to the VM's list of
primitive types.
Text values must always be valid UTF-8.
A `text*` family of instructions was introduced to distinguish text
values from a "string of bytes" values produced by `strstore`
instruction.
As an additional feature, all values can be casted to text using the
`text` instruction:
istore %1 local 42
text %2 local %1 local ; register 2 will contain text "42"
DEFERRED CALLS
A very useful feature.
Deferred calls may be registered to be called when the frame they were
registered in is popped off the stack (during unwinding, normal returns,
or tail calls).
They are useful as a debugging aid, and can be used to implement
resource management schemes.
More information about deferred calls can be found on the
weekly.viuavm.org blog.
ADDITIONAL NOTES
This release also introduces one very useful and important feature:
processes can now contain many stacks, and switch execution between
them.
Such an additionl will make implementation of several new
functionalities much easier and more intuitive.
For example:
- interrupts: they must be run in the context of a specified process,
but are in no relation to what the process is currently executing so
they are a prime candidate to be run on a different stack
- message filtering: a function could be provided to filter messages
available in a process' mailbox, and as this function's execution is
is only a tool to achieve some other goal, it would be a good idea to
run the function on another stack
- stackful coroutines: coroutines that can yield from frames at
arbitrary depth of the stack, not only from the top-most frame
and possibly more.
A style guide has been introduced with the help of the `clang-format`
tool.
VM got a basic static analyser that is able to catch errors at compile
time.
Marek Marecki (1277):
Move implemntation out of header file
Switch to emplace_back() in CPU functions
Remove unused helper program
Use emplace_back() in code generator functions
Use emplace_back() in frontends
Use emplace_back() in loader
Use emplace_back() instead of push_back() when appropriate
Add VIUA_TEST_ONLY_ASMING that allows testing just the assembling,
without running assembled code
Assembler catches zero-distance forward jumps
Remove useless continue statements
Assembler catches zero-distance backward jumps
Assembler catches zero-distance marker jumps
Helper script for generating boilerplate code for .asm scripts
Assembler catches zero-distance absolute jumps
Add tests for catching zero-distance jumps
Update Changelog
Use std::unique_ptr<> to manage frames in ForeignFunctionCallRequests
Use std::unique_ptr<> to manage ForeignFunctionCallRequests
Remove all warning and error options from assembler frontend
Hotifx
Add very crude tokeniser
Remove spaces and comments from token list
Special-case strings
Correctly handle newlines in remove_comments()
Reduce adjacent newlines
Tokeniser unwraps lines
Tokeniser correctly unwraps lines
Merge branch 'devel' into issue/149/switch-to-token-driven-code-generation
Make str::stringify() accept bigger integers
Improved unwrapping
Tokens dumpes as JSON
Tokeniser reduces to ".end" directive
Tokeniser reduces to ".function:" directive
Enable ".end" and ".function:" reductions
Simplify code
Add str::isid() function checking if a string looks like an identifier
Tokeniser reduces function signatures
Move JSON encoding to a separate function
Reorganize code
Move tokenisation and reduction functions into a namespace
Tokeniser reduces ".signature:" directive
Encode to more compact JSON
Add --size option to asm frontend: it reports size of bytecode that would
be produced
Make InvalidSyntax store biger integers to hold line and character numbers
Implement bytecode size calculation using tokens
Remove unused prints
Standardise token stream before processing
Move lexer to a library
Move bytecode size calculating function to library
Add two small functions
Fix an iterator error
Reduce block and module names
Fix remove both ; and -- comments
Fix comment lexing
Fix str::extract() function
Fix function reducing newlines
Fix unwrapping handles wraps on target operand
Fix add default constructor for Token type
Fix add 1 to line and character to make them human readable
Function signatures are discovered using tokens
Extract signatures using tokens
Reduce .bsignature: and .block: directives
Gather block names using tokens
Refactoring deduplicate code
Token::operator function operate on const Token objects
InvalidSyntax can be constructed with a token and a message
Reduce .name: and .mark: directives
Reduce +N and -N jump targets
Fix obvious brain damage
Reduce @-prefixed register names
Fix a sed-typo
Better error messages
Update Changelog
Reduce floating point numbers and absolute jumps
Fix handle call instructions returning to named registers
Fix assembler catches unbalanced parenthesis in wrapped instructions
Fix function names
New debug messages from assembler
Better error messages
Fix clear unwanted spaces after text
Fix compare just the instruction, not the whole line
Switch to token-based function and block extraction
Fix expected error messages
Remove unused parameters from gathering functions
Temporary fix
Add interface to InvalidSyntax
Hold two lists of tokens
Assembler provides context for errors
Refactoring deduplicate code in assembler error tests
Calculate bytecode size using tokens
Reduce .main: directive
Use tokens for directive verification
Use tokens when checking for unknown instructions
Use tokens to detect main function to use
Use tokens for more size calculations
__entry function does not have tokenised body, use lines for it
Use tokenised source to map invokable addresses
Refactoring generate __entry function in separate function
Generate tokens for entry function
Fix tokens for __entry function
Use tokens to map invokable addresses
Fix sed-typo
Better return value checking in main function
Refactoring move main function checking to a separate function
Update Changelog
Use tokenised source to verify if called functions are defined
Add .closure: directive
Implement basic static checking (empty register accesses)
Fix typo
Version bump
Explicitly mark functions as closures
Remove stale FIXME
Better error message for negative register indexes
Better static checks of empty register accesses
Tests for static analyser
Static analysis is now the default, can be disabled with --no-sa flag
Static analyser checks blocks as they are entered
Reenable static checks for programs with blocks
Update README
Normalise vec instruction tokens
Make newline optional in str::stringify(long unsigned)
Static analyser understands vec instructions
Fix missing register name resolution
Fix missing --no-sa flags in tests for runtime exceptions
Fix Clang build
Fix support jump checking of closures
Disable static checking for 2 more tests with closures
Static checking of more instructions
Merge branch 'devel' of github.com:marekjm/viuavm into devel
Add tests for SA of three operand instructions
One more test
Add SA of "not" instructions
Add SA of cast instructions
Add SA of "vinsert" instruction
Add SA of "vpush" instruction
Add SA of vat, vpop and vlen instructions
Fix vpush from empty registers in vlen test (caught by SA)
Fix add missing test file
Remove stale test for EMPTY instruction
Shorten code
Remove "empty" instruction
Add SA of ptr instruction
Add SA of "throw" instruction
Move static analyser code to its own file
Add (naive) SA of tmpri and tmpro registers
Add SA of "insert" instruction
Better error message on undeclared register names
Add SA of "isnull" instruction
Add SA of "fcall" instruction
One more test for SA of "pamv" instruction
Add SA of "join" instruction
Add SA of "remove" instruction
Update Changelog
Add "send" instruction to bytecode definition
Implement "send" instruction
Rewrite tests to use "send" instruction instead of Process:pass/2 function
Small update to TAO
Remove Process::pass/2 function
Update Changelog
Closes #161
Add SA of "send" instruction
Add SELF to bytecode definition
Implement "self" instruction
Add simple test for "self" instruction
Update Changelog, closes #137
Add timeout to "receive" instruction
Add more descriptive error message for invalid timeout operand in receive
Add tests for receive timeouts
Update Changelog
Add a better check of whether a wrapped instruction can be unwrapped
Use checked access to std::vector elements
Cook tokens earlier (use enhanced verification to throw parsing errors
earlier)
Encode name in case it is a newline (need better newline detection)
Factor timeout-operand checking code out of the main checker function
Add timeout to "join" instruction
Add tests for join timeouts
Update Changelog, closes #162
Align code for readability
Use formatring consistent with rest of the source
Rename CPU to Kernel, a name that better pictures its responsibilities
Better clean production
Start refactoring of operand decoding machinery
Refactor "and" and "or" instruction decoding
Fix Travis build
Fix run Valgrind tests with correct executable
Refactor opernad decoding in "bstore" instruction
Add viua::bytecode::decoder::operands::fetch_primitive_uint() function
Refactor "frame" instruction
Refactor "param" and "pamv" instructions
Refactor "arg" and "argc" instructions
Remove commented code
Add function for decoding atoms (null-terminated ASCII strings)
Refactor decoding function names in "call" and "tailcall" instructions
Refactor return register decoding in "call" instruction
Refactor setting return register
Refactor casting instructions
Refactor enclosing instructions
Refactor "closure" and "function" instructions
New ctor for Function and Closure types
Refactor "process", "join" and "self" instructions
Refactor "watchdog" instruction
Refactor "send" and "receive" instructions
Refactor float instructions
Add functions for extracting and fetching uint64_t from bytecode
Refactor "jump" and "branch" instructions
Refactor "echo" instruction
Add function for fetching primitive integers
Remove commented code
Refactor integer instructions
Fix type used
Deduplicate code
Refactor "link" and "import" instructions
Add function for fetching Viua VM objects from registers when decoding
operands
Refactor "new" instruction
Refactor "insert" and "remove" instructions
Refactor "class", "derive", "attach" and "register" instructions
Simplify code
Colorise some assembler error messages
Colorise more error messages
Colorise some assembler error messages
Colorise more error messages
Fix error messages tests check for
Merge branch 'devel' into issue/152/refactor-operand-encoding-and-decoding
Refactor "move" instruction
Refactor "copy" instruction
Refactor "ptr" instruction
Refactor "swap" instruction
Refactor "delete" instruction
Refactor "isnull" instruction
Refactor "tmpri" and "tmpro" instructions
Refactor "ress" instruction
Add small documentation notes
Add better documentation notes
Remove unused parameter name
Add function fetching string operands
Remove useless #include
Refactor "strstore" instruction
Refactor throw-catch instructions
Refactor "vec" instruction
Add FIXME
Remove incorrect comment
Refactor "vinsert" instruction
Refactor "vpush" instruction
Refactor "vpop" instruction
Refactor "vat" instruction
Refactor "vlen" instruction
Refactor "fstore" instruction
Remove old operand-extracting code
Remove old comment
Remove unused file (another operand extracting module)
Remove stale header
Remove useless #include
Refactored operand fetching #152
Update Changelog
Colorise error messages only when writing to terminal
Detect name reuse in a single block and throw an error
Fix std::misc to pass new register-name check
Add checking for registers being defined before being named
Properly expand integer, float, and boolean instructions when given only
two operands
Begin refactoring of static analyser
More detailed messages from static analyser
Add new operand types
Colorise more output
Gather names using tokens
Fix a typo
Remove useless if
Reduce newlines twice, for a good measure
Gather marks using tokens
More colors
Expand "istore" instructions with only one operand with zero
Expand "fstore" instructions with only one operand with zero
Expand "strstore" instructions with only one operand with empty string
Update version
Remove useless variable
Factor line-assembling to a new function
Change debug log output from assemble_instruction()
Add tests for default values of "istore", "fstore", and "strstore"
Better code formatting
Fix incorrect comment
Fix generating spurious newline when counting instructions in [] wrap
Expand "frame" instructions
Expand "vpop" instructions
Expand "enclose*" instructions
Fix old syntax
Generate bytecode using tokens, not lines
Remove unused lines parameters
Expand cast instructions
Use only tokens for resolving jumps and register names
Add using declaration for viua::cg::lex::Token
Use a single clean production
Use tokens to extract modules to link form .link: directives
Reduce .link: directives
Correctly skip .link: directives during static analysis
Fix recognise .link: as a valid directive
Detect missing module names in .link: directive
Update Changelog
Use tokens to gather meta information about source code from .info:
directives
Add --meta option to assembler
Decode escape sequences in strings
Add simple test for meta information encoding and decoding
Use tokens to verify "function" and "closure" instructions
Remove unused parameters from generate()
Restrict allowed register and marker names
Add "const" to reserved keywords
Use tokens to verify function names
Use tokens to verify block tries
Use tokens to verify block in catch instructions
Add "temporary" to a list of reserver words
Use tokens to verify register names in "ress" instructions
Add some more reserved words
Improve readability
Add setter for token text content
Use tokens to verify block body emptiness
Use tokens to verify frame balance
Better frame balance checking
Fix a typo
Add new dependency in Makefile production for assembler frontend
Use tokens to verify function call arities
Use tokens to verify dynamic dispatch call arities
Rename a variable to be more descriptive
Remove accidental line
Add FIXME
Use tokens to verify that frames have no gaps
Implement iota for []
Remove unused <iostream> include
Add a level of manual control over token-reduction level in lexer
Fix usage message in lexer
Guard against stary .end markers and square brackets
Fix do not append ^, parentheses, or square brackets to names
Add missing test file
Reduce directives before replacing iotas and unwrapping
Test iota in register names
Add .iota: directive to manipulate iota values
Remove extra whitespace
Add some basic iota-related verification
Update Changelog, version bump, closes #163
Change order of reductions run on raw token list
Document the order of token reductions
Document more reductions
Document order of "other multi-token reductions"
Use tokens to verify that functions end with "return" or "tailcall"
Remove test for frames without operands
Use tokens to verify that blocks end with a valid instruction
Better colors
Highlight the token that made assembly fail
Better location details in error messages
Fix handle absolute jumps with negative indexes
Fix reduce_newlines() removes all newlines from beginning of token list
Standardise "branch" instructions before further processing
Use tokenised source to verify jump targets
Remove code that became useless after transition to token-based source
processing
Refactor error reporting code
Split error reporting code into smaller functions
Fix colorsing only error token
Version bump from 0.8.4.335 to 0.8.4.354
Add test for branches without operands
Remove useless checks (branch instructions are sanitised prior to
analysis)
Add useless branch checking
Add tests for simple cases of useless branch
Fix do not crash on absolute jumps
Add tests for mixed index/offset useless branches
Add useless branch test: different markers pointing to the same
instruction
Add more tests for useless branch checking
Remove code duplication in directive reductions
Further refactoring
Remove duplicated code
Fix comment
Use empty strings as "any" token when matching
Join directive-looking adjacent tokens for better error messages
Small update to README
Remove unused code
Remove remaining line-based processing code
Add function expanding default values
Add default value for first operand of "arg" instruction
Add default value for return register in "call" instruction
Continue after each "default" expansion
Add default value for "istore" instruction
Add default value for "strstore" instruction
Implement default value for "fstore" instruction
Add tests for "default" keyword
Update Changelog
Better name for a function
Use match() function instead of matching tokens using nested ifs
Add TracedSyntaxError for detailed error messages
Add more details to register-erase event in static analyser
Static analyser generates traced errors whenever possible
Support traced syntax errors in assembler frontend
Add test for inifite timeout in "receive" instruction
Add test for default timeout in "receive" instruction
Add test for default timeout in "join" instruction
Implement "default" as a valid timeout value for "join" and "receive"
instructions
Negative timeouts are not valid
Timeouts can be given in seconds
Update Changelog
Sending a message cannot fail
Update Changelog
Fix for TravisCI broken build
Rename functions in std::io module
Fix correctly verify functions ending with "tailcall" instruction
Fix correct verification of enclosing instructions
Add *very* simple, broken file reading API
Update Changelog
Change "branch" instruction to "if"
Add initial support for nesting blocks in functions (single level of
nesting)
Rewrite some sample code using nested blocks to check if the
functionality works
Update Changelog
Add partial branch support to static analyser
Update Changelog
Add info about static analyser to README
More control over colorising with VIUAVM_ASM_COLOUR
Fix std::logic_error when VIUAVM_ASM_COLOUR is not defined
Refactor code to play nice with new static analyser
Add FIXMEs
Remove useless prints
Add SA code for more instructions
SA errors are always traced to show in which function they were detected
Static analyser understands branches (somewhat)
Add more tests
Update Changelog
Remove unused class
Remove unused class
Remove byte instructions
Update Changelog
Remove unused file
PIDs of joinable processes may be dropped
Fix print instruction first appends newline to string, then prints it
Fix indentation
Improve VP load balancing logic
Fix TravisCI build failure
Time tests
Fix copying objects
Better stringification for Object and Prototype
Update Changelog
Update sample code for new watchdog scheme
Remove old FIXME
Processes use embed their own watchdogs
Update tests for per-process watchdogs
Setting watchdog does not require a frame
Trace frame errors during static analysis
Improve logging from VPS
Fix bind processes to new schedulers upon migration
Use per-process watchdog scheme in VPS
Rename Process::bind_to() to Process::migrate_to()
Update Changelog
Fix tests expect traced errors
Report summed run time of VM tests
Remove unused code
Remove useless member variable, hide logging behind preprocessor
Version bump
Add "99 bottles of beer" benchmark
Version bump
Fix check that blocks and function names are not reserved keywords
Fix emit better errors for replaced values (e.g. iota) using original
string contents
Test for reserved words being used as block names
Fix handling traced errors in assembler frontend
Fix do not allow duplicated names in a single source file
Fix functions and blocks cannot have the same names
Mangle nested block names
Remove means of process state manipulation from user code
Update Changelog
Rename "enclose" instructions as "capture"
Make Integer inherit from viua::types::numeric::Number
Improve foreign-import exception message
Make viua::types::numeric::Number a common base of Float and Integer
Add pretty-lexing helper script
Add test for timeouts specified in seconds
Use double as underlying Float type
Override Number member functions for Boolean
Fixes and simplifications
Fix tests for new rules
Boolean is not a special case of an Integer
Remove old methods from Integer
Move Integer, Float and String to viua::types namespace
Move types to viua::types namespace
Move FFI scheduler implementation and declarations out of kernel files
Shuffl-shuffle: move FFI scheduler into a namespace
Add missing file
Move Kernel to a namespace
Move PID to its own file
Move PID to a namespace
Move Process to a namespace
Rename viua::types::ProcessType to Process
Move RegisterSet to a namespace
Remove unreachable code
Add new operand type
Fix implement default for msg instruction target
Fix set correct original contents for replaced defaults
Add void operand type
Add default constructor for Token
Store more details about register modification locations
Fix saved register modification position in receive instructions
Remove unused code
Fix saved register modification position in other instructions
Fix jump handling in SA
Handle register instruction in SA
Receiving to 0 register drops the message
Underlining more tokens provides better context for error messages
Fix a typo
Add void for some instructions
Update Changelog
Wrap
Hotfix
Fetch void operands
Basic support for void operands
Allow disassembling void operands in more places
Implement void for target of process instruction
Implement void for target of arg instruction
Make Valgrind output parsing more resilient
Implement void for target of join instruction
Implement void for target of receive instruction
Consistency is king
Add tests for void target
Add test for using void as input register
Incomplete implementation of new bytecode size calculation function
One more change
Unwrap instructions before de-inlining blocks
Unwrap instructions before de-inlining blocks
Test error message on invalid register index in .name: directive
Rename viua::cg::lex::reduce() to cook()
Replace names when cooking tokens
Fix TravisCI build
Update information about nested blocks
Remove prints
Remove unused functions
Merge branch 'issue/add-void-operand-type' into devel
Improve error messages from entered blocks (trace block enters in SA)
Do not pass names as parameter
Stylistic change to better reflect what the code does
Remove support for dot-prefixed absolute jumps
Remove old FIXME
Remove old absolute-jump-related code
Small refactoring
Calculate jump offsets using tokens and not generated bytecode
Remove unused code
Remove more unused code
Resue code
Fix iinc and idec have only one operand
Fix correctly calculate size of msg
Fix correctly increase number of consumed tokens
Experimental bytecode size calculating function
Add license notes
Normalise vinsert instruction operands
Fix correct sizes of ress and fstore instructions
Partially switch to new implementation of bytecode size calculation
Handle timeout operands in new bytecode size calculator
Add 4 bytes to void operands (for now)
Throw on invalid operands
Fix some size calculating functions
Fix size calculation for "derive" instruction
Fix size calculation for "attach" instruction
Fix size calculation for "register" instruction
Fix size calculation for "new" instruction
Remove stale FIXMEs
Port bytecode size calculations to new model
Remove traces of old bytecode size calculating code
Throw exception instead of copying Ifstream in std::io
Void operands are only one byte in size (only the type marker)
Update Changelog
Fix std::io::ifstream::getline/1 throws exception when reading from
EOF-ed stream
Fix add missing symbols to .so
Refactor register-index operands encoding (preparation for pointer
dereference implementation)
Hotfix
Refactor echo and print to use fetch_object() instead of manually
fetching using register index
Use fetch_object() instead of manually fetching using register index
Emit pointer dereference sequences in bytecode
Interpret pointer dereference bytecode
Allow pointer dereferences in integer instructions
Allow pointer dereferences in float instructions
Add basic tests for pointer dereference
Allow pointer dereferences in "and" and "or" instructions
Add more tests for pointer dereference
Make "not" a two-operand instruction
Allow pointer dereferences in "not" source
Allow pointer dereferences in cast instructions
Remove stale comments
Change function names to clearly map to opcode names
Add missing test files
Fix void may be used as return register in "fcall" instruction
Allow pointer dereferences in "capturecopy" instruction
Allow pointer dereferences in source of "fcall" instruction
Allow pointer dereferences in source of "if" instruction
Better error message on missing operands
Update Changelog
Make get_operand_type() function usable in modules other than
viua::bytecode::decoder::operands
Refactor register-erasing code in SA
Allow pointer dereferences in source of "insert" instruction
Better stringification of objects
Add more tests
Allow using void as target of "remove" instruction
Small code reorganisation
Fix pointer dereferences throw exception instead of silently returning
register indexes
Allow pointer dereferences as target and source of "vinsert" instruction
Allow pointer dereferences as source of "vpush" instruction
Allow void as target of "vpop" instruction
Closes #166
Update README
Update README
Fix record correct place of register definition
Fix skip backward jumps, but analyse later instructions
Small refactoring
Better error message about creating "function from undefined function"
SA can detect unused values
Update Changelog
Rewrite Frame to use std::unique_ptr<> to hold register sets
Use bounds checking
Rewrite RegisterSet to use std::unique_ptr<> and std::vector<> instead of
raw pointers and arrays
Do not leak memory
Use std::unique_ptr to handle RegisterSet copies
Hotfix
Add RAII utility for maybe-unique pointers
Move implementation out of header file
Remove unnecessary comments
Refactor code
Kernel owns prototypes
Move prototypes to std::unique_ptr
Manage FFI workers with std::unique_ptr
Manage main module using std::unique_ptr
Manage linked modules using std::unique_ptr
Use std::unique_ptr to manage bytecode arrays
Remove stale code
Remove unused code
Caller receives ownership of objects returned by Type::copy()
Caller receives ownership of objects returned by Type::pointer()
Caller receives ownership of objects returned by RegisterSet::pop()
Caller receives ownership of objects returned by Process::pop()
Vector uses std::unique_ptr to manage the objects it owns
Caller receives ownership of objects returned by Vector::pop()
Object uses std::unique_ptr to manage objects it owns
Caller receives ownership of objects returned by Object::remove()
Explicit ownership passing in Object::set() and Object::insert()
Explicit ownership passing in Vector public API
RegisterSet assumes ownership of the objects it holds
Process::place() takes ownership of the object it receives
Process::put() takes ownership of the objects it receives
Remove unused register set flags
Process::raiseException() takes ownership of the object it receives
Rename exception-raising funtions to just raise()
Version bump, also closes #167
Rename "pull" instruction to "draw"
Small adjustment
Use better name
Use better name
Small refactoring
Reduce code duplication
Add another small reduction in code duplication
More code deduplication
Increase code readability
Another small reduction in code duplication
Remove requirement for * and @ to be connected to the register name they
affect
Add small improvement to the syntax
Remove obvious comments
Fix VM does not crash when fcall source is not callable
Fix set correct original values in automatically inserted tokens
Fix do not try to resolve third operand to vec as register name
Prevent accessing named registers using direct indexes (enforced by SA)
Fix dubious accesses found by SA
Small fix to direct-access-to-named checking
Support pointer dereferences in "param" instruction
Change "vat" instruction to return pointers to objects, not copies
Update README
Fix a typo
Version bump
Allow explicit writes to standard output and error via std::io module
Use more descriptive make for "uregset" variable
Use better name
Use better variable names
Refactor Closure type
Small fix in a comment
Version bump
Add function for fetching operand types
Add operand types for unlimited size integers, and arbitrary precision
floats
Add unified arithmetic and logic opcodes to bytecode definition
Provide mnemonics for unified arithmetic and logic opcodes
Prepare headers for ADD instruction
Implement disassembly of unified arithmetic and logic opcodes
Calculate size of unified arithmetic and logic instructions
Basic analysis of unified ALU instructions
Bytecode generator can emit unified ADD
Program generator emits ADD instructions
Add stub for ADD instruction
Dispatch ADD instructions
Assembler frontend recognizes ADD instructions
Factor operand type encoding to a separate function
Another small refactoring
Emit bytecode for all ALU instructions
Generate bytecode for all unified ALU instructions
Correctly execute ADD instruction
Employ heavy abstraction in unified ALU instructions implementation
Template black magic
Dispatch unified arithmetic instructions
Split into two functions
Special-case unwrapping result specifiers for unified ALU instructions
Dispatch unified comparison instructions
Update Changelog
Remove old unused sample code
Rewrite sample code to use unified ALU instructions
Implement unified ALU instructions, closes #168
First small step towards fixed-sized internals
Yet another safe change
One more small change
Rename bytecode inserting functions
Preparation for refactoring
Further refactoring (required some sample rewriting)
Properly disassemble OT_INT operands
Drop the implicit cast
Refactor the way primitive ints are decoded (required refactoring of vat
and vpop)
Code deduplication
Introduce viua::internals::types::plain_int for plain integers
Refactor timeout encoding
Introduce a type alias for VM floats
Remove dead code
Encode istore correctly
Use type alias
Use byte instead of unsigned char
Refactor code to use special type for timeouts
Use viua type instead of bare unsigned
Use unsigned as underlying timeout type
Use viua::internals::types::register_index as RI type
Fix type signatures
More type adjustments
Fix Clang++ inconsistencies in override usage
Make implicit conversions explicit
Remove useless std::move()
Use VM types in disassembler
Small type change
Type adjustment
Use fixed-size unsigned integer as a register index type
Use fixed-size unsigned integer for timeout operands
Make type in declaration the same as type in definition
Use viua::internals::types::plain_int instead of int
Use fixed size integer for plain integers
Remove obsolete OP_SIZES map, introduce OP_MNEMONICS
Use std::string::size_type instead of bare unsigned
Use well-defined types and inference instead of bare ints in support
string lib
Shed more ints
Remove bare int, use decltype()
Use viua-defined type instead of bare int
Replace bare unsigned
Use viua-defined type in "ress" instruction
Introduce a special type for bytecode size
Use special type instead of bare uint64_t
Tell Clang that it is all OK
Use decltypes instead of bare ints
Use exceptions for errors, not return codes
Remove dead code
Do not use return codes for errors
Use uint16_t to store process priorities
Switch to uint16_t for priorities
Use int64_t to store values in Integer type
More decltype()
Use viua::internals::types::register_index instead of bare ints
Use uint8_t instead of unsigned char
Remove unused header file
Use uint64_t to counter references in Reference
Use decltype() instead of explicitly specifying return type
Use viua::internals::types::bytecode_size instead of bare uint64_t
Use more named types
Use timeout_op instead of int_op for timeouts
Use int64_t as underlying Integer type
Use defined types instead of bare ints
Change uint64_t to viua::internals::types::bytecode_size in more places
Add type for process time slice
Change uint64_t to viua::internals::types::bytecode_size
Use decltype() instead of explicitly specifying type
Move byte typedef into viua::internals::types
Update Changelog
Add fixed-size type for "ress" instruction operand
Change registeset_type_marker underlying type to uint8_t
Add an enum class for register set types
Use std::unique_ptr::swap()
RegisterSet holds a set of Register objects
Prepare methods for proxying register access through Register objects
Use register proxy in "move" implementation
Fix names in sample program
Fix semantics of moves and resets in Register objects
One function call less
Use register proxy in "copy" implementation
Fix Register::empty()
Use Register::empty() to implement Register::operator bool()
Use more register proxies
Move masks to Register class
Release std::unique_ptr<> from Register
Use register proxies in "swap" and "tmpri"
Rewrite "delete" to use register proxy
Use register proxies in unified ALU instructions
Use register proxies in bool instructions
Use register proxies in cast instructions
Use register proxies in "arg" and "argc" instructions
Use viua::kernel::Register to return values from calls
Rewrite sample code to match new rules
Update Changelog
Use register proxies in closure instructions
Fix
Use register proxies in "capture" implementation
Do not release from std::unique_ptr<>, use moves
Use register proxies in concurrency instructions
Use register proxy in "fstore" implementation
Fix type name
Use register proxy in integer instructions
Use register proxies in object and vector instructions
Use register proxies in type system instructions
Use register proxy in "strstore" implementation
Use register proxies in throw-catch instructions
Minor refactoring
Throw Valgrind errors on invalid reads
Scheduler should depend on process object file
Fix type mismatch
Add VIUA_STACK_TRACES environment variable
Fix type used
Refactoring
Refactoring once again
Disassembler uses --debug flag to output to stdout
Encode different operands for "vat" depending on what is requested by
user code
Small type fix
Make implicit conversion explicit
Remove useless moves detected by Clang
Remove redundant spaces from disassembler output
Encode register set type in ri operands
Refactoring and a few FIXMEs
Fix allow returning, receiving and joining into 0 register
Prepare for more involved operand index extraction
Make reserved-keyword functions publicly available
Prepare for more inserting rs-type specifiers into tokens stream
Small adjustment
Remove duplicated definition
Refactoring
Prepare asm frontend for rs type insertion
Everything still works
Encode registerset type from operand in bytecode
Lay groundwork for per-operand registerset switching
Force % before register indexes
Allow access mode sigil to precede iota
More information from lexer
Fix access mode sigils near iota, and in .name: directives
Style
Make it possible to convert bare integers to int_ops (for istore)
Add missing access specifiers
Require access-mode sigils before register-index operands
Standard library modules written in Viua assembly are compilable with new
syntax
Re-add stdlib production to all production
Some tests pass
Additional fixes
Allow changing access mode during instruction unwrapping
Fix for .unused: hint
Tests pass once more
Update Changelog, closes #170
Update README
MOAR BADGEZ
Update README
Merge branch 'devel' into
issue/169/using-multiple-register-sets-in-single-instruction
Better error messages
Reorder index and rs type in bytecode
Allow assembling with explict rs types for izero
Additional verification for main function
Allow chaining InvalidSyntax::add() calls
Update boilerplate generator
Adapt code to new rules concerning return from main function
Update Changelog
Remove old FIXME
Disassemble register set names in print and echo
Normalise explicit register set names in print and echo
Use explicit register sets in print and echo
Add tests for throwing from empty register
Support specifying register sets in throw instruction
Test for delete on empty register
Support explicit register sets for delete
Support explicit register sets for istore
Skip is required to not analyse explicit register set names
Support explicit register sets for iinc and idec
Use Viua type alias instread of bare float
Fix disassembly of istore
Support explicit register sets for fstore
Support explicit register sets for cast instructions
Cast instructions can move values between register sets
Support explicit register sets for strstore
Fix correctly deal with references
Support explicit register sets for ALU instructions
Support explicit register sets for vec
Vector target may be in a different register set than pack
Support explicit register sets for vinsert and vpush
Fix disassembly for vpush and vinsert
Support explicit register sets for vpop, vat, and vlen
Support explicit register sets for not
Support explicit register sets for move, copy, swap, and ptr
Support explicit register sets for isnull
Remove tmpri and tmpro instructions, remove temporary register
Update Changelog
Support explicit register sets for capture, capturecopy, and capturemove
Support explicit register sets for closure and function
Support explicit register sets for fcall
Remove code duplication
Merge branch 'devel' of github.com:marekjm/viuavm into devel
Support explicit register sets for call
Support explicit register sets for process
Colorise error messages from disassembler and kernel
Send error messages to standard error stream
Fix disassembly of call and process
Fix size of __entry when main/2 is used as main function
Check correctness of disassembly process
Code reorganisation
Support explicit register sets for and, and or
Fix disassembly of and, and or
Support explicit register sets for self
Remove stale, misleading comment
Support explicit register sets for join
Refactoring exploit the fact that position of each operand is known
Support explicit register sets for send and receive
Remove duplicated code
Support explicit register sets for throw and draw
Support explicit register sets for class, derive, attach, register, new,
msg
Support explicit register sets for param, pamv, arg
Support explicit register sets for argc
Support explicit register sets for insert, remove
Remove unused function
Update Changelog
Add support for explicitly writing to/reading from global register set
Simple test for explicit register sets
Another test for explcit register sets
Version bump, closes #169
Add missing copyright and license headers
Update copyright notices of files modified in 2017
First working stack-related commit
Move exception handling to stack
Move call frames to stack
Move exception frames to stack
More process return value to stack
Move jump base, instruction pointer, and instruction counter to stack
Remove instruction counter
Wrap access to frames with member functions
Create type alias for stack size
Make frames vector private
Use only Stack for unwinding, not Process
Remove unused code
Make more Stack state private
Deduplicate code
Move frame pushing and preparation to Stack
Fix a typo
If no processes are active make scheduler go to sleep
Assemble call instruction for function objects
Function objects can be called using call instruction
Replace "fcall" with "call" in all places
Backend for tailcalls from function objects
Backend for processes from function objects
Assemble tailcalls of function objects
Different serialisation for stack trace dumps
Add test helper function for JSON stack traces
Add test for tailcall of function objects
Allow checking if maybe_unique_ptr owns the pointer
Fix reset pointer to null after it is deleted
Minor refactoring: remove useless function calls
Fix the offset is constant
Fix do not crash when the frame did not own its registers
Method for checking if closures are empty
Reset maybe_unique_ptr from std::unique_ptr
Allow closures to release their register set
Allow tailcalls to closures
Allow dynamic dispatch calls using function objects
Test for dynamic dispatch from function objects
Increate per-burst cycles allocated to processes to 512
FIXME
Experiments
Merge branch 'devel' of github.com:marekjm/viuavm into devel
Remove unimplemented opcode from bytecode definition
Use -- style comments in disassembler output
Add two new reserved words
Merge branch 'devel' of github.com:marekjm/viuavm into devel
Merge branch 'devel' into text-and-utf8
Add FIXME
Fix prevent pointers from being dereferenced from "other" processes
Remove useless code
Docs
Fix build
Fix
Fix prevent Pointer::authenticate() from marking invalid pointers as safe
Merge branch 'devel' into text-and-utf8
Refactoring
Remove useless variable
Throw std::domain_error() on invalid UTF8
Merge branch 'devel' into text-and-utf8
Merge branch 'text-and-utf8' of github.com:marekjm/viuavm into
text-and-utf8
Remove unused constant
Add TEXT instruction to bytecode definition
Add declarations required for TEXT opcode
Adjust docs for String type
Add backend for emitting TEXT opcodes
Fix throw errors when assembler is unable to calculate size of an
instruction
Make assembler frontend recognise TEXT instruction
Add Text type
Update Makefile for TEXT instruction
Dispatch TEXT opcodes
Text values are printable
Fix correctly skip over the floating point token
Add missing tokens to skip-over logic
Remove duplicated code
Standardise TEXT instruction
Copy STRSTORE tests for TEXT
Add missing implementation file
Move to GCC 6 and C++14
Replace mentions of C++11 with C++14
Hotifx for Travis CI
Update Clang for Travis
Maybe
Another small fix for Travis
OK
Fix missing hyphen
Add equality comparison to Text type
Add TEXTEQ opcode to bytecode definition
Add headers for TEXTEQ
Add bytecode emitting and disassembly for TEXTEQ
Support TEXTEQ in assembler backend
Support TEXTEQ in assembler frontend
Implement TEXTEQ instruction
Fix pessimising move
Make Clang happy
More tests
Maybe Coverity will run this time
Maybe fix?
Add new text instructions to bytecode definition
Version bump
Fix kernel frontend option parsing
Add More text-related instructions
Add stubs for text-related opcodes implementation
Add documentation for text instructions
Add disassembly of text instructions
Emit bytecode for text instructions
Add program generator functions for text instructions
Calculate sizes of text instructions
First shot at static analysis of text instructions
Assembler frontend for text instructions
Implement TEXTAT instruction
Add missing frontend for TEXTLENGTH
Implement TEXTLENGTH instruction
Merge branch 'text-and-utf8' of github.com:marekjm/viuavm into
text-and-utf8
Implement textsub instruction
Implement textconcat instruction
Implement textcommonprefix/suffix instructions
Fix implicit type conversions that Clang was complaining about
Remove textview instruction
Remove Coverity stuff from devel branch
Nicer printing of PIDs and Processes
Merge branch 'text-and-utf8' into devel
Fix test failure (process stringification is not always the same)
Fix an embarassing bug
Add Mailbox class to represent process mailboxes
Fix vector element access
Use text instead of strstore in READMEs
Update README
Another small change to README
Slightly better exception messages
VPOP uses indexes from registers
Two more tests for VPOP
Remove old, incorrect comment
Fix __entry function generation
Remove .main: assembler directive
Additional documentation
Implement basic tracing
VPOP uses indexes from registers
Two more tests for VPOP
Fix __entry function generation
Add tailcall function names to trace
Add requested index and vector size to out-of-bounds error message
Fix add missing fetch-specifiers to operands
Rewrite stdlib vector module to use vat instead of vpop-vinsert combo
Simplify code
Fix add missing fetch-specifiers and make them required
VAT and VPOP instructions fetch indexes from registers instead of using
immediate values
Merge branch
'issue/171/refactor-vector-instructions-to-fetch-indexes-from-registers' of
github.com:marekjm/viuavm into
issue/171/refactor-vector-instructions-to-fetch-indexes-from-registers
Add new FIXME entries
Update Changelog
Merge branch
'issue/171/refactor-vector-instructions-to-fetch-indexes-from-registers' into
devel
Remove unneeded files
Remove code implementing ".main:" directive
Add struct opcodes to bytecode definition
Implement "struct" instruction
Add missing files
Add missing file
Implemenet "structinsert" instruction
Allow using different quoting characters in str::enquote()
Implement "structkeys" instruction
Use correct type for loop counter
Make Clang happy
Dispatch "link" instructions to "import" implementation
Remove "link" instruction, use only "import"
Rename ".link:" to ".import:"
Update Changelog
Implement "structremove" instruction
Fix disassembly of "structinsert"
Tests for struct instructions
Merge branch 'issue/172/add-structs-as-generic-key-value-containers' into
devel
Fixes #172
Add ATOM and ATOMEQ opcodes to bytecode definition
Implement "atom" and "atomeq" instructions
Require struct keys to be Atom values
Add missing files
Thanks Clang
Tests for atoms
Abstract fetching a value and checking its type into a template
Make Atom type compatible with fetch_object_of<>() function
Employ fetch_object_of<>() function in "atomeq" implementation
Add test for comparing atoms with different types
Closes #173
Fix invalid cast
Cleanup
Add Boolean type implementation file
Add generic type names to types
Implement more type checks
Version bump
Update copyright notices
Make Boolean a type distinct from numerics
Simplified casts for numbers
Add arithmetic operators to Integer and Float types
Rewrite arithmetic instructions
Add underlying_type to Float (similar to what Integer has)
Use fixed-size integers for String indexing
Use inderlying_type for casts (do not needlessly repeat information)
Simplify numeric types' code
Update copyright notices
Implement comparison operators for Integer and Float
Simplify implementation of comparison instructions
Further simplify arithmetic-logic code, reduce code duplication
Remove return type specifiers from arithmetic and logic instructions
Update Changelog
Merge branch 'issue/8f249243/simplify-arithmetic-ops' into devel
Remove some uses of fetch_object2
Remove commented code
Fix fetch_object() correctly dereferences references
Better type checking in arithmetic instructions
Remove unused code
Add missing file
Move code of Stack class out of Process implementation file
Prefix strstore and text instructions string operands with operand type
Make text accept two kinds of operands: literals and register operands
Only one set of Clang flags
Enable ThreadSanitizer for Clang builds
Fix make "finished" process state flag
Add Mailbox::size() function
Simplify code by using fetch_object_of<>()
Fix prevent data-race between destructor and fetching return value
Prepare headers for processes' return-value channel
Preparation work for moving process joining into kernel
Further preparations
Fix record return value instead of exception
Fix and FIXME a process should not return twice
Create return value slots for processes that are not disowned
Record return values of stopped processes
Fix add missing functions
Fix uninitialised pointer
New process return value passing, and process joining logic almost works
Do not record return value if there is no slot, or it was already recorded
Fix detaching processes removes their return value slot making them
unjoinable
Move joinability checking to kernel
Fix some races by saving PIDs
Version bump
Improve readability by naming values
Use std::to_string() for number conversions
Fix add compiler flags for Clang 3.9 (for TravisCI)
Rewrite samples not to use removed features
Process values always evaluate to false
Fix expected output
Remove deprecated features
Update Changelog
Add missing copyright note
Update sample code to new way of detaching processes
Rename core value from Type to Value
Rename header and implementation file to match type name
Move implementations to implementation files
Merge branch 'devel' into
issue/174/30cf2fb8/fix-warnings-raised-by-threadsanitizer
Merge thread-hardened code into main branch
Disable TSan on devel
Fix compiler names for TracisCI
Remove string functions obsoleted by text instruction
Ready for multiple stacks
Add "defer" opcode to bytecode definition
Disassemble "defer" instructions
Stub implementation of "defer"
Emit "defer" bytecode
Add static analysis of "defer" instructions
Calculate size of "defer" instructions
Dispatch "defer" instructions
Assemble "defer" instructions
Store deferred calls somewhere until the frame is popped
Maintain a stack of stacks
Allow deferred calls to foreign functions
Store deferred frames when "defer" instruction is executed
Turn deferred frames into stacks and save them on frame pop
One initialiser per line
Include stack ID in trace lines
Include names of deferred functions in trace lines
Run deferred functions on normal returns
Basic tests for deferred calls
Test nested deferred calls
Update Changelog
Stacks point to their parent processes
Merge branch 'issue/3d831201/multiple-stacks-in-a-process' of
github.com:marekjm/viuavm into issue/3d831201/multiple-stacks-in-a-process
Add pointer to documentation in README
Add link to Rosetta code for Viua
Move deferred-frame registration to a different function
Merge branch 'issue/3d831201/multiple-stacks-in-a-process' into devel
Update copyright notice
Prevent potential segfaults
Run deferred calls during "tailcall"
Test running defered calls during "tailcall"
Version bump
Allow conditionally pushing current stack during defer-registration
Run deferred functions during stack unwinding
Fix move pop out of the loop
Note to self: do not code when tired
Print stack traces to stderr
Test for deferred calls invocations and stack unwinding on unacught
exceptions
One more test for static analyser
Run deferred calls after stack has been unwound for caught exceptions
Compile C++14 with Clang on TravisCI
Readability
Temporarily switch back to C++14 (just for you, TravisCI)
Test invoking deferred calls during stack unwinding with caught exceptions
Readbility
Run deferred calls before their frame is dropped
Set stack state back to RUNNING after "return" finishes executing
Fix returns from register sets other than local
Move code to a separate function
Invoke deferred calls before frame is popped during "tailcall"
Fix a memory leak in assembler
Fix "pessimizing-move" Clang error
Error when there is no dot before "end" token
Fix a memory leak in assembler
Fix "pessimizing-move" Clang error
Error when there is no dot before "end" token
Add information about weekly.viuavm.org to README
Tell what file was assembled for failing test
Move trace line generation into compilation unit of Process::dispatch()
Error on unmatched parenthesis and bracket
Merge branch 'devel' into deferred-calls-and-stack-unwinding
Less frequently changing values to the left
Rename "bytecode_base" to "jump_base" in trace lines
Include name of the returned-from function in trace lines for "return"
Push deferred calls in reverse order during stack unwinding
Two new tests for invoking deferreds during stack unwinding
Refactor deferred call stack registration
Remove duplicated stack-registering code
Include frame address, and stack depth in trace lines
Annotate trace lines of "return" with before- and after-deferred status
Fix incorrect unwinding of non-main stacks
Change types to better reflect the responsibility of a function
Add more consts
Fix a typo
Pointers never have nullptr as their associated process
Better trace line for "return" instructions
Remove useless cout
Better comment
More comments
State for stacks suspended by executing deferred calls during stack
unwinding
Move caught exception before unwinding
Do not print duplicated trace lines
Second time the exception is already caught
Run deferred calls before the stack is unwound after an exception is
caught
Halting is done by setting a state
Test that deferred calls are invoked before their frames are popped
Make testing under Valgrind less painful
Enforce a consistent style using clang-format
OK, quick fix for clang-format
Add "using" to make code more readable
Merge pull request #176 from vktgz/devel
Update boilerplate-generator to include email
Add directory for Rosetta Code solutions
A short clarification
Update Harald's '99 Bottles' to new Viua
Remove duplicated sample
Move Harald's example to better place
Remove duplicated example
Add 99 bottles for Rosetta
Add CONTRIBUTING guidelines
Point to CONTRIBUTING from README
Where to report issues
Suggested contributions
Change next version to 0.9.0
Updated Changelog
Release 0.9.0
vktgz (1):
modulo function example
-----------------------------------------------------------------------
hooks/post-receive
--
Viua VM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Viuavm-commits] [SCM] Viua VM annotated tag v0.9.0 created. v0.9.0,
git <=