diff options
author | Björn Gustavsson <[email protected]> | 2010-09-29 12:16:56 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-01-17 15:23:38 +0100 |
commit | ec325cc785916c6a4991fe2e03747a97b7e1ae75 (patch) | |
tree | f6edcc29d40637dfa270b6bf5b4e7c97fc0ce1cc /erts/emulator/utils | |
parent | 7738e604909c52ebac606eed5f6314291747e938 (diff) | |
download | otp-ec325cc785916c6a4991fe2e03747a97b7e1ae75.tar.gz otp-ec325cc785916c6a4991fe2e03747a97b7e1ae75.tar.bz2 otp-ec325cc785916c6a4991fe2e03747a97b7e1ae75.zip |
BEAM loader: Combine is_type/1 and is_eq/1 instructions
In the transformation engine in the loader, an is_eq/1 instruction
is currently always preceded by an is_type/1 instruction. Therefore,
save a word and slight amount of time by combining those
instructions into an is_type_eq/2 instruction.
Diffstat (limited to 'erts/emulator/utils')
-rwxr-xr-x | erts/emulator/utils/beam_makeops | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/utils/beam_makeops b/erts/emulator/utils/beam_makeops index 8a5b8047eb..cb91517f04 100755 --- a/erts/emulator/utils/beam_makeops +++ b/erts/emulator/utils/beam_makeops @@ -1315,7 +1315,13 @@ sub tr_gen_from { $types .= "$_ "; $type_mask |= $type_bit{$_}; } - push(@code, &make_op($types, 'is_type', $type_mask)); + if ($cond ne 'is_eq') { + push(@code, &make_op($types, 'is_type', $type_mask)); + } else { + $cond = ''; + push(@code, &make_op($types, 'is_type_eq', + $type_mask, $val)); + } } } |