+2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * call.c: NULL_PTR -> NULL.
+ * class.c: Likewise.
+ * cvt.c: Likewise.
+ * decl.c: Likewise.
+ * decl2.c: Likewise.
+ * except.c: Likewise.
+ * init.c: Likewise.
+ * rtti.c: Likewise.
+ * search.c: Likewise.
+ * tree.c: Likewise.
+ * typeck.c: Likewise.
+ * typeck2.c: Likewise.
+
2001-05-02 Mark Mitchell <mark@codesourcery.com>
* decl2.c (do_using_directive): Revert previous patch.
{
/* If it's a field, try overloading operator (),
or calling if the field is a pointer-to-function. */
- instance = build_indirect_ref (instance_ptr, NULL_PTR);
+ instance = build_indirect_ref (instance_ptr, NULL);
instance = build_component_ref_1 (instance, field, 0);
if (instance == error_mark_node)
if (TREE_CODE (exp) == INDIRECT_REF)
decl = build_indirect_ref
(convert_pointer_to_real
- (binfo, build_unary_op (ADDR_EXPR, exp, 0)), NULL_PTR);
+ (binfo, build_unary_op (ADDR_EXPR, exp, 0)), NULL);
else
decl = build_scoped_ref (exp, basetype);
case MEMBER_REF:
return build_m_component_ref
- (build_indirect_ref (arg1, NULL_PTR), arg2);
+ (build_indirect_ref (arg1, NULL), arg2);
/* The caller will deal with these. */
case ADDR_EXPR:
java_iface_lookup_fn
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
ggc_add_tree_root (&java_iface_lookup_fn, 1);
}
add_warning (winner, loser)
struct z_candidate *winner, *loser;
{
- winner->warnings = tree_cons (NULL_PTR,
+ winner->warnings = tree_cons (NULL_TREE,
build_ptr_wrapper (loser),
winner->warnings);
}
tree binfo = get_binfo (last, TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (nonnull_expr))), 0);
nonnull_expr = convert_pointer_to_real (binfo, nonnull_expr);
}
- ind = build_indirect_ref (nonnull_expr, NULL_PTR);
+ ind = build_indirect_ref (nonnull_expr, NULL);
nonnull_expr = build_vbase_pointer (ind, last_virtual);
if (nonnull == 0
&& TREE_CODE (type) == POINTER_TYPE
if (TREE_CODE (type) == OFFSET_TYPE)
type = TREE_TYPE (type);
if (TREE_CODE (type) == REFERENCE_TYPE)
- return build_indirect_ref (val, NULL_PTR);
+ return build_indirect_ref (val, NULL);
return val;
}
\f
/* ISO standard says implicit declarations are in the innermost block.
So we record the decl in the standard fashion. */
pushdecl (decl);
- rest_of_decl_compilation (decl, NULL_PTR, 0, 0);
+ rest_of_decl_compilation (decl, NULL, 0, 0);
if (warn_implicit
/* Only one warning per identifier. */
empty_except_spec = build_tree_list (NULL_TREE, NULL_TREE);
#if 0
- record_builtin_type (RID_MAX, NULL_PTR, string_type_node);
+ record_builtin_type (RID_MAX, NULL, string_type_node);
#endif
delta_type_node = ptrdiff_type_node;
= build_cplus_array_type (vtable_entry_type, NULL_TREE);
layout_type (vtbl_type_node);
vtbl_type_node = build_qualified_type (vtbl_type_node, TYPE_QUAL_CONST);
- record_builtin_type (RID_MAX, NULL_PTR, vtbl_type_node);
+ record_builtin_type (RID_MAX, NULL, vtbl_type_node);
vtbl_ptr_type_node = build_pointer_type (vtable_entry_type);
layout_type (vtbl_ptr_type_node);
- record_builtin_type (RID_MAX, NULL_PTR, vtbl_ptr_type_node);
+ record_builtin_type (RID_MAX, NULL, vtbl_ptr_type_node);
push_namespace (get_identifier ("__cxxabiv1"));
abi_node = current_namespace;
&& !COMPLETE_TYPE_P (TREE_TYPE (decl)))
TYPE_DECL_SUPPRESS_DEBUG (decl) = 1;
- rest_of_decl_compilation (decl, NULL_PTR,
+ rest_of_decl_compilation (decl, NULL,
DECL_CONTEXT (decl) == NULL_TREE, at_eof);
goto finish_end;
}
19990811);
cp_function_chain->x_current_class_ref
- = build_indirect_ref (t, NULL_PTR);
+ = build_indirect_ref (t, NULL);
cp_function_chain->x_current_class_ptr = t;
/* Constructors and destructors need to know whether they're "in
&& TREE_TYPE (TREE_TYPE (decl)) == type)
layout_type (TREE_TYPE (decl));
layout_decl (decl, 0);
- rest_of_decl_compilation (decl, NULL_PTR, toplevel, 0);
+ rest_of_decl_compilation (decl, NULL, toplevel, 0);
if (! toplevel)
{
tree cleanup;
if (flag_weak)
comdat_linkage (vars);
- rest_of_decl_compilation (vars, NULL_PTR, 1, 1);
+ rest_of_decl_compilation (vars, NULL, 1, 1);
if (flag_vtable_gc)
output_vtable_inherit (vars);
init = build1 (NOP_EXPR, build_pointer_type (type), init);
init = build (MINUS_EXPR, TREE_TYPE (init), init,
TYPE_SIZE_UNIT (TREE_TYPE (init)));
- init = build_indirect_ref (init, NULL_PTR);
+ init = build_indirect_ref (init, NULL);
is_java = true;
}
else
finish_expr_stmt (tmp);
object = build1 (NOP_EXPR, build_pointer_type (TREE_TYPE (exp)), ptr);
- object = build_indirect_ref (object, NULL_PTR);
+ object = build_indirect_ref (object, NULL);
exp = build_modify_expr (object, INIT_EXPR, exp);
if (exp == error_mark_node)
{
member = convert_pointer_to_real (base_binfo, current_class_ptr);
expand_aggr_init_1 (base_binfo, NULL_TREE,
- build_indirect_ref (member, NULL_PTR), init,
+ build_indirect_ref (member, NULL), init,
LOOKUP_NORMAL);
}
/* Compute the location of the vtpr. */
decl = convert_pointer_to_real (vtype_binfo, decl);
- vtbl_ptr = build_vfield_ref (build_indirect_ref (decl, NULL_PTR), vtype);
+ vtbl_ptr = build_vfield_ref (build_indirect_ref (decl, NULL), vtype);
if (vtbl_ptr == error_mark_node)
return;
tree binfo, exp, addr, init_list;
{
tree init = purpose_member (binfo, init_list);
- tree ref = build_indirect_ref (addr, NULL_PTR);
+ tree ref = build_indirect_ref (addr, NULL);
if (init)
init = TREE_VALUE (init);
{
tree newtype = build_qualified_type (type, TYPE_QUALS (oldtype));
decl = convert_force (build_pointer_type (newtype), olddecl, 0);
- decl = build_indirect_ref (decl, NULL_PTR);
+ decl = build_indirect_ref (decl, NULL);
}
}
return error_mark_node;
expr = build (COMPONENT_REF, TREE_TYPE (member),
- build_indirect_ref (addr, NULL_PTR), member);
+ build_indirect_ref (addr, NULL), member);
return convert_from_reference (expr);
}
DECL_ARTIFICIAL (class_decl) = 1;
DECL_IGNORED_P (class_decl) = 1;
pushdecl_top_level (class_decl);
- make_decl_rtl (class_decl, NULL_PTR);
+ make_decl_rtl (class_decl, NULL);
}
return class_decl;
}
elements. */
cookie = build (MINUS_EXPR, build_pointer_type (sizetype),
alloc_node, size_in_bytes (sizetype));
- cookie = build_indirect_ref (cookie, NULL_PTR);
+ cookie = build_indirect_ref (cookie, NULL);
cookie_expr = build (MODIFY_EXPR, void_type_node, cookie, nelts);
TREE_SIDE_EFFECTS (cookie_expr) = 1;
init_expr = NULL_TREE;
if (TYPE_NEEDS_CONSTRUCTING (type) || init)
{
- init_expr = build_indirect_ref (alloc_node, NULL_PTR);
+ init_expr = build_indirect_ref (alloc_node, NULL);
if (init == void_zero_node)
init = build_default_init (full_type);
auto_delete = sfk_complete_destructor;
}
- expr = build_dtor_call (build_indirect_ref (addr, NULL_PTR),
+ expr = build_dtor_call (build_indirect_ref (addr, NULL),
auto_delete, flags);
if (do_delete)
expr = build (COMPOUND_EXPR, void_type_node, expr, do_delete);
int i, n_baseclasses = CLASSTYPE_N_BASECLASSES (type);
tree base_binfo = n_baseclasses > 0 ? TREE_VEC_ELT (binfos, 0) : NULL_TREE;
tree exprstmt = NULL_TREE;
- tree ref = build_indirect_ref (addr, NULL_PTR);
+ tree ref = build_indirect_ref (addr, NULL);
/* Set this again before we call anything, as we might get called
recursively. */
build_pointer_type (sizetype),
base,
TYPE_SIZE_UNIT (sizetype));
- maxindex = build_indirect_ref (cookie_addr, NULL_PTR);
+ maxindex = build_indirect_ref (cookie_addr, NULL);
}
else if (TREE_CODE (type) == ARRAY_TYPE)
{
the vptr. */
index = build_int_2 (-2, -1);
- aref = build_vtbl_ref (build_indirect_ref (exp, NULL_PTR), index);
+ aref = build_vtbl_ref (build_indirect_ref (exp, NULL), index);
if (flag_vtable_thunks)
offset = aref;
{
exp = build_unary_op (ADDR_EXPR, exp, 0);
exp = build_headof_sub (exp);
- exp = build_indirect_ref (exp, NULL_PTR);
+ exp = build_indirect_ref (exp, NULL);
}
/* The RTTI information is at index -1. */
while (fields && DECL_NAME (fields) && VBASE_NAME_P (DECL_NAME (fields)))
{
tree ref = build (COMPONENT_REF, TREE_TYPE (fields),
- build_indirect_ref (this_vbase_ptr, NULL_PTR), fields);
+ build_indirect_ref (this_vbase_ptr, NULL), fields);
tree init;
tree vbase_type;
tree vbase_binfo;
finish_expr_stmt (init);
/* Update the vtable pointers as necessary. */
ref = build_vfield_ref
- (build_indirect_ref (addr, NULL_PTR),
+ (build_indirect_ref (addr, NULL),
DECL_CONTEXT (TYPE_VFIELD (BINFO_TYPE (binfo))));
finish_expr_stmt
(build_modify_expr (ref, NOP_EXPR, nvtbl));
tree type;
{
tree decl = build1 (NOP_EXPR, build_pointer_type (type), void_zero_node);
- return build_indirect_ref (decl, NULL_PTR);
+ return build_indirect_ref (decl, NULL);
}
/* We've gotten a reference to a member of TYPE. Return *this if appropriate,
my_friendly_assert (TREE_CODE (member) == FIELD_DECL, 305);
base = convert_pointer_to (basetype, current_class_ptr);
value = build (COMPONENT_REF, TREE_TYPE (member),
- build_indirect_ref (base, NULL_PTR), member);
+ build_indirect_ref (base, NULL), member);
return require_complete_type (value);
}
}
else
addr = convert_pointer_to (base, addr);
- datum = build_indirect_ref (addr, NULL_PTR);
+ datum = build_indirect_ref (addr, NULL);
if (datum == error_mark_node)
return error_mark_node;
}
(PLUS_EXPR,
build_pointer_type (build_pointer_type (vtable_entry_type)),
vtbl, cp_convert (ptrdiff_type_node, delta2));
- vtbl = build_indirect_ref (vtbl, NULL_PTR);
+ vtbl = build_indirect_ref (vtbl, NULL);
aref = build_array_ref (vtbl, idx);
if (! flag_vtable_thunks)
last_rval = default_conversion (rval);
if (TREE_CODE (TREE_TYPE (last_rval)) == POINTER_TYPE)
- return build_indirect_ref (last_rval, NULL_PTR);
+ return build_indirect_ref (last_rval, NULL);
if (types_memoized)
error ("result of `operator->()' yields non-pointer result");
+Wed May 2 10:20:08 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * com.c: NULL_PTR -> NULL.
+
Sun Apr 22 20:18:01 2001 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* com.c (ffecom_subscript_check_): Use concat in lieu of
TREE_PUBLIC (decl) = 1;
if (library_name)
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
- make_decl_rtl (decl, NULL_PTR);
+ make_decl_rtl (decl, NULL);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
}
else if (TREE_CODE (decl) == TYPE_DECL)
{
- rest_of_decl_compilation (decl, NULL_PTR,
+ rest_of_decl_compilation (decl, NULL,
DECL_CONTEXT (decl) == 0,
0);
}
{
strncpy (fname, (char *) fbeg, flen);
fname[flen] = 0;
- f = open_include_file (fname, NULL_PTR);
+ f = open_include_file (fname, NULL);
}
else
{
+2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * decl.c: NULL_PTR -> NULL.
+ * jcf-write.c: Likewise.
+
2001-05-01 Tom Tromey <tromey@redhat.com>
* Make-lang.in ($(srcdir)/java/gcj.info): Added `-I..'.
TREE_PUBLIC (decl) = 1;
if (library_name)
SET_DECL_ASSEMBLER_NAME (decl, get_identifier (library_name));
- make_decl_rtl (decl, NULL_PTR);
+ make_decl_rtl (decl, NULL);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
tree_cons (NULL_TREE, int_type_node, endlink));
alloc_object_node = builtin_function ("_Jv_AllocObject",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
DECL_IS_MALLOC (alloc_object_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_initclass_node = builtin_function ("_Jv_InitClass",
build_function_type (void_type_node,
t),
- 0, NOT_BUILT_IN,
- NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
throw_node = builtin_function ("_Jv_Throw",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
/* Mark throw_nodes as `noreturn' functions with side effects. */
TREE_THIS_VOLATILE (throw_node) = 1;
TREE_SIDE_EFFECTS (throw_node) = 1;
t = build_function_type (int_type_node, endlink);
soft_monitorenter_node
- = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN,
- NULL_PTR);
+ = builtin_function ("_Jv_MonitorEnter", t, 0, NOT_BUILT_IN, NULL);
soft_monitorexit_node
- = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN,
- NULL_PTR);
+ = builtin_function ("_Jv_MonitorExit", t, 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, int_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_newarray_node
= builtin_function ("_Jv_NewPrimArray",
build_function_type(ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
DECL_IS_MALLOC (soft_newarray_node) = 1;
t = tree_cons (NULL_TREE, int_type_node,
soft_anewarray_node
= builtin_function ("_Jv_NewObjectArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
DECL_IS_MALLOC (soft_anewarray_node) = 1;
t = tree_cons (NULL_TREE, ptr_type_node,
soft_multianewarray_node
= builtin_function ("_Jv_NewMultiArray",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
DECL_IS_MALLOC (soft_multianewarray_node) = 1;
t = build_function_type (void_type_node,
tree_cons (NULL_TREE, int_type_node, endlink));
soft_badarrayindex_node
= builtin_function ("_Jv_ThrowBadArrayIndex", t,
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
/* Mark soft_badarrayindex_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_badarrayindex_node) = 1;
soft_nullpointer_node
= builtin_function ("_Jv_ThrowNullPointerException",
build_function_type (void_type_node, endlink),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
/* Mark soft_nullpointer_node as a `noreturn' function with side
effects. */
TREE_THIS_VOLATILE (soft_nullpointer_node) = 1;
soft_checkcast_node
= builtin_function ("_Jv_CheckCast",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, class_ptr_type, endlink));
soft_instanceof_node
= builtin_function ("_Jv_IsInstanceOf",
build_function_type (boolean_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, object_ptr_type_node, endlink));
soft_checkarraystore_node
= builtin_function ("_Jv_CheckArrayStore",
build_function_type (void_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, int_type_node, endlink)));
soft_lookupinterfacemethod_node
= builtin_function ("_Jv_LookupInterfaceMethodIdx",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, object_ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node,
soft_lookupjnimethod_node
= builtin_function ("_Jv_LookupJNIMethod",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, ptr_type_node, endlink);
soft_getjnienvnewframe_node
= builtin_function ("_Jv_GetJNIEnvNewFrame",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
soft_jnipopsystemframe_node
= builtin_function ("_Jv_JNI_PopSystemFrame",
build_function_type (ptr_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
t = tree_cons (NULL_TREE, double_type_node,
tree_cons (NULL_TREE, double_type_node, endlink));
soft_idiv_node
= builtin_function ("_Jv_divI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
soft_irem_node
= builtin_function ("_Jv_remI",
build_function_type (int_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
soft_ldiv_node
= builtin_function ("_Jv_divJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
soft_lrem_node
= builtin_function ("_Jv_remJ",
build_function_type (long_type_node, t),
- 0, NOT_BUILT_IN, NULL_PTR);
+ 0, NOT_BUILT_IN, NULL);
/* Initialize variables for except.c. */
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
if (returns_void)
{
op = OPCODE_return;
- call_cleanups (NULL_PTR, state);
+ call_cleanups (NULL, state);
}
else
{
localvar_alloc (state->return_value_decl, state);
}
emit_store (state->return_value_decl, state);
- call_cleanups (NULL_PTR, state);
+ call_cleanups (NULL, state);
emit_load (state->return_value_decl, state);
/* If we call localvar_free (state->return_value_decl, state),
then we risk the save decl erroneously re-used in the