From 2d0e514583129f30da2a529ae00a65ede4870c7a Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Fri, 19 Apr 2024 19:46:47 +0000 Subject: [PATCH] Update clang to 0f61051f541a5b8cfce25c84262dfdbadb9ca688. Account for new -Werror,-Wcast-function-type-mismatch. Re-run clang-format. TEST=ci Change-Id: I70d30548cf2e2f86b3d654962f0e73561b6e6de2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363722 Reviewed-by: Alexander Aprelev Commit-Queue: Ryan Macnak --- DEPS | 2 +- runtime/vm/bootstrap_natives.cc | 12 +- .../vm/compiler/assembler/disassembler_x86.cc | 2 +- runtime/vm/compiler/backend/range_analysis.cc | 8 +- runtime/vm/compiler/stub_code_compiler.cc | 6 +- runtime/vm/native_entry.cc | 2 +- runtime/vm/regexp_assembler.cc | 18 +- runtime/vm/runtime_entry.cc | 233 ++++++++---------- runtime/vm/runtime_entry.h | 18 +- runtime/vm/stub_code.cc | 7 +- runtime/vm/stub_code.h | 4 +- runtime/vm/tags.cc | 2 +- 12 files changed, 149 insertions(+), 165 deletions(-) diff --git a/DEPS b/DEPS index 69b6f4ef793..939a2adc7a1 100644 --- a/DEPS +++ b/DEPS @@ -76,7 +76,7 @@ vars = { "jsc_tag": "version:274355", # https://chrome-infra-packages.appspot.com/p/fuchsia/third_party/clang - "clang_version": "git_revision:b1d2e8510b58893e58558ffdf3f8ba29c1e25e5a", + "clang_version": "git_revision:0f61051f541a5b8cfce25c84262dfdbadb9ca688", # https://chrome-infra-packages.appspot.com/p/gn/gn "gn_version": "git_revision:155c53952ec2dc324b0438ce5b9bd4a286577d25", diff --git a/runtime/vm/bootstrap_natives.cc b/runtime/vm/bootstrap_natives.cc index c63d4f1883d..308553eeadc 100644 --- a/runtime/vm/bootstrap_natives.cc +++ b/runtime/vm/bootstrap_natives.cc @@ -16,15 +16,15 @@ namespace dart { // Helper macros for declaring and defining native entries. #define REGISTER_NATIVE_ENTRY(name, count) \ - {"" #name, BootstrapNatives::DN_##name, count}, + {"" #name, reinterpret_cast(BootstrapNatives::DN_##name), count}, // List all native functions implemented in the vm or core bootstrap dart // libraries so that we can resolve the native function to it's entry // point. static const struct NativeEntries { - const char* name_; - BootstrapNativeFunction function_; - int argument_count_; + const char* const name_; + void* const function_; + const int argument_count_; } BootStrapEntries[] = {BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY) #if !defined(DART_PRECOMPILED_RUNTIME) MIRRORS_BOOTSTRAP_NATIVE_LIST(REGISTER_NATIVE_ENTRY) @@ -35,8 +35,8 @@ static const struct NativeEntries { {"" #name, reinterpret_cast(BootstrapNatives::FN_##name)}, static const struct FfiNativeEntries { - const char* name_; - void* function_; + const char* const name_; + void* const function_; } BootStrapFfiEntries[] = { BOOTSTRAP_FFI_NATIVE_LIST(REGISTER_FFI_NATIVE_ENTRY)}; diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc index 3c6b147dd24..c08933b5b77 100644 --- a/runtime/vm/compiler/assembler/disassembler_x86.cc +++ b/runtime/vm/compiler/assembler/disassembler_x86.cc @@ -331,7 +331,7 @@ class DisassemblerX64 : public ValueObject { int PrintOperands(const char* mnem, OperandType op_order, uint8_t* data); - typedef const char* (DisassemblerX64::*RegisterNameMapping)(int reg) const; + typedef const char* (DisassemblerX64::* RegisterNameMapping)(int reg) const; int PrintRightOperandHelper(uint8_t* modrmp, RegisterNameMapping register_name); diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc index ddcd5a28e0d..3be8a131e29 100644 --- a/runtime/vm/compiler/backend/range_analysis.cc +++ b/runtime/vm/compiler/backend/range_analysis.cc @@ -917,10 +917,10 @@ class BoundsCheckGeneralizer { } } - typedef Definition* (BoundsCheckGeneralizer::*PhiBoundFunc)(PhiInstr*, - LoopInfo*, - InductionVar*, - Instruction*); + typedef Definition* (BoundsCheckGeneralizer::* PhiBoundFunc)(PhiInstr*, + LoopInfo*, + InductionVar*, + Instruction*); // Construct symbolic lower bound for a value at the given point. Definition* ConstructLowerBound(Definition* value, Instruction* point) { diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc index 4201bca9db3..60d51f0c89e 100644 --- a/runtime/vm/compiler/stub_code_compiler.cc +++ b/runtime/vm/compiler/stub_code_compiler.cc @@ -1708,9 +1708,9 @@ EMIT_BOX_ALLOCATION(Int32x4) static void GenerateBoxFpuValueStub(Assembler* assembler, const dart::Class& cls, const RuntimeEntry& runtime_entry, - void (Assembler::*store_value)(FpuRegister, - Register, - int32_t)) { + void (Assembler::* store_value)(FpuRegister, + Register, + int32_t)) { Label call_runtime; if (!FLAG_use_slow_path && FLAG_inline_alloc) { __ TryAllocate(cls, &call_runtime, compiler::Assembler::kFarJump, diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc index 5d3935eff57..e68ad027ed0 100644 --- a/runtime/vm/native_entry.cc +++ b/runtime/vm/native_entry.cc @@ -142,7 +142,7 @@ void NativeEntry::BootstrapNativeCallWrapper(Dart_NativeArguments args, // A return of Object::sentinel means the return value has already // been set. ObjectPtr return_value_unsafe = reinterpret_cast( - func)(thread, zone.GetZone(), arguments); + reinterpret_cast(func))(thread, zone.GetZone(), arguments); if (return_value_unsafe != Object::sentinel().ptr()) { ASSERT(return_value_unsafe->IsDartInstance()); arguments->SetReturnUnsafe(return_value_unsafe); diff --git a/runtime/vm/regexp_assembler.cc b/runtime/vm/regexp_assembler.cc index 80116ef2146..0f1ad62e5bd 100644 --- a/runtime/vm/regexp_assembler.cc +++ b/runtime/vm/regexp_assembler.cc @@ -87,17 +87,15 @@ uword /*BoolPtr*/ CaseInsensitiveCompareUTF16(uword /*StringPtr*/ str_raw, return static_cast(Bool::True().ptr()); } -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - CaseInsensitiveCompareUCS2, - 4, - false /* is_float */, - reinterpret_cast(&CaseInsensitiveCompareUCS2)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(CaseInsensitiveCompareUCS2, + /*argument_count=*/4, + /*is_float=*/false, + CaseInsensitiveCompareUCS2); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - CaseInsensitiveCompareUTF16, - 4, - false /* is_float */, - reinterpret_cast(&CaseInsensitiveCompareUTF16)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(CaseInsensitiveCompareUTF16, + /*argument_count=*/4, + /*is_float=*/false, + CaseInsensitiveCompareUTF16); BlockLabel::BlockLabel() { #if !defined(DART_PRECOMPILED_RUNTIME) diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc index 98288861195..3212ec088a3 100644 --- a/runtime/vm/runtime_entry.cc +++ b/runtime/vm/runtime_entry.cc @@ -3876,103 +3876,85 @@ typedef double (*UnaryMathCFunction)(double x); typedef double (*BinaryMathCFunction)(double x, double y); typedef void* (*MemMoveCFunction)(void* dest, const void* src, size_t n); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcPow, - 2, - true /* is_float */, - reinterpret_cast(static_cast(&pow))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcPow, + /*argument_count=*/2, + /*is_float=*/true, + static_cast(pow)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - DartModulo, - 2, - true /* is_float */, - reinterpret_cast( - static_cast(&DartModulo))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(DartModulo, + /*argument_count=*/2, + /*is_float=*/true, + static_cast(DartModulo)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcAtan2, - 2, - true /* is_float */, - reinterpret_cast( - static_cast(&atan2_ieee))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan2, + 2, + /*is_float=*/true, + static_cast(atan2_ieee)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcFloor, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&floor))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcFloor, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(floor)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcCeil, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&ceil))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcCeil, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(ceil)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcTrunc, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&trunc))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcTrunc, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(trunc)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcRound, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&round))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcRound, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(round)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcCos, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&cos))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcCos, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(cos)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcSin, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&sin))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcSin, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(sin)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcAsin, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&asin))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAsin, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(asin)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcAcos, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&acos))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAcos, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(acos)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcTan, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&tan))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcTan, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(tan)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcAtan, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&atan))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(atan)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcExp, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&exp))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcExp, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(exp)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - LibcLog, - 1, - true /* is_float */, - reinterpret_cast(static_cast(&log))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcLog, + /*argument_count=*/1, + /*is_float=*/true, + static_cast(log)); -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - MemoryMove, - 3, - false /* is_float */, - reinterpret_cast(static_cast(&memmove))); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(MemoryMove, + /*argument_count=*/3, + /*is_float=*/false, + static_cast(memmove)); extern "C" void DFLRT_EnterSafepoint(NativeArguments __unusable_) { CHECK_STACK_ALIGNMENT; @@ -3983,7 +3965,10 @@ extern "C" void DFLRT_EnterSafepoint(NativeArguments __unusable_) { thread->EnterSafepoint(); TRACE_RUNTIME_CALL("%s", "EnterSafepoint done"); } -DEFINE_RAW_LEAF_RUNTIME_ENTRY(EnterSafepoint, 0, false, &DFLRT_EnterSafepoint); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(EnterSafepoint, + /*argument_count=*/0, + /*is_float=*/false, + DFLRT_EnterSafepoint); extern "C" void DFLRT_ExitSafepoint(NativeArguments __unusable_) { CHECK_STACK_ALIGNMENT; @@ -4007,7 +3992,10 @@ extern "C" void DFLRT_ExitSafepoint(NativeArguments __unusable_) { TRACE_RUNTIME_CALL("%s", "ExitSafepoint done"); } -DEFINE_RAW_LEAF_RUNTIME_ENTRY(ExitSafepoint, 0, false, &DFLRT_ExitSafepoint); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(ExitSafepoint, + /*argument_count=*/0, + /*is_float=*/false, + DFLRT_ExitSafepoint); // This is expected to be invoked when jumping to destination frame, // during exception handling. @@ -4029,9 +4017,9 @@ extern "C" void DFLRT_ExitSafepointIgnoreUnwindInProgress( TRACE_RUNTIME_CALL("%s", "ExitSafepointIgnoreUnwindInProgress done"); } DEFINE_RAW_LEAF_RUNTIME_ENTRY(ExitSafepointIgnoreUnwindInProgress, - 0, - false, - &DFLRT_ExitSafepointIgnoreUnwindInProgress); + /*argument_count=*/0, + /*is_float*/ false, + DFLRT_ExitSafepointIgnoreUnwindInProgress); // This is called by a native callback trampoline // (see StubCodeCompiler::GenerateFfiCallbackTrampolineStub). Not registered as @@ -4172,11 +4160,10 @@ extern "C" ApiLocalScope* DLRT_EnterHandleScope(Thread* thread) { TRACE_RUNTIME_CALL("EnterHandleScope returning %p", return_value); return return_value; } -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - EnterHandleScope, - 1, - false /* is_float */, - reinterpret_cast(&DLRT_EnterHandleScope)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(EnterHandleScope, + /*argument_count=*/1, + /*is_float=*/false, + DLRT_EnterHandleScope); extern "C" void DLRT_ExitHandleScope(Thread* thread) { CHECK_STACK_ALIGNMENT; @@ -4184,11 +4171,10 @@ extern "C" void DLRT_ExitHandleScope(Thread* thread) { thread->ExitApiScope(); TRACE_RUNTIME_CALL("ExitHandleScope %s", "done"); } -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - ExitHandleScope, - 1, - false /* is_float */, - reinterpret_cast(&DLRT_ExitHandleScope)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(ExitHandleScope, + /*argument_count=*/1, + /*is_float=*/false, + DLRT_ExitHandleScope); extern "C" LocalHandle* DLRT_AllocateHandle(ApiLocalScope* scope) { CHECK_STACK_ALIGNMENT; @@ -4200,11 +4186,10 @@ extern "C" LocalHandle* DLRT_AllocateHandle(ApiLocalScope* scope) { return return_value; } -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - AllocateHandle, - 1, - false /* is_float */, - reinterpret_cast(&DLRT_AllocateHandle)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(AllocateHandle, + /*argument_count=*/1, + /*is_float=*/false, + DLRT_AllocateHandle); // Enables reusing `Dart_PropagateError` from `FfiCallInstr`. // `Dart_PropagateError` requires the native state and transitions into the VM. @@ -4226,27 +4211,27 @@ extern "C" void DLRT_PropagateError(Dart_Handle handle) { } // Not a leaf-function, throws error. -DEFINE_RAW_LEAF_RUNTIME_ENTRY( - PropagateError, - 1, - false /* is_float */, - reinterpret_cast(&DLRT_PropagateError)); +DEFINE_RAW_LEAF_RUNTIME_ENTRY(PropagateError, + /*argument_count=*/1, + /*is_float=*/false, + DLRT_PropagateError); -#if defined(USING_MEMORY_SANITIZER) -#define MSAN_UNPOISON_RANGE reinterpret_cast(&__msan_unpoison) -#define MSAN_UNPOISON_PARAM \ - reinterpret_cast(&__msan_unpoison_param) -#else -#define MSAN_UNPOISON_RANGE nullptr -#define MSAN_UNPOISON_PARAM nullptr +#if !defined(USING_MEMORY_SANITIZER) +extern "C" void __msan_unpoison(const volatile void*, size_t) { + UNREACHABLE(); +} +extern "C" void __msan_unpoison_param(size_t) { + UNREACHABLE(); +} #endif -#if defined(USING_THREAD_SANITIZER) -#define TSAN_ACQUIRE reinterpret_cast(&__tsan_acquire) -#define TSAN_RELEASE reinterpret_cast(&__tsan_release) -#else -#define TSAN_ACQUIRE nullptr -#define TSAN_RELEASE nullptr +#if !defined(USING_THREAD_SANITIZER) +extern "C" void __tsan_acquire(void* addr) { + UNREACHABLE(); +} +extern "C" void __tsan_release(void* addr) { + UNREACHABLE(); +} #endif // These runtime entries are defined even when not using MSAN / TSAN to keep @@ -4255,21 +4240,21 @@ DEFINE_RAW_LEAF_RUNTIME_ENTRY( DEFINE_RAW_LEAF_RUNTIME_ENTRY(MsanUnpoison, /*argument_count=*/2, /*is_float=*/false, - MSAN_UNPOISON_RANGE); + __msan_unpoison); DEFINE_RAW_LEAF_RUNTIME_ENTRY(MsanUnpoisonParam, /*argument_count=*/1, /*is_float=*/false, - MSAN_UNPOISON_PARAM); + __msan_unpoison_param); DEFINE_RAW_LEAF_RUNTIME_ENTRY(TsanLoadAcquire, /*argument_count=*/1, /*is_float=*/false, - TSAN_ACQUIRE); + __tsan_acquire); DEFINE_RAW_LEAF_RUNTIME_ENTRY(TsanStoreRelease, /*argument_count=*/1, /*is_float=*/false, - TSAN_RELEASE); + __tsan_release); } // namespace dart diff --git a/runtime/vm/runtime_entry.h b/runtime/vm/runtime_entry.h index b1216664d29..69ed0971bf0 100644 --- a/runtime/vm/runtime_entry.h +++ b/runtime/vm/runtime_entry.h @@ -31,7 +31,7 @@ using BaseRuntimeEntry = ValueObject; class RuntimeEntry : public BaseRuntimeEntry { public: RuntimeEntry(const char* name, - RuntimeFunction function, + const void* function, intptr_t argument_count, bool is_leaf, bool is_float, @@ -49,7 +49,7 @@ class RuntimeEntry : public BaseRuntimeEntry { } const char* name() const { return name_; } - RuntimeFunction function() const { return function_; } + const void* function() const { return function_; } intptr_t argument_count() const { return argument_count_; } bool is_leaf() const { return is_leaf_; } bool is_float() const { return is_float_; } @@ -58,7 +58,7 @@ class RuntimeEntry : public BaseRuntimeEntry { private: const char* const name_; - const RuntimeFunction function_; + const void* const function_; const intptr_t argument_count_; const bool is_leaf_; const bool is_float_; @@ -91,9 +91,9 @@ class RuntimeEntry : public BaseRuntimeEntry { #define DEFINE_RUNTIME_ENTRY_IMPL(name, argument_count, can_lazy_deopt) \ extern void DRT_##name(NativeArguments arguments); \ - extern const RuntimeEntry k##name##RuntimeEntry("DRT_" #name, &DRT_##name, \ - argument_count, false, \ - false, can_lazy_deopt); \ + extern const RuntimeEntry k##name##RuntimeEntry( \ + "DRT_" #name, reinterpret_cast(DRT_##name), argument_count, \ + false, false, can_lazy_deopt); \ static void DRT_Helper##name(Isolate* isolate, Thread* thread, Zone* zone, \ NativeArguments arguments); \ void DRT_##name(NativeArguments arguments) { \ @@ -134,7 +134,7 @@ class RuntimeEntry : public BaseRuntimeEntry { #define DEFINE_LEAF_RUNTIME_ENTRY(type, name, argument_count, ...) \ extern "C" type DLRT_##name(__VA_ARGS__); \ extern const RuntimeEntry k##name##RuntimeEntry( \ - "DLRT_" #name, reinterpret_cast(&DLRT_##name), \ + "DLRT_" #name, reinterpret_cast(DLRT_##name), \ argument_count, true, false, /*can_lazy_deopt=*/false); \ type DLRT_##name(__VA_ARGS__) { \ CHECK_STACK_ALIGNMENT; \ @@ -146,8 +146,8 @@ class RuntimeEntry : public BaseRuntimeEntry { // DEFINE_LEAF_RUNTIME_ENTRY instead. #define DEFINE_RAW_LEAF_RUNTIME_ENTRY(name, argument_count, is_float, func) \ extern const RuntimeEntry k##name##RuntimeEntry( \ - "DFLRT_" #name, func, argument_count, true, is_float, \ - /*can_lazy_deopt=*/false) + "DFLRT_" #name, reinterpret_cast(func), argument_count, \ + true, is_float, /*can_lazy_deopt=*/false) #define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \ extern const RuntimeEntry k##name##RuntimeEntry; \ diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc index 19f06ae443d..dd6181eec38 100644 --- a/runtime/vm/stub_code.cc +++ b/runtime/vm/stub_code.cc @@ -90,9 +90,10 @@ void StubCode::Init() { #undef STUB_CODE_GENERATE #undef STUB_CODE_SET_OBJECT_POOL -CodePtr StubCode::Generate(const char* name, - compiler::ObjectPoolBuilder* object_pool_builder, - void (compiler::StubCodeCompiler::*GenerateStub)()) { +CodePtr StubCode::Generate( + const char* name, + compiler::ObjectPoolBuilder* object_pool_builder, + void (compiler::StubCodeCompiler::* GenerateStub)()) { auto thread = Thread::Current(); SafepointWriteRwLocker ml(thread, thread->isolate_group()->program_lock()); diff --git a/runtime/vm/stub_code.h b/runtime/vm/stub_code.h index 3376902c327..5430b0e0cc3 100644 --- a/runtime/vm/stub_code.h +++ b/runtime/vm/stub_code.h @@ -91,7 +91,7 @@ class StubCode : public AllStatic { // code executable area. static CodePtr Generate(const char* name, compiler::ObjectPoolBuilder* object_pool_builder, - void (compiler::StubCodeCompiler::*GenerateStub)()); + void (compiler::StubCodeCompiler::* GenerateStub)()); #endif // !defined(DART_PRECOMPILED_RUNTIME) static const Code& UnoptimizedStaticCallEntry(intptr_t num_args_tested); @@ -132,7 +132,7 @@ class StubCode : public AllStatic { Code* code; const char* name; #if !defined(DART_PRECOMPILED_RUNTIME) - void (compiler::StubCodeCompiler::*generator)(); + void (compiler::StubCodeCompiler::* generator)(); #endif }; static StubCodeEntry entries_[kNumStubEntries]; diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc index aa6e5f3ca31..eb0c02cf6db 100644 --- a/runtime/vm/tags.cc +++ b/runtime/vm/tags.cc @@ -49,7 +49,7 @@ bool VMTag::IsRuntimeEntryTag(uword id) { } const char* VMTag::RuntimeEntryTagName(uword id) { - void* address = reinterpret_cast(id); + const void* address = reinterpret_cast(id); #define CHECK_RUNTIME_ADDRESS(n) \ if (address == k##n##RuntimeEntry.function()) \