Flutter Engine
The Flutter Engine
Namespaces | Macros | Functions
raw_object.cc File Reference
#include "vm/raw_object.h"
#include "vm/class_table.h"
#include "vm/dart.h"
#include "vm/heap/become.h"
#include "vm/heap/freelist.h"
#include "vm/isolate.h"
#include "vm/isolate_reload.h"
#include "vm/object.h"
#include "vm/runtime_entry.h"
#include "vm/stack_frame.h"
#include "vm/visitor.h"

Go to the source code of this file.

Namespaces

namespace  dart
 

Macros

#define SIZE_FROM_CLASS(clazz)   case kTypedData##clazz##Cid:
 
#define RAW_VISITPOINTERS(clazz)
 
#define RAW_VISITPOINTERS(clazz)   case kTypedData##clazz##Cid:
 
#define RAW_VISITPOINTERS(clazz)   case kExternalTypedData##clazz##Cid:
 
#define RAW_VISITPOINTERS(clazz)
 
#define RAW_VISITPOINTERS(clazz)   case kFfi##clazz##Cid:
 
#define REGULAR_VISITOR(Type)
 
#define COMPRESSED_VISITOR(Type)   REGULAR_VISITOR(Type)
 
#define TYPED_DATA_VIEW_VISITOR(Type)
 
#define VARIABLE_VISITOR(Type, get_length)
 
#define VARIABLE_COMPRESSED_VISITOR(Type, get_length)    VARIABLE_VISITOR(Type, get_length)
 
#define NULL_VISITOR(Type)
 
#define VARIABLE_NULL_VISITOR(Type, get_length)
 
#define UNREACHABLE_VISITOR(Type)
 
#define ENUM_CASE(name, init)
 
#define ENUM_CASE(name, init)
 

Functions

 dart::VARIABLE_COMPRESSED_VISITOR (WeakArray, Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(TypeArguments
 
raw_obj dart::untag () -> num_entries()) VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(TypedData, TypedData::ElementSizeInBytes(raw_obj->GetClassId()) *Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(Record, RecordShape(raw_obj->untag() ->shape()).num_fields()) VARIABLE_NULL_VISITOR(CompressedStackMaps, CompressedStackMaps::PayloadSizeOf(raw_obj)) VARIABLE_NULL_VISITOR(OneByteString, Smi::Value(raw_obj->untag() ->length())) VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->untag() ->length())) intptr_t UntaggedField::VisitFieldPointers(FieldPtr raw_obj, ObjectPointerVisitor *visitor)
 
 dart::DEFINE_LEAF_RUNTIME_ENTRY (void, RememberCard, 2, uword object_in, ObjectPtr *slot)
 

Macro Definition Documentation

◆ COMPRESSED_VISITOR

#define COMPRESSED_VISITOR (   Type)    REGULAR_VISITOR(Type)

Definition at line 420 of file raw_object.cc.

◆ ENUM_CASE [1/2]

#define ENUM_CASE (   name,
  init 
)
Value:
case Kind::k##name: \
return #name;
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

◆ ENUM_CASE [2/2]

#define ENUM_CASE (   name,
  init 
)
Value:
if (strcmp(#name, cstr) == 0) { \
*out = Kind::k##name; \
return true; \
}

◆ NULL_VISITOR

#define NULL_VISITOR (   Type)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
/* Make sure that we got here with the tagged pointer as this. */ \
ASSERT(raw_obj->IsHeapObject()); \
ASSERT_NOTHING_TO_VISIT(Type); \
return Type::InstanceSize(); \
}
static ObjectPtr Ptr(ObjectPtr obj)

Definition at line 482 of file raw_object.cc.

◆ RAW_VISITPOINTERS [1/5]

#define RAW_VISITPOINTERS (   clazz)
Value:
case k##clazz##Cid: { \
clazz##Ptr raw_obj = static_cast<clazz##Ptr>(this); \
size = Untagged##clazz::Visit##clazz##Pointers(raw_obj, visitor); \
break; \
}

◆ RAW_VISITPOINTERS [2/5]

#define RAW_VISITPOINTERS (   clazz)    case kTypedData##clazz##Cid:

◆ RAW_VISITPOINTERS [3/5]

#define RAW_VISITPOINTERS (   clazz)    case kExternalTypedData##clazz##Cid:

◆ RAW_VISITPOINTERS [4/5]

#define RAW_VISITPOINTERS (   clazz)
Value:
case kTypedData##clazz##ViewCid: \
case kUnmodifiableTypedData##clazz##ViewCid:

◆ RAW_VISITPOINTERS [5/5]

#define RAW_VISITPOINTERS (   clazz)    case kFfi##clazz##Cid:

◆ REGULAR_VISITOR

#define REGULAR_VISITOR (   Type)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
/* Make sure that we got here with the tagged pointer as this. */ \
ASSERT(raw_obj->IsHeapObject()); \
ASSERT_UNCOMPRESSED(Type); \
visitor->VisitPointers(raw_obj->untag()->from(), raw_obj->untag()->to()); \
return Type::InstanceSize(); \
}

Definition at line 409 of file raw_object.cc.

◆ SIZE_FROM_CLASS

#define SIZE_FROM_CLASS (   clazz)    case kTypedData##clazz##Cid:

◆ TYPED_DATA_VIEW_VISITOR

#define TYPED_DATA_VIEW_VISITOR (   Type)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
/* Make sure that we got here with the tagged pointer as this. */ \
ASSERT(raw_obj->IsHeapObject()); \
ASSERT_COMPRESSED(Type); \
visitor->VisitTypedDataViewPointers(raw_obj, raw_obj->untag()->from(), \
raw_obj->untag()->to()); \
return Type::InstanceSize(); \
}

Definition at line 440 of file raw_object.cc.

◆ UNREACHABLE_VISITOR

#define UNREACHABLE_VISITOR (   Type)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
UNREACHABLE(); \
return 0; \
}

Definition at line 504 of file raw_object.cc.

◆ VARIABLE_COMPRESSED_VISITOR

#define VARIABLE_COMPRESSED_VISITOR (   Type,
  get_length 
)     VARIABLE_VISITOR(Type, get_length)

Definition at line 465 of file raw_object.cc.

◆ VARIABLE_NULL_VISITOR

#define VARIABLE_NULL_VISITOR (   Type,
  get_length 
)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
/* Make sure that we got here with the tagged pointer as this. */ \
ASSERT(raw_obj->IsHeapObject()); \
ASSERT_NOTHING_TO_VISIT(Type); \
intptr_t length = get_length; \
return Type::InstanceSize(length); \
}
size_t length

Definition at line 493 of file raw_object.cc.

◆ VARIABLE_VISITOR

#define VARIABLE_VISITOR (   Type,
  get_length 
)
Value:
intptr_t Untagged##Type::Visit##Type##Pointers( \
Type##Ptr raw_obj, ObjectPointerVisitor* visitor) { \
/* Make sure that we got here with the tagged pointer as this. */ \
ASSERT(raw_obj->IsHeapObject()); \
intptr_t length = get_length; \
visitor->VisitPointers(raw_obj->untag()->from(), \
raw_obj->untag()->to(length)); \
return Type::InstanceSize(length); \
}

Definition at line 453 of file raw_object.cc.