Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Variables
datastream.h File Reference
#include "platform/assert.h"
#include "platform/utils.h"
#include "vm/allocation.h"
#include "vm/exceptions.h"
#include "vm/globals.h"
#include "vm/os.h"
#include "vm/zone.h"

Go to the source code of this file.

Classes

struct  dart::LEB128Constants
 
class  dart::ReadStream
 
class  dart::ReadStream::Raw< N, T >
 
class  dart::ReadStream::Raw< 1, T >
 
class  dart::ReadStream::Raw< 2, T >
 
class  dart::ReadStream::Raw< 4, T >
 
class  dart::ReadStream::Raw< 8, T >
 
class  dart::BaseWriteStream
 
class  dart::BaseWriteStream::Raw< N, T >
 
class  dart::BaseWriteStream::Raw< 1, T >
 
class  dart::BaseWriteStream::Raw< 2, T >
 
class  dart::BaseWriteStream::Raw< 4, T >
 
class  dart::BaseWriteStream::Raw< 8, T >
 
class  dart::NonStreamingWriteStream
 
class  dart::MallocWriteStream
 
class  dart::ZoneWriteStream
 
class  dart::StreamingWriteStream
 

Namespaces

namespace  dart
 

Macros

#define STAGE
 
#define UNROLLED_INIT()
 
#define UNROLLED_BODY(bit_start)
 
#define UNROLLED_END(bit_start)
 

Variables

static constexpr int8_t dart::kDataBitsPerByte = 7
 
static constexpr int8_t dart::kByteMask = (1 << kDataBitsPerByte) - 1
 
static constexpr int8_t dart::kMaxUnsignedDataPerByte = kByteMask
 
static constexpr int8_t dart::kMinDataPerByte = -(1 << (kDataBitsPerByte - 1))
 
static constexpr int8_t dart::kMaxDataPerByte
 
static constexpr uint8_t dart::kEndByteMarker = (255 - kMaxDataPerByte)
 
static constexpr uint8_t dart::kEndUnsignedByteMarker
 

Macro Definition Documentation

◆ STAGE

#define STAGE
Value:
byte = *cursor++; /* ldrsb byte, [result], 1 */ \
result = byte + (result << 7); /* add result, byte, result lsl 7 */ \
if (byte < 0) goto done; /* tbnz byte, 63, done */
static void done(const char *config, const char *src, const char *srcOptions, const char *name)
Definition: DM.cpp:263
GAsyncResult * result

◆ UNROLLED_BODY

#define UNROLLED_BODY (   bit_start)
Value:
static_assert(bit_start % kDataBitsPerByte == 0, \
"Bit start must be a multiple of the data bits per byte"); \
static_assert(bit_start >= 0 && bit_start < kBitsPerByte * sizeof(T), \
"Starting unrolled body at invalid bit position"); \
static_assert(bit_start + kDataBitsPerByte < kBitsPerByte * sizeof(T), \
"Unrolled body should not contain final bits in value"); \
b = ReadByte(); \
return r | (static_cast<T>(b - end_byte_marker) << bit_start); \
} \
r |= b << bit_start;
static bool b
constexpr intptr_t kBitsPerByte
Definition: globals.h:463
static constexpr int8_t kMaxUnsignedDataPerByte
Definition: datastream.h:20
static constexpr int8_t kDataBitsPerByte
Definition: datastream.h:18
#define T
Definition: precompiler.cc:65

Definition at line 258 of file datastream.h.

◆ UNROLLED_END

#define UNROLLED_END (   bit_start)
Value:
static_assert(bit_start % kDataBitsPerByte == 0, \
"Bit start must be a multiple of the data bits per byte"); \
static_assert(bit_start >= 0 && bit_start < kBitsPerByte * sizeof(T), \
"Starting unrolled end at invalid bit position"); \
static_assert(bit_start + kDataBitsPerByte >= kBitsPerByte * sizeof(T), \
"Unrolled end does not contain final bits in value"); \
b = ReadByte(); \
return r | (static_cast<T>(b - end_byte_marker) << bit_start);

Definition at line 272 of file datastream.h.

◆ UNROLLED_INIT

#define UNROLLED_INIT ( )
Value:
using Unsigned = typename std::make_unsigned<T>::type; \
Unsigned b = ReadByte(); \
return b - end_byte_marker; \
} \
T r = b;
GLenum type

Definition at line 248 of file datastream.h.