458 {
463 Utils::StrDup(
"Error Kernel Isolate : unable to create reply port");
465 }
467 TransitionNativeToVM transition(thread);
471
476
478 if (platform_kernel != nullptr) {
483 platform_kernel_size;
485 const_cast<uint8_t*>(platform_kernel);
487 const_cast<uint8_t*>(platform_kernel);
490 } else {
491
492
494 }
495
498 expression_object.
value.
as_string =
const_cast<char*
>(expression);
499
501 intptr_t num_definitions = definitions.Length();
504
506 for (intptr_t
i = 0;
i < num_definitions; ++
i) {
510 String::CheckedHandle(thread->zone(), definitions.At(
i)).ToCString());
511 }
513
515 intptr_t num_definition_types = definition_types.Length();
518
521 for (intptr_t
i = 0;
i < num_definition_types; ++
i) {
525 String::CheckedHandle(thread->zone(), definition_types.At(
i))
526 .ToCString());
527 }
529
531 intptr_t num_type_definitions = type_definitions.Length();
534
537 for (intptr_t
i = 0;
i < num_type_definitions; ++
i) {
541 String::CheckedHandle(thread->zone(), type_definitions.At(
i))
542 .ToCString());
543 }
545
547 intptr_t num_type_bounds = type_bounds.Length();
550
552 for (intptr_t
i = 0;
i < num_type_bounds; ++
i) {
556 String::CheckedHandle(thread->zone(), type_bounds.At(
i)).ToCString());
557 }
559
561 intptr_t num_type_defaults = type_defaults.Length();
564
566 for (intptr_t
i = 0;
i < num_type_defaults; ++
i) {
570 String::CheckedHandle(thread->zone(), type_defaults.At(
i))
571 .ToCString());
572 }
574
577 library_uri_object.
value.
as_string =
const_cast<char*
>(library_uri);
578
580 if (klass != nullptr) {
583 } else {
585 }
586
588 if (method != nullptr) {
591 } else {
593 }
594
598
602
604 if (script_uri != nullptr) {
606 script_uri_object.
value.
as_string =
const_cast<char*
>(script_uri);
607 } else {
609 }
610
611 auto isolate_group = thread->isolate_group();
612 auto source = isolate_group->source();
613
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 }
626 if (
source->loaded_blobs_ !=
nullptr) {
627 loaded_blobs =
source->loaded_blobs_;
629 for (intptr_t
i = 0;
i < loaded_blobs.Length();
i++) {
630 weak_property ^= loaded_blobs.At(
i);
632 num_dills++;
633 }
634 }
635 }
636
640
642 intptr_t dill_num = 0;
644 source->kernel_buffer_size);
646 source->script_kernel_size);
647 if (!loaded_blobs.IsNull()) {
649 for (intptr_t
i = 0;
i < loaded_blobs.Length();
i++) {
650 weak_property ^= loaded_blobs.At(
i);
654 NoSafepointScope no_safepoint(thread);
655 const uint8_t*
data =
const_cast<uint8_t*
>(
656 reinterpret_cast<uint8_t*>(externalTypedData.DataAddr(0)));
658 externalTypedData.Length());
659 }
660 }
661 }
663
667
670 enable_asserts.
value.
as_bool = isolate_group->asserts();
671
672 intptr_t num_experimental_flags = experimental_flags->length();
675 for (intptr_t
i = 0;
i < num_experimental_flags; ++
i) {
679 }
684
688
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;
714
715 {
716 TransitionVMToNative transition(thread);
717
718
720
721
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 RawCast(ObjectPtr obj)
static Thread * Current()
static char * StrDup(const char *s)
@ Dart_KernelCompilationStatus_MsgFailed
@ Dart_CObject_kExternalTypedData
struct _Dart_CObject Dart_CObject
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
struct _Dart_CObject::@86::@91 as_external_typed_data
struct _Dart_CObject::@86::@89 as_array
struct _Dart_CObject ** values
#define ARRAY_SIZE(array)