aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_validator.erl
AgeCommit message (Collapse)Author
2014-02-21Merge branch 'egil/compiler/maps-get_map_elements'Björn-Egil Dahlberg
* egil/compiler/maps-get_map_elements: compiler: Strengthen Maps compile tests compiler: Remove dead warning erts: Fix erts_debug:disassemble/1 compiler: Transform list of Args to exact literal type compiler: Test Maps aliasing compiler: Use aliasing in map pair patterns compiler: Check literal order in beam_validator erts: Introduce new instructions for combined key fetches compiler: Change map instructions for fetching values
2014-02-19compiler: Check literal order in beam_validatorBjörn-Egil Dahlberg
2014-02-13compiler: Change map instructions for fetching valuesBjörn-Egil Dahlberg
* Combine multiple get values with one instruction * Combine multiple check keys with one instruction
2014-02-13Change a list comprehension to a foreach/2 callKostis Sagonas
Partly to avoid unmatched return warnings from dialyzer and in order to preserve the style of other similar-looking code in that file. While at it, fix the wording in one comment.
2014-02-05beam_validator: Validate the "fun" argument for a call_fun/1 instructionBjörn Gustavsson
The fun argument for a call_fun/1 instruction was not validated.
2014-01-28compiler: Implement different instructions for => and :=Björn Gustavsson
2014-01-28Implement support for maps in the compilerBjörn Gustavsson
To make it possible to build the entire OTP system, also define dummys for the instructions in ops.tab.
2013-11-01Typo fix ambigous -> ambiguousLeo Correa
2013-08-01Forbid returning a match context in beam_validatorAnthony Ramine
If a match context is returned from a function without being converted back to a plain old binary, the whole VM will crash.
2013-02-06beam_validator: Eliminate dialyzer warnings for unmatched returnsBjörn Gustavsson
The assert_fls/2 and assert_type/3 functions both return the Vst passed to them, but all callers ignore the return value. Given the name of the functions, they are not expected to return anything. Make it so by changing the return value to 'ok'. There are two calls to bsm_get_context/2 used only to validate that the match context is valid. Call bsm_validate_context/2 instead. In bsm_validate_context/2, explicitly match the return value of bsm_get_context/2 to '_' to make it clear that it is not used.
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Make adjustments for UnicodeHans Bolinder
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-15beam_validator: Validate the size operand in bs_init_bits and bs_init2Björn Gustavsson
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-06beam_validator: Fix type for failure label for bs_start_match2/5Björn Gustavsson
A bs_start_match2/5 instruction will never fail (take the branch) if given a match state or a binary. Therefore, the type at the failure label should be 'term', not match state or binary. Without this correction, the beam_validator will reject safe programs.
2011-08-16compiler: Generate line instructionsBjörn Gustavsson
2010-09-10Remove warnings for clashes with new autoimported BIFsPatrik Nyblom
2010-06-02Remove (harmless) warnings about min/max in core applicationsPatrik Nyblom
2010-05-20Remove stray support for the bs_bits_to_bytes2/2 instructionBjörn Gustavsson
bs_bits_to_bytes2/2 was an experimental instruction added in R11, but was removed in R12. Although the beam_disasm and beam_validator modules do support instructions in older releases, there is no reason to have them support experimental instructions.
2010-05-11Introduce the new recv_mark/1 and recv_mark/1 instructionsBjörn Gustavsson
Make the recv_mark/1 and recv_mark/1 instructions known to the compiler and run-time system. For the moment, make the loader ignore any occurrences of those instructions in BEAM files. Also update hipe_beam_to_icode to ignore those instructions.
2010-01-19Merge branch 'bg/compiler-beam_validator' into ccase/r13b04_devErlang/OTP
* bg/compiler-beam_validator: beam_validator: fix incorrect assumptions about GC guard BIFs OTP-8378 In rare circumstances when using garbaging collecting guard BIFs, the validation pass (beam_validator) would signal that the code was unsafe, when it in fact was correct. (Thanks to Kiran Khaladkar.)
2010-01-15beam_validator: fix incorrect assumptions about GC guard BIFsBjörn Gustavsson
The beam_validator pass incorrectly assumes that a GC guard BIF (such as length/1) may first do a garbage collection and then fail. That assumption is not correct (guards BIF only do garbage collection when it is known that the BIF call will succeed), and will cause the compiler to reject valid programs. Modify the beam_validator to assume that if the branch is taken for a gc_bif instruction, all registers are unchanged and no garbage collection has occurred. Also add a comment in the emulator about that assumption.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP