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 <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
Commit Queue
parent
cc9de33052
commit
2d0e514583
@@ -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",
|
||||
|
||||
@@ -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<void*>(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<void*>(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)};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<BootstrapNativeFunction>(
|
||||
func)(thread, zone.GetZone(), arguments);
|
||||
reinterpret_cast<void*>(func))(thread, zone.GetZone(), arguments);
|
||||
if (return_value_unsafe != Object::sentinel().ptr()) {
|
||||
ASSERT(return_value_unsafe->IsDartInstance());
|
||||
arguments->SetReturnUnsafe(return_value_unsafe);
|
||||
|
||||
@@ -87,17 +87,15 @@ uword /*BoolPtr*/ CaseInsensitiveCompareUTF16(uword /*StringPtr*/ str_raw,
|
||||
return static_cast<uword>(Bool::True().ptr());
|
||||
}
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
CaseInsensitiveCompareUCS2,
|
||||
4,
|
||||
false /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(&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<RuntimeFunction>(&CaseInsensitiveCompareUTF16));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(CaseInsensitiveCompareUTF16,
|
||||
/*argument_count=*/4,
|
||||
/*is_float=*/false,
|
||||
CaseInsensitiveCompareUTF16);
|
||||
|
||||
BlockLabel::BlockLabel() {
|
||||
#if !defined(DART_PRECOMPILED_RUNTIME)
|
||||
|
||||
+109
-124
@@ -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<RuntimeFunction>(static_cast<BinaryMathCFunction>(&pow)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcPow,
|
||||
/*argument_count=*/2,
|
||||
/*is_float=*/true,
|
||||
static_cast<BinaryMathCFunction>(pow));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
DartModulo,
|
||||
2,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(
|
||||
static_cast<BinaryMathCFunction>(&DartModulo)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(DartModulo,
|
||||
/*argument_count=*/2,
|
||||
/*is_float=*/true,
|
||||
static_cast<BinaryMathCFunction>(DartModulo));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcAtan2,
|
||||
2,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(
|
||||
static_cast<BinaryMathCFunction>(&atan2_ieee)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan2,
|
||||
2,
|
||||
/*is_float=*/true,
|
||||
static_cast<BinaryMathCFunction>(atan2_ieee));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcFloor,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&floor)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcFloor,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(floor));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcCeil,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&ceil)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcCeil,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(ceil));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcTrunc,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&trunc)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcTrunc,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(trunc));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcRound,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&round)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcRound,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(round));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcCos,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&cos)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcCos,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(cos));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcSin,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&sin)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcSin,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(sin));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcAsin,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&asin)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAsin,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(asin));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcAcos,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&acos)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAcos,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(acos));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcTan,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&tan)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcTan,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(tan));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcAtan,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(atan));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcExp,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&exp)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcExp,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(exp));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
LibcLog,
|
||||
1,
|
||||
true /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&log)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcLog,
|
||||
/*argument_count=*/1,
|
||||
/*is_float=*/true,
|
||||
static_cast<UnaryMathCFunction>(log));
|
||||
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(
|
||||
MemoryMove,
|
||||
3,
|
||||
false /* is_float */,
|
||||
reinterpret_cast<RuntimeFunction>(static_cast<MemMoveCFunction>(&memmove)));
|
||||
DEFINE_RAW_LEAF_RUNTIME_ENTRY(MemoryMove,
|
||||
/*argument_count=*/3,
|
||||
/*is_float=*/false,
|
||||
static_cast<MemMoveCFunction>(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<RuntimeFunction>(&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<RuntimeFunction>(&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<RuntimeFunction>(&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<RuntimeFunction>(&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<RuntimeFunction>(&__msan_unpoison)
|
||||
#define MSAN_UNPOISON_PARAM \
|
||||
reinterpret_cast<RuntimeFunction>(&__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<RuntimeFunction>(&__tsan_acquire)
|
||||
#define TSAN_RELEASE reinterpret_cast<RuntimeFunction>(&__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
|
||||
|
||||
@@ -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<const void*>(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<RuntimeFunction>(&DLRT_##name), \
|
||||
"DLRT_" #name, reinterpret_cast<const void*>(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<const void*>(func), argument_count, \
|
||||
true, is_float, /*can_lazy_deopt=*/false)
|
||||
|
||||
#define DECLARE_LEAF_RUNTIME_ENTRY(type, name, ...) \
|
||||
extern const RuntimeEntry k##name##RuntimeEntry; \
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ bool VMTag::IsRuntimeEntryTag(uword id) {
|
||||
}
|
||||
|
||||
const char* VMTag::RuntimeEntryTagName(uword id) {
|
||||
void* address = reinterpret_cast<void*>(id);
|
||||
const void* address = reinterpret_cast<const void*>(id);
|
||||
|
||||
#define CHECK_RUNTIME_ADDRESS(n) \
|
||||
if (address == k##n##RuntimeEntry.function()) \
|
||||
|
||||
Reference in New Issue
Block a user