Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Namespaces | Macros | Functions
compiler_state.cc File Reference
#include "vm/compiler/compiler_state.h"
#include <functional>
#include "vm/compiler/aot/precompiler.h"
#include "vm/compiler/backend/flow_graph_compiler.h"
#include "vm/compiler/backend/il_printer.h"
#include "vm/compiler/backend/slot.h"
#include "vm/growable_array.h"
#include "vm/scopes.h"

Go to the source code of this file.

Namespaces

namespace  dart
 

Macros

#define DEFINE_TYPED_LIST_NATIVE_FUNCTION_GETTER(Upper, Lower)
 
#define DEFINE_CLASS_GETTER(Lib, Upper, Lower, Symbol)
 

Functions

template<typename T >
Tdart::PutIfAbsent (Thread *thread, ZoneGrowableArray< T * > **array_slot, intptr_t index, std::function< T *()> create)
 

Macro Definition Documentation

◆ DEFINE_CLASS_GETTER

#define DEFINE_CLASS_GETTER (   Lib,
  Upper,
  Lower,
  Symbol 
)
Value:
const Class& CompilerState::Upper##Class() { \
if (Lower##_class_ == nullptr) { \
Thread* thread = Thread::Current(); \
Zone* zone = thread->zone(); \
const auto& lib = Library::Handle(zone, Library::Lib##Library()); \
const auto& cls = \
Class::Handle(zone, lib.LookupClassAllowPrivate(Symbols::Symbol())); \
ASSERT(!cls.IsNull()); \
const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread)); \
ASSERT(error.IsNull()); \
Lower##_class_ = &cls; \
} \
return *Lower##_class_; \
}
const uint8_t uint32_t uint32_t GError ** error

Definition at line 127 of file compiler_state.cc.

◆ DEFINE_TYPED_LIST_NATIVE_FUNCTION_GETTER

#define DEFINE_TYPED_LIST_NATIVE_FUNCTION_GETTER (   Upper,
  Lower 
)
Value:
const Function& CompilerState::TypedListGet##Upper() { \
if (typed_list_get_##Lower##_ == nullptr) { \
Thread* thread = Thread::Current(); \
Zone* zone = thread->zone(); \
const auto& cls = CompilerState::TypedListClass(); \
typed_list_get_##Lower##_ = &Function::ZoneHandle( \
zone, cls.LookupFunctionAllowPrivate(Symbols::_nativeGet##Upper())); \
ASSERT(!typed_list_get_##Lower##_->IsNull()); \
} \
return *typed_list_get_##Lower##_; \
} \
const Function& CompilerState::TypedListSet##Upper() { \
if (typed_list_set_##Lower##_ == nullptr) { \
Thread* thread = Thread::Current(); \
Zone* zone = thread->zone(); \
const auto& cls = CompilerState::TypedListClass(); \
typed_list_set_##Lower##_ = &Function::ZoneHandle( \
zone, cls.LookupFunctionAllowPrivate(Symbols::_nativeSet##Upper())); \
ASSERT(!typed_list_set_##Lower##_->IsNull()); \
} \
return *typed_list_set_##Lower##_; \
}

Definition at line 95 of file compiler_state.cc.