Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Enumerations
slot.cc File Reference
#include "vm/compiler/backend/slot.h"
#include "vm/compiler/backend/flow_graph_compiler.h"
#include "vm/compiler/backend/il.h"
#include "vm/compiler/compiler_state.h"
#include "vm/hash_map.h"
#include "vm/parser.h"
#include "vm/scopes.h"

Go to the source code of this file.

Classes

class  dart::SlotCache
 

Namespaces

namespace  dart
 

Macros

#define DECLARE_KIND(CN, __, FN, ___, ____)   k##CN##_##FN,
 
#define FIELD_FLAGS_FINAL    (Slot::IsImmutableBit::encode(true) | Slot::IsWeakBit::encode(false))
 
#define FIELD_FLAGS_VAR    (Slot::IsImmutableBit::encode(false) | Slot::IsWeakBit::encode(false))
 
#define FIELD_FLAGS_WEAK    (Slot::IsImmutableBit::encode(false) | Slot::IsWeakBit::encode(true))
 
#define DEFINE_NULLABLE_TAGGED_NATIVE_DART_FIELD(ClassName, UnderlyingType, FieldName, cid, mutability)
 
#define DEFINE_NONNULLABLE_TAGGED_NATIVE_DART_FIELD( ClassName, UnderlyingType, FieldName, cid, mutability)
 
#define DEFINE_UNBOXED_NATIVE_DART_FIELD(ClassName, UnderlyingType, FieldName, representation, mutability)
 
#define DEFINE_UNTAGGED_NATIVE_DART_FIELD(ClassName, UnderlyingType, FieldName, GcMayMove, mutability)
 
#define DEFINE_NULLABLE_TAGGED_NATIVE_NONDART_FIELD(ClassName, __, FieldName, cid, mutability)
 
#define DEFINE_UNBOXED_NATIVE_NONDART_FIELD(ClassName, __, FieldName, representation, mutability)
 
#define DEFINE_UNTAGGED_NATIVE_NONDART_FIELD(ClassName, __, FieldName, gc_may_move, mutability)
 
#define NOT_TAGGED_INT_NATIVE_SLOT_CASE(Class, __, Field, ___, ____)    case Slot::Kind::k##Class##_##Field:
 

Enumerations

enum  dart::NativeSlotsEnumeration { dart::kNativeSlotsCount }
 

Macro Definition Documentation

◆ DECLARE_KIND

#define DECLARE_KIND (   CN,
  __,
  FN,
  ___,
  ____ 
)    k##CN##_##FN,

Definition at line 17 of file slot.cc.

◆ DEFINE_NONNULLABLE_TAGGED_NATIVE_DART_FIELD

#define DEFINE_NONNULLABLE_TAGGED_NATIVE_DART_FIELD (   ClassName,
  UnderlyingType,
  FieldName,
  cid,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) Slot( \
Slot::Kind::k##ClassName##_##FieldName, \
(FIELD_FLAGS_##mutability | \
Slot::IsCompressedBit::encode( \
ClassName::ContainsCompressedPointers())), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, \
CompileType(CompileType::kCannotBeNull, \
CompileType::kCannotBeSentinel, k##cid##Cid, nullptr), \
kTagged);

◆ DEFINE_NULLABLE_TAGGED_NATIVE_DART_FIELD

#define DEFINE_NULLABLE_TAGGED_NATIVE_DART_FIELD (   ClassName,
  UnderlyingType,
  FieldName,
  cid,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) Slot( \
Slot::Kind::k##ClassName##_##FieldName, \
(FIELD_FLAGS_##mutability | \
Slot::IsCompressedBit::encode( \
ClassName::ContainsCompressedPointers())), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, \
CompileType(CompileType::kCanBeNull, CompileType::kCannotBeSentinel, \
k##cid##Cid, nullptr), \
kTagged);

◆ DEFINE_NULLABLE_TAGGED_NATIVE_NONDART_FIELD

#define DEFINE_NULLABLE_TAGGED_NATIVE_NONDART_FIELD (   ClassName,
  __,
  FieldName,
  cid,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) Slot( \
Slot::Kind::k##ClassName##_##FieldName, \
FIELD_FLAGS_##mutability | Slot::HasUntaggedInstanceBit::encode(true), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, \
CompileType(CompileType::kCanBeNull, CompileType::kCannotBeSentinel, \
k##cid##Cid, nullptr), \
kTagged);

◆ DEFINE_UNBOXED_NATIVE_DART_FIELD

#define DEFINE_UNBOXED_NATIVE_DART_FIELD (   ClassName,
  UnderlyingType,
  FieldName,
  representation,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) \
Slot(Slot::Kind::k##ClassName##_##FieldName, \
FIELD_FLAGS_##mutability | Slot::IsNonTaggedBit::encode(true), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, \
CompileType::FromUnboxedRepresentation(kUnboxed##representation), \
kUnboxed##representation);

◆ DEFINE_UNBOXED_NATIVE_NONDART_FIELD

#define DEFINE_UNBOXED_NATIVE_NONDART_FIELD (   ClassName,
  __,
  FieldName,
  representation,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) \
Slot(Slot::Kind::k##ClassName##_##FieldName, \
FIELD_FLAGS_##mutability | Slot::IsNonTaggedBit::encode(true) | \
Slot::HasUntaggedInstanceBit::encode(true), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, \
CompileType::FromUnboxedRepresentation(kUnboxed##representation), \
kUnboxed##representation);

◆ DEFINE_UNTAGGED_NATIVE_DART_FIELD

#define DEFINE_UNTAGGED_NATIVE_DART_FIELD (   ClassName,
  UnderlyingType,
  FieldName,
  GcMayMove,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) \
Slot(Slot::Kind::k##ClassName##_##FieldName, \
FIELD_FLAGS_##mutability | \
Slot::MayContainInnerPointerBit::encode(GcMayMove) | \
Slot::IsNonTaggedBit::encode(true), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, CompileType::Object(), kUntagged);

◆ DEFINE_UNTAGGED_NATIVE_NONDART_FIELD

#define DEFINE_UNTAGGED_NATIVE_NONDART_FIELD (   ClassName,
  __,
  FieldName,
  gc_may_move,
  mutability 
)
Value:
case Slot::Kind::k##ClassName##_##FieldName: \
return new (zone_) \
Slot(Slot::Kind::k##ClassName##_##FieldName, \
FIELD_FLAGS_##mutability | \
Slot::MayContainInnerPointerBit::encode(gc_may_move) | \
Slot::IsNonTaggedBit::encode(true) | \
Slot::HasUntaggedInstanceBit::encode(true), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, CompileType::Object(), kUntagged);

◆ FIELD_FLAGS_FINAL

#define FIELD_FLAGS_FINAL    (Slot::IsImmutableBit::encode(true) | Slot::IsWeakBit::encode(false))

◆ FIELD_FLAGS_VAR

#define FIELD_FLAGS_VAR    (Slot::IsImmutableBit::encode(false) | Slot::IsWeakBit::encode(false))

◆ FIELD_FLAGS_WEAK

#define FIELD_FLAGS_WEAK    (Slot::IsImmutableBit::encode(false) | Slot::IsWeakBit::encode(true))

◆ NOT_TAGGED_INT_NATIVE_SLOT_CASE

#define NOT_TAGGED_INT_NATIVE_SLOT_CASE (   Class,
  __,
  Field,
  ___,
  ____ 
)     case Slot::Kind::k##Class##_##Field: