Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
dart::TTSTestCase Struct Reference

Public Member Functions

 TTSTestCase (const Object &obj, const TypeArguments &i_tav, const TypeArguments &f_tav, const TTSTestResult result=kTTS)
 
bool ShouldEnterRuntime () const
 
bool HasSameSTCEntry (const TTSTestCase &other) const
 
bool HasSTCEntry (const SubtypeTestCache &cache, const AbstractType &dst_type, Bool *out_result=nullptr, intptr_t *out_index=nullptr) const
 

Public Attributes

const Objectinstance
 
const TypeArgumentsinstantiator_tav
 
const TypeArgumentsfunction_tav
 
const TTSTestResult expected_result
 

Detailed Description

Definition at line 260 of file type_testing_stubs_test.cc.

Constructor & Destructor Documentation

◆ TTSTestCase()

dart::TTSTestCase::TTSTestCase ( const Object obj,
const TypeArguments i_tav,
const TypeArguments f_tav,
const TTSTestResult  result = kTTS 
)
inline

Definition at line 266 of file type_testing_stubs_test.cc.

270 : instance(obj),
271 instantiator_tav(i_tav),
272 function_tav(f_tav),
GAsyncResult * result
const TTSTestResult expected_result
const TypeArguments & function_tav
const TypeArguments & instantiator_tav

Member Function Documentation

◆ HasSameSTCEntry()

bool dart::TTSTestCase::HasSameSTCEntry ( const TTSTestCase other) const
inline

Definition at line 291 of file type_testing_stubs_test.cc.

291 {
292 if (instantiator_tav.ptr() != other.instantiator_tav.ptr()) {
293 return false;
294 }
295 if (function_tav.ptr() != other.function_tav.ptr()) {
296 return false;
297 }
298 if (instance.IsClosure() && other.instance.IsClosure()) {
299 const auto& closure = Closure::Cast(instance);
300 const auto& other_closure = Closure::Cast(other.instance);
301 const auto& sig = FunctionType::Handle(
302 Function::Handle(closure.function()).signature());
303 const auto& other_sig = FunctionType::Handle(
304 Function::Handle(other_closure.function()).signature());
305 return sig.ptr() == other_sig.ptr() &&
306 closure.instantiator_type_arguments() ==
307 other_closure.instantiator_type_arguments() &&
308 closure.function_type_arguments() ==
309 other_closure.function_type_arguments() &&
310 closure.delayed_type_arguments() ==
311 other_closure.delayed_type_arguments();
312 }
313 const intptr_t cid = instance.GetClassId();
314 const intptr_t other_cid = other.instance.GetClassId();
315 if (cid != other_cid) {
316 return false;
317 }
318 const auto& cls = Class::Handle(instance.clazz());
319 if (cls.NumTypeArguments() == 0) {
320 return true;
321 }
322 return Instance::Cast(instance).GetTypeArguments() ==
323 Instance::Cast(other.instance).GetTypeArguments();
324 }
intptr_t GetClassId() const
Definition object.h:341
ObjectPtr ptr() const
Definition object.h:332
static Object & Handle()
Definition object.h:407
ClassPtr clazz() const
Definition object.h:13192
const intptr_t cid
std::function< void()> closure
Definition closure.h:14

◆ HasSTCEntry()

bool dart::TTSTestCase::HasSTCEntry ( const SubtypeTestCache cache,
const AbstractType dst_type,
Bool out_result = nullptr,
intptr_t *  out_index = nullptr 
) const
inline

Definition at line 326 of file type_testing_stubs_test.cc.

329 {
330 if (cache.IsNull()) return false;
331 if (instance.IsClosure()) {
332 const auto& closure = Closure::Cast(instance);
333 const auto& sig = FunctionType::Handle(
334 Function::Handle(closure.function()).signature());
335 const auto& closure_instantiator_type_arguments =
336 TypeArguments::Handle(closure.instantiator_type_arguments());
337 const auto& closure_function_type_arguments =
338 TypeArguments::Handle(closure.function_type_arguments());
339 const auto& closure_delayed_type_arguments =
340 TypeArguments::Handle(closure.delayed_type_arguments());
341 return cache.HasCheck(
342 sig, dst_type, closure_instantiator_type_arguments, instantiator_tav,
343 function_tav, closure_function_type_arguments,
344 closure_delayed_type_arguments, out_index, out_result);
345 }
346 const auto& id_smi = Smi::Handle(Smi::New(instance.GetClassId()));
347 const auto& cls = Class::Handle(instance.clazz());
348 auto& instance_type_arguments = TypeArguments::Handle();
349 if (cls.NumTypeArguments() > 0) {
350 instance_type_arguments = Instance::Cast(instance).GetTypeArguments();
351 }
352 return cache.HasCheck(id_smi, dst_type, instance_type_arguments,
354 Object::null_type_arguments(),
355 Object::null_type_arguments(), out_index, out_result);
356 }
static SmiPtr New(intptr_t value)
Definition object.h:9985
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia Filters out all Skia trace event categories except those that are specified in this comma separated list dump skp on shader Automatically dump the skp that triggers new shader compilations This is useful for writing custom ShaderWarmUp to reduce jank By this is not enabled to reduce the overhead purge persistent cache
Definition switches.h:191

◆ ShouldEnterRuntime()

bool dart::TTSTestCase::ShouldEnterRuntime ( ) const
inline

Definition at line 275 of file type_testing_stubs_test.cc.

275 {
276 switch (expected_result) {
277 case kTTS:
279 return false;
280 case kFail:
281 case kNewSTCEntry:
282 case kRuntimeCheck:
283 case kSpecialize:
284 case kRespecialize:
285 return true;
286 default:
287 UNREACHABLE();
288 }
289 }
#define UNREACHABLE()
Definition assert.h:248

Member Data Documentation

◆ expected_result

const TTSTestResult dart::TTSTestCase::expected_result

Definition at line 264 of file type_testing_stubs_test.cc.

◆ function_tav

const TypeArguments& dart::TTSTestCase::function_tav

Definition at line 263 of file type_testing_stubs_test.cc.

◆ instance

const Object& dart::TTSTestCase::instance

Definition at line 261 of file type_testing_stubs_test.cc.

◆ instantiator_tav

const TypeArguments& dart::TTSTestCase::instantiator_tav

Definition at line 262 of file type_testing_stubs_test.cc.


The documentation for this struct was generated from the following file: