Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 424 of file raw_object.cc.

◆ ENUM_CASE [1/2]

#define ENUM_CASE (   name,
  init 
)
Value:
case Kind::k##name: \
return #name;
const char * name
Definition fuchsia.cc:50

◆ 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(); \
}

Definition at line 486 of file raw_object.cc.

488 { \
489 /* Make sure that we got here with the tagged pointer as this. */ \
490 ASSERT(raw_obj->IsHeapObject()); \
491 ASSERT_NOTHING_TO_VISIT(Type); \
492 return Type::InstanceSize(); \
493 }

◆ 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 413 of file raw_object.cc.

415 { \
416 /* Make sure that we got here with the tagged pointer as this. */ \
417 ASSERT(raw_obj->IsHeapObject()); \
418 ASSERT_UNCOMPRESSED(Type); \
419 visitor->VisitPointers(raw_obj->untag()->from(), raw_obj->untag()->to()); \
420 return Type::InstanceSize(); \
421 }

◆ 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 444 of file raw_object.cc.

446 { \
447 /* Make sure that we got here with the tagged pointer as this. */ \
448 ASSERT(raw_obj->IsHeapObject()); \
449 ASSERT_COMPRESSED(Type); \
450 visitor->VisitTypedDataViewPointers(raw_obj, raw_obj->untag()->from(), \
451 raw_obj->untag()->to()); \
452 return Type::InstanceSize(); \
453 }

◆ 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 508 of file raw_object.cc.

510 { \
511 UNREACHABLE(); \
512 return 0; \
513 }

◆ VARIABLE_COMPRESSED_VISITOR

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

Definition at line 469 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 497 of file raw_object.cc.

499 { \
500 /* Make sure that we got here with the tagged pointer as this. */ \
501 ASSERT(raw_obj->IsHeapObject()); \
502 ASSERT_NOTHING_TO_VISIT(Type); \
503 intptr_t length = get_length; \
504 return Type::InstanceSize(length); \
505 }

◆ 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 457 of file raw_object.cc.

459 { \
460 /* Make sure that we got here with the tagged pointer as this. */ \
461 ASSERT(raw_obj->IsHeapObject()); \
462 intptr_t length = get_length; \
463 visitor->VisitPointers(raw_obj->untag()->from(), \
464 raw_obj->untag()->to(length)); \
465 return Type::InstanceSize(length); \
466 }