22#define TEST_CODE(value, growable_array, thread) \
23 test->Invoke<void, ObjectPtr, ObjectPtr, Thread*>(value, growable_array, \
36 EXPECT(!thread->StoreBufferContains(grow_old_array.
ptr()));
38 EXPECT(!thread->StoreBufferContains(grow_new_array.
ptr()));
41 for (
int i = -128;
i < 128;
i++) {
46 EXPECT(!thread->StoreBufferContains(grow_old_array.
ptr()));
52 EXPECT(!thread->StoreBufferContains(grow_old_array.
ptr()));
57 EXPECT(thread->StoreBufferContains(grow_old_array.
ptr()));
62 EXPECT(!thread->StoreBufferContains(grow_new_array.
ptr()));
67 EXPECT(!thread->StoreBufferContains(grow_new_array.
ptr()));
74#if defined(TARGET_ARCH_IA32)
97 const uint32_t got = EXECUTE_TEST_CODE_UWORD_UWORD_UINT32(
98 HashKeysCode,
test->entry(), hash1, hash2);
99 if (got == expected)
return;
101 buffer.Printf(
"For hash1 = %" Pu " and hash2 = %" Pu
102 ": expected result %u, got result %u",
103 hash1, hash2, expected, got);
107#define HASH_TEST(hash1, hash2) \
108 hash_test(Expect(__FILE__, __LINE__), hash1, hash2)
110 const intptr_t kNumRandomTests = 500;
120 for (intptr_t
i = 0;
i < kNumRandomTests;
i++) {
126#if defined(TARGET_ARCH_IS_64_BIT)
131 for (intptr_t
i = 0;
i < kNumRandomTests;
i++) {
140#define __ assembler->
142#if defined(TARGET_ARCH_IA32)
150#define LOAD_FROM_BOX_TEST(SIZE, TYPE, VALUE, SAME_REGISTER) \
151 ASSEMBLER_TEST_GENERATE(Load##SIZE##FromBoxOrSmi##VALUE##SAME_REGISTER, \
153 const bool same_register = SAME_REGISTER; \
155 const Register src = kArg1Reg; \
156 const Register dst = same_register ? src : kArg2Reg; \
157 const TYPE value = VALUE; \
159 EnterTestFrame(assembler); \
161 __ LoadObject(src, Integer::ZoneHandle(Integer::New(value, Heap::kOld))); \
162 __ Load##SIZE##FromBoxOrSmi(dst, src); \
163 __ MoveRegister(CallingConventions::kReturnReg, dst); \
165 LeaveTestFrame(assembler); \
170 ASSEMBLER_TEST_RUN(Load##SIZE##FromBoxOrSmi##VALUE##SAME_REGISTER, test) { \
171 const int64_t res = test->InvokeWithCodeAndThread<int64_t>(); \
172 EXPECT_EQ(static_cast<TYPE>(VALUE), static_cast<TYPE>(res)); \
179#if defined(TARGET_ARCH_IS_32_BIT)
206#if !defined(TARGET_ARCH_IS_32_BIT)
219#if defined(TARGET_ARCH_ARM)
221 auto zone = thread->zone();
223 const intptr_t index_scale = 1;
224 const intptr_t kMaxAllowedOffsetForExternal = (2 << 11) - 1;
229 true,
cid, index_scale, &needs_base));
233 false,
cid, index_scale, &needs_base));
236 smi =
Smi::New(kMaxAllowedOffsetForExternal + 1);
239 false,
cid, index_scale));
242 true,
cid, index_scale));
static uint32_t hash(const SkShaderBase::GradientInfo &v)
#define LOAD_FROM_BOX_TEST(SIZE, TYPE, VALUE, SAME_REGISTER)
#define HASH_TEST(hash1, hash2)
#define TEST_CODE(value, growable_array, thread)
static ArrayPtr New(intptr_t len, Heap::Space space=Heap::kNew)
static const Register ArgumentRegisters[]
static constexpr Register kReturnReg
void Fail(const char *format,...) const PRINTF_ATTRIBUTE(2
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
static SmiPtr New(intptr_t value)
static Thread * Current()
static bool AddressCanHoldConstantIndex(const Object &constant, bool is_load, bool is_external, intptr_t cid, intptr_t index_scale, bool *needs_base=nullptr)
static constexpr intptr_t kWordSize
ASSEMBLER_TEST_EXTERN(StoreIntoObject)
ASSEMBLER_TEST_GENERATE(InstantiateTypeArgumentsHashKeys, assembler)
uint32_t CombineHashes(uint32_t hash, uint32_t other_hash)
constexpr uint64_t kMaxUint64
constexpr uint32_t kMaxUint32
ISOLATE_UNIT_TEST_CASE(StackAllocatedDestruction)
ASSEMBLER_TEST_RUN(StoreIntoObject, test)
uint32_t FinalizeHash(uint32_t hash, intptr_t hashbits=kBitsPerInt32)
constexpr uint16_t kMaxUint16
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer