aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-09-03Introduce a put_tuple2 instructionBjörn Gustavsson
Sometimes when building a tuple, there is no way to avoid an extra `move` instruction. Consider this code: make_tuple(A) -> {ok,A}. The corresponding BEAM code looks like this: {test_heap,3,1}. {put_tuple,2,{x,1}}. {put,{atom,ok}}. {put,{x,0}}. {move,{x,1},{x,0}}. return. To avoid overwriting the source register `{x,0}`, a `move` instruction is necessary. The problem doesn't exist when building a list: %% build_list(A) -> [A]. {test_heap,2,1}. {put_list,{x,0},nil,{x,0}}. return. Introduce a new `put_tuple2` instruction that builds a tuple in a single instruction, so that the `move` instruction can be eliminated: %% make_tuple(A) -> {ok,A}. {test_heap,3,1}. {put_tuple2,{x,0},{list,[{atom,ok},{x,0}]}}. return. Note that the BEAM loader already combines `put_tuple` and `put` instructions into an internal instruction similar to `put_tuple2`. Therefore the introduction of the new instruction will not speed up execution of tuple building itself, but it will be less work for the loader to load the new instruction.
2018-09-03Merge branch 'maint'Björn Gustavsson
* maint: ops.tab: Fix potentially unsafe optimization of raise/2
2018-09-03ops.tab: Fix potentially unsafe optimization of raise/2Björn Gustavsson
The operands for the raise/2 instruction are almost always in x(2) and x(1). Therefore the loader translates the raise/2 instruction to an i_raise/0 instruction which uses the values in x(2) and x(1). If the operands happens to be in other registers, the loader inserts move/2 instruction to move them to x(2) and x(1). The problem is that x(3) is used as a temporary register when generating the move/2 instructions. That is unsafe if the Value operand for raise/2 is x(3). Thus: raise x(0) x(3) will be translated to: move x(0) x(3) move x(3) x(1) move x(3) x(2) i_raise The Trace will be written to both x(2) and x(1). The current compiler will never use x(3) for the Value operand, so there is no need to patch previous releases. But a future compiler version might allocate registers differently.
2018-08-30Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers Fix missing 'in' trace events during 'running' trace
2018-08-30Merge branch 'maint-21' into maintRickard Green
* maint-21: Updated OTP version Update release notes Update version numbers Fix missing 'in' trace events during 'running' trace
2018-08-29Update release notesErlang/OTP
2018-08-29Update version numbersErlang/OTP
2018-08-29Merge branch 'rickard/running-trace-fix/ERL-713/OTP-15269' into maint-21Erlang/OTP
* rickard/running-trace-fix/ERL-713/OTP-15269: Fix missing 'in' trace events during 'running' trace
2018-08-28Merge branch 'rickard/crypto-configure/OTP-15129'Rickard Green
* rickard/crypto-configure/OTP-15129: Fix crypto configure on Darwin
2018-08-27Fix missing 'in' trace events during 'running' traceRickard Green
'in' trace events could be lost when a process had to be rescheduled on another scheduler type (normal <-> dirty).
2018-08-27Fix crypto configure on DarwinRickard Green
2018-08-24Merge branch 'bjorn/compiler/ssa'Björn Gustavsson
* bjorn/compiler/ssa: Travis CI: Run the SSA linter in the Linux64SmokeTest build Remove retired compiler passes Introduce a new SSA-based intermediate format hipe_beam_to_icode: Correct translation of get_map_elements beam_dead: Remove shortcut of binary matching instruction beam_bs: Remove optimizations that are easier done on SSA format Don't run unsafe compiler passes Simplify optimizations by introducing is_nil late beam_utils: Make is_tagged_tuple a pure test beam_except: Enhance recognition of function_clause exceptions beam_validator: Infer the types of copies in a smarter way beam_validator: Improve merge of cons and literal list beam_validator: Strengthen validation of func_info beam_validator: Allow get_tuple_element before dsetelement beam_validator: Don't transfer state to labels that can't be reached beam_validator: Improve type analysis for tuples beam_validator: Be more careful when updating try/catch state beam_trim: Handle an empty list of instructions v3_core: Number argument variables in ascending order Teach binary instructions to use Y registers as destination OTP-14894
2018-08-23Merge pull request #1932 from josevalim/jv-sb-bm/OTP-15238Lukas Larsson
Do not allocate good and bad shifts for single byte lookups
2018-08-21Merge branch 'rickard/crypto-configure/OTP-15129'Rickard Green
* rickard/crypto-configure/OTP-15129: Move configuration of crypto to crypto application from erts
2018-08-21Merge branch 'rickard/parallel-configure/OTP-14625'Rickard Green
* rickard/parallel-configure/OTP-14625: Parallel configure Remove undocumented and unused lazy configure
2018-08-21Move configuration of crypto to crypto application from ertsRickard Green
In order to be able to handle runtime library path in crypto also DED parts was broken out into a macro.
2018-08-21Parallel configureRickard Green
2018-08-21Merge branch 'max-au/dist_msg_too_long'Rickard Green
* max-au/dist_msg_too_long: Cleanup unused dist output buf immediately instead of at GC Throw 'system_limit' when distribution message size exceed INT_MAX instead of crashing emulator with 'Absurdly large distribution data buffer'
2018-08-21Cleanup unused dist output buf immediately instead of at GCRickard Green
2018-08-21Merge branch 'maint'Rickard Green
* maint: Fix incoming suspend monitor down
2018-08-21Merge branch 'rickard/fix-suspend-monitor-down/OTP-15237/ERL-704' into maintRickard Green
* rickard/fix-suspend-monitor-down/OTP-15237/ERL-704: Fix incoming suspend monitor down
2018-08-20Merge branch 'maint'Rickard Green
* maint: erts/time_correction.xml: remove extra closing parenthesis use ssl:handshake/1 function
2018-08-20Fix incoming suspend monitor downRickard Green
An incoming suspend monitor down wasn't handled correct when the local monitor half had been removed with an emulator crash as result.
2018-08-17Teach binary instructions to use Y registers as destinationBjörn Gustavsson
The new code generator will use Y registers as a destination for binary construction and matching instructions. v3_codegen would always first store terms in an X register and it would be the responsibility of the optimization passes to optimize the extra moves.
2018-08-16erts/time_correction.xml: remove extra closing parenthesisMariano Guerra
2018-08-16Do not allocate good and bad shifts for single byte lookupsJosé Valim
The single byte lookups always rely on `memchr` and never really use the good and bad shifts arrays.
2018-08-16Merge branch 'josevalim/jv-sb/PR-1803/OTP-15238' into masterLukas Larsson
Optimize binary match from 10% up to 70x
2018-08-15Merge branch 'maint'Björn Gustavsson
* maint: Fix compiler crash when compiling double receives erts: Delete fd from poll-set when closing fd_driver port
2018-08-15merge branch 'lukas/erts/fd_driver-fix_pollset_delete/ERL-692/OTP-15236' ↵Lukas Larsson
into maint erts: Delete fd from poll-set when closing fd_driver port
2018-08-11Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers
2018-08-11Merge branch 'maint-21' into maintRickard Green
* maint-21: Updated OTP version Update release notes Update version numbers
2018-08-11Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers syntax_tools: Fix a bug regarding reverting map types.
2018-08-11Merge branch 'maint-19' into maintRickard Green
* maint-19: Updated OTP version Update release notes Update version numbers syntax_tools: Fix a bug regarding reverting map types.
2018-08-10Update release notesErlang/OTP
2018-08-10Update version numbersErlang/OTP
2018-08-10Merge branch 'rickard/full-cache-nif-env/OTP-15223/ERL-695' into maint-21Erlang/OTP
* rickard/full-cache-nif-env/OTP-15223/ERL-695: Fix caching of NIF environment when executing dirty # Conflicts: # erts/emulator/beam/erl_nif.c
2018-08-10Merge branch 'dotsimon/ref_ordering_bug/OTP-15225' into maint-21Erlang/OTP
* dotsimon/ref_ordering_bug/OTP-15225: Fixed #Ref ordering bug Test #Ref ordering in lists and ets
2018-08-10Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers crypto: Fix crash in compute_key(ecdh, ...) on badarg Relax add_table_copy restriction Fixed #Ref ordering bug Test #Ref ordering in lists and ets Do NOT disc_load from ram_copies when master_node is set ssl: Make sure that a correct cipher suite is selected ssl: Correct handling of empty server SNI extension
2018-08-10Merge branch 'maint-20' into maintRickard Green
* maint-20: Updated OTP version Update release notes Update version numbers crypto: Fix crash in compute_key(ecdh, ...) on badarg Relax add_table_copy restriction Fixed #Ref ordering bug Test #Ref ordering in lists and ets Do NOT disc_load from ram_copies when master_node is set ssl: Make sure that a correct cipher suite is selected ssl: Correct handling of empty server SNI extension
2018-08-10erts: Delete fd from poll-set when closing fd_driver portLukas Larsson
2018-08-09Update release notesErlang/OTP
2018-08-09Update version numbersErlang/OTP
2018-08-09Merge branch 'dotsimon/ref_ordering_bug/OTP-15225' into maint-20Erlang/OTP
* dotsimon/ref_ordering_bug/OTP-15225: Fixed #Ref ordering bug Test #Ref ordering in lists and ets
2018-08-09Merge branch 'rickard/full-cache-nif-env/OTP-15223/ERL-695' into maint-20Erlang/OTP
* rickard/full-cache-nif-env/OTP-15223/ERL-695: Fix caching of NIF environment when executing dirty
2018-08-09Merge branch 'maint'Rickard Green
* maint: Fix caching of NIF environment when executing dirty
2018-08-09Merge branch 'rickard/full-cache-nif-env/OTP-15223/ERL-695' into maintRickard Green
* rickard/full-cache-nif-env/OTP-15223/ERL-695: Fix caching of NIF environment when executing dirty
2018-08-09Update release notesErlang/OTP
2018-08-09Update version numbersErlang/OTP
2018-08-09Merge branch 'john/erts/inet-drv-race/OTP-15158/ERL-654' into maint-19Erlang/OTP
* john/erts/inet-drv-race/OTP-15158/ERL-654: Fix a race condition when generating async operation ids
2018-08-09Merge branch 'dotsimon/ref_ordering_bug/OTP-15225' into maint-19Erlang/OTP
* dotsimon/ref_ordering_bug/OTP-15225: Fixed #Ref ordering bug Test #Ref ordering in lists and ets