[m-rev.] diff: split scalar init code in java
Peter Wang
novalazy at gmail.com
Tue Jan 25 14:40:17 AEDT 2011
On 2011-01-24, Peter Wang <novalazy at gmail.com> wrote:
> Branches: main, 11.01
>
> compiler/mlds_to_java.m:
> Divide the generated Java code to initialise scalar data into small
> methods to avoid running into the maximum method size limit.
Branches: main, 11.01
compiler/mlds_to_java.m:
Make `MR_init_scalars' methods private.
diff --git a/compiler/mlds_to_java.m b/compiler/mlds_to_java.m
index 907874f..3004247 100644
--- a/compiler/mlds_to_java.m
+++ b/compiler/mlds_to_java.m
@@ -2685,7 +2685,8 @@ add_scalar_deps_rval_const(FromScalar, RvalConst, !Graph) :-
output_scalar_init_method(Info, Indent, Map, Scalars,
ChunkNum, ChunkNum + 1, !IO) :-
indent_line(Indent, !IO),
- io.format("static void MR_init_scalars_%d() {\n", [i(ChunkNum)], !IO),
+ io.format("private static void MR_init_scalars_%d() {\n",
+ [i(ChunkNum)], !IO),
list.foldl(output_scalar_init(Info, Indent + 1, Map), Scalars, !IO),
indent_line(Indent, !IO),
io.write_string("}\n", !IO).
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list