Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Upgrade busybox. Delete cruft.

  • Loading branch information...
commit 60fcbc48aa894807495ad205af32893bc558c384 1 parent de7fd0a
@atgreen authored
Showing with 1 addition and 7,094 deletions.
  1. +1 −1  busybox
  2. +0 −112 gcc/gcc/config/v850/.svn/text-base/t-v850e.svn-base
  3. +0 −112 gcc/gcc/config/v850/t-v850e
  4. +0 −127 gcc/gcc/testsuite/g++.old-deja/g++.oliva/.svn/text-base/ChangeLog.svn-base
  5. +0 −127 gcc/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog
  6. +0 −19 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt.adb.svn-base
  7. +0 −10 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt.ads.svn-base
  8. +0 −9 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt_aux.ads.svn-base
  9. +0 −8 gcc/gcc/testsuite/gnat.dg/.svn/text-base/test_tamdt.adb.svn-base
  10. +0 −19 gcc/gcc/testsuite/gnat.dg/tamdt.adb
  11. +0 −10 gcc/gcc/testsuite/gnat.dg/tamdt.ads
  12. +0 −9 gcc/gcc/testsuite/gnat.dg/tamdt_aux.ads
  13. +0 −8 gcc/gcc/testsuite/gnat.dg/test_tamdt.adb
  14. +0 −169 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1-implementation.h.svn-base
  15. +0 −175 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.h.svn-base
  16. +0 −4 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.m.svn-base
  17. +0 −4 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.mm.svn-base
  18. +0 −52 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Protocol1.h.svn-base
  19. +0 −109 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/next-mapping.h.svn-base
  20. +0 −169 gcc/gcc/testsuite/objc-obj-c++-shared/Object1-implementation.h
  21. +0 −175 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.h
  22. +0 −4 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.m
  23. +0 −4 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.mm
  24. +0 −52 gcc/gcc/testsuite/objc-obj-c++-shared/Protocol1.h
  25. +0 −109 gcc/gcc/testsuite/objc-obj-c++-shared/next-mapping.h
  26. +0 −906 gcc/gcc/testsuite/objc/execute/.svn/text-base/next_mapping.h.svn-base
  27. +0 −906 gcc/gcc/testsuite/objc/execute/next_mapping.h
  28. +0 −3  gcc/libgcc/config/mips/.svn/text-base/t-crtfm.svn-base
  29. +0 −3  gcc/libgcc/config/mips/t-crtfm
  30. +0 −117 gcc/libobjc/objc/.svn/text-base/encoding.h.svn-base
  31. +0 −394 gcc/libobjc/objc/.svn/text-base/objc-api.h.svn-base
  32. +0 −572 gcc/libobjc/objc/deprecated/.svn/entries
  33. +0 −1  gcc/libobjc/objc/deprecated/.svn/text-base/MetaClass.h.svn-base
  34. +0 −63 gcc/libobjc/objc/deprecated/.svn/text-base/Object.h.svn-base
  35. +0 −13 gcc/libobjc/objc/deprecated/.svn/text-base/Protocol.h.svn-base
  36. +0 −11 gcc/libobjc/objc/deprecated/.svn/text-base/README.svn-base
  37. +0 −12 gcc/libobjc/objc/deprecated/.svn/text-base/objc_msg_sendv.h.svn-base
  38. +0 −21 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_category.h.svn-base
  39. +0 −56 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_class.h.svn-base
  40. +0 −15 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_ivar.h.svn-base
  41. +0 −10 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_ivar_list.h.svn-base
  42. +0 −22 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_method.h.svn-base
  43. +0 −9 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_method_list.h.svn-base
  44. +0 −24 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_module.h.svn-base
  45. +0 −6 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_protocol.h.svn-base
  46. +0 −5 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_protocol_list.h.svn-base
  47. +0 −20 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_selector.h.svn-base
  48. +0 −26 gcc/libobjc/objc/deprecated/.svn/text-base/struct_objc_symtab.h.svn-base
  49. +0 −1  gcc/libobjc/objc/deprecated/MetaClass.h
  50. +0 −63 gcc/libobjc/objc/deprecated/Object.h
  51. +0 −13 gcc/libobjc/objc/deprecated/Protocol.h
  52. +0 −11 gcc/libobjc/objc/deprecated/README
  53. +0 −12 gcc/libobjc/objc/deprecated/objc_msg_sendv.h
  54. +0 −21 gcc/libobjc/objc/deprecated/struct_objc_category.h
  55. +0 −56 gcc/libobjc/objc/deprecated/struct_objc_class.h
  56. +0 −15 gcc/libobjc/objc/deprecated/struct_objc_ivar.h
  57. +0 −10 gcc/libobjc/objc/deprecated/struct_objc_ivar_list.h
  58. +0 −22 gcc/libobjc/objc/deprecated/struct_objc_method.h
  59. +0 −9 gcc/libobjc/objc/deprecated/struct_objc_method_list.h
  60. +0 −24 gcc/libobjc/objc/deprecated/struct_objc_module.h
  61. +0 −6 gcc/libobjc/objc/deprecated/struct_objc_protocol.h
  62. +0 −5 gcc/libobjc/objc/deprecated/struct_objc_protocol_list.h
  63. +0 −20 gcc/libobjc/objc/deprecated/struct_objc_selector.h
  64. +0 −26 gcc/libobjc/objc/deprecated/struct_objc_symtab.h
  65. +0 −117 gcc/libobjc/objc/encoding.h
  66. +0 −394 gcc/libobjc/objc/objc-api.h
  67. +0 −103 gcc/libstdc++-v3/include/ext/pb_ds/detail/.svn/text-base/constructors_destructor_fn_imps.hpp.svn-base
  68. +0 −130 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/.svn/entries
  69. +0 −173 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/.svn/text-base/basic_tree_policy_base.hpp.svn-base
  70. +0 −67 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/.svn/text-base/null_node_metadata.hpp.svn-base
  71. +0 −92 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/.svn/text-base/traits.hpp.svn-base
  72. +0 −173 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/basic_tree_policy_base.hpp
  73. +0 −67 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/null_node_metadata.hpp
  74. +0 −92 gcc/libstdc++-v3/include/ext/pb_ds/detail/basic_tree_policy/traits.hpp
  75. +0 −103 gcc/libstdc++-v3/include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp
  76. +0 −457 src/readline/doc/inc-hist.texinfo
2  busybox
@@ -1 +1 @@
-Subproject commit f9c710d048c0b0c22e391d0646a837abaa78cb0f
+Subproject commit 570234a78cb9ea152e815f43c345ea44f2abf047
View
112 gcc/gcc/config/v850/.svn/text-base/t-v850e.svn-base
@@ -1,112 +0,0 @@
-# Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-
-LIB1ASMSRC = v850/lib1funcs.asm
-LIB1ASMFUNCS = _mulsi3 \
- _divsi3 \
- _udivsi3 \
- _modsi3 \
- _umodsi3 \
- _save_2 \
- _save_20 \
- _save_21 \
- _save_22 \
- _save_23 \
- _save_24 \
- _save_25 \
- _save_26 \
- _save_27 \
- _save_28 \
- _save_29 \
- _save_2c \
- _save_20c \
- _save_21c \
- _save_22c \
- _save_23c \
- _save_24c \
- _save_25c \
- _save_26c \
- _save_27c \
- _save_28c \
- _save_29c \
- _save_31c \
- _save_interrupt \
- _save_all_interrupt \
- _callt_save_20 \
- _callt_save_21 \
- _callt_save_22 \
- _callt_save_23 \
- _callt_save_24 \
- _callt_save_25 \
- _callt_save_26 \
- _callt_save_27 \
- _callt_save_28 \
- _callt_save_29 \
- _callt_save_20c \
- _callt_save_21c \
- _callt_save_22c \
- _callt_save_23c \
- _callt_save_24c \
- _callt_save_25c \
- _callt_save_26c \
- _callt_save_27c \
- _callt_save_28c \
- _callt_save_29c \
- _callt_save_31c \
- _callt_save_interrupt \
- _callt_save_all_interrupt \
- _callt_save_r2_r29 \
- _callt_save_r2_r31 \
- _negdi2 \
- _cmpdi2 \
- _ucmpdi2 \
- _muldi3
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
- echo '#endif' >> dp-bit.c
- cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
- echo '#endif' >> fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-# Create target-specific versions of the libraries
-MULTILIB_OPTIONS = mv850
-MULTILIB_DIRNAMES = v850
-INSTALL_LIBGCC = install-multilib
-
-TCFLAGS = -mno-app-regs -msmall-sld -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow
-
-v850-c.o: $(srcdir)/config/v850/v850-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(CPPLIB_H) $(TREE_H) $(C_PRAGMA_H) $(GGC_H) $(TM_P_H)
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- $(srcdir)/config/v850/v850-c.c
-
-# Local Variables:
-# mode: Makefile
-# End:
View
112 gcc/gcc/config/v850/t-v850e
@@ -1,112 +0,0 @@
-# Copyright (C) 2003, 2008, 2009, 2010 Free Software Foundation, Inc.
-#
-# This file is part of GCC.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-
-LIB1ASMSRC = v850/lib1funcs.asm
-LIB1ASMFUNCS = _mulsi3 \
- _divsi3 \
- _udivsi3 \
- _modsi3 \
- _umodsi3 \
- _save_2 \
- _save_20 \
- _save_21 \
- _save_22 \
- _save_23 \
- _save_24 \
- _save_25 \
- _save_26 \
- _save_27 \
- _save_28 \
- _save_29 \
- _save_2c \
- _save_20c \
- _save_21c \
- _save_22c \
- _save_23c \
- _save_24c \
- _save_25c \
- _save_26c \
- _save_27c \
- _save_28c \
- _save_29c \
- _save_31c \
- _save_interrupt \
- _save_all_interrupt \
- _callt_save_20 \
- _callt_save_21 \
- _callt_save_22 \
- _callt_save_23 \
- _callt_save_24 \
- _callt_save_25 \
- _callt_save_26 \
- _callt_save_27 \
- _callt_save_28 \
- _callt_save_29 \
- _callt_save_20c \
- _callt_save_21c \
- _callt_save_22c \
- _callt_save_23c \
- _callt_save_24c \
- _callt_save_25c \
- _callt_save_26c \
- _callt_save_27c \
- _callt_save_28c \
- _callt_save_29c \
- _callt_save_31c \
- _callt_save_interrupt \
- _callt_save_all_interrupt \
- _callt_save_r2_r29 \
- _callt_save_r2_r31 \
- _negdi2 \
- _cmpdi2 \
- _ucmpdi2 \
- _muldi3
-
-# We want fine grained libraries, so use the new code to build the
-# floating point emulation libraries.
-FPBIT = fp-bit.c
-DPBIT = dp-bit.c
-
-dp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
- echo '#endif' >> dp-bit.c
- cat $(srcdir)/config/fp-bit.c >> dp-bit.c
-
-fp-bit.c: $(srcdir)/config/fp-bit.c
- echo '#define FLOAT' > fp-bit.c
- echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c
- echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c
- echo '#endif' >> fp-bit.c
- cat $(srcdir)/config/fp-bit.c >> fp-bit.c
-
-# Create target-specific versions of the libraries
-MULTILIB_OPTIONS = mv850
-MULTILIB_DIRNAMES = v850
-INSTALL_LIBGCC = install-multilib
-
-TCFLAGS = -mno-app-regs -msmall-sld -Wa,-mwarn-signed-overflow -Wa,-mwarn-unsigned-overflow
-
-v850-c.o: $(srcdir)/config/v850/v850-c.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
- $(TM_H) $(CPPLIB_H) $(TREE_H) $(C_PRAGMA_H) $(GGC_H) $(TM_P_H)
- $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
- $(srcdir)/config/v850/v850-c.c
-
-# Local Variables:
-# mode: Makefile
-# End:
View
127 gcc/gcc/testsuite/g++.old-deja/g++.oliva/.svn/text-base/ChangeLog.svn-base
@@ -1,127 +0,0 @@
-2005-04-03 Alexandre Oliva <aoliva@redhat.com>
-
- PR c++/19199
- * expr2.C: Fixed.
-
-2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
-
- * template1.C (bar): Remove xfail marker.
-
-2002-07-06 Alexandre Oliva <aoliva@redhat.com>
-
- * linkage1.C, linkage1-main.cc: New test.
-
-2001-02-15 Alexandre Oliva <aoliva@redhat.com>
-
- * friend1.C: New test.
-
-2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
-
- * expr2.C: New test.
-
-2000-04-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * stkalign.C: New test.
-
-1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * nameret2.C: New test.
-
- * nameret1.C: New test.
-
- * template10.C: New test.
-
-1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * delete2.C, delete3.C, delete4.C, delete5.C: New tests.
-
-1999-11-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * template7.C: Crash test passes, bug error is now bogus.
-
-1999-11-11 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * template9.C: New test.
-
-1999-09-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * overload1.C: New test.
-
- * inline1.C: New test.
-
-1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * thunk1.C: New test.
-
-1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * dwarf2.C, dwarf3.C: Added XFAIL for Solaris/x86. Removed
- -gdwarf.
- * dwarf1.C: Removed -gdwarf.
-
-1999-08-05 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * new1.C, template8.C: Removed XFAIL.
- * template3.C: Re-introduced XFAIL. :-(
-
-1999-08-03 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ext1.C: New test.
-
- * dwarf1.C, dwarf2.C, dwarf3.C: New tests.
-
-1999-07-20 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template8.C, typeof1.C: New test.
-
-1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template6.C, delete1.C, template7.C: New test.
-
-1999-07-13 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template5.C: New test.
-
- * template4.C: New test.
-
- * expr1.C: New test.
-
- * partspec1.C: New test.
-
-1999-07-05 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * typename1.C, typename2.C: New tests.
-
- * template3.C: Fixed.
-
- * ns3.C: New test.
-
-1999-07-03 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ctor1.C: New test.
-
- * template3.C: New test.
-
-1999-07-02 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ns1.C: Typo.
- * ns2.C: New test.
-
- * template2.C: New test.
-
- * ns1.C: New test.
-
-1999-07-01 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * new1.C: New test.
-
- * partord1.C: New test.
-
- * template1.C: New test.
-
-
-Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
View
127 gcc/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog
@@ -1,127 +0,0 @@
-2005-04-03 Alexandre Oliva <aoliva@redhat.com>
-
- PR c++/19199
- * expr2.C: Fixed.
-
-2003-06-04 J"orn Rennecke <joern.rennecke@superh.com>
-
- * template1.C (bar): Remove xfail marker.
-
-2002-07-06 Alexandre Oliva <aoliva@redhat.com>
-
- * linkage1.C, linkage1-main.cc: New test.
-
-2001-02-15 Alexandre Oliva <aoliva@redhat.com>
-
- * friend1.C: New test.
-
-2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
-
- * expr2.C: New test.
-
-2000-04-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * stkalign.C: New test.
-
-1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * nameret2.C: New test.
-
- * nameret1.C: New test.
-
- * template10.C: New test.
-
-1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * delete2.C, delete3.C, delete4.C, delete5.C: New tests.
-
-1999-11-19 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * template7.C: Crash test passes, bug error is now bogus.
-
-1999-11-11 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * template9.C: New test.
-
-1999-09-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * overload1.C: New test.
-
- * inline1.C: New test.
-
-1999-08-25 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * thunk1.C: New test.
-
-1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * dwarf2.C, dwarf3.C: Added XFAIL for Solaris/x86. Removed
- -gdwarf.
- * dwarf1.C: Removed -gdwarf.
-
-1999-08-05 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * new1.C, template8.C: Removed XFAIL.
- * template3.C: Re-introduced XFAIL. :-(
-
-1999-08-03 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ext1.C: New test.
-
- * dwarf1.C, dwarf2.C, dwarf3.C: New tests.
-
-1999-07-20 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template8.C, typeof1.C: New test.
-
-1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template6.C, delete1.C, template7.C: New test.
-
-1999-07-13 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * template5.C: New test.
-
- * template4.C: New test.
-
- * expr1.C: New test.
-
- * partspec1.C: New test.
-
-1999-07-05 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * typename1.C, typename2.C: New tests.
-
- * template3.C: Fixed.
-
- * ns3.C: New test.
-
-1999-07-03 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ctor1.C: New test.
-
- * template3.C: New test.
-
-1999-07-02 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * ns1.C: Typo.
- * ns2.C: New test.
-
- * template2.C: New test.
-
- * ns1.C: New test.
-
-1999-07-01 Alexandre Oliva <oliva@dcc.unicamp.br>
-
- * new1.C: New test.
-
- * partord1.C: New test.
-
- * template1.C: New test.
-
-
-Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
-
-Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.
View
19 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt.adb.svn-base
@@ -1,19 +0,0 @@
-
-with Tamdt_Aux;
-
-package body TAMDT is
- type TAMT1 is new Tamdt_Aux.Priv (X => 1);
- type TAMT2 is new Tamdt_Aux.Priv;
-
- procedure Check is
- Ptr1 : TAMT1_Access := new TAMT1;
- Ptr2 : TAMT2_Access := new TAMT2 (X => 2);
- begin
- if Ptr1.all.X /= 1 then
- raise Program_Error;
- end if;
- if Ptr2.all.X /= 2 then
- raise Program_Error;
- end if;
- end;
-end;
View
10 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt.ads.svn-base
@@ -1,10 +0,0 @@
-
-package TAMDT is
- procedure Check;
-private
- type TAMT1;
- type TAMT1_Access is access TAMT1;
-
- type TAMT2;
- type TAMT2_Access is access TAMT2;
-end;
View
9 gcc/gcc/testsuite/gnat.dg/.svn/text-base/tamdt_aux.ads.svn-base
@@ -1,9 +0,0 @@
-
-package Tamdt_Aux is
- type Priv (X : Integer) is private;
-private
- type Priv (X : Integer) is null record;
-end;
-
-
-
View
8 gcc/gcc/testsuite/gnat.dg/.svn/text-base/test_tamdt.adb.svn-base
@@ -1,8 +0,0 @@
--- { dg-do run }
-
-with Tamdt;
-
-procedure Test_Tamdt is
-begin
- Tamdt.Check;
-end;
View
19 gcc/gcc/testsuite/gnat.dg/tamdt.adb
@@ -1,19 +0,0 @@
-
-with Tamdt_Aux;
-
-package body TAMDT is
- type TAMT1 is new Tamdt_Aux.Priv (X => 1);
- type TAMT2 is new Tamdt_Aux.Priv;
-
- procedure Check is
- Ptr1 : TAMT1_Access := new TAMT1;
- Ptr2 : TAMT2_Access := new TAMT2 (X => 2);
- begin
- if Ptr1.all.X /= 1 then
- raise Program_Error;
- end if;
- if Ptr2.all.X /= 2 then
- raise Program_Error;
- end if;
- end;
-end;
View
10 gcc/gcc/testsuite/gnat.dg/tamdt.ads
@@ -1,10 +0,0 @@
-
-package TAMDT is
- procedure Check;
-private
- type TAMT1;
- type TAMT1_Access is access TAMT1;
-
- type TAMT2;
- type TAMT2_Access is access TAMT2;
-end;
View
9 gcc/gcc/testsuite/gnat.dg/tamdt_aux.ads
@@ -1,9 +0,0 @@
-
-package Tamdt_Aux is
- type Priv (X : Integer) is private;
-private
- type Priv (X : Integer) is null record;
-end;
-
-
-
View
8 gcc/gcc/testsuite/gnat.dg/test_tamdt.adb
@@ -1,8 +0,0 @@
--- { dg-do run }
-
-with Tamdt;
-
-procedure Test_Tamdt is
-begin
- Tamdt.Check;
-end;
View
169 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1-implementation.h.svn-base
@@ -1,169 +0,0 @@
-/* Compatibility code between APIs and ABIs for the objc test suite.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
- Contributed by Iain Sandoe
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/*
- * Implementation of a compatibility layer for the ObjC* test-suite.
- *
- * Four cases:
- * GNU
- * Uses the 'old' Object with API and ABI = 0.
- * Compatibility methods are added.
- * NeXT pre-Darwin9
- * Uses the 'old' Object with API and ABI = 0.
- * NeXT Darwin >= 9 with no implementation of ABI 2
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 for m64 but only compile tests can be expected to work.
- * NeXT Darwin >= 9 with __OBJC2__
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 and ABI 2 - the libobjc implementation of Object is very
- * basic, and we add a category to expand this for test-suite use.
- */
-
-#ifndef _OBJC_OBJECT1_IMPLEMENTATION_H_
-#define _OBJC_OBJECT1_IMPLEMENTATION_H_
-
-#include "Object1.h"
-
-#ifndef __NEXT_RUNTIME__
-
-/* Save us from repeating this. */
-@implementation Object (TEST_SUITE_ADDITIONS)
-+ initialize
-{
- return self;
-}
-@end
-
-#else
-
-/* For NeXT pre-Darwin 9 or m32 we need do nothing. */
-
-# if NEXT_OBJC_ABI_VERSION >= 2
-
-/* Pick up the API=2 header. */
-# include <objc/runtime.h>
-
-# ifndef __OBJC2__
-
-/* On a Darwin system >= 9 when there is no __OBJC2__ compiler, the testcases
- will not link. So we provide a dummy Object for this purpose. */
-
-@implementation Object
-
-+ (Class) class
-{
- return self;
-}
-
-- (BOOL)isEqual: (id)anObject
-{
- return self == anObject;
-}
-
-@end
-# endif /* __OBJC2__ */
-
-/* In any case, since the library does not provide a complete (enough)
- implementation we need to provide the additions. */
-
-@implementation Object (TEST_SUITE_ADDITIONS)
-
-+ initialize
-{
- return self;
-}
-
-- init
-{
- return self;
-}
-
-- (Class) class
-{
- return isa;
-}
-
-+ (Class) superclass
-{
- return class_getSuperclass(object_getClass(self));
-}
-
-+ new
-{
- return [[self alloc] init];
-}
-
-+ free
-{
- return nil;
-}
-
-- free
-{
- return object_dispose(self);
-}
-
-+ alloc
-{
- return class_createInstance (self, 0);
-}
-
-- (Class) superclass {
- return class_getSuperclass([self class]);
-}
-
-- (const char *) name {
- return class_getName([self class]);
-}
-
--(BOOL)conformsTo:(Protocol *)protocol {
- Class cls;
- for (cls = [self class]; cls; cls = [cls superclass])
- {
- if (class_conformsToProtocol(cls, protocol))
- return YES;
- }
- return NO;
-}
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int printf (const char *, ...);
-extern void abort (void);
-#ifdef __cplusplus
-}
-#endif
-
-/* This is a helper to catch cases where we need to add more functionality
- to our test-suite category - more informative than fail with 'does not
- respond to forward:' */
-- forward: (SEL)sel : (marg_list)args
-{
- const char * onam = object_getClassName (self);
- const char * snam = sel_getName (sel);
- printf ("%s: tried to forward: %s\n", onam, snam);
- abort ();
-}
-@end
-
-# endif /* NEXT_OBJC_ABI_VERSION >= 2 */
-# endif /* __NEXT_RUNTIME__ */
-#endif /* _OBJC_OBJECT1_IMPLEMENTATION_H_ */
View
175 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.h.svn-base
@@ -1,175 +0,0 @@
-/* Compatibility code between APIs and ABIs for the objc test suite.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
- Contributed by Iain Sandoe
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/*
- * Compatibility header.
- *
- * Four cases:
- * GNU
- * Uses the 'old' Object with API and ABI = 0.
- * Compatibility methods are added.
- * NeXT pre-Darwin9
- * Uses the 'old' Object with API and ABI = 0.
- * NeXT Darwin >= 9 with no implementation of ABI 2
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 for m64 but only compile tests can be expected to work.
- * NeXT Darwin >= 9 with __OBJC2__
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 and ABI 2 - the libobjc implementation of Object is very
- * basic, and we add a category to expand this for test-suite use.
- */
-#ifndef _OBJC_OBJECT1_H_
-#define _OBJC_OBJECT1_H_
-
-#ifndef __NEXT_RUNTIME__
-/* Case 1 = GNU. */
-# include <objc/Object.h>
-/* NeXT requires a +initialize (or forward:) method, and it makes testcases more
- readable if the conditional code can be reduced, so we add one to the GNU tests
- too. This saves us from having to introduce it every time. */
-@interface Object (TEST_SUITE_ADDITIONS)
-+ initialize;
-@end
-
-#else /* NeXT */
-
-# include "next-abi.h"
-# if !defined(NEXT_OBJC_ABI_VERSION) || (NEXT_OBJC_ABI_VERSION < 2)
-/* Cases 2, Case 3/m32 and 4/m32 are handled as default. */
-# include <objc/Object.h>
-# else
-# include <objc/objc.h>
-
-/* This is a cut-down Object with only the methods currently required
- by the testsuite declared. The implementation is provided in
- Object1-implementation.h
-*/
-
-/* The m64 libobjc implementation of Object provides only the 'class' and
- isEqual: methods.
-
- We add the others required as a test-suite category.
-
- Please leave the unimplemented methods as comments - so that they can
- be inserted as required by future tests. */
-
-@interface Object
-{
- Class isa;
-}
-+ (Class) class;
-- (BOOL)isEqual: (id)anObject;
-@end
-
-/* Dummy definition. */
-typedef void * marg_list;
-
-@interface Object (TEST_SUITE_ADDITIONS)
-
-+ initialize;
-- init;
-
-+ new;
-+ free;
-- free;
-+ alloc;
-//- copy;
-//+ allocFromZone:(void *)zone;
-//- copyFromZone:(void *)zone;
-//- (void *)zone;
-
-- (Class) class;
-+ (Class) superclass;
-//+ (const char *) name;
-//- superclass;
-- (const char *) name;
-
-//- self;
-//- (unsigned int) hash;
-
-/* Testing inheritance relationships */
-
-//- (BOOL) isKindOf: aClassObject;
-//- (BOOL) isMemberOf: aClassObject;
-//- (BOOL) isKindOfClassNamed: (const char *)aClassName;
-//- (BOOL) isMemberOfClassNamed: (const char *)aClassName;
-
-/* Testing class functionality */
-
-//+ (BOOL) instancesRespondTo:(SEL)aSelector;
-//- (BOOL) respondsTo:(SEL)aSelector;
-
-/* Testing protocol conformance */
-
-- (BOOL) conformsTo: (Protocol *)aProtocolObject;
-//+ (BOOL) conformsTo: (Protocol *)aProtocolObject;
-
-/* Obtaining method descriptors from protocols */
-
-//- (struct objc_method_description *) descriptionForMethod:(SEL)aSel;
-//+ (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
-
-/* Obtaining method handles */
-
-//- (IMP) methodFor:(SEL)aSelector;
-//+ (IMP) instanceMethodFor:(SEL)aSelector;
-
-/* Sending messages determined at run time */
-
-//- perform:(SEL)aSelector;
-//- perform:(SEL)aSelector with:anObject;
-//- perform:(SEL)aSelector with:object1 with:object2;
-
-/* Posing */
-
-//+ poseAs: aClassObject;
-
-/* Enforcing intentions */
-
-//- subclassResponsibility:(SEL)aSelector;
-//- notImplemented:(SEL)aSelector;
-
-/* Error handling */
-
-//- doesNotRecognize:(SEL)aSelector;
-//- error:(const char *)aString, ...;
-
-/* Debugging */
-
-//- (void) printForDebugger:(void *)stream;
-
-/* Archiving */
-
-//- awake;
-//- write:(void *)stream;
-//- read:(void *)stream;
-//+ (int) version;
-//+ setVersion: (int) aVersion;
-
-/* Forwarding */
-
-- forward: (SEL)sel : (marg_list)args;
-//- performv: (SEL)sel : (marg_list)args;
-
-@end
-
-# endif /* NeXT case 3 & 4 m64 */
-# endif /* NEXT */
-#endif /* _OBJC_OBJECT1_H_ */
View
4 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.m.svn-base
@@ -1,4 +0,0 @@
-/* This will generate compatibility code for the test-suite provided as a
- category on Object.
-*/
-#include "Object1-implementation.h"
View
4 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Object1.mm.svn-base
@@ -1,4 +0,0 @@
-/* This will generate compatibility code for the test-suite provided as a
- category on Object.
-*/
-#import "Object1-implementation.h"
View
52 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/Protocol1.h.svn-base
@@ -1,52 +0,0 @@
-/*
- * Temporary work-around to avoid the need for method attributes in
- * the NeXT Runtime Protocol header.
- */
-#ifndef _OBJC_PROTOCOL1_H_
-#define _OBJC_PROTOCOL1_H_
-
-# ifndef __NEXT_RUNTIME__
-# include <objc/Protocol.h>
-# else
-# include "next-abi.h"
-# ifndef NEXT_OBJC_USE_NEW_INTERFACE
-/* We are on a NeXT version without method __attributes__ */
-# import <objc/Protocol.h>
-# else
-/* We make our own interface without the deprecation messages
- * This is essentially <objc/Protocol.h> without the OBJC2
- * flags.
- *
- */
-# ifndef _OBJC_PROTOCOL_H_
-# define _OBJC_PROTOCOL_H_
-# import "Object1.h"
-
-@interface Protocol : Object
-{
-@private
- char *protocol_name ;
- struct objc_protocol_list *protocol_list ;
- struct objc_method_description_list *instance_methods ;
- struct objc_method_description_list *class_methods ;
-}
-
-/* Obtaining attributes intrinsic to the protocol */
-#if (NEXT_OBJC_ABI_VERSION==0)
-- (const char *)name ; /* Not avail in v2, deprecated in prior */
-/* Testing protocol conformance */
-- (BOOL) conformsTo: (Protocol *)aProtocolObject ; /* Not avail in v2 */
-#endif
-
-/* Looking up information specific to a protocol */
-/* Deprecated, but available */
-
-- (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel ;
-- (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel ;
-
-@end
-
-# endif /* __NEXT_RUNTIME__ */
-# endif /* _OBJC_PROTOCOL_H_ */
-# endif /* NEXT_OBJC_ABI_VERSION */
-#endif /* _OBJC_PROTOCOL1_H_ */
View
109 gcc/gcc/testsuite/objc-obj-c++-shared/.svn/text-base/next-mapping.h.svn-base
@@ -1,109 +0,0 @@
-/* Compatibility header between runtimes and APIs.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
-
- Original Authors: Ziemowit Laski <zlaski@apple.com>
- David Ayers <d.ayers@inode.at>
-
- re-work for ObjC2 by Iain Sandoe <iains@gcc.gnu.org>
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#ifndef _OBJC_NEXT_MAPPING_H_
-#define _OBJC_NEXT_MAPPING_H_
-
-/* This file provides a two-way mapping of API names for the original
- GNU & NeXT APIs.
-
- It is being expanded to provide mapping (where possible) between between the
- older API and API-2.
-*/
-
-#include "objc-test-suite-types.h"
-
-#ifndef __NEXT_RUNTIME__
-
-# define CLASSFIELD class_pointer
-# define CLASSPTRFIELD(x) (x)->class_pointer
-# define SUPERCLASS superClass
-# define OBJC_GETCLASS objc_get_class
-
-# ifdef __objc_api_INCLUDE_GNU
-# define class_createInstance(C, S) class_create_instance(C)
-# endif
-# define method_get_types(M) (M)->method_types
-
-#else /* NeXT */
-
-/* Include next-abi.h to set NEXT_OBJC_USE_NEW_INTERFACE etc.*/
-# include "next-abi.h"
-
-# ifdef NEXT_OBJC_USE_NEW_INTERFACE
- /* API=2. */
-# include <objc/runtime.h>
-# else
- /* API=0. */
-# include <objc/objc-class.h>
-# endif
-
-# define CLASSPTRFIELD(x) (x)->isa
-# define SUPERCLASS superclass
-# define OBJC_GETCLASS objc_getClass
-
-# define objc_get_class(C) objc_getClass(C)
-# define objc_get_meta_class(C) objc_getMetaClass(C)
-# define class_get_class_method(C, S) class_getClassMethod(C, S)
-# define class_get_instance_method(C, S) class_getInstanceMethod(C, S)
-# define sel_get_name(S) sel_getName(S)
-# define class_create_instance(C) class_createInstance(C, 0)
-# define class_get_class_name(C) object_getClassName(C)
-# define objc_lookup_class(N) objc_lookUpClass(N)
-
-# ifdef NEXT_OBJC_USE_NEW_INTERFACE
-
-# define object_class_name(O) (object_getClassName(O))
-# define object_get_class(O) (object_getClass((id)O))
-# define object_get_super_class(O) class_get_super_class(object_get_class(O))
-# define object_is_class(O) class_is_meta_class(object_get_class(O))
-# define object_is_meta_class(O) (object_is_class(O) && class_is_meta_class(O) \
- && class_is_meta_class(object_get_class(O)))
-
-# define method_get_imp(M) (method_getImplementation((Method)M))
-# define method_get_types(M) (method_getTypeEncoding((Method)M))
-
-# define class_get_super_class(C) (class_getSuperclass((Class)C))
-# define class_is_meta_class(C) (class_isMetaClass((Class)C) ? YES: NO)
-# define class_is_class(C) (class_is_meta_class(C) == NO)
-
-# else /* OLD API */
-
-# define object_class_name(O) (O->name)
-# define object_get_super_class(O) class_get_super_class(*(struct objc_class **)O)
-# define object_get_class(O) (*(struct objc_class **)O)
-# define object_is_class(O) class_is_meta_class(*(struct objc_class **)O)
-# define object_is_meta_class(O) (class_is_meta_class(O) && class_is_meta_class(*(struct objc_class **)O))
-
-# define method_get_imp(M) (((Method)M)->method_imp)
-# define method_get_types(M) (((Method)M)->method_types)
-
-# define class_get_super_class(C) (((struct objc_class *)C)->super_class)
-# define class_is_meta_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_META)? YES: NO)
-# define class_is_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_CLASS)? YES: NO)
-
-# endif /* NEXT_OBJC_USE_NEW_INTERFACE */
-
-# endif /*__NEXT_RUNTIME__ */
-#endif /* _OBJC_NEXT_MAPPING_H_ */
View
169 gcc/gcc/testsuite/objc-obj-c++-shared/Object1-implementation.h
@@ -1,169 +0,0 @@
-/* Compatibility code between APIs and ABIs for the objc test suite.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
- Contributed by Iain Sandoe
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/*
- * Implementation of a compatibility layer for the ObjC* test-suite.
- *
- * Four cases:
- * GNU
- * Uses the 'old' Object with API and ABI = 0.
- * Compatibility methods are added.
- * NeXT pre-Darwin9
- * Uses the 'old' Object with API and ABI = 0.
- * NeXT Darwin >= 9 with no implementation of ABI 2
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 for m64 but only compile tests can be expected to work.
- * NeXT Darwin >= 9 with __OBJC2__
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 and ABI 2 - the libobjc implementation of Object is very
- * basic, and we add a category to expand this for test-suite use.
- */
-
-#ifndef _OBJC_OBJECT1_IMPLEMENTATION_H_
-#define _OBJC_OBJECT1_IMPLEMENTATION_H_
-
-#include "Object1.h"
-
-#ifndef __NEXT_RUNTIME__
-
-/* Save us from repeating this. */
-@implementation Object (TEST_SUITE_ADDITIONS)
-+ initialize
-{
- return self;
-}
-@end
-
-#else
-
-/* For NeXT pre-Darwin 9 or m32 we need do nothing. */
-
-# if NEXT_OBJC_ABI_VERSION >= 2
-
-/* Pick up the API=2 header. */
-# include <objc/runtime.h>
-
-# ifndef __OBJC2__
-
-/* On a Darwin system >= 9 when there is no __OBJC2__ compiler, the testcases
- will not link. So we provide a dummy Object for this purpose. */
-
-@implementation Object
-
-+ (Class) class
-{
- return self;
-}
-
-- (BOOL)isEqual: (id)anObject
-{
- return self == anObject;
-}
-
-@end
-# endif /* __OBJC2__ */
-
-/* In any case, since the library does not provide a complete (enough)
- implementation we need to provide the additions. */
-
-@implementation Object (TEST_SUITE_ADDITIONS)
-
-+ initialize
-{
- return self;
-}
-
-- init
-{
- return self;
-}
-
-- (Class) class
-{
- return isa;
-}
-
-+ (Class) superclass
-{
- return class_getSuperclass(object_getClass(self));
-}
-
-+ new
-{
- return [[self alloc] init];
-}
-
-+ free
-{
- return nil;
-}
-
-- free
-{
- return object_dispose(self);
-}
-
-+ alloc
-{
- return class_createInstance (self, 0);
-}
-
-- (Class) superclass {
- return class_getSuperclass([self class]);
-}
-
-- (const char *) name {
- return class_getName([self class]);
-}
-
--(BOOL)conformsTo:(Protocol *)protocol {
- Class cls;
- for (cls = [self class]; cls; cls = [cls superclass])
- {
- if (class_conformsToProtocol(cls, protocol))
- return YES;
- }
- return NO;
-}
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern int printf (const char *, ...);
-extern void abort (void);
-#ifdef __cplusplus
-}
-#endif
-
-/* This is a helper to catch cases where we need to add more functionality
- to our test-suite category - more informative than fail with 'does not
- respond to forward:' */
-- forward: (SEL)sel : (marg_list)args
-{
- const char * onam = object_getClassName (self);
- const char * snam = sel_getName (sel);
- printf ("%s: tried to forward: %s\n", onam, snam);
- abort ();
-}
-@end
-
-# endif /* NEXT_OBJC_ABI_VERSION >= 2 */
-# endif /* __NEXT_RUNTIME__ */
-#endif /* _OBJC_OBJECT1_IMPLEMENTATION_H_ */
View
175 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.h
@@ -1,175 +0,0 @@
-/* Compatibility code between APIs and ABIs for the objc test suite.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
- Contributed by Iain Sandoe
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-/*
- * Compatibility header.
- *
- * Four cases:
- * GNU
- * Uses the 'old' Object with API and ABI = 0.
- * Compatibility methods are added.
- * NeXT pre-Darwin9
- * Uses the 'old' Object with API and ABI = 0.
- * NeXT Darwin >= 9 with no implementation of ABI 2
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 for m64 but only compile tests can be expected to work.
- * NeXT Darwin >= 9 with __OBJC2__
- * Uses API 2 and ABI 0 for m32, uses the 'old' Object'
- * Uses API 2 and ABI 2 - the libobjc implementation of Object is very
- * basic, and we add a category to expand this for test-suite use.
- */
-#ifndef _OBJC_OBJECT1_H_
-#define _OBJC_OBJECT1_H_
-
-#ifndef __NEXT_RUNTIME__
-/* Case 1 = GNU. */
-# include <objc/Object.h>
-/* NeXT requires a +initialize (or forward:) method, and it makes testcases more
- readable if the conditional code can be reduced, so we add one to the GNU tests
- too. This saves us from having to introduce it every time. */
-@interface Object (TEST_SUITE_ADDITIONS)
-+ initialize;
-@end
-
-#else /* NeXT */
-
-# include "next-abi.h"
-# if !defined(NEXT_OBJC_ABI_VERSION) || (NEXT_OBJC_ABI_VERSION < 2)
-/* Cases 2, Case 3/m32 and 4/m32 are handled as default. */
-# include <objc/Object.h>
-# else
-# include <objc/objc.h>
-
-/* This is a cut-down Object with only the methods currently required
- by the testsuite declared. The implementation is provided in
- Object1-implementation.h
-*/
-
-/* The m64 libobjc implementation of Object provides only the 'class' and
- isEqual: methods.
-
- We add the others required as a test-suite category.
-
- Please leave the unimplemented methods as comments - so that they can
- be inserted as required by future tests. */
-
-@interface Object
-{
- Class isa;
-}
-+ (Class) class;
-- (BOOL)isEqual: (id)anObject;
-@end
-
-/* Dummy definition. */
-typedef void * marg_list;
-
-@interface Object (TEST_SUITE_ADDITIONS)
-
-+ initialize;
-- init;
-
-+ new;
-+ free;
-- free;
-+ alloc;
-//- copy;
-//+ allocFromZone:(void *)zone;
-//- copyFromZone:(void *)zone;
-//- (void *)zone;
-
-- (Class) class;
-+ (Class) superclass;
-//+ (const char *) name;
-//- superclass;
-- (const char *) name;
-
-//- self;
-//- (unsigned int) hash;
-
-/* Testing inheritance relationships */
-
-//- (BOOL) isKindOf: aClassObject;
-//- (BOOL) isMemberOf: aClassObject;
-//- (BOOL) isKindOfClassNamed: (const char *)aClassName;
-//- (BOOL) isMemberOfClassNamed: (const char *)aClassName;
-
-/* Testing class functionality */
-
-//+ (BOOL) instancesRespondTo:(SEL)aSelector;
-//- (BOOL) respondsTo:(SEL)aSelector;
-
-/* Testing protocol conformance */
-
-- (BOOL) conformsTo: (Protocol *)aProtocolObject;
-//+ (BOOL) conformsTo: (Protocol *)aProtocolObject;
-
-/* Obtaining method descriptors from protocols */
-
-//- (struct objc_method_description *) descriptionForMethod:(SEL)aSel;
-//+ (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
-
-/* Obtaining method handles */
-
-//- (IMP) methodFor:(SEL)aSelector;
-//+ (IMP) instanceMethodFor:(SEL)aSelector;
-
-/* Sending messages determined at run time */
-
-//- perform:(SEL)aSelector;
-//- perform:(SEL)aSelector with:anObject;
-//- perform:(SEL)aSelector with:object1 with:object2;
-
-/* Posing */
-
-//+ poseAs: aClassObject;
-
-/* Enforcing intentions */
-
-//- subclassResponsibility:(SEL)aSelector;
-//- notImplemented:(SEL)aSelector;
-
-/* Error handling */
-
-//- doesNotRecognize:(SEL)aSelector;
-//- error:(const char *)aString, ...;
-
-/* Debugging */
-
-//- (void) printForDebugger:(void *)stream;
-
-/* Archiving */
-
-//- awake;
-//- write:(void *)stream;
-//- read:(void *)stream;
-//+ (int) version;
-//+ setVersion: (int) aVersion;
-
-/* Forwarding */
-
-- forward: (SEL)sel : (marg_list)args;
-//- performv: (SEL)sel : (marg_list)args;
-
-@end
-
-# endif /* NeXT case 3 & 4 m64 */
-# endif /* NEXT */
-#endif /* _OBJC_OBJECT1_H_ */
View
4 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.m
@@ -1,4 +0,0 @@
-/* This will generate compatibility code for the test-suite provided as a
- category on Object.
-*/
-#include "Object1-implementation.h"
View
4 gcc/gcc/testsuite/objc-obj-c++-shared/Object1.mm
@@ -1,4 +0,0 @@
-/* This will generate compatibility code for the test-suite provided as a
- category on Object.
-*/
-#import "Object1-implementation.h"
View
52 gcc/gcc/testsuite/objc-obj-c++-shared/Protocol1.h
@@ -1,52 +0,0 @@
-/*
- * Temporary work-around to avoid the need for method attributes in
- * the NeXT Runtime Protocol header.
- */
-#ifndef _OBJC_PROTOCOL1_H_
-#define _OBJC_PROTOCOL1_H_
-
-# ifndef __NEXT_RUNTIME__
-# include <objc/Protocol.h>
-# else
-# include "next-abi.h"
-# ifndef NEXT_OBJC_USE_NEW_INTERFACE
-/* We are on a NeXT version without method __attributes__ */
-# import <objc/Protocol.h>
-# else
-/* We make our own interface without the deprecation messages
- * This is essentially <objc/Protocol.h> without the OBJC2
- * flags.
- *
- */
-# ifndef _OBJC_PROTOCOL_H_
-# define _OBJC_PROTOCOL_H_
-# import "Object1.h"
-
-@interface Protocol : Object
-{
-@private
- char *protocol_name ;
- struct objc_protocol_list *protocol_list ;
- struct objc_method_description_list *instance_methods ;
- struct objc_method_description_list *class_methods ;
-}
-
-/* Obtaining attributes intrinsic to the protocol */
-#if (NEXT_OBJC_ABI_VERSION==0)
-- (const char *)name ; /* Not avail in v2, deprecated in prior */
-/* Testing protocol conformance */
-- (BOOL) conformsTo: (Protocol *)aProtocolObject ; /* Not avail in v2 */
-#endif
-
-/* Looking up information specific to a protocol */
-/* Deprecated, but available */
-
-- (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel ;
-- (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel ;
-
-@end
-
-# endif /* __NEXT_RUNTIME__ */
-# endif /* _OBJC_PROTOCOL_H_ */
-# endif /* NEXT_OBJC_ABI_VERSION */
-#endif /* _OBJC_PROTOCOL1_H_ */
View
109 gcc/gcc/testsuite/objc-obj-c++-shared/next-mapping.h
@@ -1,109 +0,0 @@
-/* Compatibility header between runtimes and APIs.
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
-
- Original Authors: Ziemowit Laski <zlaski@apple.com>
- David Ayers <d.ayers@inode.at>
-
- re-work for ObjC2 by Iain Sandoe <iains@gcc.gnu.org>
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3. If not see
-<http://www.gnu.org/licenses/>. */
-
-#ifndef _OBJC_NEXT_MAPPING_H_
-#define _OBJC_NEXT_MAPPING_H_
-
-/* This file provides a two-way mapping of API names for the original
- GNU & NeXT APIs.
-
- It is being expanded to provide mapping (where possible) between between the
- older API and API-2.
-*/
-
-#include "objc-test-suite-types.h"
-
-#ifndef __NEXT_RUNTIME__
-
-# define CLASSFIELD class_pointer
-# define CLASSPTRFIELD(x) (x)->class_pointer
-# define SUPERCLASS superClass
-# define OBJC_GETCLASS objc_get_class
-
-# ifdef __objc_api_INCLUDE_GNU
-# define class_createInstance(C, S) class_create_instance(C)
-# endif
-# define method_get_types(M) (M)->method_types
-
-#else /* NeXT */
-
-/* Include next-abi.h to set NEXT_OBJC_USE_NEW_INTERFACE etc.*/
-# include "next-abi.h"
-
-# ifdef NEXT_OBJC_USE_NEW_INTERFACE
- /* API=2. */
-# include <objc/runtime.h>
-# else
- /* API=0. */
-# include <objc/objc-class.h>
-# endif
-
-# define CLASSPTRFIELD(x) (x)->isa
-# define SUPERCLASS superclass
-# define OBJC_GETCLASS objc_getClass
-
-# define objc_get_class(C) objc_getClass(C)
-# define objc_get_meta_class(C) objc_getMetaClass(C)
-# define class_get_class_method(C, S) class_getClassMethod(C, S)
-# define class_get_instance_method(C, S) class_getInstanceMethod(C, S)
-# define sel_get_name(S) sel_getName(S)
-# define class_create_instance(C) class_createInstance(C, 0)
-# define class_get_class_name(C) object_getClassName(C)
-# define objc_lookup_class(N) objc_lookUpClass(N)
-
-# ifdef NEXT_OBJC_USE_NEW_INTERFACE
-
-# define object_class_name(O) (object_getClassName(O))
-# define object_get_class(O) (object_getClass((id)O))
-# define object_get_super_class(O) class_get_super_class(object_get_class(O))
-# define object_is_class(O) class_is_meta_class(object_get_class(O))
-# define object_is_meta_class(O) (object_is_class(O) && class_is_meta_class(O) \
- && class_is_meta_class(object_get_class(O)))
-
-# define method_get_imp(M) (method_getImplementation((Method)M))
-# define method_get_types(M) (method_getTypeEncoding((Method)M))
-
-# define class_get_super_class(C) (class_getSuperclass((Class)C))
-# define class_is_meta_class(C) (class_isMetaClass((Class)C) ? YES: NO)
-# define class_is_class(C) (class_is_meta_class(C) == NO)
-
-# else /* OLD API */
-
-# define object_class_name(O) (O->name)
-# define object_get_super_class(O) class_get_super_class(*(struct objc_class **)O)
-# define object_get_class(O) (*(struct objc_class **)O)
-# define object_is_class(O) class_is_meta_class(*(struct objc_class **)O)
-# define object_is_meta_class(O) (class_is_meta_class(O) && class_is_meta_class(*(struct objc_class **)O))
-
-# define method_get_imp(M) (((Method)M)->method_imp)
-# define method_get_types(M) (((Method)M)->method_types)
-
-# define class_get_super_class(C) (((struct objc_class *)C)->super_class)
-# define class_is_meta_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_META)? YES: NO)
-# define class_is_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_CLASS)? YES: NO)
-
-# endif /* NEXT_OBJC_USE_NEW_INTERFACE */
-
-# endif /*__NEXT_RUNTIME__ */
-#endif /* _OBJC_NEXT_MAPPING_H_ */
View
906 gcc/gcc/testsuite/objc/execute/.svn/text-base/next_mapping.h.svn-base
@@ -1,906 +0,0 @@
-/* This file "renames" various ObjC GNU runtime entry points
- (and fakes the existence of several others)
- if the NeXT runtime is being used. */
-/* Authors: Ziemowit Laski <zlaski@apple.com> */
-/* David Ayers <d.ayers@inode.at> */
-
-#ifdef __NEXT_RUNTIME__
-#include <objc/objc-class.h>
-#include <objc/Object.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define objc_get_class(C) objc_getClass(C)
-#define objc_get_meta_class(C) objc_getMetaClass(C)
-#define class_get_class_method(C, S) class_getClassMethod(C, S)
-#define class_get_instance_method(C, S) class_getInstanceMethod(C, S)
-#define method_get_imp(M) (((Method)M)->method_imp)
-#define sel_get_name(S) sel_getName(S)
-#define class_create_instance(C) class_createInstance(C, 0)
-#define class_get_class_name(C) object_getClassName(C)
-#define class_get_super_class(C) (((struct objc_class *)C)->super_class)
-#define object_get_super_class(O) class_get_super_class(*(struct objc_class **)O)
-#define objc_lookup_class(N) objc_lookUpClass(N)
-#define object_get_class(O) (*(struct objc_class **)O)
-#define class_is_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_CLASS)? YES: NO)
-#define class_is_meta_class(C) (CLS_GETINFO((struct objc_class *)C, CLS_META)? YES: NO)
-#define object_is_class(O) class_is_meta_class(*(struct objc_class **)O)
-#define object_is_meta_class(O) (class_is_meta_class(O) && class_is_meta_class(*(struct objc_class **)O))
-
-/* You need either an empty +initialize method or an empty -forward:: method.
- The NeXT runtime unconditionally sends +initialize to classes when they are
- first used, and unconditionally tries to forward methods that the class
- doesn't understand (including +initialize). If you have neither +initialize
- nor -forward::, the runtime complains.
-
- The simplest workaround is to add
-
- + initialize { return self; }
-
- to every root class @implementation. */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* The following is necessary to "cover" the bf*.m test cases on NeXT. */
-
-#undef MAX
-#undef MIN
-#undef ROUND
-
-#ifdef __cplusplus
-#define MAX(X, Y) ((X > Y) ? X : Y)
-#define MIN(X, Y) ((X < Y) ? X : Y)
-#define ROUND(V, A) (A * ((V + A - 1) / A))
-#else
-#define MAX(X, Y) \
- ({ typeof (X) __x = (X), __y = (Y); \
- (__x > __y ? __x : __y); })
-#define MIN(X, Y) \
- ({ typeof (X) __x = (X), __y = (Y); \
- (__x < __y ? __x : __y); })
-#define ROUND(V, A) \
- ({ typeof (V) __v = (V); typeof (A) __a = (A); \
- __a * ((__v+__a - 1)/__a); })
-#endif
-
-#define BITS_PER_UNIT __CHAR_BIT__
-typedef struct{ char a; } __small_struct;
-#define STRUCTURE_SIZE_BOUNDARY (BITS_PER_UNIT * sizeof (__small_struct))
-
-/* Not sure why the following are missing from NeXT objc headers... */
-
-#ifndef _C_LNG_LNG
-#define _C_LNG_LNG 'q'
-#endif
-#ifndef _C_ULNG_LNG
-#define _C_ULNG_LNG 'Q'
-#endif
-#ifndef _C_ATOM
-#define _C_ATOM '%'
-#endif
-#ifndef _C_BOOL
-#define _C_BOOL 'B'
-#endif
-
-#define _C_CONST 'r'
-#define _C_IN 'n'
-#define _C_INOUT 'N'
-#define _C_OUT 'o'
-#define _C_BYCOPY 'O'
-#define _C_BYREF 'R'
-#define _C_ONEWAY 'V'
-#define _C_GCINVISIBLE '!'
-
-#define _F_CONST 0x01
-#define _F_IN 0x01
-#define _F_OUT 0x02
-#define _F_INOUT 0x03
-#define _F_BYCOPY 0x04
-#define _F_BYREF 0x08
-#define _F_ONEWAY 0x10
-#define _F_GCINVISIBLE 0x20
-
-struct objc_struct_layout
-{
- const char *original_type;
- const char *type;
- const char *prev_type;
- unsigned int record_size;
- unsigned int record_align;
-};
-
-typedef union arglist {
- char *arg_ptr;
- char arg_regs[sizeof (char*)];
-} *arglist_t; /* argument frame */
-
-const char *objc_skip_typespec (const char *type);
-void objc_layout_structure_get_info (struct objc_struct_layout *layout,
- unsigned int *offset, unsigned int *align, const char **type);
-void objc_layout_structure (const char *type,
- struct objc_struct_layout *layout);
-BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
-void objc_layout_finish_structure (struct objc_struct_layout *layout,
- unsigned int *size, unsigned int *align);
-int objc_aligned_size (const char *type);
-
-/*
- return the size of an object specified by type
-*/
-
-int
-objc_sizeof_type (const char *type)
-{
- /* Skip the variable name if any */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
-
- switch (*type) {
- case _C_ID:
- return sizeof (id);
- break;
-
- case _C_CLASS:
- return sizeof (Class);
- break;
-
- case _C_SEL:
- return sizeof (SEL);
- break;
-
- case _C_CHR:
- return sizeof (char);
- break;
-
- case _C_UCHR:
- return sizeof (unsigned char);
- break;
-
- case _C_SHT:
- return sizeof (short);
- break;
-
- case _C_USHT:
- return sizeof (unsigned short);
- break;
-
- case _C_INT:
- return sizeof (int);
- break;
-
- case _C_UINT:
- return sizeof (unsigned int);
- break;
-
- case _C_LNG:
- return sizeof (long);
- break;
-
- case _C_ULNG:
- return sizeof (unsigned long);
- break;
-
- case _C_LNG_LNG:
- return sizeof (long long);
- break;
-
- case _C_ULNG_LNG:
- return sizeof (unsigned long long);
- break;
-
- case _C_FLT:
- return sizeof (float);
- break;
-
- case _C_DBL:
- return sizeof (double);
- break;
-
- case _C_PTR:
- case _C_ATOM:
- case _C_CHARPTR:
- return sizeof (char *);
- break;
-
- case _C_ARY_B:
- {
- int len = atoi (type + 1);
- while (isdigit ((unsigned char)*++type))
- ;
- return len * objc_aligned_size (type);
- }
- break;
-
- case _C_BFLD:
- {
- /* The NeXT encoding of bitfields is _still_: b 'size' */
- int size = atoi (type + 1);
- /* Return an upper bound on byte size */
- return (size + BITS_PER_UNIT - 1) / BITS_PER_UNIT;
- }
-
- case _C_STRUCT_B:
- {
- struct objc_struct_layout layout;
- unsigned int size;
-
- objc_layout_structure (type, &layout);
- while (objc_layout_structure_next_member (&layout))
- /* do nothing */ ;
- objc_layout_finish_structure (&layout, &size, NULL);
-
- return size;
- }
-
- case _C_UNION_B:
- {
- int max_size = 0;
- while (*type != _C_UNION_E && *type++ != '=')
- /* do nothing */;
- while (*type != _C_UNION_E)
- {
- /* Skip the variable name if any */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
- max_size = MAX (max_size, objc_sizeof_type (type));
- type = objc_skip_typespec (type);
- }
- return max_size;
- }
- }
- return 0; /* error */
-}
-
-
-/*
- Return the alignment of an object specified by type
-*/
-
-int
-objc_alignof_type (const char *type)
-{
- /* Skip the variable name if any */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
- switch (*type) {
- case _C_ID:
- return __alignof__ (id);
- break;
-
- case _C_CLASS:
- return __alignof__ (Class);
- break;
-
- case _C_SEL:
- return __alignof__ (SEL);
- break;
-
- case _C_CHR:
- return __alignof__ (char);
- break;
-
- case _C_UCHR:
- return __alignof__ (unsigned char);
- break;
-
- case _C_SHT:
- return __alignof__ (short);
- break;
-
- case _C_USHT:
- return __alignof__ (unsigned short);
- break;
-
- case _C_INT:
- case _C_BFLD: /* This is for the NeXT only */
- return __alignof__ (int);
- break;
-
- case _C_UINT:
- return __alignof__ (unsigned int);
- break;
-
- case _C_LNG:
- return __alignof__ (long);
- break;
-
- case _C_ULNG:
- return __alignof__ (unsigned long);
- break;
-
- case _C_LNG_LNG:
- return __alignof__ (long long);
- break;
-
- case _C_ULNG_LNG:
- return __alignof__ (unsigned long long);
- break;
-
- case _C_FLT:
- return __alignof__ (float);
- break;
-
- case _C_DBL:
- return __alignof__ (double);
- break;
-
- case _C_PTR:
- case _C_ATOM:
- case _C_CHARPTR:
- return __alignof__ (char *);
- break;
-
- case _C_ARY_B:
- while (isdigit ((unsigned char)*++type))
- /* do nothing */;
- return objc_alignof_type (type);
-
- case _C_STRUCT_B:
- {
- struct objc_struct_layout layout;
- unsigned int align;
-
- objc_layout_structure (type, &layout);
- while (objc_layout_structure_next_member (&layout))
- /* do nothing */;
- objc_layout_finish_structure (&layout, NULL, &align);
-
- return align;
- }
-
- case _C_UNION_B:
- {
- int maxalign = 0;
- while (*type != _C_UNION_E && *type++ != '=')
- /* do nothing */;
- while (*type != _C_UNION_E)
- {
- /* Skip the variable name if any */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
- maxalign = MAX (maxalign, objc_alignof_type (type));
- type = objc_skip_typespec (type);
- }
- return maxalign;
- }
- }
- return 0; /* error */
-}
-
-/*
- The aligned size if the size rounded up to the nearest alignment.
-*/
-
-int
-objc_aligned_size (const char *type)
-{
- int size, align;
-
- /* Skip the variable name */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
-
- size = objc_sizeof_type (type);
- align = objc_alignof_type (type);
-
- return ROUND (size, align);
-}
-
-/*
- The size rounded up to the nearest integral of the wordsize, taken
- to be the size of a void *.
-*/
-
-int
-objc_promoted_size (const char *type)
-{
- int size, wordsize;
-
- /* Skip the variable name */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
-
- size = objc_sizeof_type (type);
- wordsize = sizeof (void *);
-
- return ROUND (size, wordsize);
-}
-
-/*
- Skip type qualifiers. These may eventually precede typespecs
- occurring in method prototype encodings.
-*/
-
-inline const char *
-objc_skip_type_qualifiers (const char *type)
-{
- while (*type == _C_CONST
- || *type == _C_IN
- || *type == _C_INOUT
- || *type == _C_OUT
- || *type == _C_BYCOPY
- || *type == _C_BYREF
- || *type == _C_ONEWAY
- || *type == _C_GCINVISIBLE)
- {
- type += 1;
- }
- return type;
-}
-
-
-/*
- Skip one typespec element. If the typespec is prepended by type
- qualifiers, these are skipped as well.
-*/
-
-const char *
-objc_skip_typespec (const char *type)
-{
- /* Skip the variable name if any */
- if (*type == '"')
- {
- for (type++; *type++ != '"';)
- /* do nothing */;
- }
-
- type = objc_skip_type_qualifiers (type);
-
- switch (*type) {
-
- case _C_ID:
- /* An id may be annotated by the actual type if it is known
- with the @"ClassName" syntax */
-
- if (*++type != '"')
- return type;
- else
- {
- while (*++type != '"')
- /* do nothing */;
- return type + 1;
- }
-
- /* The following are one character type codes */
- case _C_CLASS:
- case _C_SEL:
- case _C_CHR:
- case _C_UCHR:
- case _C_CHARPTR:
- case _C_ATOM:
- case _C_SHT:
- case _C_USHT:
- case _C_INT:
- case _C_UINT:
- case _C_LNG:
- case _C_ULNG:
- case _C_LNG_LNG:
- case _C_ULNG_LNG:
- case _C_FLT:
- case _C_DBL:
- case _C_VOID:
- case _C_UNDEF:
- return ++type;
- break;
-
- case _C_ARY_B:
- /* skip digits, typespec and closing ']' */
-
- while (isdigit ((unsigned char)*++type))
- ;
- type = objc_skip_typespec (type);
- if (*type == _C_ARY_E)
- return ++type;
- else
- break; /* error */
-
- case _C_BFLD:
- /* The NeXT encoding for bitfields is _still_: b 'size' */
- while (isdigit ((unsigned char)*++type))
- ; /* skip type and size */
- return type;
-
- case _C_STRUCT_B:
- /* skip name, and elements until closing '}' */
-
- while (*type != _C_STRUCT_E && *type++ != '=')
- ;
- while (*type != _C_STRUCT_E)
- {
- type = objc_skip_typespec (type);
- }
- return ++type;
-
- case _C_UNION_B:
- /* skip name, and elements until closing ')' */
-
- while (*type != _C_UNION_E && *type++ != '=')
- ;
- while (*type != _C_UNION_E)
- {
- type = objc_skip_typespec (type);
- }
- return ++type;
-
- case _C_PTR:
- /* Just skip the following typespec */
-
- return objc_skip_typespec (++type);
- }
- return 0; /* error */
-}
-
-/*
- Skip an offset as part of a method encoding. This is prepended by a
- '+' if the argument is passed in registers.
-*/
-inline const char *
-objc_skip_offset (const char *type)
-{
- if (*type == '+')
- type++;
- while (isdigit ((unsigned char) *++type))
- ;
- return type;
-}
-
-/*
- Skip an argument specification of a method encoding.
-*/
-const char *
-objc_skip_argspec (const char *type)
-{
- type = objc_skip_typespec (type);
- type = objc_skip_offset (type);
- return type;
-}
-
-/*
- Return the number of arguments that the method MTH expects.
- Note that all methods need two implicit arguments `self' and
- `_cmd'.
-*/
-int
-method_get_number_of_arguments (struct objc_method *mth)
-{
- int i = 0;
- const char *type = mth->method_types;
- while (*type)
- {
- type = objc_skip_argspec (type);
- i += 1;
- }
- return i - 1;
-}
-
-/*
- Return the size of the argument block needed on the stack to invoke
- the method MTH. This may be zero, if all arguments are passed in
- registers.
-*/
-
-int
-method_get_sizeof_arguments (struct objc_method *mth)
-{
- const char *type = objc_skip_typespec (mth->method_types);
- return atoi (type);
-}
-
-/*
- Return a pointer to the next argument of ARGFRAME. type points to
- the last argument. Typical use of this look like:
-
- {
- char *datum, *type;
- for (datum = method_get_first_argument (method, argframe, &type);
- datum; datum = method_get_next_argument (argframe, &type))
- {
- unsigned flags = objc_get_type_qualifiers (type);
- type = objc_skip_type_qualifiers (type);
- if (*type != _C_PTR)
- [portal encodeData: datum ofType: type];
- else
- {
- if ((flags & _F_IN) == _F_IN)
- [portal encodeData: *(char **) datum ofType: ++type];
- }
- }
- }
-*/
-
-char *
-method_get_next_argument (arglist_t argframe, const char **type)
-{
- const char *t = objc_skip_argspec (*type);
-
- if (*t == '\0')
- return 0;
-
- *type = t;
- t = objc_skip_typespec (t);
-
- if (*t == '+')
- return argframe->arg_regs + atoi (++t);
- else
- return argframe->arg_ptr + atoi (t);
-}
-
-/*
- Return a pointer to the value of the first argument of the method
- described in M with the given argumentframe ARGFRAME. The type
- is returned in TYPE. type must be passed to successive calls of
- method_get_next_argument.
-*/
-char *
-method_get_first_argument (struct objc_method *m,
- arglist_t argframe,
- const char **type)
-{
- *type = m->method_types;
- return method_get_next_argument (argframe, type);
-}
-
-/*
- Return a pointer to the ARGth argument of the method
- M from the frame ARGFRAME. The type of the argument
- is returned in the value-result argument TYPE
-*/
-
-char *
-method_get_nth_argument (struct objc_method *m,
- arglist_t argframe, int arg,
- const char **type)
-{
- const char *t = objc_skip_argspec (m->method_types);
-
- if (arg > method_get_number_of_arguments (m))
- return 0;
-
- while (arg--)
- t = objc_skip_argspec (t);
-
- *type = t;
- t = objc_skip_typespec (t);
-
- if (*t == '+')
- return argframe->arg_regs + atoi (++t);
- else
- return argframe->arg_ptr + atoi (t);
-}
-
-unsigned
-objc_get_type_qualifiers (const char *type)
-{
- unsigned res = 0;
- BOOL flag = YES;
-
- while (flag)
- switch (*type++)
- {
- case _C_CONST: res |= _F_CONST; break;
- case _C_IN: res |= _F_IN; break;
- case _C_INOUT: res |= _F_INOUT; break;
- case _C_OUT: res |= _F_OUT; break;
- case _C_BYCOPY: res |= _F_BYCOPY; break;
- case _C_BYREF: res |= _F_BYREF; break;
- case _C_ONEWAY: res |= _F_ONEWAY; break;
- case _C_GCINVISIBLE: res |= _F_GCINVISIBLE; break;
- default: flag = NO;
- }
-
- return res;
-}
-
-
-/* The following three functions can be used to determine how a
- structure is laid out by the compiler. For example:
-
- struct objc_struct_layout layout;
- int i;
-
- objc_layout_structure (type, &layout);
- while (objc_layout_structure_next_member (&layout))
- {
- int position, align;
- const char *type;
-
- objc_layout_structure_get_info (&layout, &position, &align, &type);
- printf ("element %d has offset %d, alignment %d\n",
- i++, position, align);
- }
-
- These functions are used by objc_sizeof_type and objc_alignof_type
- functions to compute the size and alignment of structures. The
- previous method of computing the size and alignment of a structure
- was not working on some architectures, particulary on AIX, and in
- the presence of bitfields inside the structure. */
-void
-objc_layout_structure (const char *type,
- struct objc_struct_layout *layout)
-{
- const char *ntype;
-
- layout->original_type = ++type;
-
- /* Skip "<name>=" if any. Avoid embedded structures and unions. */
- ntype = type;
- while (*ntype != _C_STRUCT_E && *ntype != _C_STRUCT_B && *ntype != _C_UNION_B
- && *ntype++ != '=')
- /* do nothing */;
-
- /* If there's a "<name>=", ntype - 1 points to '='; skip the name */
- if (*(ntype - 1) == '=')
- type = ntype;
-
- layout->type = type;
- layout->prev_type = NULL;
- layout->record_size = 0;
- layout->record_align = MAX (BITS_PER_UNIT, STRUCTURE_SIZE_BOUNDARY);
-}
-
-
-BOOL
-objc_layout_structure_next_member (struct objc_struct_layout *layout)
-{
- register int desired_align = 0;
-
- /* The current type without the type qualifiers */
- const char *type;
-
- /* Add the size of the previous field to the size of the record. */
- if (layout->prev_type)
- {
- type = objc_skip_type_qualifiers (layout->prev_type);
-
- if (*type != _C_BFLD)
- layout->record_size += objc_sizeof_type (type) * BITS_PER_UNIT;
- else
- layout->record_size += atoi (++type);
- }
-
- if (*layout->type == _C_STRUCT_E)
- return NO;
-
- /* Skip the variable name if any */
- if (*layout->type == '"')
- {
- for (layout->type++; *layout->type++ != '"';)
- /* do nothing */;
- }
-
- type = objc_skip_type_qualifiers (layout->type);
-
- desired_align = objc_alignof_type (type) * BITS_PER_UNIT;
-
- /* Record must have at least as much alignment as any field.
- Otherwise, the alignment of the field within the record
- is meaningless. */
- layout->record_align = MAX (layout->record_align, desired_align);
-
- if (*type == _C_BFLD)
- {
- int bfld_size = atoi (++type);
- int int_align = __alignof__ (int) * BITS_PER_UNIT;
- /* If this bitfield would traverse a word alignment boundary, push it out
- to that boundary instead. */
- if (layout->record_size % int_align
- && (layout->record_size / int_align
- < (layout->record_size + bfld_size - 1) / int_align))
- layout->record_size = ROUND (layout->record_size, int_align);
- }
- else if (layout->record_size % desired_align != 0)
- {
- /* We need to skip space before this field.
- Bump the cumulative size to multiple of field alignment. */
- layout->record_size = ROUND (layout->record_size, desired_align);
- }
-
- /* Jump to the next field in record. */
-
- layout->prev_type = layout->type;
- layout->type = objc_skip_typespec (layout->type); /* skip component */
-
- return YES;
-}
-
-
-void objc_layout_finish_structure (struct objc_struct_layout *layout,
- unsigned int *size,
- unsigned int *align)
-{
- if (layout->type && *layout->type == _C_STRUCT_E)
- {
- /* Round the size up to be a multiple of the required alignment */
- layout->record_size = ROUND (layout->record_size, layout->record_align);
- layout->type = NULL;
- }
- if (size)
- *size = layout->record_size / BITS_PER_UNIT;
- if (align)
- *align = layout->record_align / BITS_PER_UNIT;
-}
-
-
-void objc_layout_structure_get_info (struct objc_struct_layout *layout,
- unsigned int *offset,
- unsigned int *align,
- const char **type)
-{
- if (offset)
- *offset = layout->record_size / BITS_PER_UNIT;
- if (align)
- *align = layout->record_align / BITS_PER_UNIT;
- if (type)
- *type = layout->prev_type;
-}
-
-/* A small, portable NSConstantString implementation for use with the NeXT
- runtime.
-
- On full-fledged Mac OS X systems, NSConstantString is provided
- as part of the Foundation framework. However, on bare Darwin systems,
- Foundation is not included, and hence there is no NSConstantString
- implementation to link against.
-
- This code is derived from the GNU runtime's NXConstantString implementation.
-*/
-
-struct objc_class _NSConstantStringClassReference;
-
-@interface NSConstantString : Object
-{
- char *c_string;
- unsigned int len;
-}
-
--(const char *) cString;
--(unsigned int) length;
-
-@end
-
-@implementation NSConstantString
-
--(const char *) cString
-{
- return (c_string);
-}
-
--(unsigned int) length
-{
- return (len);
-}
-
-@end
-
-/* The NSConstantString metaclass will need to be initialized before we can
- send messages to strings. */
-
-void objc_constant_string_init (void) __attribute__((constructor));
-void objc_constant_string_init (void) {
- memcpy (&_NSConstantStringClassReference,
- objc_getClass ("NSConstantString"),
- sizeof (_NSConstantStringClassReference));
-}
-
-#endif /* #ifdef __NEXT_RUNTIME__ */
View
906 gcc/gcc/testsuite/objc/execute/next_mapping.h
@@ -1,906 +0,0 @@
-/* This file "renames" various ObjC GNU runtime entry points
- (and fakes the existence of several others)
- if the NeXT runtime is being used. */
-/* Authors: Ziemowit Laski <zlaski@apple.com> */
-/* David Ayers <d.ayers@inode.at> */
-
-#ifdef __NEXT_RUNTIME__
-#include <objc/objc-class.h>
-#include <objc/Object.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define objc_get_class(C) objc_getClass(C)