Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Macros | Functions | Variables
memory_copy_test.cc File Reference
#include <vector>
#include "vm/compiler/backend/il.h"
#include "vm/compiler/backend/il_printer.h"
#include "vm/compiler/backend/il_test_helper.h"
#include "vm/compiler/call_specializer.h"
#include "vm/compiler/compiler_pass.h"
#include "vm/object.h"
#include "vm/unit_test.h"

Go to the source code of this file.

Namespaces

namespace  dart
 

Macros

#define CHECK_DEFAULT_MEMORY(in, out)
 
#define CHECK_MEMORY(in, out, start, skip, len, size)
 
#define MEMORY_COPY_TEST_BOXED(src_start, dest_start, length, elem_size)
 
#define MEMORY_COPY_TEST_UNBOXED(src_start, dest_start, length, el_si)
 
#define MEMORY_MOVE_TEST_BOXED(src_start, dest_start, length, elem_size)
 
#define MEMORY_MOVE_TEST_UNBOXED(src_start, dest_start, length, el_si)
 
#define MEMORY_COPY_TEST(src_start, dest_start, length, elem_size)
 
#define MEMORY_MOVE_TEST(src_start, dest_start, length, elem_size)
 
#define MEMORY_TEST(src_start, dest_start, length, elem_size)
 

Functions

static classid_t dart::TypedDataCidForElementSize (intptr_t elem_size)
 
static intptr_t dart::ExpectedValue (intptr_t i)
 
static void dart::InitializeMemory (uint8_t *input, uint8_t *output)
 
static bool dart::CheckMemory (Expect expect, const uint8_t *input, const uint8_t *output, intptr_t dest_start, intptr_t src_start, intptr_t length, intptr_t elem_size)
 
static void dart::RunMemoryCopyInstrTest (intptr_t src_start, intptr_t dest_start, intptr_t length, intptr_t elem_size, bool unboxed_inputs, bool use_same_buffer)
 

Variables

const char * dart::pointer_prefix = ""
 
static constexpr intptr_t dart::kMemoryTestLength = 1024
 
static constexpr uint8_t dart::kUnInitialized = 0xFE
 

Macro Definition Documentation

◆ CHECK_DEFAULT_MEMORY

#define CHECK_DEFAULT_MEMORY (   in,
  out 
)
Value:
do { \
if (CheckMemory(dart::Expect(__FILE__, __LINE__), in, out, 0, 0, 0, 1)) { \
return; \
} \
} while (false)

Definition at line 119 of file memory_copy_test.cc.

120 { \
121 if (CheckMemory(dart::Expect(__FILE__, __LINE__), in, out, 0, 0, 0, 1)) { \
122 return; \
123 } \
124 } while (false)
static bool CheckMemory(Expect expect, const uint8_t *input, const uint8_t *output, intptr_t dest_start, intptr_t src_start, intptr_t length, intptr_t elem_size)

◆ CHECK_MEMORY

#define CHECK_MEMORY (   in,
  out,
  start,
  skip,
  len,
  size 
)
Value:
do { \
if (CheckMemory(dart::Expect(__FILE__, __LINE__), in, out, start, skip, \
len, size)) { \
return; \
} \
} while (false)
static bool skip(SkStream *stream, size_t amount)

Definition at line 125 of file memory_copy_test.cc.

126 { \
127 if (CheckMemory(dart::Expect(__FILE__, __LINE__), in, out, start, skip, \
128 len, size)) { \
129 return; \
130 } \
131 } while (false)

◆ MEMORY_COPY_TEST

#define MEMORY_COPY_TEST (   src_start,
  dest_start,
  length,
  elem_size 
)
Value:
MEMORY_COPY_TEST_BOXED(src_start, dest_start, length, elem_size) \
MEMORY_COPY_TEST_UNBOXED(src_start, dest_start, length, elem_size)
size_t length
#define MEMORY_COPY_TEST_BOXED(src_start, dest_start, length, elem_size)

Definition at line 441 of file memory_copy_test.cc.

◆ MEMORY_COPY_TEST_BOXED

#define MEMORY_COPY_TEST_BOXED (   src_start,
  dest_start,
  length,
  elem_size 
)
Value:
IRTest_MemoryCopy_##src_start##_##dest_start##_##length##_##elem_size) { \
RunMemoryCopyInstrTest(src_start, dest_start, length, elem_size, false, \
false); \
}
#define ISOLATE_UNIT_TEST_CASE(name)
Definition unit_test.h:64

Definition at line 415 of file memory_copy_test.cc.

417 { \
418 RunMemoryCopyInstrTest(src_start, dest_start, length, elem_size, false, \
419 false); \
420 }

◆ MEMORY_COPY_TEST_UNBOXED

#define MEMORY_COPY_TEST_UNBOXED (   src_start,
  dest_start,
  length,
  el_si 
)
Value:
IRTest_MemoryCopy_##src_start##_##dest_start##_##length##_##el_si##_u) { \
RunMemoryCopyInstrTest(src_start, dest_start, length, el_si, true, false); \
}

Definition at line 422 of file memory_copy_test.cc.

424 { \
425 RunMemoryCopyInstrTest(src_start, dest_start, length, el_si, true, false); \
426 }

◆ MEMORY_MOVE_TEST

#define MEMORY_MOVE_TEST (   src_start,
  dest_start,
  length,
  elem_size 
)
Value:
MEMORY_MOVE_TEST_BOXED(src_start, dest_start, length, elem_size) \
MEMORY_MOVE_TEST_UNBOXED(src_start, dest_start, length, elem_size)
#define MEMORY_MOVE_TEST_BOXED(src_start, dest_start, length, elem_size)

Definition at line 445 of file memory_copy_test.cc.

◆ MEMORY_MOVE_TEST_BOXED

#define MEMORY_MOVE_TEST_BOXED (   src_start,
  dest_start,
  length,
  elem_size 
)
Value:
IRTest_MemoryMove_##src_start##_##dest_start##_##length##_##elem_size) { \
RunMemoryCopyInstrTest(src_start, dest_start, length, elem_size, false, \
true); \
}

Definition at line 428 of file memory_copy_test.cc.

430 { \
431 RunMemoryCopyInstrTest(src_start, dest_start, length, elem_size, false, \
432 true); \
433 }

◆ MEMORY_MOVE_TEST_UNBOXED

#define MEMORY_MOVE_TEST_UNBOXED (   src_start,
  dest_start,
  length,
  el_si 
)
Value:
IRTest_MemoryMove_##src_start##_##dest_start##_##length##_##el_si##_u) { \
RunMemoryCopyInstrTest(src_start, dest_start, length, el_si, true, true); \
}

Definition at line 435 of file memory_copy_test.cc.

437 { \
438 RunMemoryCopyInstrTest(src_start, dest_start, length, el_si, true, true); \
439 }

◆ MEMORY_TEST

#define MEMORY_TEST (   src_start,
  dest_start,
  length,
  elem_size 
)
Value:
MEMORY_MOVE_TEST(src_start, dest_start, length, elem_size) \
MEMORY_COPY_TEST(src_start, dest_start, length, elem_size)
#define MEMORY_MOVE_TEST(src_start, dest_start, length, elem_size)

Definition at line 449 of file memory_copy_test.cc.