68 {
70
72 auto zone = thread->zone();
73 auto object_store = thread->isolate_group()->object_store();
74
76 thread->isolate_group()->program_lock()->IsCurrentThreadWriter());
77
78 auto& closures =
80 if (closures.IsNull()) {
82 object_store->set_closure_functions(closures);
83 }
84
85 ASSERT(allow_implicit_closure_functions ||
86 function.IsNonImplicitClosureFunction());
88
89 if (allow_implicit_closure_functions) {
90 return;
91 }
92
93 const Function& member_function =
96
97 auto& map_array =
99 if (map_array.IsNull()) {
100 map_array = HashTables::New<FunctionHashMap>(16,
Heap::kOld);
101 }
103 map_array ^=
map.GetOrNull(member_function);
104 if (map_array.IsNull()) {
105 map_array = HashTables::New<IntHashMap>(4,
Heap::kOld);
106 }
110 map.UpdateOrInsert(member_function, map2.Release());
111 object_store->set_closure_functions_table(
map.Release());
112}
#define DEBUG_ASSERT(cond)
static bool IsBackgroundCompilation()
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
static SmiPtr New(intptr_t value)
static Thread * Current()
Dart_NativeFunction function
UnorderedHashMap< SmiTraits > IntHashMap
UnorderedHashMap< FunctionHashMapTraits > FunctionHashMap
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>