In libobjc/: 2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>

In libobjc/:
2011-06-03  Nicola Pero  <nicola.pero@meta-innovation.com>

	* Makefile.in (OBJC_H): Removed typedstream.h.
	(OBJC_DEPRECATED_H): Removed typedstream.h.
	(C_SOURCE_FILES): Removed archive.c.
	(Object.lo): Rule removed.
	(Object_gc.lo): Likewise.
	(archive.lo): Likewise.
	(archive_gc.lo): Likewise.
	* objc/deprecated/Object.h ([+streamVersion:], [-read], [-write],
	[-awake]): Removed.
	Do not include deprecated/typedstream.h.
	* Object.m: Removed the same methods.
	* archive.c: File removed.
	* objc/typedstream.h: File removed.
	* objc/deprecated/typedstream.h: File removed.
	* libobjc.def (__objc_read_nbyte_uint, __objc_read_nbyte_ulong,
	__objc_write_class, __objc_write_object, __objc_write_selector,
	objc_close_typed_stream, objc_end_of_typed_stream,
	objc_flush_typed_stream, objc_get_stream_class_version,
	objc_open_typed_stream, objc_open_typed_stream_for_file,
	objc_read_array, objc_read_char, objc_read_int, objc_read_long,
	objc_read_object, objc_read_selector, objc_read_short,
	objc_read_string, objc_read_type, objc_read_types,
	objc_read_unsigned_char, objc_read_unsigned_int,
	objc_read_unsigned_long, objc_read_unsigned_short,
	objc_write_array, objc_write_char, objc_write_int,
	objc_write_long, objc_write_object, objc_write_object_reference,
	objc_write_root_object, objc_write_selector, objc_write_short,
	objc_write_string, objc_write_string_atomic, objc_write_type,
	objc_write_types, objc_write_unsigned_char,
	objc_write_unsigned_int, objc_write_unsigned_long,
	objc_write_unsigned_short): Removed.
	
In gcc/testsuite/:
2011-06-03  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/type-stream-1.m: Test removed.
	* objc.dg/headers.m: Do not include typedstream.h.

From-SVN: r174593
This commit is contained in:
Nicola Pero 2011-06-03 00:43:14 +00:00 committed by Nicola Pero
parent ba4a8e3fd4
commit efad6bee02
12 changed files with 41 additions and 1928 deletions

View File

@ -1,3 +1,8 @@
2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/type-stream-1.m: Test removed.
* objc.dg/headers.m: Do not include typedstream.h.
2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/torture/forward-1.m (main): Updated testcase.

View File

@ -27,5 +27,4 @@
#ifndef __NEXT_RUNTIME__
#include <objc/sarray.h>
#include <objc/thr.h>
#include <objc/typedstream.h>
#endif

View File

@ -1,17 +0,0 @@
/* { dg-do compile } */
/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */
/* Test warning for deprecated typedstream functions. These functions
will be removed in the release after 4.6.0, at which point this
testcase can be removed too.
*/
#include <objc/typedstream.h>
void dummy (void)
{
TypedStream* t = objc_open_typed_stream_for_file ("dummy", 0); /* { dg-warning "deprecated" } */
objc_write_object (t, nil); /* { dg-warning "deprecated" } */
objc_read_object (t, NULL); /* { dg-warning "deprecated" } */
}

View File

@ -1,3 +1,37 @@
2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>
* Makefile.in (OBJC_H): Removed typedstream.h.
(OBJC_DEPRECATED_H): Removed typedstream.h.
(C_SOURCE_FILES): Removed archive.c.
(Object.lo): Rule removed.
(Object_gc.lo): Likewise.
(archive.lo): Likewise.
(archive_gc.lo): Likewise.
* objc/deprecated/Object.h ([+streamVersion:], [-read], [-write],
[-awake]): Removed.
Do not include deprecated/typedstream.h.
* Object.m: Removed the same methods.
* archive.c: File removed.
* objc/typedstream.h: File removed.
* objc/deprecated/typedstream.h: File removed.
* libobjc.def (__objc_read_nbyte_uint, __objc_read_nbyte_ulong,
__objc_write_class, __objc_write_object, __objc_write_selector,
objc_close_typed_stream, objc_end_of_typed_stream,
objc_flush_typed_stream, objc_get_stream_class_version,
objc_open_typed_stream, objc_open_typed_stream_for_file,
objc_read_array, objc_read_char, objc_read_int, objc_read_long,
objc_read_object, objc_read_selector, objc_read_short,
objc_read_string, objc_read_type, objc_read_types,
objc_read_unsigned_char, objc_read_unsigned_int,
objc_read_unsigned_long, objc_read_unsigned_short,
objc_write_array, objc_write_char, objc_write_int,
objc_write_long, objc_write_object, objc_write_object_reference,
objc_write_root_object, objc_write_selector, objc_write_short,
objc_write_string, objc_write_string_atomic, objc_write_type,
objc_write_types, objc_write_unsigned_char,
objc_write_unsigned_int, objc_write_unsigned_long,
objc_write_unsigned_short): Removed.
2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>
* Makefile.in (OBJC_DEPRECATED_H): Removed objc_error.h.

View File

@ -126,8 +126,7 @@ OBJC_H = \
\
hash.h \
objc-list.h \
sarray.h \
typedstream.h
sarray.h
# User-visible header files containing deprecated APIs, from the
# objc/deprecated directory
@ -157,8 +156,7 @@ OBJC_DEPRECATED_H = \
struct_objc_protocol_list.h \
struct_objc_selector.h \
struct_objc_static_instances.h \
struct_objc_symtab.h \
typedstream.h
struct_objc_symtab.h
# Objective-C source files to compile
OBJC_SOURCE_FILES = \
@ -170,7 +168,6 @@ OBJC_SOURCE_FILES = \
# C source files to compile
C_SOURCE_FILES = \
archive.c \
class.c \
encoding.c \
error.c \
@ -278,27 +275,6 @@ sendmsg_gc.lo: sendmsg.c runtime-info.h
# These files have separate rules because they require special
# compiler flags.
archive.lo: archive.c
$(LIBTOOL_COMPILE) $(CC) $< -c \
$(ALL_CFLAGS) $(INCLUDES) -Wno-deprecated-declarations \
-o $@
archive_gc.lo: archive.c
$(LIBTOOL_COMPILE) $(CC) $< -c \
$(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -Wno-deprecated-declarations \
-o $@
# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object.lo: Object.m
$(LIBTOOL_COMPILE) $(CC) $< -c \
$(ALL_CFLAGS) $(INCLUDES) -fgnu-runtime -Wno-deprecated-declarations \
-o $@
# -Wno-deprecated-declarations is for the objc/typedstream.h functions.
Object_gc.lo: Object.m
$(LIBTOOL_COMPILE) $(CC) $< -c \
$(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fgnu-runtime -Wno-deprecated-declarations \
-o $@
# -Wno-deprecated-declarations is to silence warnings from using
# _objc_unexpected_exception.

View File

@ -289,38 +289,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
return self;
}
+ (int)streamVersion: (TypedStream*)aStream
{
if (aStream->mode == OBJC_READONLY)
return objc_get_stream_class_version (aStream, self);
else
return class_get_version (self);
}
// These are used to write or read the instance variables
// declared in this particular part of the object. Subclasses
// should extend these, by calling [super read/write: aStream]
// before doing their own archiving. These methods are private, in
// the sense that they should only be called from subclasses.
- read: (TypedStream*)aStream
{
(void) aStream; /* UNUSED */
// [super read: aStream];
return self;
}
- write: (TypedStream*)aStream
{
(void) aStream; /* UNUSED */
// [super write: aStream];
return self;
}
- awake
{
// [super awake];
return self;
}
@end

File diff suppressed because it is too large Load Diff

View File

@ -85,48 +85,6 @@ objc_skip_argspec
objc_skip_offset
objc_skip_type_qualifiers
objc_skip_typespec
__objc_read_nbyte_uint
__objc_read_nbyte_ulong
__objc_write_class
__objc_write_object
__objc_write_selector
objc_close_typed_stream
objc_end_of_typed_stream
objc_flush_typed_stream
objc_get_stream_class_version
objc_open_typed_stream
objc_open_typed_stream_for_file
objc_read_array
objc_read_char
objc_read_int
objc_read_long
objc_read_object
objc_read_selector
objc_read_short
objc_read_string
objc_read_type
objc_read_types
objc_read_unsigned_char
objc_read_unsigned_int
objc_read_unsigned_long
objc_read_unsigned_short
objc_write_array
objc_write_char
objc_write_int
objc_write_long
objc_write_object
objc_write_object_reference
objc_write_root_object
objc_write_selector
objc_write_short
objc_write_string
objc_write_string_atomic
objc_write_type
objc_write_types
objc_write_unsigned_char
objc_write_unsigned_int
objc_write_unsigned_long
objc_write_unsigned_short
__objc_exec_class
__objc_init_dispatch_tables
__objc_install_premature_dtable

View File

@ -58,7 +58,6 @@ extern "C" {
/* All of the following includes were deprecated in GCC 4.6 and will
be removed in the next release. */
#include "deprecated/hash.h"
#include "deprecated/typedstream.h"
#include "deprecated/Object.h"
#ifdef __cplusplus

View File

@ -60,11 +60,5 @@
+ (int)version;
+ setVersion:(int)aVersion;
+ (int)streamVersion: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- read: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- write: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */
- awake; /* __attribute__ ((deprecated)) */
@end

View File

@ -1,141 +0,0 @@
/* GNU Objective-C Typed Streams interface.
Copyright (C) 1993, 1995, 2004, 2009 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.
Under Section 7 of GPL version 3, you are granted additional
permissions described in the GCC Runtime Library Exception, version
3.1, as published by the Free Software Foundation.
You should have received a copy of the GNU General Public License and
a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef __typedstream_INCLUDE_GNU
#define __typedstream_INCLUDE_GNU
/* The API in this file was entirely deprecated in GCC 4.6.0 and will
be removed in the following GCC release.
*/
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef int (*objc_typed_read_func)(void*, char*, int);
typedef int (*objc_typed_write_func)(void*, const char*, int);
typedef int (*objc_typed_flush_func)(void*);
typedef int (*objc_typed_eof_func)(void*);
#define OBJC_READONLY 0x01
#define OBJC_WRITEONLY 0x02
#define OBJC_MANAGED_STREAM 0x01
#define OBJC_FILE_STREAM 0x02
#define OBJC_MEMORY_STREAM 0x04
#define OBJC_TYPED_STREAM_VERSION 0x01
typedef struct objc_typed_stream {
void* physical;
cache_ptr object_table; /* read/written objects */
cache_ptr stream_table; /* other read/written but shared things.. */
cache_ptr class_table; /* class version mapping */
cache_ptr object_refs; /* forward references */
int mode; /* OBJC_READONLY or OBJC_WRITEONLY */
int type; /* MANAGED, FILE, MEMORY etc bit string */
int version; /* version used when writing */
int writing_root_p;
objc_typed_read_func read;
objc_typed_write_func write;
objc_typed_eof_func eof;
objc_typed_flush_func flush;
} TypedStream;
/* opcode masks */
#define _B_VALUE 0x1fU
#define _B_CODE 0xe0U
#define _B_SIGN 0x10U
#define _B_NUMBER 0x0fU
/* standard opcodes */
#define _B_INVALID 0x00U
#define _B_SINT 0x20U
#define _B_NINT 0x40U
#define _B_SSTR 0x60U
#define _B_NSTR 0x80U
#define _B_RCOMM 0xa0U
#define _B_UCOMM 0xc0U
#define _B_EXT 0xe0U
/* eXtension opcodes */
#define _BX_OBJECT 0x00U
#define _BX_CLASS 0x01U
#define _BX_SEL 0x02U
#define _BX_OBJREF 0x03U
#define _BX_OBJROOT 0x04U
#define _BX_EXT 0x1fU
/*
** Read and write objects as specified by TYPE. All the `last'
** arguments are pointers to the objects to read/write.
*/
int objc_write_type (TypedStream* stream, const char* type, const void* data) __attribute__ ((deprecated));
int objc_read_type (TypedStream* stream, const char* type, void* data) __attribute__ ((deprecated));
int objc_write_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
int objc_read_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated));
int objc_write_object_reference (TypedStream* stream, id object) __attribute__ ((deprecated));
int objc_write_root_object (TypedStream* stream, id object) __attribute__ ((deprecated));
long objc_get_stream_class_version (TypedStream* stream, Class class_type) __attribute__ ((deprecated));
/*
** Convenience functions
*/
int objc_write_array (TypedStream* stream, const char* type,
int count, const void* data) __attribute__ ((deprecated));
int objc_read_array (TypedStream* stream, const char* type,
int count, void* data) __attribute__ ((deprecated));
int objc_write_object (TypedStream* stream, id object) __attribute__ ((deprecated));
int objc_read_object (TypedStream* stream, id* object) __attribute__ ((deprecated));
/*
** Open a typed stream for reading or writing. MODE may be either of
** OBJC_READONLY or OBJC_WRITEONLY.
*/
TypedStream* objc_open_typed_stream (FILE* physical, int mode) __attribute__ ((deprecated));
TypedStream* objc_open_typed_stream_for_file (const char* file_name, int mode) __attribute__ ((deprecated));
void objc_close_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
BOOL objc_end_of_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
void objc_flush_typed_stream (TypedStream* stream) __attribute__ ((deprecated));
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* not __typedstream_INCLUDE_GNU */

View File

@ -1,4 +0,0 @@
#include "objc.h"
#include "deprecated/hash.h"
#include "deprecated/typedstream.h"