[m-rev.] for review: Add constant structure support to Java backend
Paul Bone
paul at bone.id.au
Fri Jan 31 17:10:31 AEDT 2014
On Fri, Jan 31, 2014 at 04:35:36PM +1100, Julien Fischer wrote:
>
> Hi Paul,
>
> On Wed, 29 Jan 2014, Paul Bone wrote:
>
>> diff --git a/compiler/const_struct.m b/compiler/const_struct.m
>> index a9def75..812ad15 100644
>> --- a/compiler/const_struct.m
>> +++ b/compiler/const_struct.m
>> @@ -1,7 +1,7 @@
>> - ; Target = target_java
>> ; Target = target_x86_64
>> ; Target = target_erlang
>> ),
>> @@ -186,6 +167,38 @@ const_struct_db_init(Globals, Db) :-
>> Db = const_struct_db(PolyEnabled, GroundTermEnabled, 0,
>> map.init, map.init, map.init, map.init).
>>
>> + % Test if constant structures are enabled for polymorphism structures
>> + % and from ground term contexts. The latter is only enabled if tracing
>
> s/from ground term/from_ground_term/
>
>> + % does not require procedure bodies to be preserved. The caller must
>> + % also check if the compilation grade supports constant structures.
>
> Is there a good reaons why this predicate does not check that itself?
This is a new predicate that's only called from the predicate above.
However it's useful to make a new predicate because it is called twice. So
the checking of grade support is done above, then this predicate does the
other checking.
Everything else that you identified is trivial.
> That looks okay otherwise.
Okay thanks.
--
Paul Bone
http://www.bone.id.au
More information about the reviews
mailing list