36 bool* auto_setup_scope) {
38 *auto_setup_scope =
false;
43 const char* kScriptChars = R
"(
45 @pragma("vm:external-name", "NativeFunc")
46 external static void func(var i, var k);
53 i = 10; s1 = 'abcd'; k = 20; s2 = 'B'; s3 = 'C';
58 if (i != 30) throw '$i != 30';
91 EXPECT(stack_bitmap !=
nullptr);
92 stack_bitmap->
Set(0,
false);
93 stack_bitmap->
Set(1,
true);
94 stack_bitmap->
Set(2,
false);
95 stack_bitmap->
Set(3,
true);
96 stack_bitmap->
Set(4,
true);
103 UntaggedPcDescriptors::kUnoptStaticCall);
112 const auto& compressed_maps =
114 code.set_compressed_stackmaps(compressed_maps);
126 ASSERT(descriptors !=
nullptr);
127 const int32_t token_positions[] = {
145 const intptr_t num_token_positions =
ARRAY_SIZE(token_positions);
147 for (intptr_t
i = 0;
i < num_token_positions;
i++) {
149 descriptors->
AddDescriptor(UntaggedPcDescriptors::kRuntimeCall, 0, 0, tp, 0,
158 UntaggedPcDescriptors::kRuntimeCall);
void Set(intptr_t bit_offset, bool value)
static bool ProcessPendingClasses()
FunctionPtr LookupStaticFunction(const String &name) const
ErrorPtr EnsureIsFinalized(Thread *thread) const
static bool TestCompileFunction(const Function &function)
CompressedStackMapsPtr Finalize() const
void AddEntry(intptr_t pc_offset, BitmapBuilder *bitmap, intptr_t spill_slot_bit_count)
static ObjectPtr InvokeFunction(const Function &function, const Array &arguments)
void AddDescriptor(UntaggedPcDescriptors::Kind kind, intptr_t pc_offset, intptr_t deopt_id, TokenPosition token_pos, intptr_t try_index, intptr_t yield_index)
PcDescriptorsPtr FinalizePcDescriptors(uword entry_point)
CodePtr unoptimized_code() const
void CollectAllGarbage(GCReason reason=GCReason::kFull, bool compact=false)
static IsolateGroup * Current()
ClassPtr LookupClass(const String &name) const
static LibraryPtr LookupLibrary(Thread *thread, const String &url)
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
TokenPosition TokenPos() const
static StringPtr New(const char *cstr, Heap::Space space=Heap::kNew)
static StringPtr New(Thread *thread, const char *cstr)
static Dart_Handle LoadTestScript(const char *script, Dart_NativeEntryResolver resolver, const char *lib_uri=RESOLVED_USER_TEST_URI, bool finalize=true, bool allow_compile_errors=false)
static const char * url()
static Thread * Current()
static constexpr int32_t kMinSourcePos
const char * ToCString() const
static TokenPosition Deserialize(int32_t value)
static constexpr int32_t kMaxSourcePos
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
static void NativeFunc(Dart_NativeArguments args)
constexpr int32_t kMinInt32
ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction)
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
static Dart_NativeFunction native_resolver(Dart_Handle name, int argument_count, bool *auto_setup_scope)
TEST_CASE(DirectoryCurrent)
DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer, int64_t *value)
#define EXPECT_VALID(handle)
#define ARRAY_SIZE(array)