diff options
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r-- | runtime/interpreter/interpreter_common.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 7b38473dd7..9d76685fb5 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -66,7 +66,7 @@ namespace art { namespace interpreter { void ThrowNullPointerExceptionFromInterpreter() - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); template <bool kMonitorCounting> static inline void DoMonitorEnter(Thread* self, @@ -108,13 +108,13 @@ static inline bool DoMonitorCheckOnExit(Thread* self, ShadowFrame* frame) void AbortTransactionF(Thread* self, const char* fmt, ...) __attribute__((__format__(__printf__, 2, 3))) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); void AbortTransactionV(Thread* self, const char* fmt, va_list args) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); void RecordArrayElementsInTransaction(mirror::Array* array, int32_t count) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Invokes the given method. This is part of the invocation support and is used by DoInvoke and // DoInvokeVirtualQuick functions. @@ -213,32 +213,32 @@ static inline bool DoInvokeVirtualQuick(Thread* self, ShadowFrame& shadow_frame, // Returns true on success, otherwise throws an exception and returns false. template<FindFieldType find_type, Primitive::Type field_type, bool do_access_check> bool DoFieldGet(Thread* self, ShadowFrame& shadow_frame, const Instruction* inst, - uint16_t inst_data) SHARED_REQUIRES(Locks::mutator_lock_); + uint16_t inst_data) REQUIRES_SHARED(Locks::mutator_lock_); // Handles iget-quick, iget-wide-quick and iget-object-quick instructions. // Returns true on success, otherwise throws an exception and returns false. template<Primitive::Type field_type> bool DoIGetQuick(ShadowFrame& shadow_frame, const Instruction* inst, uint16_t inst_data) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Handles iput-XXX and sput-XXX instructions. // Returns true on success, otherwise throws an exception and returns false. template<FindFieldType find_type, Primitive::Type field_type, bool do_access_check, bool transaction_active> bool DoFieldPut(Thread* self, const ShadowFrame& shadow_frame, const Instruction* inst, - uint16_t inst_data) SHARED_REQUIRES(Locks::mutator_lock_); + uint16_t inst_data) REQUIRES_SHARED(Locks::mutator_lock_); // Handles iput-quick, iput-wide-quick and iput-object-quick instructions. // Returns true on success, otherwise throws an exception and returns false. template<Primitive::Type field_type, bool transaction_active> bool DoIPutQuick(const ShadowFrame& shadow_frame, const Instruction* inst, uint16_t inst_data) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Handles string resolution for const-string and const-string-jumbo instructions. Also ensures the // java.lang.String class is initialized. static inline String* ResolveString(Thread* self, ShadowFrame& shadow_frame, uint32_t string_idx) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { Class* java_lang_string_class = String::GetJavaLangString(); if (UNLIKELY(!java_lang_string_class->IsInitialized())) { ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); @@ -272,7 +272,7 @@ static inline String* ResolveString(Thread* self, ShadowFrame& shadow_frame, uin // Returns true on success, otherwise throws a java.lang.ArithmeticException and return false. static inline bool DoIntDivide(ShadowFrame& shadow_frame, size_t result_reg, int32_t dividend, int32_t divisor) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { constexpr int32_t kMinInt = std::numeric_limits<int32_t>::min(); if (UNLIKELY(divisor == 0)) { ThrowArithmeticExceptionDivideByZero(); @@ -290,7 +290,7 @@ static inline bool DoIntDivide(ShadowFrame& shadow_frame, size_t result_reg, // Returns true on success, otherwise throws a java.lang.ArithmeticException and return false. static inline bool DoIntRemainder(ShadowFrame& shadow_frame, size_t result_reg, int32_t dividend, int32_t divisor) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { constexpr int32_t kMinInt = std::numeric_limits<int32_t>::min(); if (UNLIKELY(divisor == 0)) { ThrowArithmeticExceptionDivideByZero(); @@ -308,7 +308,7 @@ static inline bool DoIntRemainder(ShadowFrame& shadow_frame, size_t result_reg, // Returns true on success, otherwise throws a java.lang.ArithmeticException and return false. static inline bool DoLongDivide(ShadowFrame& shadow_frame, size_t result_reg, int64_t dividend, int64_t divisor) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { const int64_t kMinLong = std::numeric_limits<int64_t>::min(); if (UNLIKELY(divisor == 0)) { ThrowArithmeticExceptionDivideByZero(); @@ -326,7 +326,7 @@ static inline bool DoLongDivide(ShadowFrame& shadow_frame, size_t result_reg, // Returns true on success, otherwise throws a java.lang.ArithmeticException and return false. static inline bool DoLongRemainder(ShadowFrame& shadow_frame, size_t result_reg, int64_t dividend, int64_t divisor) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { const int64_t kMinLong = std::numeric_limits<int64_t>::min(); if (UNLIKELY(divisor == 0)) { ThrowArithmeticExceptionDivideByZero(); @@ -350,7 +350,7 @@ bool DoFilledNewArray(const Instruction* inst, const ShadowFrame& shadow_frame, // Returns the branch offset to the next instruction to execute. static inline int32_t DoPackedSwitch(const Instruction* inst, const ShadowFrame& shadow_frame, uint16_t inst_data) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(inst->Opcode() == Instruction::PACKED_SWITCH); const uint16_t* switch_data = reinterpret_cast<const uint16_t*>(inst) + inst->VRegB_31t(); int32_t test_val = shadow_frame.GetVReg(inst->VRegA_31t(inst_data)); @@ -378,7 +378,7 @@ static inline int32_t DoPackedSwitch(const Instruction* inst, const ShadowFrame& // Returns the branch offset to the next instruction to execute. static inline int32_t DoSparseSwitch(const Instruction* inst, const ShadowFrame& shadow_frame, uint16_t inst_data) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { DCHECK(inst->Opcode() == Instruction::SPARSE_SWITCH); const uint16_t* switch_data = reinterpret_cast<const uint16_t*>(inst) + inst->VRegB_31t(); int32_t test_val = shadow_frame.GetVReg(inst->VRegA_31t(inst_data)); @@ -411,18 +411,18 @@ static inline int32_t DoSparseSwitch(const Instruction* inst, const ShadowFrame& uint32_t FindNextInstructionFollowingException(Thread* self, ShadowFrame& shadow_frame, uint32_t dex_pc, const instrumentation::Instrumentation* instrumentation) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); NO_RETURN void UnexpectedOpcode(const Instruction* inst, const ShadowFrame& shadow_frame) __attribute__((cold)) - SHARED_REQUIRES(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Set true if you want TraceExecution invocation before each bytecode execution. constexpr bool kTraceExecutionEnabled = false; static inline void TraceExecution(const ShadowFrame& shadow_frame, const Instruction* inst, const uint32_t dex_pc) - SHARED_REQUIRES(Locks::mutator_lock_) { + REQUIRES_SHARED(Locks::mutator_lock_) { if (kTraceExecutionEnabled) { #define TRACE_LOG std::cerr std::ostringstream oss; @@ -465,7 +465,7 @@ void SetStringInitValueToAllAliases(ShadowFrame* shadow_frame, // Explicitly instantiate all DoInvoke functions. #define EXPLICIT_DO_INVOKE_TEMPLATE_DECL(_type, _is_range, _do_check) \ - template SHARED_REQUIRES(Locks::mutator_lock_) \ + template REQUIRES_SHARED(Locks::mutator_lock_) \ bool DoInvoke<_type, _is_range, _do_check>(Thread* self, ShadowFrame& shadow_frame, \ const Instruction* inst, uint16_t inst_data, \ JValue* result) @@ -486,7 +486,7 @@ EXPLICIT_DO_INVOKE_ALL_TEMPLATE_DECL(kInterface) // invoke-interface/range. // Explicitly instantiate all DoInvokeVirtualQuick functions. #define EXPLICIT_DO_INVOKE_VIRTUAL_QUICK_TEMPLATE_DECL(_is_range) \ - template SHARED_REQUIRES(Locks::mutator_lock_) \ + template REQUIRES_SHARED(Locks::mutator_lock_) \ bool DoInvokeVirtualQuick<_is_range>(Thread* self, ShadowFrame& shadow_frame, \ const Instruction* inst, uint16_t inst_data, \ JValue* result) |