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
e1a4d10f
Commit
e1a4d10f
authored
Jul 23, 2003
by
Tom Tromey
Committed by
Tom Tromey
Jul 23, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
boehm.cc (_Jv_BuildGCDescr): Wrote.
* boehm.cc (_Jv_BuildGCDescr): Wrote. Include limits.h. From-SVN: r69700
parent
5c798f92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
libjava/ChangeLog
+5
-0
libjava/boehm.cc
+42
-4
No files found.
libjava/ChangeLog
View file @
e1a4d10f
2003
-
07
-
22
Tom
Tromey
<
tromey
@
redhat
.
com
>
2003
-
07
-
22
Tom
Tromey
<
tromey
@
redhat
.
com
>
*
boehm
.
cc
(
_Jv_BuildGCDescr
):
Wrote
.
Include
limits
.
h
.
2003
-
07
-
22
Tom
Tromey
<
tromey
@
redhat
.
com
>
*
java
/
awt
/
Window
.
java
(
getWarningString
):
Just
return
the
*
java
/
awt
/
Window
.
java
(
getWarningString
):
Just
return
the
string
.
string
.
(
Window
):
Set
warningString
;
check
with
security
manager
.
(
Window
):
Set
warningString
;
check
with
security
manager
.
...
...
libjava/boehm.cc
View file @
e1a4d10f
// boehm.cc - interface between libjava and Boehm GC.
// boehm.cc - interface between libjava and Boehm GC.
/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000, 2001, 2002
, 2003
Free Software Foundation
This file is part of libgcj.
This file is part of libgcj.
...
@@ -11,6 +11,7 @@ details. */
...
@@ -11,6 +11,7 @@ details. */
#include <config.h>
#include <config.h>
#include <stdio.h>
#include <stdio.h>
#include <limits.h>
#include <jvm.h>
#include <jvm.h>
#include <gcj/cni.h>
#include <gcj/cni.h>
...
@@ -325,11 +326,48 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void * /*env*/)
...
@@ -325,11 +326,48 @@ _Jv_MarkArray (void *addr, void *msp, void *msl, void * /*env*/)
// since another one could be registered first. But the compiler also
// since another one could be registered first. But the compiler also
// knows this, so in that case everything else will break, too.
// knows this, so in that case everything else will break, too.
#define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0)
#define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0)
void
*
void
*
_Jv_BuildGCDescr
(
jclass
)
_Jv_BuildGCDescr
(
jclass
self
)
{
{
/* FIXME: We should really look at the class and build the descriptor. */
jlong
desc
=
0
;
return
(
void
*
)(
GCJ_DEFAULT_DESCR
);
// Note: for now we only consider a bitmap mark descriptor. We
// could also handle the case where the first N fields of a type are
// references. However, this is not very likely to be used by many
// classes, and it is easier to compute things this way.
for
(
jclass
klass
=
self
;
klass
!=
NULL
;
klass
=
klass
->
getSuperclass
())
{
jfieldID
field
=
JvGetFirstInstanceField
(
klass
);
int
count
=
JvNumInstanceFields
(
klass
);
for
(
int
i
=
0
;
i
<
count
;
++
i
)
{
if
(
field
->
isRef
())
{
unsigned
int
off
=
field
->
getOffset
();
// If we run into a weird situation, we bail.
if
(
off
%
sizeof
(
void
*
)
!=
0
)
return
(
void
*
)
(
GCJ_DEFAULT_DESCR
);
off
/=
sizeof
(
void
*
);
// Bottom 2 bits are reserved.
off
+=
2
;
// If we find a field outside the range of our bitmap,
// fall back to procedure marker.
if
(
off
>
CHAR_BIT
*
sizeof
(
void
*
))
return
(
void
*
)
(
GCJ_DEFAULT_DESCR
);
desc
|=
1
<<
off
;
}
field
=
field
->
getNextField
();
}
}
// For bitmap mark type, bottom bits are 01.
desc
|=
1
;
// Bogus warning avoidance (on many platforms).
return
(
void
*
)
(
unsigned
long
)
desc
;
}
}
// Allocate some space that is known to be pointer-free.
// Allocate some space that is known to be pointer-free.
...
...
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