Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
runtime_api.h File Reference
#include "platform/globals.h"
#include "platform/thread_sanitizer.h"
#include "platform/utils.h"
#include "vm/allocation.h"
#include "vm/bitfield.h"
#include "vm/bss_relocs.h"
#include "vm/class_id.h"
#include "vm/code_entry_kind.h"
#include "vm/constants.h"
#include "vm/frame_layout.h"
#include "vm/pointer_tagging.h"
#include "vm/runtime_entry_list.h"
#include "vm/token.h"

Go to the source code of this file.

Classes

class  dart::compiler::InvalidClass
 
class  dart::compiler::RuntimeEntry
 
class  dart::compiler::target::FreeListElement::FakeInstance
 
class  dart::compiler::target::ForwardingCorpse::FakeInstance
 

Namespaces

namespace  dart
 
namespace  dart::compiler
 
namespace  dart::compiler::target
 

Macros

#define DO(clazz)
 
#define DECLARE_RUNTIME_ENTRY(name)    extern const RuntimeEntry& k##name##RuntimeEntry;
 
#define DECLARE_RUNTIME_ENTRY(type, name, ...)    extern const RuntimeEntry& k##name##RuntimeEntry;
 
#define FINAL_CLASS()
 
#define THREAD_XMM_CONSTANT_LIST(V)
 
#define DECLARE_CONSTANT_OFFSET_GETTER(name)    static word name##_address_offset();
 

Functions

Objectdart::compiler::NewZoneHandle (Zone *zone)
 
Objectdart::compiler::NewZoneHandle (Zone *zone, const Object &obj)
 
const Objectdart::compiler::NullObject ()
 
const Objectdart::compiler::SentinelObject ()
 
const Booldart::compiler::TrueObject ()
 
const Booldart::compiler::FalseObject ()
 
const Objectdart::compiler::EmptyTypeArguments ()
 
const Typedart::compiler::DynamicType ()
 
const Typedart::compiler::ObjectType ()
 
const Typedart::compiler::VoidType ()
 
const Typedart::compiler::IntType ()
 
const Classdart::compiler::GrowableObjectArrayClass ()
 
const Classdart::compiler::MintClass ()
 
const Classdart::compiler::DoubleClass ()
 
const Classdart::compiler::Float32x4Class ()
 
const Classdart::compiler::Float64x2Class ()
 
const Classdart::compiler::Int32x4Class ()
 
const Classdart::compiler::ClosureClass ()
 
const Arraydart::compiler::ArgumentsDescriptorBoxed (intptr_t type_args_len, intptr_t num_arguments)
 
template<typename To , typename From >
const To & dart::compiler::CastHandle (const From &from)
 
bool dart::compiler::IsSameObject (const Object &a, const Object &b)
 
bool dart::compiler::IsEqualType (const AbstractType &a, const AbstractType &b)
 
bool dart::compiler::IsSubtypeOfInt (const AbstractType &type)
 
bool dart::compiler::IsDoubleType (const AbstractType &type)
 
bool dart::compiler::IsBoolType (const AbstractType &type)
 
bool dart::compiler::IsSmiType (const AbstractType &type)
 
bool dart::compiler::IsInOldSpace (const Object &obj)
 
bool dart::compiler::IsOriginalObject (const Object &object)
 
void dart::compiler::SetToNull (Object *obj)
 
const Objectdart::compiler::ToObject (const Code &handle)
 
const Objectdart::compiler::ToObject (const Function &handle)
 
intptr_t dart::compiler::ObjectHash (const Object &obj)
 
const char * dart::compiler::ObjectToCString (const Object &obj)
 
bool dart::compiler::HasIntegerValue (const dart::Object &object, int64_t *value)
 
int32_t dart::compiler::CreateJitCookie ()
 
word dart::compiler::TypedDataElementSizeInBytes (classid_t cid)
 
word dart::compiler::TypedDataMaxNewSpaceElements (classid_t cid)
 
const Fielddart::compiler::LookupMathRandomStateFieldOffset ()
 
const Fielddart::compiler::LookupConvertUtf8DecoderScanFlagsField ()
 
word dart::compiler::LookupFieldOffsetInBytes (const Field &field)
 
const Codedart::compiler::StubCodeAllocateArray ()
 
const Codedart::compiler::StubCodeSubtype2TestCache ()
 
const Codedart::compiler::StubCodeSubtype3TestCache ()
 
const Codedart::compiler::StubCodeSubtype4TestCache ()
 
const Codedart::compiler::StubCodeSubtype6TestCache ()
 
const Codedart::compiler::StubCodeSubtype7TestCache ()
 
const Stringdart::compiler::AllocateString (const char *buffer)
 
void dart::compiler::BailoutWithBranchOffsetError ()
 
bool dart::compiler::target::SizeFitsInSizeTag (uword instance_size)
 
uword dart::compiler::target::MakeTagWordForNewSpaceObject (classid_t cid, uword instance_size)
 
bool dart::compiler::target::IsSmi (const dart::Object &a)
 
bool dart::compiler::target::IsSmi (int64_t v)
 
word dart::compiler::target::ToRawSmi (const dart::Object &a)
 
word dart::compiler::target::ToRawSmi (intptr_t value)
 
word dart::compiler::target::SmiValue (const dart::Object &a)
 
bool dart::compiler::target::IsDouble (const dart::Object &a)
 
double dart::compiler::target::DoubleValue (const dart::Object &a)
 
bool dart::compiler::target::CanLoadFromThread (const dart::Object &object, intptr_t *offset)
 
bool dart::compiler::target::WillAllocateNewOrRememberedObject (intptr_t instance_size)
 
bool dart::compiler::target::WillAllocateNewOrRememberedContext (intptr_t num_context_variables)
 
bool dart::compiler::target::WillAllocateNewOrRememberedArray (intptr_t length)
 
void dart::compiler::target::UnboxFieldIfSupported (const dart::Field &field, const dart::AbstractType &type)
 

Variables

InvalidClass dart::compiler::kWordSize
 
InvalidClass dart::compiler::kWordSizeLog2
 
InvalidClass dart::compiler::kBitsPerWord
 
InvalidClass dart::compiler::kBitsPerWordLog2
 
InvalidClass dart::compiler::kWordMin
 
InvalidClass dart::compiler::kWordMax
 
InvalidClass dart::compiler::kUWordMax
 
InvalidClass dart::compiler::kNewObjectAlignmentOffset
 
InvalidClass dart::compiler::kOldObjectAlignmentOffset
 
InvalidClass dart::compiler::kNewObjectBitPosition
 
InvalidClass dart::compiler::kPageSize
 
InvalidClass dart::compiler::kPageSizeInWords
 
InvalidClass dart::compiler::kPageMask
 
InvalidClass dart::compiler::kObjectAlignment
 
InvalidClass dart::compiler::kObjectAlignmentLog2
 
InvalidClass dart::compiler::kObjectAlignmentMask
 
InvalidClass dart::compiler::kSmiBits
 
InvalidClass dart::compiler::kSmiMin
 
InvalidClass dart::compiler::kSmiMax
 
static constexpr intptr_t dart::compiler::kHostWordSize = dart::kWordSize
 
static constexpr intptr_t dart::compiler::kHostWordSizeLog2 = dart::kWordSizeLog2
 

Macro Definition Documentation

◆ DECLARE_CONSTANT_OFFSET_GETTER

#define DECLARE_CONSTANT_OFFSET_GETTER (   name)     static word name##_address_offset();

Definition at line 1265 of file runtime_api.h.

1292 : public AllStatic {
1293 public:
1294 static word top_offset();
1295 static word pointers_offset();
1296 static const word kSize;
1297};
1298
1299class MarkingStackBlock : public AllStatic {
1300 public:
1301 static word top_offset();
1302 static word pointers_offset();
1303 static const word kSize;
1304};
1305
1306class ObjectStore : public AllStatic {
1307 public:
1308 static word double_type_offset();
1309 static word int_type_offset();
1310 static word record_field_names_offset();
1311 static word string_type_offset();
1312 static word type_type_offset();
1313
1314 static word ffi_callback_code_offset();
1315
1316 static word suspend_state_await_offset();
1317 static word suspend_state_await_with_type_check_offset();
1318 static word suspend_state_handle_exception_offset();
1319 static word suspend_state_init_async_offset();
1320 static word suspend_state_init_async_star_offset();
1321 static word suspend_state_init_sync_star_offset();
1322 static word suspend_state_return_async_offset();
1323 static word suspend_state_return_async_not_future_offset();
1324 static word suspend_state_return_async_star_offset();
1325 static word suspend_state_suspend_sync_star_at_start_offset();
1326 static word suspend_state_yield_async_star_offset();
1327};
1328
1329class Isolate : public AllStatic {
1330 public:
1331 static word default_tag_offset();
1332 static word current_tag_offset();
1333 static word user_tag_offset();
1334 static word finalizers_offset();
1335#if !defined(PRODUCT)
1336 static word single_step_offset();
1337 static word has_resumption_breakpoints_offset();
1338#endif // !defined(PRODUCT)
1339};
1340
1341class IsolateGroup : public AllStatic {
1342 public:
1343 static word object_store_offset();
1344 static word class_table_offset();
1345 static word cached_class_table_table_offset();
1346};
1347
1348class ClassTable : public AllStatic {
1349 public:
1350#if !defined(PRODUCT)
1351 static word allocation_tracing_state_table_offset();
1352 static word AllocationTracingStateSlotOffsetFor(intptr_t cid);
1353#endif // !defined(PRODUCT)
1354};
1355
1356class InstructionsSection : public AllStatic {
1357 public:
1358 static word UnalignedHeaderSize();
1359 static word HeaderSize();
1360 static word InstanceSize();
1361 static word InstanceSize(word payload_size);
1362 FINAL_CLASS();
1363};
1364
1365class InstructionsTable : public AllStatic {
1366 public:
1367 static word HeaderSize();
1368 static word InstanceSize();
1369 static word InstanceSize(intptr_t length);
1370 FINAL_CLASS();
1371
1372 private:
1373 static word element_offset(intptr_t index);
1374};
1375
1376class Instructions : public AllStatic {
1377 public:
1378 static const word kMonomorphicEntryOffsetJIT;
1379 static const word kPolymorphicEntryOffsetJIT;
1380 static const word kMonomorphicEntryOffsetAOT;
1381 static const word kPolymorphicEntryOffsetAOT;
1382 static const word kBarePayloadAlignment;
1383 static const word kNonBarePayloadAlignment;
1384 static word UnalignedHeaderSize();
1385 static word HeaderSize();
1386 static word InstanceSize();
1387 static word InstanceSize(word payload_size);
1388 FINAL_CLASS();
1389};
1390
1391class Code : public AllStatic {
1392 public:
1393#if defined(TARGET_ARCH_IA32)
1394 static uword EntryPointOf(const dart::Code& code);
1395#endif // defined(TARGET_ARCH_IA32)
1396
1397 static word object_pool_offset();
1398 static word entry_point_offset(CodeEntryKind kind = CodeEntryKind::kNormal);
1399 static word active_instructions_offset();
1400 static word instructions_offset();
1401 static word owner_offset();
1402 static word HeaderSize();
1403 static word InstanceSize();
1404 static word InstanceSize(intptr_t length);
1405 FINAL_CLASS();
1406
1407 private:
1408 static word element_offset(intptr_t index);
1409};
1410
1411class WeakSerializationReference : public AllStatic {
1412 public:
1413 static word InstanceSize();
1414 FINAL_CLASS();
1415};
1416
1417class WeakArray : public AllStatic {
1418 public:
1419 static word length_offset();
1420 static word element_offset(intptr_t index);
1421 static word InstanceSize(intptr_t length);
1422 static word InstanceSize();
1423 FINAL_CLASS();
1424};
1425
1426class SubtypeTestCache : public AllStatic {
1427 public:
1428 static word cache_offset();
1429 static word num_inputs_offset();
1430
1431 static const word kMaxInputs;
1432 static const word kTestEntryLength;
1433 static const word kInstanceCidOrSignature;
1434 static const word kDestinationType;
1435 static const word kInstanceTypeArguments;
1436 static const word kInstantiatorTypeArguments;
1437 static const word kFunctionTypeArguments;
1438 static const word kInstanceParentFunctionTypeArguments;
1439 static const word kInstanceDelayedFunctionTypeArguments;
1440 static const word kTestResult;
1441 static word InstanceSize();
1442 FINAL_CLASS();
1443};
1444
1445class LoadingUnit : public AllStatic {
1446 public:
1447 static word InstanceSize();
1448 FINAL_CLASS();
1449};
1450
1451class Context : public AllStatic {
1452 public:
1453 static word header_size();
1454 static word parent_offset();
1455 static word num_variables_offset();
1456 static word variable_offset(intptr_t index);
1457 static word InstanceSize(intptr_t length);
1458 static word InstanceSize();
1459 FINAL_CLASS();
1460
1461 static const word kMaxElements;
1462};
1463
1464class Closure : public AllStatic {
1465 public:
1466 static word context_offset();
1467 static word delayed_type_arguments_offset();
1468 static word entry_point_offset();
1469 static word function_offset();
1470 static word function_type_arguments_offset();
1471 static word instantiator_type_arguments_offset();
1472 static word hash_offset();
1473 static word InstanceSize();
1474 FINAL_CLASS();
1475};
1476
1477class ClosureData : public AllStatic {
1478 public:
1479 static word packed_fields_offset();
1480 static word InstanceSize();
1481 FINAL_CLASS();
1482};
1483
1484class Page : public AllStatic {
1485 public:
1486 static const word kBytesPerCardLog2;
1487
1488 static word card_table_offset();
1489 static word original_top_offset();
1490 static word original_end_offset();
1491};
1492
1493class Heap : public AllStatic {
1494 public:
1495 // Return true if an object with the given instance size is allocatable
1496 // in new space on the target.
1497 static bool IsAllocatableInNewSpace(intptr_t instance_size);
1498};
1499
1500class NativeArguments {
1501 public:
1502 static word thread_offset();
1503 static word argc_tag_offset();
1504 static word argv_offset();
1505 static word retval_offset();
1506
1507 static word StructSize();
1508};
1509
1510class NativeEntry {
1511 public:
1512 static const word kNumCallWrapperArguments;
1513};
1514
1515class RegExp : public AllStatic {
1516 public:
1517 static word function_offset(classid_t cid, bool sticky);
1518 static word InstanceSize();
1519 FINAL_CLASS();
1520};
1521
1522class UserTag : public AllStatic {
1523 public:
1524 static word tag_offset();
1525 static word InstanceSize();
1526 FINAL_CLASS();
1527};
1528
1529class Symbols : public AllStatic {
1530 public:
1531 static const word kNumberOfOneCharCodeSymbols;
1532 static const word kNullCharCodeSymbolOffset;
1533};
1534
1535class Field : public AllStatic {
1536 public:
1537 static word OffsetOf(const dart::Field& field);
1538
1539 static word guarded_cid_offset();
1540 static word guarded_list_length_in_object_offset_offset();
1541 static word guarded_list_length_offset();
1542 static word is_nullable_offset();
1543 static word kind_bits_offset();
1544 static word initializer_function_offset();
1545 static word host_offset_or_field_id_offset();
1546 static word InstanceSize();
1547 FINAL_CLASS();
1548};
1549
1550class TypeParameters : public AllStatic {
1551 public:
1552 static word names_offset();
1553 static word flags_offset();
1554 static word bounds_offset();
1555 static word defaults_offset();
1556 static word InstanceSize();
1557 FINAL_CLASS();
1558};
1559
1560class TypeArguments : public AllStatic {
1561 public:
1562 static word hash_offset();
1563 static word instantiations_offset();
1564 static word length_offset();
1565 static word nullability_offset();
1566 static word type_at_offset(intptr_t i);
1567 static word types_offset();
1568 static word InstanceSize(intptr_t length);
1569 static word InstanceSize();
1570 FINAL_CLASS();
1571
1572 static const word kMaxElements;
1573};
1574
1575class FreeListElement : public AllStatic {
1576 public:
1577 class FakeInstance : public AllStatic {
1578 public:
1579 static word InstanceSize();
1580 FINAL_CLASS();
1581 };
1582};
1583
1584class ForwardingCorpse : public AllStatic {
1585 public:
1586 class FakeInstance : public AllStatic {
1587 public:
1588 static word InstanceSize();
1589 FINAL_CLASS();
1590 };
1591};
1592
1593class FieldTable : public AllStatic {
1594 public:
1595 static word OffsetOf(const dart::Field& field);
1596};
1597
1598void UnboxFieldIfSupported(const dart::Field& field,
1599 const dart::AbstractType& type);
1600
1601} // namespace target
1602} // namespace compiler
1603} // namespace dart
1604
1605#endif // RUNTIME_VM_COMPILER_RUNTIME_API_H_
static constexpr int kSize
size_t length
void UnboxFieldIfSupported(const dart::Field &field, const dart::AbstractType &type)
MarkingStack::Block MarkingStackBlock
uintptr_t uword
Definition globals.h:501
intptr_t word
Definition globals.h:500
bool IsAllocatableInNewSpace(intptr_t size)
Definition spaces.h:57
std::function< void(Dart_NativeArguments)> NativeEntry
#define FINAL_CLASS()

◆ DECLARE_RUNTIME_ENTRY [1/2]

#define DECLARE_RUNTIME_ENTRY (   name)     extern const RuntimeEntry& k##name##RuntimeEntry;

Definition at line 241 of file runtime_api.h.

◆ DECLARE_RUNTIME_ENTRY [2/2]

#define DECLARE_RUNTIME_ENTRY (   type,
  name,
  ... 
)     extern const RuntimeEntry& k##name##RuntimeEntry;

Definition at line 241 of file runtime_api.h.

◆ DO

#define DO (   clazz)
Value:
class Untagged##clazz; \
class clazz;

Definition at line 44 of file runtime_api.h.

◆ FINAL_CLASS

#define FINAL_CLASS ( )
Value:
static word NextFieldOffset() { \
return -kWordSize; \
}

Definition at line 406 of file runtime_api.h.

407 { \
408 return -kWordSize; \
409 }
constexpr intptr_t kWordSize
Definition globals.h:509

◆ THREAD_XMM_CONSTANT_LIST

#define THREAD_XMM_CONSTANT_LIST (   V)
Value:
V(float_not) \
V(float_negate) \
V(float_absolute) \
V(float_zerow) \
V(double_negate) \
V(double_abs)
#define V(name)
Definition raw_object.h:124

Definition at line 1257 of file runtime_api.h.