Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
dart::compiler::ffi::CallbackArgumentTranslator Class Reference
Inheritance diagram for dart::compiler::ffi::CallbackArgumentTranslator:
dart::ValueObject

Static Public Member Functions

static NativeLocationsTranslateArgumentLocations (Zone *zone, const NativeLocations &argument_locations, const NativeLocation &return_loc)
 

Additional Inherited Members

- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Detailed Description

Definition at line 757 of file marshaller.cc.

Member Function Documentation

◆ TranslateArgumentLocations()

static NativeLocations & dart::compiler::ffi::CallbackArgumentTranslator::TranslateArgumentLocations ( Zone zone,
const NativeLocations argument_locations,
const NativeLocation return_loc 
)
inlinestatic

Definition at line 759 of file marshaller.cc.

762 {
763 const bool treat_return_loc = return_loc.IsPointerToMemory();
764
765 auto& pushed_locs = *(new (zone) NativeLocations(
766 argument_locations.length() + (treat_return_loc ? 1 : 0)));
767
768 CallbackArgumentTranslator translator;
769 for (intptr_t i = 0, n = argument_locations.length(); i < n; i++) {
770 translator.AllocateArgument(*argument_locations[i]);
771 }
772 if (treat_return_loc) {
773 translator.AllocateArgument(return_loc);
774 }
775 for (intptr_t i = 0, n = argument_locations.length(); i < n; ++i) {
776 pushed_locs.Add(
777 &translator.TranslateArgument(zone, *argument_locations[i]));
778 }
779 if (treat_return_loc) {
780 pushed_locs.Add(&translator.TranslateArgument(zone, return_loc));
781 }
782
783 return pushed_locs;
784 }
ZoneGrowableArray< const NativeLocation * > NativeLocations

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