Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
65e1be69
Commit
65e1be69
authored
Apr 29, 1993
by
Kresten Krab Thorup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Uninstalled argframe macros
From-SVN: r4270
parent
0b80ea44
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
24 deletions
+53
-24
gcc/objc/Makefile.in
+14
-4
gcc/objc/Object.h
+3
-7
gcc/objc/Object.m
+2
-2
gcc/objc/misc.c
+2
-0
gcc/objc/objc.h
+28
-4
gcc/objc/sendmsg.c
+4
-7
No files found.
gcc/objc/Makefile.in
View file @
65e1be69
...
@@ -60,12 +60,9 @@ libobjc.a: $(OBJC_O)
...
@@ -60,12 +60,9 @@ libobjc.a: $(OBJC_O)
$(AR)
rc libobjc.a
$(OBJC_O)
$(AR)
rc libobjc.a
$(OBJC_O)
# ranlib is run in the parent directory's makefile.
# ranlib is run in the parent directory's makefile.
ARGFRAME_H
=
argframe.h af-sparc.h
OBJC_H
=
hash.h list.h sarray.h objc.h
\
OBJC_H
=
hash.h list.h sarray.h objc.h
\
objc-api.h cache.h
\
objc-api.h cache.h
\
Object.h Protocol.h mutex.h
\
Object.h Protocol.h mutex.h
$(ARGFRAME_H)
# copy objc headers to installation include directory
# copy objc headers to installation include directory
copy-headers
:
$(OBJC_H)
copy-headers
:
$(OBJC_H)
...
@@ -77,6 +74,19 @@ copy-headers: $(OBJC_H)
...
@@ -77,6 +74,19 @@ copy-headers: $(OBJC_H)
chmod a+r
$(incinstalldir)
/objc
;
\
chmod a+r
$(incinstalldir)
/objc
;
\
done
done
sendmsg.o
:
sendmsg.c fflags
$(GCC_FOR_TARGET)
`
cat
fflags
`
-c
$(GCC_CFLAGS)
$(SUBDIR_INCLUDES)
$(srcdir)
/objc/sendmsg.c
## Next to are for heuristics on forwarding mechanism...
_forward
:
_forward.c
-
$(GCC_FOR_TARGET)
-c
$(GCC_CFLAGS)
$(SUBDIR_INCLUDES)
$(srcdir)
/objc/_forward.c
-
$(GCC_FOR_TARGET)
./_forward.o
-o
_forward
if
[
!
-f
./_forward
]
;
then
touch ./_forward
;
fi
fflags
:
_forward
-
rm
-f
fflags
-
if
[
-s
./_forward
]
;
then
./_forward
>
fflags
;
else
touch fflags
;
fi
mostlyclean
:
mostlyclean
:
-
rm
-f
*
.o libobjc.a _forward fflags
-
rm
-f
*
.o libobjc.a _forward fflags
clean
:
mostlyclean
clean
:
mostlyclean
...
...
gcc/objc/Object.h
View file @
65e1be69
...
@@ -52,14 +52,10 @@ typedef char *STR; /* String alias */
...
@@ -52,14 +52,10 @@ typedef char *STR; /* String alias */
@class
Protocol
;
@class
Protocol
;
typedef
struct
objc_typed_stream
TypedStream
;
typedef
struct
objc_typed_stream
TypedStream
;
typedef
void
*
arglist_t
;
#endif
/* not __objc_INCLUDE_GNU */
#endif
/* not __objc_INCLUDE_GNU */
#ifndef __AF_FRAME
typedef
struct
__gnuc_af_frame
*
af_frame
;
#define __AF_FRAME
#endif
/*
/*
* All classes are derived from Object. As such,
* All classes are derived from Object. As such,
* this is the overhead tacked onto those objects.
* this is the overhead tacked onto those objects.
...
@@ -123,8 +119,8 @@ typedef struct __gnuc_af_frame *af_frame;
...
@@ -123,8 +119,8 @@ typedef struct __gnuc_af_frame *af_frame;
-
-
perform
:(
SEL
)
aSel
with
:
anObject1
with
:
anObject2
;
-
-
perform
:(
SEL
)
aSel
with
:
anObject1
with
:
anObject2
;
/* Forwarding */
/* Forwarding */
-
-
forward
:(
SEL
)
aSel
:
(
af_fra
me
)
argFrame
;
-
-
forward
:(
SEL
)
aSel
:
(
arglist
_t
)
argFrame
;
-
-
performv
:(
SEL
)
aSel
:
(
af_fra
me
)
argFrame
;
-
-
performv
:(
SEL
)
aSel
:
(
arglist
_t
)
argFrame
;
/* Posing */
/* Posing */
+
+
poseAs
:(
Class
*
)
aClassObject
;
+
+
poseAs
:(
Class
*
)
aClassObject
;
...
...
gcc/objc/Object.m
View file @
65e1be69
...
@@ -245,12 +245,12 @@ extern int errno;
...
@@ -245,12 +245,12 @@ extern int errno;
return
(
*
msg
)(
self
,
aSel
,
anObject1
,
anObject2
);
return
(
*
msg
)(
self
,
aSel
,
anObject1
,
anObject2
);
}
}
-
forward
:
(
SEL
)
aSel
:
(
a
f_frame
)
argFrame
-
forward
:
(
SEL
)
aSel
:
(
a
rglist_t
)
argFrame
{
{
return
[
self
doesNotRecognize
:
aSel
];
return
[
self
doesNotRecognize
:
aSel
];
}
}
-
performv
:
(
SEL
)
aSel
:
(
a
f_frame
)
argFrame
-
performv
:
(
SEL
)
aSel
:
(
a
rglist_t
)
argFrame
{
{
return
objc_msg_sendv
(
self
,
aSel
,
method_get_argsize
(
0
),
argFrame
);
return
objc_msg_sendv
(
self
,
aSel
,
method_get_argsize
(
0
),
argFrame
);
}
}
...
...
gcc/objc/misc.c
View file @
65e1be69
...
@@ -26,6 +26,8 @@ You should have received a copy of the GNU General Public License along with
...
@@ -26,6 +26,8 @@ You should have received a copy of the GNU General Public License along with
#include "runtime.h"
#include "runtime.h"
void
objc_error
(
id
object
,
const
char
*
fmt
,
va_list
);
void
(
*
_objc_error
)(
id
,
const
char
*
,
va_list
)
=
objc_error
;
void
(
*
_objc_error
)(
id
,
const
char
*
,
va_list
)
=
objc_error
;
/* id (*_objc_object_alloc)(Class*) = 0; */
/* id (*_objc_object_alloc)(Class*) = 0; */
/* id (*_objc_object_dispose)(id) = 0; */
/* id (*_objc_object_dispose)(id) = 0; */
...
...
gcc/objc/objc.h
View file @
65e1be69
...
@@ -440,12 +440,36 @@ IMP objc_msg_lookup_super(Super_t super, SEL sel);
...
@@ -440,12 +440,36 @@ IMP objc_msg_lookup_super(Super_t super, SEL sel);
typedef
void
*
retval_t
;
/* return value */
typedef
void
*
retval_t
;
/* return value */
typedef
void
(
*
apply_t
)(
void
);
/* function pointer */
typedef
void
(
*
apply_t
)(
void
);
/* function pointer */
#ifndef __AF_FRAME
#ifndef __object_INCLUDE_GNU
typedef
struct
__gnuc_af_frame
*
af_frame
;
#define __AF_FRAME
#if defined(REG_ARGS) || defined(STACK_ARGS)
typedef
struct
{
char
*
arg_pointer
;
#ifdef STRUCT_RETURN
void
*
struct_return
;
#endif
#ifdef REG_ARGS
void
*
regs
[
2
];
#endif
}
*
arglist_t
;
#ifdef REG_ARGS
#define __objc_frame_receiver(FRAME) (FRAME)->regs[0]
#define __objc_frame_selector(FRAME) ((SEL)(FRAME)->regs[1])
#else
#define __objc_frame_receiver(FRAME) ((id*)(FRAME)->arg_pointer)[0]
#define __objc_frame_selector(FRAME) ((SEL*)(FRAME)->arg_pointer)[1]
#endif
#else
typedef
void
*
arglist_t
;
#endif
#endif
#endif
/* not __object_INCLUDE_GNU */
retval_t
objc_msg_sendv
(
id
,
SEL
,
size_t
,
a
f_frame
);
retval_t
objc_msg_sendv
(
id
,
SEL
,
size_t
,
a
rglist_t
);
#ifdef __OBJC__
#ifdef __OBJC__
...
...
gcc/objc/sendmsg.c
View file @
65e1be69
...
@@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License along with
...
@@ -25,7 +25,6 @@ You should have received a copy of the GNU General Public License along with
covered by the GNU General Public License. */
covered by the GNU General Public License. */
#include "runtime.h"
#include "runtime.h"
#include "argframe.h"
#ifdef OBJC_SPARSE_LOOKUP
#ifdef OBJC_SPARSE_LOOKUP
const
char
*
__objc_sparse_lookup_id
=
"Method lookup uses sparse arrays"
;
const
char
*
__objc_sparse_lookup_id
=
"Method lookup uses sparse arrays"
;
...
@@ -111,13 +110,11 @@ objc_msg_lookup_super (Super_t super, SEL sel)
...
@@ -111,13 +110,11 @@ objc_msg_lookup_super (Super_t super, SEL sel)
}
}
retval_t
retval_t
objc_msg_sendv
(
id
object
,
SEL
op
,
size_t
frame_size
,
a
f_frame
arg_frame
)
objc_msg_sendv
(
id
object
,
SEL
op
,
size_t
frame_size
,
a
rglist_t
arg_frame
)
{
{
#ifndef __ARGFRAME_DOES_NOT_WORK
#ifdef __objc_frame_receiver
af_cum
cum
;
__objc_frame_receiver
(
arg_frame
)
=
object
;
af_start
(
cum
,
arg_frame
);
__objc_frame_selector
(
arg_frame
)
=
op
;
af_put
(
arg_frame
,
cum
,
id
,
object
);
af_put
(
arg_frame
,
cum
,
SEL
,
op
);
return
__builtin_apply
((
apply_t
)
get_imp
(
object
->
class_pointer
,
op
),
return
__builtin_apply
((
apply_t
)
get_imp
(
object
->
class_pointer
,
op
),
arg_frame
,
arg_frame
,
frame_size
);
frame_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment