aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_disasm.hrl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2016-05-27 11:55:12 +0200
committerKostis Sagonas <[email protected]>2016-05-27 11:55:12 +0200
commitd6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7 (patch)
treea1dacdd69d192e8a4a59d4a50e1ba5adcc74bccf /lib/compiler/src/beam_disasm.hrl
parent8b5f6835560195b1506ecefcc90f653d5bc14635 (diff)
downloadotp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.tar.gz
otp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.tar.bz2
otp-d6d52477cdd6efefd3d3d93f4433b2b1f4e52ce7.zip
Declare the type of function entry points
This shuts off compiler warnings and will allow to enable stronger compiler checks files that include beam_disasm.hrl in the hipe application. While doing that, also modified a comment in the header file and turned a case statement into effectively an assertion: there should not really be any beam files where functions do not have a label as entry point, right?
Diffstat (limited to 'lib/compiler/src/beam_disasm.hrl')
-rw-r--r--lib/compiler/src/beam_disasm.hrl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_disasm.hrl b/lib/compiler/src/beam_disasm.hrl
index e18214644f..d968cd9587 100644
--- a/lib/compiler/src/beam_disasm.hrl
+++ b/lib/compiler/src/beam_disasm.hrl
@@ -22,7 +22,9 @@
%% the system (e.g. in the translation from Beam to Icode).
%%
-%% XXX: THE FOLLOWING TYPE DECLARATION DOES NOT BELONG HERE...
+%% XXX: THE FOLLOWING TYPE DECLARATION DOES NOT BELONG HERE.
+%% IT SHOULD BE MOVED TO A FILE THAT DEFINES (AND EXPORTS)
+%% PROPER TYPES FOR THE SET OF BEAM INSTRUCTIONS.
%%
-type beam_instr() :: 'bs_init_writable' | 'fclearerror' | 'if_end'
| 'remove_message' | 'return' | 'send' | 'timeout'
@@ -34,7 +36,7 @@
-record(function, {name :: atom(),
arity :: byte(),
- entry, %% unused ??
+ entry :: beam_lib:label(), %% unnecessary ?
code = [] :: [beam_instr()]}).
-record(beam_file, {module :: module(),