Skip to content

Commit 79bff21

Browse files
author
David Holmes
committed
8263709: Cleanup THREAD/TRAPS/CHECK usage in JRT_ENTRY routines
Reviewed-by: coleenp, hseigel, iklam, kvn
1 parent f4c3efd commit 79bff21

23 files changed

+907
-920
lines changed

src/hotspot/cpu/aarch64/interpreterRT_aarch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,11 @@ class SlowSignatureHandler
309309

310310

311311
JRT_ENTRY(address,
312-
InterpreterRuntime::slow_signature_handler(JavaThread* thread,
312+
InterpreterRuntime::slow_signature_handler(JavaThread* current,
313313
Method* method,
314314
intptr_t* from,
315315
intptr_t* to))
316-
methodHandle m(thread, (Method*)method);
316+
methodHandle m(current, (Method*)method);
317317
assert(m->is_native(), "sanity check");
318318

319319
// handle arguments

src/hotspot/cpu/arm/interpreterRT_arm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2008, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -364,8 +364,8 @@ class SlowSignatureHandler: public NativeSignatureIterator {
364364
}
365365
};
366366

367-
JRT_ENTRY(address, InterpreterRuntime::slow_signature_handler(JavaThread* thread, Method* method, intptr_t* from, intptr_t* to))
368-
methodHandle m(thread, (Method*)method);
367+
JRT_ENTRY(address, InterpreterRuntime::slow_signature_handler(JavaThread* current, Method* method, intptr_t* from, intptr_t* to))
368+
methodHandle m(current, (Method*)method);
369369
assert(m->is_native(), "sanity check");
370370
SlowSignatureHandler(m, (address)from, to).iterate(UCONST64(-1));
371371
return Interpreter::result_handler(m->result_type());

src/hotspot/cpu/ppc/interpreterRT_ppc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2012, 2013 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -147,15 +147,15 @@ void SignatureHandlerLibrary::pd_set_handler(address handler) {
147147

148148

149149
// Access function to get the signature.
150-
JRT_ENTRY(address, InterpreterRuntime::get_signature(JavaThread* thread, Method* method))
151-
methodHandle m(thread, method);
150+
JRT_ENTRY(address, InterpreterRuntime::get_signature(JavaThread* current, Method* method))
151+
methodHandle m(current, method);
152152
assert(m->is_native(), "sanity check");
153153
Symbol *s = m->signature();
154154
return (address) s->base();
155155
JRT_END
156156

157-
JRT_ENTRY(address, InterpreterRuntime::get_result_handler(JavaThread* thread, Method* method))
158-
methodHandle m(thread, method);
157+
JRT_ENTRY(address, InterpreterRuntime::get_result_handler(JavaThread* current, Method* method))
158+
methodHandle m(current, method);
159159
assert(m->is_native(), "sanity check");
160160
return AbstractInterpreter::result_handler(m->result_type());
161161
JRT_END

src/hotspot/cpu/s390/interpreterRT_s390.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
* Copyright (c) 2016 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -150,15 +150,15 @@ void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprin
150150

151151
void SignatureHandlerLibrary::pd_set_handler(address handler) {}
152152

153-
JRT_ENTRY(address, InterpreterRuntime::get_signature(JavaThread* thread, Method* method))
154-
methodHandle m(thread, method);
153+
JRT_ENTRY(address, InterpreterRuntime::get_signature(JavaThread* current, Method* method))
154+
methodHandle m(current, method);
155155
assert(m->is_native(), "sanity check");
156156
Symbol *s = m->signature();
157157
return (address) s->base();
158158
JRT_END
159159

160-
JRT_ENTRY(address, InterpreterRuntime::get_result_handler(JavaThread* thread, Method* method))
161-
methodHandle m(thread, method);
160+
JRT_ENTRY(address, InterpreterRuntime::get_result_handler(JavaThread* current, Method* method))
161+
methodHandle m(current, method);
162162
assert(m->is_native(), "sanity check");
163163
return AbstractInterpreter::result_handler(m->result_type());
164164
JRT_END

src/hotspot/cpu/x86/interpreterRT_x86_32.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -146,8 +146,8 @@ class SlowSignatureHandler: public NativeSignatureIterator {
146146
}
147147
};
148148

149-
JRT_ENTRY(address, InterpreterRuntime::slow_signature_handler(JavaThread* thread, Method* method, intptr_t* from, intptr_t* to))
150-
methodHandle m(thread, (Method*)method);
149+
JRT_ENTRY(address, InterpreterRuntime::slow_signature_handler(JavaThread* current, Method* method, intptr_t* from, intptr_t* to))
150+
methodHandle m(current, (Method*)method);
151151
assert(m->is_native(), "sanity check");
152152
// handle arguments
153153
SlowSignatureHandler(m, (address)from, to + 1).iterate((uint64_t)CONST64(-1));

src/hotspot/cpu/x86/interpreterRT_x86_64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,11 +496,11 @@ class SlowSignatureHandler
496496

497497

498498
JRT_ENTRY(address,
499-
InterpreterRuntime::slow_signature_handler(JavaThread* thread,
499+
InterpreterRuntime::slow_signature_handler(JavaThread* current,
500500
Method* method,
501501
intptr_t* from,
502502
intptr_t* to))
503-
methodHandle m(thread, (Method*)method);
503+
methodHandle m(current, (Method*)method);
504504
assert(m->is_native(), "sanity check");
505505

506506
// handle arguments

src/hotspot/cpu/zero/interpreterRT_zero.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
33
* Copyright 2007, 2008, 2010 Red Hat, Inc.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
@@ -153,11 +153,11 @@ void InterpreterRuntime::SignatureHandler::finalize() {
153153
}
154154

155155
JRT_ENTRY(address,
156-
InterpreterRuntime::slow_signature_handler(JavaThread* thread,
156+
InterpreterRuntime::slow_signature_handler(JavaThread* current,
157157
Method* method,
158158
intptr_t* unused1,
159159
intptr_t* unused2))
160-
ZeroStack *stack = thread->zero_stack();
160+
ZeroStack *stack = current->zero_stack();
161161

162162
int required_words =
163163
(align_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) +
@@ -166,7 +166,7 @@ JRT_ENTRY(address,
166166
stack->overflow_check(required_words, CHECK_NULL);
167167

168168
intptr_t *buf = (intptr_t *) stack->alloc(required_words * wordSize);
169-
SlowSignatureHandlerGenerator sshg(methodHandle(thread, method), buf);
169+
SlowSignatureHandlerGenerator sshg(methodHandle(current, method), buf);
170170
sshg.generate((uint64_t)CONST64(-1));
171171

172172
SignatureHandler *handler = sshg.handler();

0 commit comments

Comments
 (0)