aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBryce McKinlay <mckinlay@redhat.com>2004-04-16 16:27:19 +0000
committerBryce McKinlay <bryce@gcc.gnu.org>2004-04-16 17:27:19 +0100
commit245c3c04af3e4f256615b0e68c7a14a77a91d6d2 (patch)
treef8e6ed92c4715a9964e9461e0650bbca33471270 /gcc
parent2f228199b9cbcc7b3b1a3cc978bf9e3b8ddec8f3 (diff)
downloadgcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.zip
gcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.tar.gz
gcc-245c3c04af3e4f256615b0e68c7a14a77a91d6d2.tar.bz2
prims.cc (_Jv_AllocObject): Remove `size' argument.
libjava: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * prims.cc (_Jv_AllocObject): Remove `size' argument. (_Jv_AllocObjectNoFinalizer): Likewise. (_Jv_AllocObjectNoInitNoFinalizer): Likewise. (_Jv_AllocPtrFreeObject): Likewise. (_Jv_AllocString): Moved from natString.cc. Call collector interface directly even in the JVMPI case. * gcj/cni.h (JvAllocObject): Remove `size' argument from _Jv_AllocObject calls. * gcj/javaprims.h: Update prototypes. * gnu/gcj/natCore.cc (_Jv_create_core): Use `new', not _Jv_AllocObject. * java/lang/Class.h: Update _Jv_AllocObject friend prototype. * java/lang/natString.cc (_Jv_AllocString): Move to prims.cc. gcc/cp: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * init.c (build_new_1): Don't use type size argument for Java _Jv_AllocObject call. gcc/java: 2004-04-15 Bryce McKinlay <mckinlay@redhat.com> * expr.c (expand_java_NEW): Don't use size argument for _Jv_AllocObject calls. * parse.y (patch_invoke): Likewise. From-SVN: r80754
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/init.c4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/expr.c4
-rw-r--r--gcc/java/parse.y8
5 files changed, 16 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c0b5725..a3a2c6a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
+
+ * init.c (build_new_1): Don't use type size argument for Java
+ _Jv_AllocObject call.
+
2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
* method.c (make_alias_for_thunk): Remove preprocessor guard on
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index e9142b7..5a64ed5 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -2019,7 +2019,6 @@ build_new_1 (tree exp)
{
tree class_addr, alloc_decl;
tree class_decl = build_java_class_ref (true_type);
- tree class_size = size_in_bytes (true_type);
static const char alloc_name[] = "_Jv_AllocObject";
use_java_new = 1;
if (!get_global_value_if_present (get_identifier (alloc_name),
@@ -2037,8 +2036,7 @@ build_new_1 (tree exp)
class_addr = build1 (ADDR_EXPR, jclass_node, class_decl);
alloc_call = (build_function_call
(alloc_decl,
- tree_cons (NULL_TREE, class_addr,
- build_tree_list (NULL_TREE, class_size))));
+ build_tree_list (NULL_TREE, class_addr)));
}
else
{
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 6336c2e..ac5a568 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
+
+ * expr.c (expand_java_NEW): Don't use size argument for
+ _Jv_AllocObject calls.
+ * parse.y (patch_invoke): Likewise.
+
2004-04-12 Bryce McKinlay <mckinlay@redhat.com>
* expr.c (build_invokeinterface): Remove unused variables to
diff --git a/gcc/java/expr.c b/gcc/java/expr.c
index 2c0312e..839480b 100644
--- a/gcc/java/expr.c
+++ b/gcc/java/expr.c
@@ -1150,9 +1150,7 @@ expand_java_NEW (tree type)
safe_layout_class (type);
push_value (build (CALL_EXPR, promote_type (type),
build_address_of (alloc_node),
- tree_cons (NULL_TREE, build_class_ref (type),
- build_tree_list (NULL_TREE,
- size_in_bytes (type))),
+ build_tree_list (NULL_TREE, build_class_ref (type)),
NULL_TREE));
}
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index a21fc2a..7d4c2de 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -10863,11 +10863,9 @@ patch_invoke (tree patch, tree method, tree args)
(class_has_finalize_method (class) ? alloc_object_node
: alloc_no_finalizer_node);
new = build (CALL_EXPR, promote_type (class),
- build_address_of (alloc_node),
- tree_cons (NULL_TREE, build_class_ref (class),
- build_tree_list (NULL_TREE,
- size_in_bytes (class))),
- NULL_TREE);
+ build_address_of (alloc_node),
+ build_tree_list (NULL_TREE, build_class_ref (class)),
+ NULL_TREE);
saved_new = save_expr (new);
c1 = build_tree_list (NULL_TREE, saved_new);
TREE_CHAIN (c1) = TREE_OPERAND (original_call, 1);