689 {
692
693
694
695 const char* kDummyScript = "assembler_test_dummy_function() {}";
703 signature,
function_name, UntaggedFunction::kRegularFunction,
true,
false,
705 SafepointWriteRwLocker ml(thread, thread->isolate_group()->program_lock());
710#ifndef PRODUCT
711
712 SetFlagScope<bool> sfs(&FLAG_disassemble_relative, true);
714 if (FLAG_disassemble) {
718 }
720 DISASSEMBLY_SIZE);
721#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
722
723
724
725
726 bool in_hex_constant = false;
727 for (
char* p = disassembly_; *
p !=
'\0';
p++) {
728 if (in_hex_constant) {
729 if (IsHex(*p)) {
731 } else {
732 in_hex_constant = false;
733 }
734 } else {
735#if defined(TARGET_ARCH_IA32)
736 if (*p == '[' && *(p + 1) == '0' && *(p + 2) == 'x' && IsHex(*(p + 3)) &&
737 IsHex(*(p + 4))) {
739 in_hex_constant = true;
740 }
741#endif
742#if defined(TARGET_ARCH_X64)
743 if (*p == '[' && *(p + 1) == 't' && *(p + 2) == 'h' && *(p + 3) == 'r' &&
744 *(p + 4) == '+' && *(p + 5) == '0' && *(p + 6) == 'x' &&
745 IsHex(*(p + 7)) && IsHex(*(p + 8))) {
747 in_hex_constant = true;
748 }
749#endif
750 }
751 }
752#endif
753#endif
754}
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::kLegacy, 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