Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

compiler tests: Test the 'inline' option better

Clone some test suites and compile them with the 'inline' option
to test inlining more thorughly.
  • Loading branch information...
commit e74235df989995f5bd2b66b7102857446ff10d11 1 parent 57cb16f
@bjorng bjorng authored
View
1  .gitignore
@@ -121,6 +121,7 @@ a.out.dSYM/
/lib/compiler/test/*_no_opt_SUITE.erl
/lib/compiler/test/*_post_opt_SUITE.erl
+/lib/compiler/test/*_inline_SUITE.erl
# debugger
View
26 lib/compiler/test/Makefile
@@ -53,6 +53,21 @@ NO_OPT= \
record \
trycatch
+INLINE= \
+ andor \
+ apply \
+ bs_bincomp \
+ bs_bit_binaries \
+ bs_construct \
+ core_fold \
+ float \
+ fun \
+ match \
+ misc \
+ num_bif \
+ receive \
+ record
+
CORE_MODULES = \
bs_shadowed_size_var \
nested_call_in_case
@@ -62,6 +77,8 @@ NO_OPT_MODULES= $(NO_OPT:%=%_no_opt_SUITE)
NO_OPT_ERL_FILES= $(NO_OPT_MODULES:%=%.erl)
POST_OPT_MODULES= $(NO_OPT:%=%_post_opt_SUITE)
POST_OPT_ERL_FILES= $(POST_OPT_MODULES:%=%.erl)
+INLINE_MODULES= $(INLINE:%=%_inline_SUITE)
+INLINE_ERL_FILES= $(INLINE_MODULES:%=%.erl)
ERL_FILES= $(MODULES:%=%.erl)
@@ -90,13 +107,15 @@ EBIN = .
# Targets
# ----------------------------------------------------
-make_emakefile: $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES)
+make_emakefile: $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) $(INLINE_ERL_FILES)
$(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
> $(EMAKEFILE)
$(ERL_TOP)/make/make_emakefile +no_copt +no_postopt $(ERL_COMPILE_FLAGS) \
-o$(EBIN) $(NO_OPT_MODULES) >> $(EMAKEFILE)
$(ERL_TOP)/make/make_emakefile +no_copt $(ERL_COMPILE_FLAGS) \
-o$(EBIN) $(POST_OPT_MODULES) >> $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile +inline $(ERL_COMPILE_FLAGS) \
+ -o$(EBIN) $(INLINE_MODULES) >> $(EMAKEFILE)
tests debug opt: make_emakefile
erl $(ERL_MAKE_FLAGS) -make
@@ -118,6 +137,9 @@ docs:
%_post_opt_SUITE.erl: %_SUITE.erl
sed -e 's;-module($(basename $<));-module($(basename $@));' $< > $@
+%_inline_SUITE.erl: %_SUITE.erl
+ sed -e 's;-module($(basename $<));-module($(basename $@));' $< > $@
+
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
@@ -130,7 +152,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DATA) compiler.dynspec compiler.cover \
$(EMAKEFILE) $(ERL_FILES) $(CORE_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) \
- $(RELSYSDIR)
+ $(INLINE_ERL_FILES) $(RELSYSDIR)
chmod -f -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
View
4 lib/compiler/test/test_lib.erl
@@ -58,6 +58,7 @@ opt_opts(Mod) ->
(no_gc_bifs) -> true;
(no_stack_trimming) -> true;
(debug_info) -> true;
+ (inline) -> true;
(_) -> false
end, Opts).
@@ -68,5 +69,6 @@ opt_opts(Mod) ->
get_data_dir(Config) ->
Data0 = ?config(data_dir, Config),
{ok,Data1,_} = regexp:sub(Data0, "_no_opt_SUITE", "_SUITE"),
- {ok,Data,_} = regexp:sub(Data1, "_post_opt_SUITE", "_SUITE"),
+ {ok,Data2,_} = regexp:sub(Data1, "_post_opt_SUITE", "_SUITE"),
+ {ok,Data,_} = regexp:sub(Data2, "_inline_SUITE", "_SUITE"),
Data.
Please sign in to comment.
Something went wrong with that request. Please try again.