Flutter Engine
The Flutter Engine
Classes | Namespaces | Macros | Functions | Variables
thread.cc File Reference
#include "vm/thread.h"
#include "vm/cpu.h"
#include "vm/dart_api_state.h"
#include "vm/growable_array.h"
#include "vm/heap/safepoint.h"
#include "vm/isolate.h"
#include "vm/json_stream.h"
#include "vm/lockers.h"
#include "vm/log.h"
#include "vm/message_handler.h"
#include "vm/native_entry.h"
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/os_thread.h"
#include "vm/profiler.h"
#include "vm/runtime_entry.h"
#include "vm/service.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
#include "vm/thread_interrupter.h"
#include "vm/thread_registry.h"
#include "vm/timeline.h"
#include "vm/zone.h"

Go to the source code of this file.

Classes

struct  dart::ALIGN16
 
class  dart::RestoreWriteBarrierInvariantVisitor
 

Namespaces

namespace  dart
 

Macros

#define REUSABLE_HANDLE_SCOPE_INIT(object)
 
#define REUSABLE_HANDLE_INITIALIZERS(object)   object##_handle_(nullptr),
 
#define DEFAULT_INIT(type_name, member_name, init_expr, default_init_value)    member_name = default_init_value;
 
#define DEFAULT_INIT(name)   name##_entry_point_ = 0;
 
#define DEFAULT_INIT(returntype, name, ...)   name##_entry_point_ = 0;
 
#define ASSERT_VM_HEAP(type_name, member_name, init_expr, default_init_value)    ASSERT((init_expr)->IsOldObject());
 
#define INIT_VALUE(type_name, member_name, init_expr, default_init_value)
 
#define INIT_VALUE(name)
 
#define INIT_VALUE(returntype, name, ...)
 
#define REUSABLE_HANDLE_ALLOCATION(object)    this->object##_handle_ = this->AllocateReusableHandle<object>();
 
#define CHECK_REUSABLE_HANDLE(object)   ASSERT(object##_handle_->IsNull());
 
#define CLEAR_REUSABLE_HANDLE(object)   *object##_handle_ = object::null();
 
#define CHECK_OBJECT(type_name, member_name, expr, default_init_value)
 
#define CHECK_OBJECT(type_name, member_name, expr, default_init_value)
 
#define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)
 
#define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)
 
#define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)
 
#define COMPUTE_OFFSET(name)
 
#define COMPUTE_OFFSET(returntype, name, ...)
 

Functions

 dart::DECLARE_FLAG (bool, trace_service)
 
 dart::DECLARE_FLAG (bool, trace_service_verbose)
 
static bool dart::ShouldSuspend (bool isolate_shutdown, Thread *thread)
 
static bool dart::IsInterruptLimit (uword limit)
 

Variables

static const double dart::double_nan_constant = NAN
 
static const struct dart::ALIGN16 dart::double_negate_constant = {0x8000000000000000ULL, 0x8000000000000000ULL}
 
static const struct dart::ALIGN16 dart::double_abs_constant = {0x7FFFFFFFFFFFFFFFULL, 0x7FFFFFFFFFFFFFFFULL}
 
static const struct dart::ALIGN16 dart::float_not_constant = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}
 
static const struct dart::ALIGN16 dart::float_negate_constant = {0x80000000, 0x80000000, 0x80000000, 0x80000000}
 
static const struct dart::ALIGN16 dart::float_absolute_constant = {0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF, 0x7FFFFFFF}
 
static const struct dart::ALIGN16 dart::float_zerow_constant = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000}
 

Macro Definition Documentation

◆ ASSERT_VM_HEAP

#define ASSERT_VM_HEAP (   type_name,
  member_name,
  init_expr,
  default_init_value 
)     ASSERT((init_expr)->IsOldObject());

◆ CHECK_OBJECT [1/2]

#define CHECK_OBJECT (   type_name,
  member_name,
  expr,
  default_init_value 
)
Value:
if (object.ptr() == expr) { \
return true; \
}

◆ CHECK_OBJECT [2/2]

#define CHECK_OBJECT (   type_name,
  member_name,
  expr,
  default_init_value 
)
Value:
if (object.ptr() == expr) { \
return true; \
}

◆ CHECK_REUSABLE_HANDLE

#define CHECK_REUSABLE_HANDLE (   object)    ASSERT(object##_handle_->IsNull());

◆ CLEAR_REUSABLE_HANDLE

#define CLEAR_REUSABLE_HANDLE (   object)    *object##_handle_ = object::null();

◆ COMPUTE_OFFSET [1/5]

#define COMPUTE_OFFSET (   name)
Value:
if (runtime_entry == &k##name##RuntimeEntry) { \
return Thread::name##_entry_point_offset(); \
}
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32

◆ COMPUTE_OFFSET [2/5]

#define COMPUTE_OFFSET (   returntype,
  name,
  ... 
)
Value:
if (runtime_entry == &k##name##RuntimeEntry) { \
return Thread::name##_entry_point_offset(); \
}

◆ COMPUTE_OFFSET [3/5]

#define COMPUTE_OFFSET (   type_name,
  member_name,
  expr,
  default_init_value 
)
Value:
ASSERT((expr)->untag()->InVMIsolateHeap()); \
if (object.ptr() == expr) { \
return Thread::member_name##offset(); \
}
#define ASSERT(E)
raw_obj 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)
Definition: raw_object.cc:558
SeparatedVector2 offset

◆ COMPUTE_OFFSET [4/5]

#define COMPUTE_OFFSET (   type_name,
  member_name,
  expr,
  default_init_value 
)
Value:
if (object.ptr() == expr) { \
return Thread::member_name##offset(); \
}

◆ COMPUTE_OFFSET [5/5]

#define COMPUTE_OFFSET (   type_name,
  member_name,
  expr,
  default_init_value 
)
Value:
if (Thread::member_name##offset() == offset) { \
*object = expr; \
return true; \
}

◆ DEFAULT_INIT [1/3]

#define DEFAULT_INIT (   name)    name##_entry_point_ = 0;

◆ DEFAULT_INIT [2/3]

#define DEFAULT_INIT (   returntype,
  name,
  ... 
)    name##_entry_point_ = 0;

◆ DEFAULT_INIT [3/3]

#define DEFAULT_INIT (   type_name,
  member_name,
  init_expr,
  default_init_value 
)     member_name = default_init_value;

◆ INIT_VALUE [1/3]

#define INIT_VALUE (   name)
Value:
ASSERT(name##_entry_point_ == 0); \
name##_entry_point_ = k##name##RuntimeEntry.GetEntryPoint();

◆ INIT_VALUE [2/3]

#define INIT_VALUE (   returntype,
  name,
  ... 
)
Value:
ASSERT(name##_entry_point_ == 0); \
name##_entry_point_ = k##name##RuntimeEntry.GetEntryPoint();

◆ INIT_VALUE [3/3]

#define INIT_VALUE (   type_name,
  member_name,
  init_expr,
  default_init_value 
)
Value:
ASSERT(member_name == default_init_value); \
member_name = (init_expr);

◆ REUSABLE_HANDLE_ALLOCATION

#define REUSABLE_HANDLE_ALLOCATION (   object)     this->object##_handle_ = this->AllocateReusableHandle<object>();

◆ REUSABLE_HANDLE_INITIALIZERS

#define REUSABLE_HANDLE_INITIALIZERS (   object)    object##_handle_(nullptr),

Definition at line 62 of file thread.cc.

◆ REUSABLE_HANDLE_SCOPE_INIT

#define REUSABLE_HANDLE_SCOPE_INIT (   object)

Definition at line 59 of file thread.cc.