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
6a305f32
Commit
6a305f32
authored
Aug 11, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting changes.
From-SVN: r12617
parent
2a7c93ee
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
19 deletions
+35
-19
gcc/objc/archive.c
+16
-8
gcc/objc/class.c
+2
-1
gcc/objc/objc.h
+4
-4
gcc/objc/sarray.c
+2
-1
gcc/objc/thr-decosf1.c
+2
-1
gcc/objc/thr-mach.c
+3
-2
gcc/objc/thr-win32.c
+5
-1
gcc/objc/thr.c
+1
-1
No files found.
gcc/objc/archive.c
View file @
6a305f32
...
@@ -141,7 +141,8 @@ __objc_code_unsigned_short (unsigned char* buf, unsigned short val)
...
@@ -141,7 +141,8 @@ __objc_code_unsigned_short (unsigned char* buf, unsigned short val)
}
}
int
int
objc_write_unsigned_short
(
struct
objc_typed_stream
*
stream
,
unsigned
short
value
)
objc_write_unsigned_short
(
struct
objc_typed_stream
*
stream
,
unsigned
short
value
)
{
{
unsigned
char
buf
[
sizeof
(
unsigned
short
)
+
1
];
unsigned
char
buf
[
sizeof
(
unsigned
short
)
+
1
];
int
len
=
__objc_code_unsigned_short
(
buf
,
value
);
int
len
=
__objc_code_unsigned_short
(
buf
,
value
);
...
@@ -252,7 +253,8 @@ __objc_code_unsigned_long (unsigned char* buf, unsigned long val)
...
@@ -252,7 +253,8 @@ __objc_code_unsigned_long (unsigned char* buf, unsigned long val)
}
}
int
int
objc_write_unsigned_long
(
struct
objc_typed_stream
*
stream
,
unsigned
long
value
)
objc_write_unsigned_long
(
struct
objc_typed_stream
*
stream
,
unsigned
long
value
)
{
{
unsigned
char
buf
[
sizeof
(
unsigned
long
)
+
1
];
unsigned
char
buf
[
sizeof
(
unsigned
long
)
+
1
];
int
len
=
__objc_code_unsigned_long
(
buf
,
value
);
int
len
=
__objc_code_unsigned_long
(
buf
,
value
);
...
@@ -315,7 +317,8 @@ objc_write_string_atomic (struct objc_typed_stream* stream,
...
@@ -315,7 +317,8 @@ objc_write_string_atomic (struct objc_typed_stream* stream,
}
}
static
int
static
int
objc_write_register_common
(
struct
objc_typed_stream
*
stream
,
unsigned
long
key
)
objc_write_register_common
(
struct
objc_typed_stream
*
stream
,
unsigned
long
key
)
{
{
unsigned
char
buf
[
sizeof
(
unsigned
long
)
+
2
];
unsigned
char
buf
[
sizeof
(
unsigned
long
)
+
2
];
int
len
=
__objc_code_unsigned_long
(
buf
+
1
,
key
);
int
len
=
__objc_code_unsigned_long
(
buf
+
1
,
key
);
...
@@ -488,7 +491,8 @@ objc_write_selector (struct objc_typed_stream* stream, SEL selector)
...
@@ -488,7 +491,8 @@ objc_write_selector (struct objc_typed_stream* stream, SEL selector)
else
else
{
{
int
length
;
int
length
;
hash_add
(
&
stream
->
stream_table
,
LONG2PTR
(
key
=
PTR2LONG
(
sel_name
)),
(
char
*
)
sel_name
);
hash_add
(
&
stream
->
stream_table
,
LONG2PTR
(
key
=
PTR2LONG
(
sel_name
)),
(
char
*
)
sel_name
);
if
((
length
=
objc_write_register_common
(
stream
,
key
)))
if
((
length
=
objc_write_register_common
(
stream
,
key
)))
return
__objc_write_selector
(
stream
,
selector
);
return
__objc_write_selector
(
stream
,
selector
);
return
length
;
return
length
;
...
@@ -840,8 +844,10 @@ objc_read_object (struct objc_typed_stream* stream, id* object)
...
@@ -840,8 +844,10 @@ objc_read_object (struct objc_typed_stream* stream, id* object)
{
{
struct
objc_list
*
other
;
struct
objc_list
*
other
;
len
=
objc_read_unsigned_long
(
stream
,
&
key
);
len
=
objc_read_unsigned_long
(
stream
,
&
key
);
other
=
(
struct
objc_list
*
)
hash_value_for_key
(
stream
->
object_refs
,
LONG2PTR
(
key
));
other
=
(
struct
objc_list
*
)
hash_value_for_key
(
stream
->
object_refs
,
hash_add
(
&
stream
->
object_refs
,
LONG2PTR
(
key
),
(
void
*
)
list_cons
(
object
,
other
));
LONG2PTR
(
key
));
hash_add
(
&
stream
->
object_refs
,
LONG2PTR
(
key
),
(
void
*
)
list_cons
(
object
,
other
));
}
}
else
if
(
buf
[
0
]
==
(
_B_EXT
|
_BX_OBJROOT
))
/* a root object */
else
if
(
buf
[
0
]
==
(
_B_EXT
|
_BX_OBJROOT
))
/* a root object */
...
@@ -948,7 +954,8 @@ objc_read_selector (struct objc_typed_stream* stream, SEL* selector)
...
@@ -948,7 +954,8 @@ objc_read_selector (struct objc_typed_stream* stream, SEL* selector)
if
(
key
)
if
(
key
)
__objc_fatal
(
"cannot register use upcode..."
);
__objc_fatal
(
"cannot register use upcode..."
);
len
=
__objc_read_nbyte_ulong
(
stream
,
(
buf
[
0
]
&
_B_VALUE
),
&
key
);
len
=
__objc_read_nbyte_ulong
(
stream
,
(
buf
[
0
]
&
_B_VALUE
),
&
key
);
(
*
selector
)
=
hash_value_for_key
(
stream
->
stream_table
,
LONG2PTR
(
key
));
(
*
selector
)
=
hash_value_for_key
(
stream
->
stream_table
,
LONG2PTR
(
key
));
}
}
else
else
...
@@ -1019,7 +1026,8 @@ objc_write_type(TypedStream* stream, const char* type, const void* data)
...
@@ -1019,7 +1026,8 @@ objc_write_type(TypedStream* stream, const char* type, const void* data)
break
;
break
;
case
_C_ATOM
:
case
_C_ATOM
:
return
objc_write_string_atomic
(
stream
,
*
(
char
**
)
data
,
strlen
(
*
(
char
**
)
data
));
return
objc_write_string_atomic
(
stream
,
*
(
char
**
)
data
,
strlen
(
*
(
char
**
)
data
));
break
;
break
;
case
_C_ARY_B
:
case
_C_ARY_B
:
...
...
gcc/objc/class.c
View file @
6a305f32
...
@@ -306,7 +306,8 @@ class_pose_as (Class impostor, Class super_class)
...
@@ -306,7 +306,8 @@ class_pose_as (Class impostor, Class super_class)
if
(
CLS_ISCLASS
(
sub
))
if
(
CLS_ISCLASS
(
sub
))
{
{
/* meta classes */
/* meta classes */
CLASSOF
(
sub
)
->
sibling_class
=
CLASSOF
(
impostor
)
->
subclass_list
;
CLASSOF
(
sub
)
->
sibling_class
=
CLASSOF
(
impostor
)
->
subclass_list
;
CLASSOF
(
sub
)
->
super_class
=
CLASSOF
(
impostor
);
CLASSOF
(
sub
)
->
super_class
=
CLASSOF
(
impostor
);
CLASSOF
(
impostor
)
->
subclass_list
=
CLASSOF
(
sub
);
CLASSOF
(
impostor
)
->
subclass_list
=
CLASSOF
(
sub
);
}
}
...
...
gcc/objc/objc.h
View file @
6a305f32
/* Basic data types for Objective C.
/* Basic data types for Objective C.
Copyright (C) 1993, 1995 Free Software Foundation, Inc.
Copyright (C) 1993, 1995
, 1996
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -103,9 +103,9 @@ struct objc_class {
...
@@ -103,9 +103,9 @@ struct objc_class {
unsigned
long
info
;
/* Bit mask. See class masks
unsigned
long
info
;
/* Bit mask. See class masks
defined above. */
defined above. */
long
instance_size
;
/* Size in bytes of the class.
long
instance_size
;
/* Size in bytes of the class.
The sum of the class
definition
The sum of the class
and all super class
definition and all super
definitions. */
class
definitions. */
struct
objc_ivar_list
*
ivars
;
/* Pointer to a structure that
struct
objc_ivar_list
*
ivars
;
/* Pointer to a structure that
describes the instance
describes the instance
variables in the class
variables in the class
...
...
gcc/objc/sarray.c
View file @
6a305f32
...
@@ -174,7 +174,8 @@ sarray_at_put(struct sarray* array, sidx index, void* element)
...
@@ -174,7 +174,8 @@ sarray_at_put(struct sarray* array, sidx index, void* element)
/* The bucket was previously empty (or something like that), */
/* The bucket was previously empty (or something like that), */
/* allocate a new. This is the effect of `lazy' allocation */
/* allocate a new. This is the effect of `lazy' allocation */
new_bucket
=
(
struct
sbucket
*
)
__objc_xmalloc
(
sizeof
(
struct
sbucket
));
new_bucket
=
(
struct
sbucket
*
)
__objc_xmalloc
(
sizeof
(
struct
sbucket
));
memcpy
((
void
*
)
new_bucket
,
(
const
void
*
)
array
->
empty_bucket
,
sizeof
(
struct
sbucket
));
memcpy
((
void
*
)
new_bucket
,
(
const
void
*
)
array
->
empty_bucket
,
sizeof
(
struct
sbucket
));
new_bucket
->
version
.
version
=
array
->
version
.
version
;
new_bucket
->
version
.
version
=
array
->
version
.
version
;
*
the_bucket
=
new_bucket
;
/* Prepared for install. */
*
the_bucket
=
new_bucket
;
/* Prepared for install. */
...
...
gcc/objc/thr-decosf1.c
View file @
6a305f32
...
@@ -82,7 +82,8 @@ objc_thread_create(void (*func)(void *arg), void *arg)
...
@@ -82,7 +82,8 @@ objc_thread_create(void (*func)(void *arg), void *arg)
if
(
pthread_create
(
&
new_thread_handle
,
pthread_attr_default
,
if
(
pthread_create
(
&
new_thread_handle
,
pthread_attr_default
,
(
void
*
)
func
,
arg
)
==
0
)
{
(
void
*
)
func
,
arg
)
==
0
)
{
thread_id
=
*
(
_objc_thread_t
*
)
&
new_thread_handle
;
/* ??? May not work! (64bit)*/
/* ??? May not work! (64bit)*/
thread_id
=
*
(
_objc_thread_t
*
)
&
new_thread_handle
;
pthread_detach
(
&
new_thread_handle
);
/* Fully detach thread. */
pthread_detach
(
&
new_thread_handle
);
/* Fully detach thread. */
__objc_runtime_threads_alive
++
;
__objc_runtime_threads_alive
++
;
}
}
...
...
gcc/objc/thr-mach.c
View file @
6a305f32
...
@@ -107,7 +107,8 @@ objc_thread_create(void (*func)(void *arg), void *arg)
...
@@ -107,7 +107,8 @@ objc_thread_create(void (*func)(void *arg), void *arg)
new_thread_handle
=
cthread_fork
((
cthread_fn_t
)
func
,
arg
);
new_thread_handle
=
cthread_fork
((
cthread_fn_t
)
func
,
arg
);
if
(
new_thread_handle
)
{
if
(
new_thread_handle
)
{
thread_id
=
*
(
_objc_thread_t
*
)
&
new_thread_handle
;
/* this is not terribly portable */
/* this is not terribly portable */
thread_id
=
*
(
_objc_thread_t
*
)
&
new_thread_handle
;
cthread_detach
(
new_thread_handle
);
/* fully detach thread */
cthread_detach
(
new_thread_handle
);
/* fully detach thread */
__objc_runtime_threads_alive
++
;
/* increment thread count */
__objc_runtime_threads_alive
++
;
/* increment thread count */
}
}
...
@@ -123,7 +124,7 @@ int
...
@@ -123,7 +124,7 @@ int
objc_thread_set_priority
(
int
priority
)
objc_thread_set_priority
(
int
priority
)
{
{
_objc_thread_t
*
t
=
objc_thread_id
();
_objc_thread_t
*
t
=
objc_thread_id
();
cthread_t
cT
=
(
cthread_t
)
t
;
/* see objc_thread_id() */
cthread_t
cT
=
(
cthread_t
)
t
;
int
maxPriority
=
__mach_get_max_thread_priority
(
cT
,
NULL
);
int
maxPriority
=
__mach_get_max_thread_priority
(
cT
,
NULL
);
int
sys_priority
=
0
;
int
sys_priority
=
0
;
...
...
gcc/objc/thr-win32.c
View file @
6a305f32
...
@@ -24,10 +24,14 @@ Boston, MA 02111-1307, USA. */
...
@@ -24,10 +24,14 @@ Boston, MA 02111-1307, USA. */
however invalidate any other reasons why the executable file might be
however invalidate any other reasons why the executable file might be
covered by the GNU General Public License. */
covered by the GNU General Public License. */
#include <windows.h>
#include <objc/thr.h>
#include <objc/thr.h>
#include "runtime.h"
#include "runtime.h"
#ifndef __OBJC__
#define __OBJC__
#endif
#include <windows.h>
/********
/********
* This structure represents a single mutual exclusion lock. Lock semantics
* This structure represents a single mutual exclusion lock. Lock semantics
* are detailed with the subsequent functions. We use whatever lock is
* are detailed with the subsequent functions. We use whatever lock is
...
...
gcc/objc/thr.c
View file @
6a305f32
...
@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
...
@@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <stdlib.h>
#include "runtime.h"
#include "runtime.h"
/*************************************************************************
****
/*************************************************************************
* Universal static variables:
* Universal static variables:
*/
*/
int
__objc_thread_exit_status
=
0
;
/* Global exit status. */
int
__objc_thread_exit_status
=
0
;
/* Global exit status. */
...
...
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