OSDN Git Service

2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Jan 2002 22:28:42 +0000 (22:28 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 27 Jan 2002 22:28:42 +0000 (22:28 +0000)
* gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
BUILT_IN_SQRTF.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49271 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/builtins.c
gcc/java/expr.c
gcc/java/parse.y

index b2fde76..14274b1 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-26 Andreas Tobler <a.tobler@schweiz.ch>
+       
+       * gcc/java/builtins.c (sqrt_builtin): Use BUILT_IN_SQRT, not
+       BUILT_IN_SQRTF.
+
 2002-01-22  Tom Tromey  <tromey@redhat.com>
 
        * decl.c (java_init_decl_processing): Use add_predefined_file.
index 2449859..41ded85 100644 (file)
@@ -181,7 +181,7 @@ sqrt_builtin (method_return_type, method_arguments)
      tree method_return_type, method_arguments;
 {
   /* FIXME: this assumes that jdouble and double are the same.  */
-  tree fn = built_in_decls[BUILT_IN_SQRTF];
+  tree fn = built_in_decls[BUILT_IN_SQRT];
   if (fn == NULL_TREE)
     return NULL_TREE;
   return build_function_call_expr (fn, method_arguments);
index e3eaf35..a7cb59e 100644 (file)
@@ -2168,8 +2168,13 @@ build_jni_stub (method)
   TREE_PUBLIC (meth_var) = 0;
   DECL_EXTERNAL (meth_var) = 0;
   DECL_CONTEXT (meth_var) = method;
+  DECL_ARTIFICIAL (meth_var) = 1;
+  DECL_INITIAL (meth_var) = null_pointer_node;
+  TREE_USED (meth_var) = 1;
+  chainon (env_var, meth_var);
+  layout_decl (meth_var, 0);
   make_decl_rtl (meth_var, NULL);
-  meth_var = pushdecl_top_level (meth_var);
+  rest_of_decl_compilation (meth_var, NULL, 0, 0);
 
   /* One strange way that the front ends are different is that they
      store arguments differently.  */
index a75e3f9..8b33fad 100644 (file)
@@ -1,6 +1,6 @@
 /* Source code parsing and tree node generation for the GNU compiler
    for the Java(TM) language.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
    Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
 
 This file is part of GNU CC.
@@ -7723,7 +7723,9 @@ java_complete_expand_methods (class_decl)
 
       if (METHOD_NATIVE (decl))
        {
-         tree body = build_jni_stub (decl);
+         tree body;
+         current_function_decl = decl;
+         body = build_jni_stub (decl);
          BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (decl)) = body;
        }