Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
DiSL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DiSL
DiSL
Commits
8684c36a
Commit
8684c36a
authored
Apr 01, 2016
by
Lubomir Bulej
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the inlined net_ref_* functions static to get rid of compilation warnings.
parent
63d5d724
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
19 deletions
+8
-19
src-shvm-agent/netref.h
src-shvm-agent/netref.h
+8
-19
No files found.
src-shvm-agent/netref.h
View file @
8684c36a
...
...
@@ -65,43 +65,35 @@ static inline void set_bits(uint64_t * to, uint64_t bits,
*
to
|=
bits_pos
;
}
inline
jlong
net_ref_get_object_id
(
jlong
net_ref
)
{
static
inline
jlong
net_ref_get_object_id
(
jlong
net_ref
)
{
return
get_bits
(
net_ref
,
OBJECT_ID_MASK
,
OBJECT_ID_POS
);
}
inline
jint
net_ref_get_class_id
(
jlong
net_ref
)
{
static
inline
jint
net_ref_get_class_id
(
jlong
net_ref
)
{
return
get_bits
(
net_ref
,
CLASS_ID_MASK
,
CLASS_ID_POS
);
}
inline
unsigned
char
net_ref_get_spec
(
jlong
net_ref
)
{
static
inline
unsigned
char
net_ref_get_spec
(
jlong
net_ref
)
{
return
get_bits
(
net_ref
,
SPEC_MASK
,
SPEC_POS
);
}
inline
unsigned
char
net_ref_get_class_instance_bit
(
jlong
net_ref
)
{
static
inline
unsigned
char
net_ref_get_class_instance_bit
(
jlong
net_ref
)
{
return
get_bits
(
net_ref
,
CLASS_INSTANCE_MASK
,
CLASS_INSTANCE_POS
);
}
inline
void
net_ref_set_object_id
(
jlong
*
net_ref
,
jlong
object_id
)
{
static
inline
void
net_ref_set_object_id
(
jlong
*
net_ref
,
jlong
object_id
)
{
set_bits
((
uint64_t
*
)
net_ref
,
object_id
,
OBJECT_ID_MASK
,
OBJECT_ID_POS
);
}
inline
void
net_ref_set_class_id
(
jlong
*
net_ref
,
jint
class_id
)
{
static
inline
void
net_ref_set_class_id
(
jlong
*
net_ref
,
jint
class_id
)
{
set_bits
((
uint64_t
*
)
net_ref
,
class_id
,
CLASS_ID_MASK
,
CLASS_ID_POS
);
}
inline
void
net_ref_set_class_instance
(
jlong
*
net_ref
,
unsigned
char
cibit
)
{
static
inline
void
net_ref_set_class_instance
(
jlong
*
net_ref
,
unsigned
char
cibit
)
{
set_bits
((
uint64_t
*
)
net_ref
,
cibit
,
CLASS_INSTANCE_MASK
,
CLASS_INSTANCE_POS
);
}
inline
void
net_ref_set_spec
(
jlong
*
net_ref
,
unsigned
char
spec
)
{
static
inline
void
net_ref_set_spec
(
jlong
*
net_ref
,
unsigned
char
spec
)
{
set_bits
((
uint64_t
*
)
net_ref
,
spec
,
SPEC_MASK
,
SPEC_POS
);
}
...
...
@@ -111,7 +103,6 @@ inline void net_ref_set_spec(jlong * net_ref, unsigned char spec) {
// only retrieves object tag data
jlong
get_tag
(
jvmtiEnv
*
jvmti_env
,
jobject
obj
)
{
jlong
net_ref
;
jvmtiError
error
=
(
*
jvmti_env
)
->
GetTag
(
jvmti_env
,
obj
,
&
net_ref
);
...
...
@@ -126,12 +117,10 @@ jlong get_net_reference(JNIEnv * jni_env, jvmtiEnv * jvmti_env,
// !!! returned local reference should be freed
static
jclass
_get_class_for_object
(
JNIEnv
*
jni_env
,
jobject
obj
)
{
return
(
*
jni_env
)
->
GetObjectClass
(
jni_env
,
obj
);
}
static
int
_object_is_class
(
jvmtiEnv
*
jvmti_env
,
jobject
obj
)
{
// TODO isn't there better way?
jvmtiError
error
=
...
...
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