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
2224b8cc
Commit
2224b8cc
authored
Aug 24, 1993
by
Kresten Krab Thorup
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(nil_method): Don't define it, import it from sendmsg.c.
(arglist_t): Data-definition changed. From-SVN: r5204
parent
62b9a712
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
30 deletions
+17
-30
gcc/objc/objc.h
+17
-30
No files found.
gcc/objc/objc.h
View file @
2224b8cc
...
@@ -123,51 +123,38 @@ typedef struct objc_protocol {
...
@@ -123,51 +123,38 @@ typedef struct objc_protocol {
struct
objc_method_description_list
*
instance_methods
,
*
class_methods
;
struct
objc_method_description_list
*
instance_methods
,
*
class_methods
;
}
Protocol
;
}
Protocol
;
#else
#else
/* __OBJC__ */
@
class
Protocol
;
@
class
Protocol
;
#endif
#endif
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 */
typedef
union
{
char
*
arg_ptr
;
char
arg_regs
[
sizeof
(
char
*
)];
}
*
arglist_t
;
/* argument 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
#if defined(__OBJC__)
#if defined(__OBJC__)
#include "objc/sarray.h"
#include "objc/sarray.h"
static
id
nil_method
(
id
rcv
,
SEL
op
,
...)
{
return
rcv
;
}
/*
This is the function called when messages are send to nil. You may
set a breakpoint in your debugger at this function to catch messages
too nil.
*/
extern
id
nil_method
(
id
rcv
,
SEL
op
,
...);
/*
The messager is inlined, thus it is defined here directly. The
inlining is quite time-consuming when optimizing. This will be
taken care of later by hand-coding the messager in the compiler.
*/
extern
__inline__
IMP
extern
__inline__
IMP
objc_msg_lookup
(
id
receiver
,
SEL
op
)
objc_msg_lookup
(
id
receiver
,
SEL
op
)
{
{
if
(
receiver
)
if
(
receiver
)
return
sarray_get
(
receiver
->
class_pointer
->
dtable
,
(
size_t
)
op
);
return
sarray_get
(
receiver
->
class_pointer
->
dtable
,
(
size_t
)
(
op
)
);
else
else
return
nil_method
;
return
nil_method
;
}
}
...
...
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