703 {
706
707
708
709 const char* kDummyScript = "assembler_test_dummy_function() {}";
717 signature,
function_name, UntaggedFunction::kRegularFunction,
true,
false,
719 SafepointWriteRwLocker ml(thread, thread->isolate_group()->program_lock());
724#ifndef PRODUCT
725
726 SetFlagScope<bool> sfs(&FLAG_disassemble_relative, true);
728 if (FLAG_disassemble) {
732 }
734 DISASSEMBLY_SIZE);
735#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
736
737
738
739
740 bool in_hex_constant = false;
741 for (
char*
p = disassembly_; *
p !=
'\0';
p++) {
742 if (in_hex_constant) {
745 } else {
746 in_hex_constant = false;
747 }
748 } else {
749#if defined(TARGET_ARCH_IA32)
750 if (*
p ==
'[' && *(
p + 1) ==
'0' && *(
p + 2) ==
'x' && IsHex(*(
p + 3)) &&
753 in_hex_constant = true;
754 }
755#endif
756#if defined(TARGET_ARCH_X64)
757 if (*
p ==
'[' && *(
p + 1) ==
't' && *(
p + 2) ==
'h' && *(
p + 3) ==
'r' &&
758 *(
p + 4) ==
'+' && *(
p + 5) ==
'0' && *(
p + 6) ==
'x' &&
759 IsHex(*(
p + 7)) && IsHex(*(
p + 8))) {
761 in_hex_constant = true;
762 }
763#endif
764 }
765 }
766#endif
767#endif
768}
static ClassPtr New(IsolateGroup *isolate_group, bool register_class=true)
void set_exception_handlers(const ExceptionHandlers &handlers) const
static CodePtr FinalizeCodeAndNotify(const Function &function, FlowGraphCompiler *compiler, compiler::Assembler *assembler, PoolAttachment pool_attachment, bool optimized=false, CodeStatistics *stats=nullptr)
uword PayloadStart() const
void set_owner(const Object &owner) const
static void Disassemble(uword start, uword end, DisassemblyFormatter *formatter, const Code &code, const CodeComments *comments=nullptr)
static FunctionTypePtr New(intptr_t num_parent_type_arguments=0, Nullability nullability=Nullability::kNonNullable, Heap::Space space=Heap::kOld)
static FunctionPtr New(const FunctionType &signature, const String &name, UntaggedFunction::Kind kind, bool is_static, bool is_const, bool is_abstract, bool is_external, bool is_native, const Object &owner, TokenPosition token_pos, Heap::Space space=Heap::kOld)
static LibraryPtr CoreLibrary()
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static ScriptPtr New(const String &url, const String &source)
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static StringPtr New(Thread *thread, const char *cstr)
static Thread * Current()
static const TokenPosition kMinSource
intptr_t CodeSize() const
Dart_NativeFunction function
const char *const function_name