aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/regalloc/hipe_regalloc_loop.erl
diff options
context:
space:
mode:
authorTomas Abrahamsson <[email protected]>2011-09-15 19:38:23 +0200
committerHenrik Nord <[email protected]>2011-09-16 11:09:05 +0200
commit9c132d619bb3b88201019a39d064f2852a067fb0 (patch)
treeaab53bc942d75894ac1fd1b9ff593cbebbcdb81a /lib/hipe/regalloc/hipe_regalloc_loop.erl
parent68c96ca855821adb42a25ced5b69446ae7ccc635 (diff)
downloadotp-9c132d619bb3b88201019a39d064f2852a067fb0.tar.gz
otp-9c132d619bb3b88201019a39d064f2852a067fb0.tar.bz2
otp-9c132d619bb3b88201019a39d064f2852a067fb0.zip
Quote atoms if necessary in types
Atoms in some occurrences were not correctly quoted when formatted to strings, for instance by the typer program. Example: -module(tb). -export(['UPPERCASE-FUNCTION-NAME'/0, f1/0, f2/0, f3/0]). -record('UPPERCASE-RECORD-NAME', {x}). -record(r2, {'UPPERCASE-FIELD-NAME'}). -type 'UPPERCASE-TYPE-NAME'() :: integer(). 'UPPERCASE-FUNCTION-NAME'() -> ok. f1() -> #'UPPERCASE-RECORD-NAME'{x=1}. f2() -> #r2{'UPPERCASE-FIELD-NAME'=1}. -spec f3() -> 'UPPERCASE-TYPE-NAME'(). f3() -> 1. Given the program above, the output from typer --plt some.plt tb.erl resulted in the following specs being printed: -spec UPPERCASE-FUNCTION-NAME() -> 'ok'. -spec f1() -> #UPPERCASE-RECORD-NAME{x::1}. -spec f2() -> #r2{UPPERCASE-FIELD-NAME::1}. -spec f3() -> UPPERCASE-TYPE-NAME(). This commit changes the output to become the following: -spec 'UPPERCASE-FUNCTION-NAME'() -> 'ok'. -spec f1() -> #'UPPERCASE-RECORD-NAME'{x::1}. -spec f2() -> #r2{'UPPERCASE-FIELD-NAME'::1}. -spec f3() -> 'UPPERCASE-TYPE-NAME'().
Diffstat (limited to 'lib/hipe/regalloc/hipe_regalloc_loop.erl')
0 files changed, 0 insertions, 0 deletions