Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::KernelCompilationRequest Class Reference
Inheritance diagram for dart::KernelCompilationRequest:
dart::ValueObject

Public Member Functions

 KernelCompilationRequest ()
 
 ~KernelCompilationRequest ()
 
intptr_t setDillData (Dart_CObject **dills_array, intptr_t dill_num, const uint8_t *buffer, intptr_t buffer_size)
 
Dart_KernelCompilationResult SendAndWaitForResponse (Dart_Port kernel_port, const uint8_t *platform_kernel, intptr_t platform_kernel_size, const char *expression, const Array &definitions, const Array &definition_types, const Array &type_definitions, const Array &type_bounds, const Array &type_defaults, char const *library_uri, char const *klass, char const *method, int64_t token_pos, char const *script_uri, bool is_static, const MallocGrowableArray< char * > *experimental_flags)
 
Dart_KernelCompilationResult SendAndWaitForResponse (int request_tag, Dart_Port kernel_port, const char *script_uri, const uint8_t *platform_kernel, intptr_t platform_kernel_size, int source_files_count, Dart_SourceFile source_files[], bool incremental_compile, bool for_snapshot, bool embed_sources, const char *package_config, const char *multiroot_filepaths, const char *multiroot_scheme, const MallocGrowableArray< char * > *experimental_flags, Dart_KernelCompilationVerbosityLevel verbosity)
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Detailed Description

Definition at line 398 of file kernel_isolate.cc.

Constructor & Destructor Documentation

◆ KernelCompilationRequest()

dart::KernelCompilationRequest::KernelCompilationRequest ( )
inline

Definition at line 400 of file kernel_isolate.cc.

401 : monitor_(),
402 port_(Dart_NewNativePort("kernel-compilation-port",
403 &HandleResponse,
404 false)),
405 next_(nullptr),
406 prev_(nullptr) {
407 RegisterRequest(this);
409 result_.error = nullptr;
410 result_.kernel = nullptr;
411 result_.kernel_size = 0;
412 }
@ Dart_KernelCompilationStatus_Unknown
Definition dart_api.h:3727
DART_EXPORT Dart_Port Dart_NewNativePort(const char *name, Dart_NativeMessageHandler handler, bool handle_concurrently)
Dart_KernelCompilationStatus status
Definition dart_api.h:3735

◆ ~KernelCompilationRequest()

dart::KernelCompilationRequest::~KernelCompilationRequest ( )
inline

Definition at line 414 of file kernel_isolate.cc.

414 {
415 UnregisterRequest(this);
416 if (port_ != ILLEGAL_PORT) {
418 }
419 }
#define ILLEGAL_PORT
Definition dart_api.h:1530
DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id)

Member Function Documentation

◆ SendAndWaitForResponse() [1/2]

Dart_KernelCompilationResult dart::KernelCompilationRequest::SendAndWaitForResponse ( Dart_Port  kernel_port,
const uint8_t *  platform_kernel,
intptr_t  platform_kernel_size,
const char *  expression,
const Array definitions,
const Array definition_types,
const Array type_definitions,
const Array type_bounds,
const Array type_defaults,
char const *  library_uri,
char const *  klass,
char const *  method,
int64_t  token_pos,
char const *  script_uri,
bool  is_static,
const MallocGrowableArray< char * > *  experimental_flags 
)
inline

Definition at line 442 of file kernel_isolate.cc.

458 {
459 if (port_ == ILLEGAL_PORT) {
462 result.error =
463 Utils::StrDup("Error Kernel Isolate : unable to create reply port");
464 return result;
465 }
466 Thread* thread = Thread::Current();
467 TransitionNativeToVM transition(thread);
468 Dart_CObject tag;
471
472 Dart_CObject send_port;
473 send_port.type = Dart_CObject_kSendPort;
474 send_port.value.as_send_port.id = port_;
476
477 Dart_CObject dart_platform_kernel;
478 if (platform_kernel != nullptr) {
479 dart_platform_kernel.type = Dart_CObject_kExternalTypedData;
480 dart_platform_kernel.value.as_external_typed_data.type =
482 dart_platform_kernel.value.as_external_typed_data.length =
483 platform_kernel_size;
484 dart_platform_kernel.value.as_external_typed_data.data =
485 const_cast<uint8_t*>(platform_kernel);
486 dart_platform_kernel.value.as_external_typed_data.peer =
487 const_cast<uint8_t*>(platform_kernel);
488 dart_platform_kernel.value.as_external_typed_data.callback =
490 } else {
491 // If nullptr, the kernel service looks up the platform dill file
492 // next to the executable.
493 dart_platform_kernel.type = Dart_CObject_kNull;
494 }
495
496 Dart_CObject expression_object;
497 expression_object.type = Dart_CObject_kString;
498 expression_object.value.as_string = const_cast<char*>(expression);
499
500 Dart_CObject definitions_object;
501 intptr_t num_definitions = definitions.Length();
502 definitions_object.type = Dart_CObject_kArray;
503 definitions_object.value.as_array.length = num_definitions;
504
505 Dart_CObject** definitions_array = new Dart_CObject*[num_definitions];
506 for (intptr_t i = 0; i < num_definitions; ++i) {
507 definitions_array[i] = new Dart_CObject;
508 definitions_array[i]->type = Dart_CObject_kString;
509 definitions_array[i]->value.as_string = const_cast<char*>(
510 String::CheckedHandle(thread->zone(), definitions.At(i)).ToCString());
511 }
512 definitions_object.value.as_array.values = definitions_array;
513
514 Dart_CObject definition_types_object;
515 intptr_t num_definition_types = definition_types.Length();
516 definition_types_object.type = Dart_CObject_kArray;
517 definition_types_object.value.as_array.length = num_definition_types;
518
519 Dart_CObject** definition_types_array =
520 new Dart_CObject*[num_definition_types];
521 for (intptr_t i = 0; i < num_definition_types; ++i) {
522 definition_types_array[i] = new Dart_CObject;
523 definition_types_array[i]->type = Dart_CObject_kString;
524 definition_types_array[i]->value.as_string = const_cast<char*>(
525 String::CheckedHandle(thread->zone(), definition_types.At(i))
526 .ToCString());
527 }
528 definition_types_object.value.as_array.values = definition_types_array;
529
530 Dart_CObject type_definitions_object;
531 intptr_t num_type_definitions = type_definitions.Length();
532 type_definitions_object.type = Dart_CObject_kArray;
533 type_definitions_object.value.as_array.length = num_type_definitions;
534
535 Dart_CObject** type_definitions_array =
536 new Dart_CObject*[num_type_definitions];
537 for (intptr_t i = 0; i < num_type_definitions; ++i) {
538 type_definitions_array[i] = new Dart_CObject;
539 type_definitions_array[i]->type = Dart_CObject_kString;
540 type_definitions_array[i]->value.as_string = const_cast<char*>(
541 String::CheckedHandle(thread->zone(), type_definitions.At(i))
542 .ToCString());
543 }
544 type_definitions_object.value.as_array.values = type_definitions_array;
545
546 Dart_CObject type_bounds_object;
547 intptr_t num_type_bounds = type_bounds.Length();
548 type_bounds_object.type = Dart_CObject_kArray;
549 type_bounds_object.value.as_array.length = num_type_bounds;
550
551 Dart_CObject** type_bounds_array = new Dart_CObject*[num_type_bounds];
552 for (intptr_t i = 0; i < num_type_bounds; ++i) {
553 type_bounds_array[i] = new Dart_CObject;
554 type_bounds_array[i]->type = Dart_CObject_kString;
555 type_bounds_array[i]->value.as_string = const_cast<char*>(
556 String::CheckedHandle(thread->zone(), type_bounds.At(i)).ToCString());
557 }
558 type_bounds_object.value.as_array.values = type_bounds_array;
559
560 Dart_CObject type_defaults_object;
561 intptr_t num_type_defaults = type_defaults.Length();
562 type_defaults_object.type = Dart_CObject_kArray;
563 type_defaults_object.value.as_array.length = num_type_defaults;
564
565 Dart_CObject** type_defaults_array = new Dart_CObject*[num_type_defaults];
566 for (intptr_t i = 0; i < num_type_defaults; ++i) {
567 type_defaults_array[i] = new Dart_CObject;
568 type_defaults_array[i]->type = Dart_CObject_kString;
569 type_defaults_array[i]->value.as_string = const_cast<char*>(
570 String::CheckedHandle(thread->zone(), type_defaults.At(i))
571 .ToCString());
572 }
573 type_defaults_object.value.as_array.values = type_defaults_array;
574
575 Dart_CObject library_uri_object;
576 library_uri_object.type = Dart_CObject_kString;
577 library_uri_object.value.as_string = const_cast<char*>(library_uri);
578
579 Dart_CObject class_object;
580 if (klass != nullptr) {
581 class_object.type = Dart_CObject_kString;
582 class_object.value.as_string = const_cast<char*>(klass);
583 } else {
584 class_object.type = Dart_CObject_kNull;
585 }
586
587 Dart_CObject method_object;
588 if (method != nullptr) {
589 method_object.type = Dart_CObject_kString;
590 method_object.value.as_string = const_cast<char*>(method);
591 } else {
592 method_object.type = Dart_CObject_kNull;
593 }
594
595 Dart_CObject is_static_object;
596 is_static_object.type = Dart_CObject_kBool;
597 is_static_object.value.as_bool = is_static;
598
599 Dart_CObject token_pos_object;
600 token_pos_object.type = Dart_CObject_kInt64;
601 token_pos_object.value.as_int64 = token_pos;
602
603 Dart_CObject script_uri_object;
604 if (script_uri != nullptr) {
605 script_uri_object.type = Dart_CObject_kString;
606 script_uri_object.value.as_string = const_cast<char*>(script_uri);
607 } else {
608 script_uri_object.type = Dart_CObject_kNull;
609 }
610
611 auto isolate_group = thread->isolate_group();
612 auto source = isolate_group->source();
613
614 Dart_CObject isolate_id;
615 isolate_id.type = Dart_CObject_kInt64;
616 isolate_id.value.as_int64 = static_cast<int64_t>(isolate_group->id());
617
618 intptr_t num_dills = 0;
619 if (source->kernel_buffer != nullptr) {
620 num_dills++;
621 }
622 if (source->script_kernel_buffer != nullptr) {
623 num_dills++;
624 }
625 Array& loaded_blobs = Array::Handle();
626 if (source->loaded_blobs_ != nullptr) {
627 loaded_blobs = source->loaded_blobs_;
628 WeakProperty& weak_property = WeakProperty::Handle();
629 for (intptr_t i = 0; i < loaded_blobs.Length(); i++) {
630 weak_property ^= loaded_blobs.At(i);
631 if (weak_property.key() != ExternalTypedData::null()) {
632 num_dills++;
633 }
634 }
635 }
636
637 Dart_CObject dills_object;
638 dills_object.type = Dart_CObject_kArray;
639 dills_object.value.as_array.length = num_dills;
640
641 Dart_CObject** dills_array = new Dart_CObject*[num_dills];
642 intptr_t dill_num = 0;
643 dill_num = setDillData(dills_array, dill_num, source->kernel_buffer,
644 source->kernel_buffer_size);
645 dill_num = setDillData(dills_array, dill_num, source->script_kernel_buffer,
646 source->script_kernel_size);
647 if (!loaded_blobs.IsNull()) {
648 WeakProperty& weak_property = WeakProperty::Handle();
649 for (intptr_t i = 0; i < loaded_blobs.Length(); i++) {
650 weak_property ^= loaded_blobs.At(i);
651 if (weak_property.key() != ExternalTypedData::null()) {
652 ExternalTypedData& externalTypedData = ExternalTypedData::Handle(
653 thread->zone(), ExternalTypedData::RawCast(weak_property.key()));
654 NoSafepointScope no_safepoint(thread);
655 const uint8_t* data = const_cast<uint8_t*>(
656 reinterpret_cast<uint8_t*>(externalTypedData.DataAddr(0)));
657 dill_num = setDillData(dills_array, dill_num, data,
658 externalTypedData.Length());
659 }
660 }
661 }
662 dills_object.value.as_array.values = dills_array;
663
664 Dart_CObject num_blob_loads;
665 num_blob_loads.type = Dart_CObject_kInt64;
666 num_blob_loads.value.as_int64 = source->num_blob_loads_;
667
668 Dart_CObject enable_asserts;
669 enable_asserts.type = Dart_CObject_kBool;
670 enable_asserts.value.as_bool = isolate_group->asserts();
671
672 intptr_t num_experimental_flags = experimental_flags->length();
673 Dart_CObject** experimental_flags_array =
674 new Dart_CObject*[num_experimental_flags];
675 for (intptr_t i = 0; i < num_experimental_flags; ++i) {
676 experimental_flags_array[i] = new Dart_CObject;
677 experimental_flags_array[i]->type = Dart_CObject_kString;
678 experimental_flags_array[i]->value.as_string = (*experimental_flags)[i];
679 }
680 Dart_CObject experimental_flags_object;
681 experimental_flags_object.type = Dart_CObject_kArray;
682 experimental_flags_object.value.as_array.values = experimental_flags_array;
683 experimental_flags_object.value.as_array.length = num_experimental_flags;
684
685 Dart_CObject enable_mirrors;
686 enable_mirrors.type = Dart_CObject_kBool;
687 enable_mirrors.value.as_bool = FLAG_enable_mirrors;
688
691 Dart_CObject* message_arr[] = {&tag,
692 &send_port,
693 &isolate_id,
694 &dart_platform_kernel,
695 &expression_object,
696 &definitions_object,
697 &definition_types_object,
698 &type_definitions_object,
699 &type_bounds_object,
700 &type_defaults_object,
701 &library_uri_object,
702 &class_object,
703 &method_object,
704 &is_static_object,
705 &token_pos_object,
706 &script_uri_object,
707 &dills_object,
708 &num_blob_loads,
709 &enable_asserts,
710 &experimental_flags_object,
711 &enable_mirrors};
712 message.value.as_array.values = message_arr;
713 message.value.as_array.length = ARRAY_SIZE(message_arr);
714
715 {
716 TransitionVMToNative transition(thread);
717
718 // Send the message.
719 Dart_PostCObject(kernel_port, &message);
720
721 // Wait for reply to arrive.
722 VMTagScope tagScope(thread, VMTag::kLoadWaitTagId);
723 MonitorLocker ml(&monitor_);
725 ml.Wait();
726 }
727 }
728
729 for (intptr_t i = 0; i < num_definitions; ++i) {
730 delete definitions_array[i];
731 }
732 delete[] definitions_array;
733
734 for (intptr_t i = 0; i < num_definition_types; ++i) {
735 delete definition_types_array[i];
736 }
737 delete[] definition_types_array;
738
739 for (intptr_t i = 0; i < num_type_definitions; ++i) {
740 delete type_definitions_array[i];
741 }
742 delete[] type_definitions_array;
743
744 for (intptr_t i = 0; i < num_type_bounds; ++i) {
745 delete type_bounds_array[i];
746 }
747 delete[] type_bounds_array;
748
749 for (intptr_t i = 0; i < num_type_defaults; ++i) {
750 delete type_defaults_array[i];
751 }
752 delete[] type_defaults_array;
753
754 for (intptr_t i = 0; i < num_dills; ++i) {
755 delete dills_array[i];
756 }
757 delete[] dills_array;
758
759 for (intptr_t i = 0; i < num_experimental_flags; ++i) {
760 delete experimental_flags_array[i];
761 }
762 delete[] experimental_flags_array;
763
764 return result_;
765 }
intptr_t setDillData(Dart_CObject **dills_array, intptr_t dill_num, const uint8_t *buffer, intptr_t buffer_size)
static constexpr int kCompileExpressionTag
static ObjectPtr null()
Definition object.h:433
static Object & Handle()
Definition object.h:407
static ObjectPtr RawCast(ObjectPtr obj)
Definition object.h:325
static Thread * Current()
Definition thread.h:361
static char * StrDup(const char *s)
@ Dart_KernelCompilationStatus_MsgFailed
Definition dart_api.h:3731
@ Dart_TypedData_kUint8
Definition dart_api.h:2606
@ Dart_CObject_kInt64
@ Dart_CObject_kSendPort
@ Dart_CObject_kString
@ Dart_CObject_kArray
@ Dart_CObject_kNull
@ Dart_CObject_kExternalTypedData
@ Dart_CObject_kInt32
@ Dart_CObject_kBool
struct _Dart_CObject Dart_CObject
SkBitmap source
Definition examples.cpp:28
GAsyncResult * result
Win32Message message
static void PassThroughFinalizer(void *isolate_callback_data, void *peer)
DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject *message)
static int8_t data[kExtLength]
struct _Dart_CObject::@86::@87 as_send_port
Dart_HandleFinalizer callback
union _Dart_CObject::@86 value
Dart_CObject_Type type
const char * as_string
struct _Dart_CObject::@86::@91 as_external_typed_data
struct _Dart_CObject::@86::@89 as_array
struct _Dart_CObject ** values
Dart_Port origin_id
#define ARRAY_SIZE(array)
Definition globals.h:72

◆ SendAndWaitForResponse() [2/2]

Dart_KernelCompilationResult dart::KernelCompilationRequest::SendAndWaitForResponse ( int  request_tag,
Dart_Port  kernel_port,
const char *  script_uri,
const uint8_t *  platform_kernel,
intptr_t  platform_kernel_size,
int  source_files_count,
Dart_SourceFile  source_files[],
bool  incremental_compile,
bool  for_snapshot,
bool  embed_sources,
const char *  package_config,
const char *  multiroot_filepaths,
const char *  multiroot_scheme,
const MallocGrowableArray< char * > *  experimental_flags,
Dart_KernelCompilationVerbosityLevel  verbosity 
)
inline

Definition at line 767 of file kernel_isolate.cc.

782 {
783 // Build the message for the Kernel isolate.
784 // tag is used to specify which operation the frontend should perform.
785 if (port_ == ILLEGAL_PORT) {
788 result.error =
789 Utils::StrDup("Error Kernel Isolate : unable to create reply port");
790 return result;
791 }
792 Dart_CObject tag;
794 tag.value.as_int32 = request_tag;
795
796 Dart_CObject send_port;
797 send_port.type = Dart_CObject_kSendPort;
798 send_port.value.as_send_port.id = port_;
800
801 Dart_CObject uri;
802 if (script_uri != nullptr) {
804 uri.value.as_string = const_cast<char*>(script_uri);
805 } else {
807 }
808
809 Dart_CObject dart_platform_kernel;
810 if (platform_kernel != nullptr) {
811 dart_platform_kernel.type = Dart_CObject_kExternalTypedData;
812 dart_platform_kernel.value.as_external_typed_data.type =
814 dart_platform_kernel.value.as_external_typed_data.length =
815 platform_kernel_size;
816 dart_platform_kernel.value.as_external_typed_data.data =
817 const_cast<uint8_t*>(platform_kernel);
818 dart_platform_kernel.value.as_external_typed_data.peer =
819 const_cast<uint8_t*>(platform_kernel);
820 dart_platform_kernel.value.as_external_typed_data.callback =
822 } else {
823 // If nullptr, the kernel service looks up the platform dill file
824 // next to the executable.
825 dart_platform_kernel.type = Dart_CObject_kNull;
826 }
827
828 Dart_CObject dart_incremental;
829 dart_incremental.type = Dart_CObject_kBool;
830 dart_incremental.value.as_bool = incremental_compile;
831
832 Dart_CObject dart_snapshot;
833 dart_snapshot.type = Dart_CObject_kBool;
834 dart_snapshot.value.as_bool = for_snapshot;
835
836 Dart_CObject dart_embed_sources;
837 dart_embed_sources.type = Dart_CObject_kBool;
838 dart_embed_sources.value.as_bool = embed_sources;
839
840 // TODO(aam): Assert that isolate exists once we move CompileAndReadScript
841 // compilation logic out of CreateIsolateAndSetupHelper and into
842 // IsolateSetupHelper in main.cc.
843 auto thread = Thread::Current();
844 auto isolate_group = thread != nullptr ? thread->isolate_group() : nullptr;
845
846 if (incremental_compile) {
847 ASSERT(isolate_group != nullptr);
848 }
849 Dart_CObject isolate_id;
850 isolate_id.type = Dart_CObject_kInt64;
851 isolate_id.value.as_int64 = isolate_group != nullptr
852 ? static_cast<int64_t>(isolate_group->id())
853 : 0;
854
857
858 Dart_CObject files = BuildFilesPairs(source_files_count, source_files);
859
860 Dart_CObject enable_asserts;
861 enable_asserts.type = Dart_CObject_kBool;
862 enable_asserts.value.as_bool = isolate_group != nullptr
863 ? isolate_group->asserts()
864 : FLAG_enable_asserts;
865
866 intptr_t num_experimental_flags = experimental_flags->length();
867 Dart_CObject** experimental_flags_array =
868 new Dart_CObject*[num_experimental_flags];
869 for (intptr_t i = 0; i < num_experimental_flags; ++i) {
870 experimental_flags_array[i] = new Dart_CObject;
871 experimental_flags_array[i]->type = Dart_CObject_kString;
872 experimental_flags_array[i]->value.as_string = (*experimental_flags)[i];
873 }
874 Dart_CObject experimental_flags_object;
875 experimental_flags_object.type = Dart_CObject_kArray;
876 experimental_flags_object.value.as_array.values = experimental_flags_array;
877 experimental_flags_object.value.as_array.length = num_experimental_flags;
878
879 Dart_CObject package_config_uri;
880 if (package_config != nullptr) {
881 package_config_uri.type = Dart_CObject_kString;
882 package_config_uri.value.as_string = const_cast<char*>(package_config);
883 } else {
884 package_config_uri.type = Dart_CObject_kNull;
885 }
886
887 Dart_CObject multiroot_filepaths_object;
888 {
889 const char* filepaths = multiroot_filepaths != nullptr
890 ? multiroot_filepaths
891 : FLAG_kernel_multiroot_filepaths;
892 if (filepaths != nullptr) {
893 multiroot_filepaths_object.type = Dart_CObject_kString;
894 multiroot_filepaths_object.value.as_string =
895 const_cast<char*>(filepaths);
896 } else {
897 multiroot_filepaths_object.type = Dart_CObject_kNull;
898 }
899 }
900
901 Dart_CObject multiroot_scheme_object;
902 {
903 const char* scheme = multiroot_scheme != nullptr
904 ? multiroot_scheme
905 : FLAG_kernel_multiroot_scheme;
906 if (scheme != nullptr) {
907 multiroot_scheme_object.type = Dart_CObject_kString;
908 multiroot_scheme_object.value.as_string = const_cast<char*>(scheme);
909 } else {
910 multiroot_scheme_object.type = Dart_CObject_kNull;
911 }
912 }
913
914 Dart_CObject verbosity_str;
915 verbosity_str.type = Dart_CObject_kString;
916 verbosity_str.value.as_string =
917 const_cast<char*>(KernelCompilationVerbosityLevelToString(verbosity));
918
919 Dart_CObject enable_mirrors;
920 enable_mirrors.type = Dart_CObject_kBool;
921 enable_mirrors.value.as_bool = FLAG_enable_mirrors;
922
923 Dart_CObject* message_arr[] = {&tag,
924 &send_port,
925 &uri,
926 &dart_platform_kernel,
927 &dart_incremental,
928 &dart_snapshot,
929 &dart_embed_sources,
930 &isolate_id,
931 &files,
932 &enable_asserts,
933 &experimental_flags_object,
934 &package_config_uri,
935 &multiroot_filepaths_object,
936 &multiroot_scheme_object,
937 &verbosity_str,
938 &enable_mirrors};
939 message.value.as_array.values = message_arr;
940 message.value.as_array.length = ARRAY_SIZE(message_arr);
941 // Send the message.
942 Dart_PostCObject(kernel_port, &message);
943
944 ReleaseFilesPairs(files);
945
946 // Wait for reply to arrive.
947 VMTagScope tagScope(Thread::Current(), VMTag::kLoadWaitTagId);
948 MonitorLocker ml(&monitor_);
950 ml.Wait();
951 }
952
953 for (intptr_t i = 0; i < num_experimental_flags; ++i) {
954 delete experimental_flags_array[i];
955 }
956 delete[] experimental_flags_array;
957
958 return result_;
959 }
#define ASSERT(E)
static Dart_CObject BuildFilesPairs(int source_files_count, Dart_SourceFile source_files[])
static void ReleaseFilesPairs(const Dart_CObject &files)

◆ setDillData()

intptr_t dart::KernelCompilationRequest::setDillData ( Dart_CObject **  dills_array,
intptr_t  dill_num,
const uint8_t *  buffer,
intptr_t  buffer_size 
)
inline

Definition at line 421 of file kernel_isolate.cc.

424 {
425 if (buffer != nullptr) {
426 dills_array[dill_num] = new Dart_CObject;
427 dills_array[dill_num]->type = Dart_CObject_kExternalTypedData;
428 dills_array[dill_num]->value.as_external_typed_data.type =
430 dills_array[dill_num]->value.as_external_typed_data.length = buffer_size;
431 dills_array[dill_num]->value.as_external_typed_data.data =
432 const_cast<uint8_t*>(buffer);
433 dills_array[dill_num]->value.as_external_typed_data.peer =
434 const_cast<uint8_t*>(buffer);
435 dills_array[dill_num]->value.as_external_typed_data.callback =
437 dill_num++;
438 }
439 return dill_num;
440 }
static uint32_t buffer_size(uint32_t offset, uint32_t maxAlignment)
static const uint8_t buffer[]

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