diff options
author | Erlang/OTP <otp@erlang.org> | 2010-05-12 04:04:59 +0000 |
---|---|---|
committer | Erlang/OTP <otp@erlang.org> | 2010-05-12 04:04:59 +0000 |
commit | dd908223cbf62adfeaefac982c4087cd35bb1805 (patch) | |
tree | ce35140043845c72d0f1196f0a9a13dcef278286 /bootstrap/lib/compiler | |
parent | 3bcc56eb8f6034d73cbc6d1903785a278feae163 (diff) | |
parent | 84f65232d00de87042b11b07db4dad30cc7e1fa4 (diff) | |
download | otp-dd908223cbf62adfeaefac982c4087cd35bb1805.tar.gz otp-dd908223cbf62adfeaefac982c4087cd35bb1805.tar.bz2 otp-dd908223cbf62adfeaefac982c4087cd35bb1805.zip |
Merge branch 'bg/opt-receive' into dev
* bg/opt-receive:
Test that gen_server:call/2,3 are fast even with a huge message queue
erts: Add tests for the receive optimization
Update primary bootstrap
erts: Implement recv_mark/1 and recv_set/1 for real
compiler tests: Cover the error handling code in beam_receive
compiler test: Test optimization of receive statements
Optimize selective receives in the presence of a large message queue
Introduce the new recv_mark/1 and recv_mark/1 instructions
Compile tests that communicate with R12 nodes with the r12 option
Move p_run/2 to test_lib
gen: Inline wait_resp_mon/2 to help the compiler optimize
OTP-8623 bg/opt-receive
reveive statements that can only read out a newly created reference are now
specially optimized so that it will execute in constant time regardless of
the number of messages in the receive queue for the process. That
optimization will benefit calls to gen_server:call(). (See gen:do_call/4
for an example of a receive statement that will be optimized.)
Diffstat (limited to 'bootstrap/lib/compiler')
-rw-r--r-- | bootstrap/lib/compiler/ebin/beam_disasm.beam | bin | 23216 -> 23300 bytes | |||
-rw-r--r-- | bootstrap/lib/compiler/ebin/beam_opcodes.beam | bin | 6652 -> 6748 bytes | |||
-rw-r--r-- | bootstrap/lib/compiler/ebin/beam_receive.beam | bin | 0 -> 5388 bytes | |||
-rw-r--r-- | bootstrap/lib/compiler/ebin/beam_validator.beam | bin | 31480 -> 31536 bytes | |||
-rw-r--r-- | bootstrap/lib/compiler/ebin/compile.beam | bin | 31748 -> 31804 bytes | |||
-rw-r--r-- | bootstrap/lib/compiler/ebin/compiler.app | 1 | ||||
-rw-r--r-- | bootstrap/lib/compiler/egen/beam_opcodes.erl | 8 | ||||
-rw-r--r-- | bootstrap/lib/compiler/egen/core_parse.erl | 4 |
8 files changed, 9 insertions, 4 deletions
diff --git a/bootstrap/lib/compiler/ebin/beam_disasm.beam b/bootstrap/lib/compiler/ebin/beam_disasm.beam Binary files differindex c1fe43b398..b58b44c68c 100644 --- a/bootstrap/lib/compiler/ebin/beam_disasm.beam +++ b/bootstrap/lib/compiler/ebin/beam_disasm.beam diff --git a/bootstrap/lib/compiler/ebin/beam_opcodes.beam b/bootstrap/lib/compiler/ebin/beam_opcodes.beam Binary files differindex 34327c700e..8c5378e05e 100644 --- a/bootstrap/lib/compiler/ebin/beam_opcodes.beam +++ b/bootstrap/lib/compiler/ebin/beam_opcodes.beam diff --git a/bootstrap/lib/compiler/ebin/beam_receive.beam b/bootstrap/lib/compiler/ebin/beam_receive.beam Binary files differnew file mode 100644 index 0000000000..ef7afd8113 --- /dev/null +++ b/bootstrap/lib/compiler/ebin/beam_receive.beam diff --git a/bootstrap/lib/compiler/ebin/beam_validator.beam b/bootstrap/lib/compiler/ebin/beam_validator.beam Binary files differindex 2edf5f226e..e04c9efa69 100644 --- a/bootstrap/lib/compiler/ebin/beam_validator.beam +++ b/bootstrap/lib/compiler/ebin/beam_validator.beam diff --git a/bootstrap/lib/compiler/ebin/compile.beam b/bootstrap/lib/compiler/ebin/compile.beam Binary files differindex f989cdc1df..3d44822af6 100644 --- a/bootstrap/lib/compiler/ebin/compile.beam +++ b/bootstrap/lib/compiler/ebin/compile.beam diff --git a/bootstrap/lib/compiler/ebin/compiler.app b/bootstrap/lib/compiler/ebin/compiler.app index 497d1873d8..ed0dd7c30e 100644 --- a/bootstrap/lib/compiler/ebin/compiler.app +++ b/bootstrap/lib/compiler/ebin/compiler.app @@ -33,6 +33,7 @@ beam_listing, beam_opcodes, beam_peep, + beam_receive, beam_trim, beam_type, beam_utils, diff --git a/bootstrap/lib/compiler/egen/beam_opcodes.erl b/bootstrap/lib/compiler/egen/beam_opcodes.erl index 83cdaa4d48..05587800b4 100644 --- a/bootstrap/lib/compiler/egen/beam_opcodes.erl +++ b/bootstrap/lib/compiler/egen/beam_opcodes.erl @@ -8,7 +8,7 @@ -spec format_number() -> 0. format_number() -> 0. --spec opcode(atom(), 0..8) -> 1..149. +-spec opcode(atom(), 0..8) -> 1..151. opcode(label, 1) -> 1; opcode(func_info, 3) -> 2; opcode(int_code_end, 0) -> 3; @@ -158,9 +158,11 @@ opcode(bs_utf16_size, 3) -> 146; opcode(bs_put_utf16, 3) -> 147; opcode(bs_put_utf32, 3) -> 148; opcode(on_load, 0) -> 149; +opcode(recv_mark, 1) -> 150; +opcode(recv_set, 1) -> 151; opcode(Name, Arity) -> erlang:error(badarg, [Name,Arity]). --spec opname(1..149) -> {atom(),0..8}. +-spec opname(1..151) -> {atom(),0..8}. opname(1) -> {label,1}; opname(2) -> {func_info,3}; opname(3) -> {int_code_end,0}; @@ -310,4 +312,6 @@ opname(146) -> {bs_utf16_size,3}; opname(147) -> {bs_put_utf16,3}; opname(148) -> {bs_put_utf32,3}; opname(149) -> {on_load,0}; +opname(150) -> {recv_mark,1}; +opname(151) -> {recv_set,1}; opname(Number) -> erlang:error(badarg, [Number]). diff --git a/bootstrap/lib/compiler/egen/core_parse.erl b/bootstrap/lib/compiler/egen/core_parse.erl index 05624beb14..093ab4d1a3 100644 --- a/bootstrap/lib/compiler/egen/core_parse.erl +++ b/bootstrap/lib/compiler/egen/core_parse.erl @@ -13,7 +13,7 @@ tok_val(T) -> element(3, T). tok_line(T) -> element(2, T). --file("/usr/local/otp/releases/sles10_32_R13B04_patched/lib/parsetools-2.0.2/include/yeccpre.hrl", 0). +-file("/usr/local/lib/erlang/lib/parsetools-2.0.2/include/yeccpre.hrl", 0). %% %% %CopyrightBegin% %% @@ -194,7 +194,7 @@ yecctoken2string(Other) -> --file("/clearcase/otp/erts/bootstrap/lib/compiler/egen/core_parse.erl", 197). +-file("/Users/bjorng/Downloads/otp/bootstrap/lib/compiler/egen/core_parse.erl", 197). yeccpars2(0=S, Cat, Ss, Stack, T, Ts, Tzr) -> yeccpars2_0(S, Cat, Ss, Stack, T, Ts, Tzr); |