-- Common expansion processing for Boolean operators (And, Or, Xor) for the
-- case of array type arguments.
- procedure Expand_Non_Binary_Modular_Op (N : Node_Id);
- -- Generating C code convert non-binary modular arithmetic operations into
- -- code that relies on the frontend expansion of operator Mod. No expansion
- -- is performed if N is not a non-binary modular operand.
+ procedure Expand_Nonbinary_Modular_Op (N : Node_Id);
+ -- When generating C code, convert nonbinary modular arithmetic operations
+ -- into code that relies on the front-end expansion of operator Mod. No
+ -- expansion is performed if N is not a nonbinary modular operand.
procedure Expand_Short_Circuit_Operator (N : Node_Id);
-- Common expansion processing for short-circuit boolean operators
end if;
end Expand_Membership_Minimize_Eliminate_Overflow;
- ----------------------------------
- -- Expand_Non_Binary_Modular_Op --
- ----------------------------------
+ ---------------------------------
+ -- Expand_Nonbinary_Modular_Op --
+ ---------------------------------
- procedure Expand_Non_Binary_Modular_Op (N : Node_Id) is
+ procedure Expand_Nonbinary_Modular_Op (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Typ : constant Entity_Id := Etype (N);
procedure Expand_Modular_Addition;
- -- Expand the modular addition handling the special case of adding a
+ -- Expand the modular addition, handling the special case of adding a
-- constant.
procedure Expand_Modular_Op;
-- Compute the general rule: (lhs OP rhs) mod Modulus
procedure Expand_Modular_Subtraction;
- -- Expand the modular addition handling the special case of subtracting
+ -- Expand the modular addition, handling the special case of subtracting
-- a constant.
-----------------------------
Mod_Expr : constant Node_Id := New_Op_Node (N_Op_Mod, Loc);
begin
- -- Convert non-binary modular type operands into integer or integer
- -- values. Thus we avoid never-ending loops expanding them, and we
- -- also ensure that the backend never receives non-binary modular
- -- type expressions.
+ -- Convert nonbinary modular type operands into integer values. Thus
+ -- we avoid never-ending loops expanding them, and we also ensure
+ -- the back end never receives nonbinary modular type expressions.
if Nkind_In (Nkind (N), N_Op_And, N_Op_Or) then
Set_Left_Opnd (Op_Expr,
end if;
end Expand_Modular_Subtraction;
- -- Start of processing for Expand_Non_Binary_Modular_Op
+ -- Start of processing for Expand_Nonbinary_Modular_Op
begin
- -- No action needed if we are not generating C code for a non-binary
+ -- No action needed if we are not generating C code for a nonbinary
-- modular operand.
if not Modify_Tree_For_C
end case;
Analyze_And_Resolve (N, Typ);
- end Expand_Non_Binary_Modular_Op;
+ end Expand_Nonbinary_Modular_Op;
------------------------
-- Expand_N_Allocator --
if Is_Tagged_Type (Typ) then
-- No expansion will be performed for VM targets, as the VM
- -- back-ends will handle the membership tests directly.
+ -- back ends will handle the membership tests directly.
if Tagged_Type_Expansion then
Tagged_Membership (N, SCIL_Node, New_N);
Right_Opnd => Make_Null (Loc))));
-- No expansion will be performed for VM targets, as
- -- the VM back-ends will handle the membership tests
+ -- the VM back ends will handle the membership tests
-- directly.
if Tagged_Type_Expansion then
-- is an access to protected subprogram, or a subtype thereof. We represent
-- such access values as a record, and so we must replace the occurrence of
-- null by the equivalent record (with a null address and a null pointer in
- -- it), so that the backend creates the proper value.
+ -- it), so that the back end creates the proper value.
procedure Expand_N_Null (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
Check_Float_Op_Overflow (N);
- -- Generating C code convert non-binary modular additions into code that
- -- relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular additions into code
+ -- that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Add;
Expand_Intrinsic_Call (N, Entity (N));
end if;
- -- Generating C code convert non-binary modular operators into code that
- -- relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular operators into code
+ -- that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_And;
Check_Float_Op_Overflow (N);
- -- Generating C code convert non-binary modular divisions into code that
- -- relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular divisions into code
+ -- that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Divide;
-- Otherwise expand the component by component equality. Note that
-- we never use block-bit comparisons for records, because of the
- -- problems with gaps. The backend will often be able to recombine
+ -- problems with gaps. The back end will often be able to recombine
-- the separate comparisons that we generate here.
else
Analyze_And_Resolve (N, Typ);
end if;
- -- Generating C code convert non-binary modular minus into code that
- -- relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular minus into code
+ -- that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Minus;
Check_Float_Op_Overflow (N);
- -- Generating C code convert non-binary modular multiplications into
- -- code that relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular multiplications
+ -- into code that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Multiply;
Expand_Intrinsic_Call (N, Entity (N));
end if;
- -- Generating C code convert non-binary modular operators into code that
- -- relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular operators into code
+ -- that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Or;
Check_Float_Op_Overflow (N);
- -- Generating C code convert non-binary modular subtractions into code
- -- that relies on the frontend expansion of operator Mod.
+ -- When generating C code, convert nonbinary modular subtractions into
+ -- code that relies on the front-end expansion of operator Mod.
if Modify_Tree_For_C then
- Expand_Non_Binary_Modular_Op (N);
+ Expand_Nonbinary_Modular_Op (N);
end if;
end Expand_N_Op_Subtract;
procedure Make_Temporary_For_Slice;
-- Create a named variable for the value of the slice, in cases where
- -- the back-end cannot handle it properly, e.g. when packed types or
+ -- the back end cannot handle it properly, e.g. when packed types or
-- unaligned slices are involved.
-------------------------
-- and then ...
-- and then Lhs.Cmpn = Rhs.Cmpn
- -- The expression is folded by the back-end for adjacent fields. This
+ -- The expression is folded by the back end for adjacent fields. This
-- function is called for tagged record in only one occasion: for imple-
-- menting predefined primitive equality (see Predefined_Primitives_Bodies)
-- otherwise the primitive "=" is used directly.