@icure/cardinal-sdk 2.0.0-PREVIEW-18.1 → 2.0.0-PREVIEW-21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kermit-kermit-core.mjs +45 -40
- package/Kermit-kermit.mjs +6 -6
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1577 -1577
- package/api/HealthcarePartyApi.d.mts +2 -0
- package/api/HealthcarePartyApiInGroup.d.mts +5 -0
- package/api/HealthcarePartyApiInGroup.mjs +1 -0
- package/api/RecoveryApi.d.mts +5 -1
- package/api.d.mts +1 -0
- package/api.mjs +1 -0
- package/bitops-library-bits.mjs +197 -0
- package/bitops-library-endian.mjs +117 -0
- package/cardinal-sdk-ts.d.mts +2 -2
- package/cardinal-sdk-ts.mjs +57007 -56794
- package/cardinal-sdk.mjs +120895 -120501
- package/core-library-digest.mjs +186 -0
- package/crypto/CryptoService.d.mts +17 -7
- package/error-library-error.mjs +42 -0
- package/hash-library-sha2.mjs +183 -0
- package/internal/BytesEncoding.d.mts +3 -0
- package/internal/BytesEncoding.mjs +99 -0
- package/internal/JsonDecodeUtils.d.mts +20 -0
- package/internal/JsonDecodeUtils.mjs +99 -0
- package/kerberus.mjs +557 -389
- package/kotlin-kotlin-stdlib.mjs +2445 -2713
- package/kotlinx-atomicfu.mjs +13 -13
- package/kotlinx-coroutines-core.mjs +2455 -2450
- package/kotlinx-io-kotlinx-io-bytestring.mjs +36 -36
- package/kotlinx-io-kotlinx-io-core.mjs +459 -459
- package/kotlinx-serialization-kotlinx-serialization-core.mjs +2029 -2029
- package/kotlinx-serialization-kotlinx-serialization-json.mjs +1952 -1952
- package/kryptom-lib.mjs +3263 -1967
- package/ktor-ktor-client-content-negotiation.mjs +184 -184
- package/ktor-ktor-client-core.mjs +2713 -2713
- package/ktor-ktor-events.mjs +6 -6
- package/ktor-ktor-http-cio.mjs +481 -481
- package/ktor-ktor-http.mjs +693 -693
- package/ktor-ktor-io.mjs +963 -963
- package/ktor-ktor-serialization-kotlinx-json.mjs +7 -7
- package/ktor-ktor-serialization-kotlinx.mjs +238 -238
- package/ktor-ktor-serialization.mjs +109 -109
- package/ktor-ktor-utils.mjs +557 -557
- package/ktor-ktor-websockets.mjs +673 -673
- package/model/AccessLog.d.mts +5 -0
- package/model/AccessLog.mjs +168 -0
- package/model/Agenda.d.mts +2 -0
- package/model/Agenda.mjs +82 -0
- package/model/ApplicationSettings.d.mts +5 -0
- package/model/ApplicationSettings.mjs +140 -0
- package/model/BooleanResponse.d.mts +2 -0
- package/model/BooleanResponse.mjs +20 -0
- package/model/CalendarItem.d.mts +5 -0
- package/model/CalendarItem.mjs +290 -0
- package/model/CalendarItemType.d.mts +7 -0
- package/model/CalendarItemType.mjs +117 -0
- package/model/Classification.d.mts +5 -0
- package/model/Classification.mjs +148 -0
- package/model/Code.d.mts +2 -0
- package/model/Code.mjs +69 -0
- package/model/Contact.d.mts +5 -0
- package/model/Contact.mjs +218 -0
- package/model/CryptoActorStub.d.mts +2 -0
- package/model/CryptoActorStub.mjs +45 -0
- package/model/CryptoActorStubWithType.d.mts +2 -0
- package/model/CryptoActorStubWithType.mjs +25 -0
- package/model/DataOwnerRegistrationSuccess.d.mts +2 -0
- package/model/DataOwnerRegistrationSuccess.mjs +24 -0
- package/model/DataOwnerWithType.d.mts +7 -0
- package/model/DataOwnerWithType.mjs +80 -0
- package/model/DatabaseInitialisation.d.mts +2 -0
- package/model/DatabaseInitialisation.mjs +34 -0
- package/model/Device.d.mts +2 -0
- package/model/Device.mjs +99 -0
- package/model/Document.d.mts +5 -0
- package/model/Document.mjs +246 -0
- package/model/DocumentTemplate.d.mts +2 -0
- package/model/DocumentTemplate.mjs +91 -0
- package/model/EntityReference.d.mts +2 -0
- package/model/EntityReference.mjs +29 -0
- package/model/EntityReferenceInGroup.d.mts +2 -0
- package/model/EntityReferenceInGroup.mjs +23 -0
- package/model/EntityTemplate.d.mts +2 -0
- package/model/EntityTemplate.mjs +46 -0
- package/model/Form.d.mts +5 -0
- package/model/Form.mjs +204 -0
- package/model/FormTemplate.d.mts +2 -0
- package/model/FormTemplate.mjs +82 -0
- package/model/FrontEndMigration.d.mts +2 -0
- package/model/FrontEndMigration.mjs +57 -0
- package/model/Group.d.mts +2 -0
- package/model/Group.mjs +68 -0
- package/model/GroupDeletionReport.d.mts +2 -0
- package/model/GroupDeletionReport.mjs +24 -0
- package/model/HealthElement.d.mts +5 -0
- package/model/HealthElement.mjs +226 -0
- package/model/HealthcareParty.d.mts +2 -0
- package/model/HealthcareParty.mjs +182 -0
- package/model/IdWithRev.d.mts +2 -0
- package/model/IdWithRev.mjs +23 -0
- package/model/IndexingInfo.d.mts +2 -0
- package/model/IndexingInfo.mjs +21 -0
- package/model/Insurance.d.mts +2 -0
- package/model/Insurance.mjs +46 -0
- package/model/Invoice.d.mts +5 -0
- package/model/Invoice.mjs +468 -0
- package/model/Keyword.d.mts +2 -0
- package/model/Keyword.mjs +58 -0
- package/model/ListOfIds.d.mts +2 -0
- package/model/ListOfIds.mjs +20 -0
- package/model/ListOfProperties.d.mts +2 -0
- package/model/ListOfProperties.mjs +22 -0
- package/model/MaintenanceTask.d.mts +5 -0
- package/model/MaintenanceTask.mjs +152 -0
- package/model/MedicalLocation.d.mts +2 -0
- package/model/MedicalLocation.mjs +63 -0
- package/model/Message.d.mts +5 -0
- package/model/Message.mjs +248 -0
- package/model/PaginatedDocumentKeyIdPair.d.mts +2 -0
- package/model/PaginatedDocumentKeyIdPair.mjs +24 -0
- package/model/Patient.d.mts +5 -0
- package/model/Patient.mjs +491 -0
- package/model/Place.d.mts +2 -0
- package/model/Place.mjs +33 -0
- package/model/PropertyStub.d.mts +5 -0
- package/model/PropertyStub.mjs +74 -0
- package/model/PropertyTypeStub.d.mts +2 -0
- package/model/PropertyTypeStub.mjs +26 -0
- package/model/PublicAgendasAndCalendarItemTypes.d.mts +2 -0
- package/model/PublicAgendasAndCalendarItemTypes.mjs +25 -0
- package/model/PublicKey.d.mts +2 -0
- package/model/PublicKey.mjs +24 -0
- package/model/Receipt.d.mts +5 -0
- package/model/Receipt.mjs +159 -0
- package/model/RegistrationInformation.d.mts +2 -0
- package/model/RegistrationInformation.mjs +43 -0
- package/model/RegistrationSuccess.d.mts +2 -0
- package/model/RegistrationSuccess.mjs +24 -0
- package/model/Replication.d.mts +2 -0
- package/model/Replication.mjs +35 -0
- package/model/ReplicationInfo.d.mts +2 -0
- package/model/ReplicationInfo.mjs +28 -0
- package/model/Role.d.mts +2 -0
- package/model/Role.mjs +34 -0
- package/model/StoredDocumentIdentifier.d.mts +2 -0
- package/model/StoredDocumentIdentifier.mjs +22 -0
- package/model/Tarification.d.mts +2 -0
- package/model/Tarification.mjs +92 -0
- package/model/TimeTable.d.mts +2 -0
- package/model/TimeTable.mjs +64 -0
- package/model/Topic.d.mts +5 -0
- package/model/Topic.mjs +163 -0
- package/model/User.d.mts +4 -0
- package/model/User.mjs +118 -0
- package/model/UserGroup.d.mts +2 -0
- package/model/UserGroup.mjs +55 -0
- package/model/base/CodeStub.d.mts +2 -0
- package/model/base/CodeStub.mjs +40 -0
- package/model/base/CryptoActor.d.mts +3 -0
- package/model/base/CryptoActor.mjs +19 -1
- package/model/base/Identifier.d.mts +2 -0
- package/model/base/Identifier.mjs +44 -0
- package/model/couchdb/Basic.d.mts +2 -0
- package/model/couchdb/Basic.mjs +22 -0
- package/model/couchdb/DatabaseInfo.d.mts +2 -0
- package/model/couchdb/DatabaseInfo.mjs +47 -0
- package/model/couchdb/DesignDocument.d.mts +2 -0
- package/model/couchdb/DesignDocument.mjs +40 -0
- package/model/couchdb/DocIdentifier.d.mts +2 -0
- package/model/couchdb/DocIdentifier.mjs +24 -0
- package/model/couchdb/GroupDatabasesInfo.d.mts +2 -0
- package/model/couchdb/GroupDatabasesInfo.mjs +26 -0
- package/model/couchdb/Remote.d.mts +2 -0
- package/model/couchdb/Remote.mjs +25 -0
- package/model/couchdb/RemoteAuthentication.d.mts +2 -0
- package/model/couchdb/RemoteAuthentication.mjs +23 -0
- package/model/couchdb/ReplicationStats.d.mts +2 -0
- package/model/couchdb/ReplicationStats.mjs +45 -0
- package/model/couchdb/ReplicatorDocument.d.mts +2 -0
- package/model/couchdb/ReplicatorDocument.mjs +61 -0
- package/model/couchdb/View.d.mts +2 -0
- package/model/couchdb/View.mjs +23 -0
- package/model/data/LabelledOccurence.d.mts +2 -0
- package/model/data/LabelledOccurence.mjs +22 -0
- package/model/embed/Address.d.mts +5 -0
- package/model/embed/Address.mjs +133 -0
- package/model/embed/AdministrationQuantity.d.mts +2 -0
- package/model/embed/AdministrationQuantity.mjs +29 -0
- package/model/embed/AgendaSlottingAlgorithm.d.mts +3 -0
- package/model/embed/AgendaSlottingAlgorithm.mjs +30 -0
- package/model/embed/AgreementAppendix.d.mts +2 -0
- package/model/embed/AgreementAppendix.mjs +30 -0
- package/model/embed/Annotation.d.mts +2 -0
- package/model/embed/Annotation.mjs +46 -0
- package/model/embed/CalendarItemTag.d.mts +5 -0
- package/model/embed/CalendarItemTag.mjs +72 -0
- package/model/embed/CareTeamMember.d.mts +5 -0
- package/model/embed/CareTeamMember.mjs +71 -0
- package/model/embed/CareTeamMembership.d.mts +5 -0
- package/model/embed/CareTeamMembership.mjs +73 -0
- package/model/embed/Content.d.mts +5 -0
- package/model/embed/Content.mjs +125 -0
- package/model/embed/DataAttachment.d.mts +2 -0
- package/model/embed/DataAttachment.mjs +26 -0
- package/model/embed/DatabaseSynchronization.d.mts +2 -0
- package/model/embed/DatabaseSynchronization.mjs +30 -0
- package/model/embed/Delegation.d.mts +2 -0
- package/model/embed/Delegation.mjs +30 -0
- package/model/embed/DeletedAttachment.d.mts +2 -0
- package/model/embed/DeletedAttachment.mjs +30 -0
- package/model/embed/DocumentGroup.d.mts +2 -0
- package/model/embed/DocumentGroup.mjs +24 -0
- package/model/embed/Duration.d.mts +2 -0
- package/model/embed/Duration.mjs +26 -0
- package/model/embed/EmbeddedTimeTableHour.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableHour.mjs +22 -0
- package/model/embed/EmbeddedTimeTableItem.d.mts +2 -0
- package/model/embed/EmbeddedTimeTableItem.mjs +41 -0
- package/model/embed/Employer.d.mts +2 -0
- package/model/embed/Employer.mjs +26 -0
- package/model/embed/EmploymentInfo.d.mts +5 -0
- package/model/embed/EmploymentInfo.mjs +74 -0
- package/model/embed/Episode.d.mts +5 -0
- package/model/embed/Episode.mjs +75 -0
- package/model/embed/FinancialInstitutionInformation.d.mts +5 -0
- package/model/embed/FinancialInstitutionInformation.mjs +88 -0
- package/model/embed/FlatRateTarification.d.mts +5 -0
- package/model/embed/FlatRateTarification.mjs +72 -0
- package/model/embed/FlowItem.d.mts +2 -0
- package/model/embed/FlowItem.mjs +117 -0
- package/model/embed/HealthcarePartyHistoryStatus.d.mts +2 -0
- package/model/embed/HealthcarePartyHistoryStatus.mjs +28 -0
- package/model/embed/IdentityDocumentReader.d.mts +2 -0
- package/model/embed/IdentityDocumentReader.mjs +33 -0
- package/model/embed/Insurability.d.mts +5 -0
- package/model/embed/Insurability.mjs +100 -0
- package/model/embed/InvoicingCode.d.mts +5 -0
- package/model/embed/InvoicingCode.mjs +377 -0
- package/model/embed/KeywordSubword.d.mts +2 -0
- package/model/embed/KeywordSubword.mjs +25 -0
- package/model/embed/LetterValue.d.mts +2 -0
- package/model/embed/LetterValue.mjs +30 -0
- package/model/embed/Measure.d.mts +2 -0
- package/model/embed/Measure.mjs +57 -0
- package/model/embed/MedicalHouseContract.d.mts +5 -0
- package/model/embed/MedicalHouseContract.mjs +223 -0
- package/model/embed/Medication.d.mts +2 -0
- package/model/embed/Medication.mjs +157 -0
- package/model/embed/Medicinalproduct.d.mts +2 -0
- package/model/embed/Medicinalproduct.mjs +33 -0
- package/model/embed/MessageAttachment.d.mts +2 -0
- package/model/embed/MessageAttachment.mjs +25 -0
- package/model/embed/MessageReadStatus.d.mts +2 -0
- package/model/embed/MessageReadStatus.mjs +23 -0
- package/model/embed/ParagraphAgreement.d.mts +2 -0
- package/model/embed/ParagraphAgreement.mjs +86 -0
- package/model/embed/Partnership.d.mts +2 -0
- package/model/embed/Partnership.mjs +36 -0
- package/model/embed/PatientHealthCareParty.d.mts +9 -0
- package/model/embed/PatientHealthCareParty.mjs +88 -0
- package/model/embed/Payment.d.mts +2 -0
- package/model/embed/Payment.mjs +28 -0
- package/model/embed/Periodicity.d.mts +2 -0
- package/model/embed/Periodicity.mjs +26 -0
- package/model/embed/PersonName.d.mts +2 -0
- package/model/embed/PersonName.mjs +41 -0
- package/model/embed/PlanOfAction.d.mts +8 -3
- package/model/embed/PlanOfAction.mjs +179 -0
- package/model/embed/Range.d.mts +2 -0
- package/model/embed/Range.mjs +24 -0
- package/model/embed/ReferenceRange.d.mts +2 -0
- package/model/embed/ReferenceRange.mjs +40 -0
- package/model/embed/ReferralPeriod.d.mts +2 -0
- package/model/embed/ReferralPeriod.mjs +27 -0
- package/model/embed/RegimenItem.d.mts +2 -0
- package/model/embed/RegimenItem.mjs +40 -0
- package/model/embed/Renewal.d.mts +2 -0
- package/model/embed/Renewal.mjs +26 -0
- package/model/embed/ResourceGroupAllocationSchedule.d.mts +2 -0
- package/model/embed/ResourceGroupAllocationSchedule.mjs +39 -0
- package/model/embed/Right.d.mts +2 -0
- package/model/embed/Right.mjs +27 -0
- package/model/embed/RoleConfiguration.d.mts +2 -0
- package/model/embed/RoleConfiguration.mjs +22 -0
- package/model/embed/SchoolingInfo.d.mts +5 -0
- package/model/embed/SchoolingInfo.mjs +73 -0
- package/model/embed/SecureDelegation.d.mts +2 -0
- package/model/embed/SecureDelegation.mjs +39 -0
- package/model/embed/SecurityMetadata.d.mts +2 -0
- package/model/embed/SecurityMetadata.mjs +22 -0
- package/model/embed/Service.d.mts +5 -0
- package/model/embed/Service.mjs +240 -0
- package/model/embed/ServiceLink.d.mts +2 -0
- package/model/embed/ServiceLink.mjs +21 -0
- package/model/embed/SubContact.d.mts +5 -0
- package/model/embed/SubContact.mjs +146 -0
- package/model/embed/Substanceproduct.d.mts +2 -0
- package/model/embed/Substanceproduct.mjs +33 -0
- package/model/embed/Suspension.d.mts +2 -0
- package/model/embed/Suspension.mjs +30 -0
- package/model/embed/Telecom.d.mts +5 -0
- package/model/embed/Telecom.mjs +67 -0
- package/model/embed/TimeSeries.d.mts +2 -0
- package/model/embed/TimeSeries.mjs +32 -0
- package/model/embed/TimeTableHour.d.mts +2 -0
- package/model/embed/TimeTableHour.mjs +24 -0
- package/model/embed/TimeTableItem.d.mts +2 -0
- package/model/embed/TimeTableItem.mjs +57 -0
- package/model/embed/TypedValue.d.mts +5 -0
- package/model/embed/TypedValue.mjs +85 -0
- package/model/embed/Valorisation.d.mts +5 -0
- package/model/embed/Valorisation.mjs +108 -0
- package/model/embed/ValueWithPrecision.d.mts +2 -0
- package/model/embed/ValueWithPrecision.mjs +22 -0
- package/model/embed/Weekday.d.mts +2 -0
- package/model/embed/Weekday.mjs +26 -0
- package/model/embed/form/template/Action.d.mts +2 -0
- package/model/embed/form/template/Action.mjs +30 -0
- package/model/embed/form/template/CheckBox.d.mts +2 -0
- package/model/embed/form/template/CheckBox.mjs +71 -0
- package/model/embed/form/template/DatePicker.d.mts +2 -0
- package/model/embed/form/template/DatePicker.mjs +71 -0
- package/model/embed/form/template/DateTimePicker.d.mts +2 -0
- package/model/embed/form/template/DateTimePicker.mjs +71 -0
- package/model/embed/form/template/DropdownField.d.mts +2 -0
- package/model/embed/form/template/DropdownField.mjs +71 -0
- package/model/embed/form/template/FieldsGroup.d.mts +2 -0
- package/model/embed/form/template/FieldsGroup.mjs +28 -0
- package/model/embed/form/template/FormTemplateLayout.d.mts +2 -0
- package/model/embed/form/template/FormTemplateLayout.mjs +33 -0
- package/model/embed/form/template/Launcher.d.mts +2 -0
- package/model/embed/form/template/Launcher.mjs +26 -0
- package/model/embed/form/template/MeasureField.d.mts +2 -0
- package/model/embed/form/template/MeasureField.mjs +71 -0
- package/model/embed/form/template/MultipleChoice.d.mts +2 -0
- package/model/embed/form/template/MultipleChoice.mjs +71 -0
- package/model/embed/form/template/NumberField.d.mts +2 -0
- package/model/embed/form/template/NumberField.mjs +71 -0
- package/model/embed/form/template/RadioButton.d.mts +2 -0
- package/model/embed/form/template/RadioButton.mjs +71 -0
- package/model/embed/form/template/Section.d.mts +2 -0
- package/model/embed/form/template/Section.mjs +30 -0
- package/model/embed/form/template/State.d.mts +2 -0
- package/model/embed/form/template/State.mjs +26 -0
- package/model/embed/form/template/StructureElement.d.mts +3 -0
- package/model/embed/form/template/StructureElement.mjs +32 -1
- package/model/embed/form/template/TextField.d.mts +2 -0
- package/model/embed/form/template/TextField.mjs +71 -0
- package/model/embed/form/template/TimePicker.d.mts +2 -0
- package/model/embed/form/template/TimePicker.mjs +71 -0
- package/model/filter/predicate/AlwaysPredicate.d.mts +2 -0
- package/model/filter/predicate/AlwaysPredicate.mjs +20 -0
- package/model/filter/predicate/AndPredicate.d.mts +2 -0
- package/model/filter/predicate/AndPredicate.mjs +25 -0
- package/model/filter/predicate/KeyValuePredicate.d.mts +2 -0
- package/model/filter/predicate/KeyValuePredicate.mjs +32 -0
- package/model/filter/predicate/NotPredicate.d.mts +2 -0
- package/model/filter/predicate/NotPredicate.mjs +25 -0
- package/model/filter/predicate/OrPredicate.d.mts +2 -0
- package/model/filter/predicate/OrPredicate.mjs +25 -0
- package/model/filter/predicate/Predicate.d.mts +3 -0
- package/model/filter/predicate/Predicate.mjs +20 -1
- package/model/security/AlwaysPermissionItem.d.mts +2 -0
- package/model/security/AlwaysPermissionItem.mjs +25 -0
- package/model/security/AuthenticationToken.d.mts +2 -0
- package/model/security/AuthenticationToken.mjs +28 -0
- package/model/security/Enable2faRequest.d.mts +2 -0
- package/model/security/Enable2faRequest.mjs +22 -0
- package/model/security/ExternalJwtConfig.d.mts +18 -0
- package/model/security/ExternalJwtConfig.mjs +199 -0
- package/model/security/LoginIdentifier.d.mts +2 -0
- package/model/security/LoginIdentifier.mjs +22 -0
- package/model/security/OperationToken.d.mts +2 -0
- package/model/security/OperationToken.mjs +31 -0
- package/model/security/Permission.d.mts +2 -0
- package/model/security/Permission.mjs +24 -0
- package/model/security/PermissionItem.d.mts +3 -0
- package/model/security/PermissionItem.mjs +12 -1
- package/model/security/TokenWithGroup.d.mts +2 -0
- package/model/security/TokenWithGroup.mjs +25 -0
- package/options/SdkOptions.d.mts +3 -23
- package/package.json +1 -1
- package/utils/Id.d.mts +5 -0
- package/utils/Id.mjs +19 -10
- package/KotlinBigInteger-bignum.mjs +0 -5902
- /package/{KotlinBigInteger-bignum-serialization-kotlinx.mjs → core-library-core.mjs} +0 -0
|
@@ -47,7 +47,7 @@ var imul = Math.imul;
|
|
|
47
47
|
function readAtMostTo$default(sink, startIndex, endIndex, $super) {
|
|
48
48
|
startIndex = startIndex === VOID ? 0 : startIndex;
|
|
49
49
|
endIndex = endIndex === VOID ? sink.length : endIndex;
|
|
50
|
-
return $super === VOID ? this.
|
|
50
|
+
return $super === VOID ? this.qr(sink, startIndex, endIndex) : $super.qr.call(this, sink, startIndex, endIndex);
|
|
51
51
|
}
|
|
52
52
|
initMetadataForInterface(Source, 'Source', VOID, VOID, [AutoCloseable]);
|
|
53
53
|
function write$default(source, startIndex, endIndex, $super) {
|
|
@@ -55,10 +55,10 @@ function write$default(source, startIndex, endIndex, $super) {
|
|
|
55
55
|
endIndex = endIndex === VOID ? source.length : endIndex;
|
|
56
56
|
var tmp;
|
|
57
57
|
if ($super === VOID) {
|
|
58
|
-
this.
|
|
58
|
+
this.cs(source, startIndex, endIndex);
|
|
59
59
|
tmp = Unit_instance;
|
|
60
60
|
} else {
|
|
61
|
-
tmp = $super.
|
|
61
|
+
tmp = $super.cs.call(this, source, startIndex, endIndex);
|
|
62
62
|
}
|
|
63
63
|
return tmp;
|
|
64
64
|
}
|
|
@@ -110,20 +110,20 @@ function throwEof($this, byteCount) {
|
|
|
110
110
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + $this.v().toString() + ', required: ' + byteCount.toString() + ')');
|
|
111
111
|
}
|
|
112
112
|
function Buffer() {
|
|
113
|
-
this.
|
|
114
|
-
this.
|
|
115
|
-
this.
|
|
113
|
+
this.oq_1 = null;
|
|
114
|
+
this.pq_1 = null;
|
|
115
|
+
this.qq_1 = new Long(0, 0);
|
|
116
116
|
}
|
|
117
117
|
protoOf(Buffer).v = function () {
|
|
118
|
-
return this.
|
|
118
|
+
return this.qq_1;
|
|
119
119
|
};
|
|
120
|
-
protoOf(Buffer).
|
|
120
|
+
protoOf(Buffer).rq = function () {
|
|
121
121
|
return this;
|
|
122
122
|
};
|
|
123
|
-
protoOf(Buffer).
|
|
123
|
+
protoOf(Buffer).sq = function () {
|
|
124
124
|
return equalsLong(this.v(), new Long(0, 0));
|
|
125
125
|
};
|
|
126
|
-
protoOf(Buffer).
|
|
126
|
+
protoOf(Buffer).tq = function (byteCount) {
|
|
127
127
|
// Inline function 'kotlin.require' call
|
|
128
128
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
129
129
|
var message = 'byteCount: ' + byteCount.toString();
|
|
@@ -133,7 +133,7 @@ protoOf(Buffer).xq = function (byteCount) {
|
|
|
133
133
|
throw EOFException_init_$Create$_0("Buffer doesn't contain required number of bytes (size: " + this.v().toString() + ', required: ' + byteCount.toString() + ')');
|
|
134
134
|
}
|
|
135
135
|
};
|
|
136
|
-
protoOf(Buffer).
|
|
136
|
+
protoOf(Buffer).uq = function (byteCount) {
|
|
137
137
|
// Inline function 'kotlin.require' call
|
|
138
138
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
139
139
|
var message = 'byteCount: ' + byteCount.toString() + ' < 0';
|
|
@@ -141,8 +141,8 @@ protoOf(Buffer).yq = function (byteCount) {
|
|
|
141
141
|
}
|
|
142
142
|
return compare(this.v(), byteCount) >= 0;
|
|
143
143
|
};
|
|
144
|
-
protoOf(Buffer).
|
|
145
|
-
var tmp0_elvis_lhs = this.
|
|
144
|
+
protoOf(Buffer).vq = function () {
|
|
145
|
+
var tmp0_elvis_lhs = this.oq_1;
|
|
146
146
|
var tmp;
|
|
147
147
|
if (tmp0_elvis_lhs == null) {
|
|
148
148
|
throwEof(this, new Long(1, 0));
|
|
@@ -152,18 +152,18 @@ protoOf(Buffer).zq = function () {
|
|
|
152
152
|
var segment = tmp;
|
|
153
153
|
var segmentSize = segment.v();
|
|
154
154
|
if (segmentSize === 0) {
|
|
155
|
-
this.
|
|
156
|
-
return this.
|
|
155
|
+
this.dr();
|
|
156
|
+
return this.vq();
|
|
157
157
|
}
|
|
158
|
-
var v = segment.
|
|
159
|
-
this.
|
|
158
|
+
var v = segment.er();
|
|
159
|
+
this.qq_1 = subtract(this.qq_1, new Long(1, 0));
|
|
160
160
|
if (segmentSize === 1) {
|
|
161
|
-
this.
|
|
161
|
+
this.dr();
|
|
162
162
|
}
|
|
163
163
|
return v;
|
|
164
164
|
};
|
|
165
|
-
protoOf(Buffer).
|
|
166
|
-
var tmp0_elvis_lhs = this.
|
|
165
|
+
protoOf(Buffer).fr = function () {
|
|
166
|
+
var tmp0_elvis_lhs = this.oq_1;
|
|
167
167
|
var tmp;
|
|
168
168
|
if (tmp0_elvis_lhs == null) {
|
|
169
169
|
throwEof(this, new Long(2, 0));
|
|
@@ -173,120 +173,120 @@ protoOf(Buffer).jr = function () {
|
|
|
173
173
|
var segment = tmp;
|
|
174
174
|
var segmentSize = segment.v();
|
|
175
175
|
if (segmentSize < 2) {
|
|
176
|
-
this.
|
|
176
|
+
this.tq(new Long(2, 0));
|
|
177
177
|
if (segmentSize === 0) {
|
|
178
|
-
this.
|
|
179
|
-
return this.
|
|
178
|
+
this.dr();
|
|
179
|
+
return this.fr();
|
|
180
180
|
}
|
|
181
181
|
// Inline function 'kotlinx.io.and' call
|
|
182
|
-
var tmp_0 = (this.
|
|
182
|
+
var tmp_0 = (this.vq() & 255) << 8;
|
|
183
183
|
// Inline function 'kotlinx.io.and' call
|
|
184
|
-
var tmp$ret$1 = this.
|
|
184
|
+
var tmp$ret$1 = this.vq() & 255;
|
|
185
185
|
return toShort(tmp_0 | tmp$ret$1);
|
|
186
186
|
}
|
|
187
|
-
var v = segment.
|
|
188
|
-
this.
|
|
187
|
+
var v = segment.gr();
|
|
188
|
+
this.qq_1 = subtract(this.qq_1, new Long(2, 0));
|
|
189
189
|
if (segmentSize === 2) {
|
|
190
|
-
this.
|
|
190
|
+
this.dr();
|
|
191
191
|
}
|
|
192
192
|
return v;
|
|
193
193
|
};
|
|
194
|
-
protoOf(Buffer).
|
|
194
|
+
protoOf(Buffer).hr = function () {
|
|
195
195
|
return Unit_instance;
|
|
196
196
|
};
|
|
197
|
-
protoOf(Buffer).
|
|
197
|
+
protoOf(Buffer).ir = function (out, startIndex, endIndex) {
|
|
198
198
|
checkBounds(this.v(), startIndex, endIndex);
|
|
199
199
|
if (equalsLong(startIndex, endIndex))
|
|
200
200
|
return Unit_instance;
|
|
201
201
|
var currentOffset = startIndex;
|
|
202
202
|
var remainingByteCount = subtract(endIndex, startIndex);
|
|
203
|
-
out.
|
|
204
|
-
var s = this.
|
|
205
|
-
while (compare(currentOffset, fromInt(ensureNotNull(s).
|
|
206
|
-
currentOffset = subtract(currentOffset, fromInt(s.
|
|
207
|
-
s = s.
|
|
203
|
+
out.qq_1 = add(out.qq_1, remainingByteCount);
|
|
204
|
+
var s = this.oq_1;
|
|
205
|
+
while (compare(currentOffset, fromInt(ensureNotNull(s).yq_1 - s.xq_1 | 0)) >= 0) {
|
|
206
|
+
currentOffset = subtract(currentOffset, fromInt(s.yq_1 - s.xq_1 | 0));
|
|
207
|
+
s = s.br_1;
|
|
208
208
|
}
|
|
209
209
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
210
|
-
var copy = ensureNotNull(s).
|
|
211
|
-
copy.
|
|
210
|
+
var copy = ensureNotNull(s).jr();
|
|
211
|
+
copy.xq_1 = copy.xq_1 + convertToInt(currentOffset) | 0;
|
|
212
212
|
var tmp = copy;
|
|
213
|
-
var tmp0 = copy.
|
|
213
|
+
var tmp0 = copy.xq_1 + convertToInt(remainingByteCount) | 0;
|
|
214
214
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
215
|
-
var b = copy.
|
|
216
|
-
tmp.
|
|
215
|
+
var b = copy.yq_1;
|
|
216
|
+
tmp.yq_1 = Math.min(tmp0, b);
|
|
217
217
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
218
|
-
if (out.
|
|
219
|
-
out.
|
|
220
|
-
out.
|
|
218
|
+
if (out.oq_1 == null) {
|
|
219
|
+
out.oq_1 = copy;
|
|
220
|
+
out.pq_1 = copy;
|
|
221
221
|
} else if (false) {
|
|
222
|
-
out.
|
|
223
|
-
if (ensureNotNull(out.
|
|
224
|
-
out.
|
|
222
|
+
out.pq_1 = ensureNotNull(out.pq_1).kr(copy).lr();
|
|
223
|
+
if (ensureNotNull(out.pq_1).cr_1 == null) {
|
|
224
|
+
out.oq_1 = out.pq_1;
|
|
225
225
|
}
|
|
226
226
|
} else {
|
|
227
|
-
out.
|
|
227
|
+
out.pq_1 = ensureNotNull(out.pq_1).kr(copy);
|
|
228
228
|
}
|
|
229
|
-
remainingByteCount = subtract(remainingByteCount, fromInt(copy.
|
|
229
|
+
remainingByteCount = subtract(remainingByteCount, fromInt(copy.yq_1 - copy.xq_1 | 0));
|
|
230
230
|
currentOffset = new Long(0, 0);
|
|
231
|
-
s = s.
|
|
231
|
+
s = s.br_1;
|
|
232
232
|
}
|
|
233
233
|
};
|
|
234
|
-
protoOf(Buffer).
|
|
234
|
+
protoOf(Buffer).mr = function () {
|
|
235
235
|
var result = this.v();
|
|
236
236
|
if (equalsLong(result, new Long(0, 0)))
|
|
237
237
|
return new Long(0, 0);
|
|
238
|
-
var tail = ensureNotNull(this.
|
|
239
|
-
if (tail.
|
|
240
|
-
result = subtract(result, fromInt(tail.
|
|
238
|
+
var tail = ensureNotNull(this.pq_1);
|
|
239
|
+
if (tail.yq_1 < 8192 && tail.ar_1) {
|
|
240
|
+
result = subtract(result, fromInt(tail.yq_1 - tail.xq_1 | 0));
|
|
241
241
|
}
|
|
242
242
|
return result;
|
|
243
243
|
};
|
|
244
|
-
protoOf(Buffer).
|
|
244
|
+
protoOf(Buffer).nr = function (position) {
|
|
245
245
|
if (compare(position, new Long(0, 0)) < 0 || compare(position, this.v()) >= 0) {
|
|
246
246
|
throw IndexOutOfBoundsException_init_$Create$('position (' + position.toString() + ') is not within the range [0..size(' + this.v().toString() + '))');
|
|
247
247
|
}
|
|
248
248
|
if (equalsLong(position, new Long(0, 0))) {
|
|
249
|
-
return ensureNotNull(this.
|
|
249
|
+
return ensureNotNull(this.oq_1).or(0);
|
|
250
250
|
}
|
|
251
251
|
// Inline function 'kotlinx.io.seek' call
|
|
252
|
-
if (this.
|
|
252
|
+
if (this.oq_1 == null) {
|
|
253
253
|
var offset = new Long(-1, -1);
|
|
254
|
-
return ensureNotNull(null).
|
|
254
|
+
return ensureNotNull(null).or(convertToInt(subtract(position, offset)));
|
|
255
255
|
}
|
|
256
256
|
if (compare(subtract(this.v(), position), position) < 0) {
|
|
257
|
-
var s = this.
|
|
257
|
+
var s = this.pq_1;
|
|
258
258
|
var offset_0 = this.v();
|
|
259
259
|
$l$loop: while (!(s == null) && compare(offset_0, position) > 0) {
|
|
260
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
260
|
+
offset_0 = subtract(offset_0, fromInt(s.yq_1 - s.xq_1 | 0));
|
|
261
261
|
if (compare(offset_0, position) <= 0)
|
|
262
262
|
break $l$loop;
|
|
263
|
-
s = s.
|
|
263
|
+
s = s.cr_1;
|
|
264
264
|
}
|
|
265
265
|
var tmp0 = s;
|
|
266
266
|
var offset_1 = offset_0;
|
|
267
|
-
return ensureNotNull(tmp0).
|
|
267
|
+
return ensureNotNull(tmp0).or(convertToInt(subtract(position, offset_1)));
|
|
268
268
|
} else {
|
|
269
|
-
var s_0 = this.
|
|
269
|
+
var s_0 = this.oq_1;
|
|
270
270
|
var offset_2 = new Long(0, 0);
|
|
271
271
|
$l$loop_0: while (!(s_0 == null)) {
|
|
272
272
|
var tmp0_0 = offset_2;
|
|
273
273
|
// Inline function 'kotlin.Long.plus' call
|
|
274
|
-
var other = s_0.
|
|
274
|
+
var other = s_0.yq_1 - s_0.xq_1 | 0;
|
|
275
275
|
var nextOffset = add(tmp0_0, fromInt(other));
|
|
276
276
|
if (compare(nextOffset, position) > 0)
|
|
277
277
|
break $l$loop_0;
|
|
278
|
-
s_0 = s_0.
|
|
278
|
+
s_0 = s_0.br_1;
|
|
279
279
|
offset_2 = nextOffset;
|
|
280
280
|
}
|
|
281
281
|
var tmp0_1 = s_0;
|
|
282
282
|
var offset_3 = offset_2;
|
|
283
|
-
return ensureNotNull(tmp0_1).
|
|
283
|
+
return ensureNotNull(tmp0_1).or(convertToInt(subtract(position, offset_3)));
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
|
-
protoOf(Buffer).
|
|
287
|
-
return this.
|
|
286
|
+
protoOf(Buffer).i2 = function () {
|
|
287
|
+
return this.pr(this.v());
|
|
288
288
|
};
|
|
289
|
-
protoOf(Buffer).
|
|
289
|
+
protoOf(Buffer).pr = function (byteCount) {
|
|
290
290
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
291
291
|
// Inline function 'kotlin.require' call
|
|
292
292
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -295,7 +295,7 @@ protoOf(Buffer).tr = function (byteCount) {
|
|
|
295
295
|
}
|
|
296
296
|
var remainingByteCount = byteCount;
|
|
297
297
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
298
|
-
var tmp0_elvis_lhs = this.
|
|
298
|
+
var tmp0_elvis_lhs = this.oq_1;
|
|
299
299
|
var tmp;
|
|
300
300
|
if (tmp0_elvis_lhs == null) {
|
|
301
301
|
throw EOFException_init_$Create$_0('Buffer exhausted before skipping ' + byteCount.toString() + ' bytes.');
|
|
@@ -305,24 +305,24 @@ protoOf(Buffer).tr = function (byteCount) {
|
|
|
305
305
|
var head = tmp;
|
|
306
306
|
var tmp0 = remainingByteCount;
|
|
307
307
|
// Inline function 'kotlinx.io.minOf' call
|
|
308
|
-
var b = head.
|
|
308
|
+
var b = head.yq_1 - head.xq_1 | 0;
|
|
309
309
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
310
310
|
var b_0 = fromInt(b);
|
|
311
311
|
var tmp$ret$4 = compare(tmp0, b_0) <= 0 ? tmp0 : b_0;
|
|
312
312
|
var toSkip = convertToInt(tmp$ret$4);
|
|
313
|
-
this.
|
|
313
|
+
this.qq_1 = subtract(this.qq_1, fromInt(toSkip));
|
|
314
314
|
remainingByteCount = subtract(remainingByteCount, fromInt(toSkip));
|
|
315
|
-
head.
|
|
316
|
-
if (head.
|
|
317
|
-
this.
|
|
315
|
+
head.xq_1 = head.xq_1 + toSkip | 0;
|
|
316
|
+
if (head.xq_1 === head.yq_1) {
|
|
317
|
+
this.dr();
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
};
|
|
321
|
-
protoOf(Buffer).
|
|
321
|
+
protoOf(Buffer).qr = function (sink, startIndex, endIndex) {
|
|
322
322
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
323
323
|
var size = sink.length;
|
|
324
324
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
325
|
-
var tmp0_elvis_lhs = this.
|
|
325
|
+
var tmp0_elvis_lhs = this.oq_1;
|
|
326
326
|
var tmp;
|
|
327
327
|
if (tmp0_elvis_lhs == null) {
|
|
328
328
|
return -1;
|
|
@@ -334,14 +334,14 @@ protoOf(Buffer).ur = function (sink, startIndex, endIndex) {
|
|
|
334
334
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
335
335
|
var b = s.v();
|
|
336
336
|
var toCopy = Math.min(tmp0, b);
|
|
337
|
-
s.
|
|
338
|
-
this.
|
|
337
|
+
s.rr(sink, startIndex, startIndex + toCopy | 0);
|
|
338
|
+
this.qq_1 = subtract(this.qq_1, fromInt(toCopy));
|
|
339
339
|
if (isEmpty(s)) {
|
|
340
|
-
this.
|
|
340
|
+
this.dr();
|
|
341
341
|
}
|
|
342
342
|
return toCopy;
|
|
343
343
|
};
|
|
344
|
-
protoOf(Buffer).
|
|
344
|
+
protoOf(Buffer).tr = function (sink, byteCount) {
|
|
345
345
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
346
346
|
// Inline function 'kotlin.require' call
|
|
347
347
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -351,10 +351,10 @@ protoOf(Buffer).xr = function (sink, byteCount) {
|
|
|
351
351
|
if (equalsLong(this.v(), new Long(0, 0)))
|
|
352
352
|
return new Long(-1, -1);
|
|
353
353
|
var bytesWritten = compare(byteCount, this.v()) > 0 ? this.v() : byteCount;
|
|
354
|
-
sink.
|
|
354
|
+
sink.ur(this, bytesWritten);
|
|
355
355
|
return bytesWritten;
|
|
356
356
|
};
|
|
357
|
-
protoOf(Buffer).
|
|
357
|
+
protoOf(Buffer).vr = function (sink, byteCount) {
|
|
358
358
|
// Inline function 'kotlinx.io.checkByteCount' call
|
|
359
359
|
// Inline function 'kotlin.require' call
|
|
360
360
|
if (!(compare(byteCount, new Long(0, 0)) >= 0)) {
|
|
@@ -362,136 +362,136 @@ protoOf(Buffer).zr = function (sink, byteCount) {
|
|
|
362
362
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
363
363
|
}
|
|
364
364
|
if (compare(this.v(), byteCount) < 0) {
|
|
365
|
-
sink.
|
|
365
|
+
sink.ur(this, this.v());
|
|
366
366
|
throw EOFException_init_$Create$_0('Buffer exhausted before writing ' + byteCount.toString() + ' bytes. Only ' + this.v().toString() + ' bytes were written.');
|
|
367
367
|
}
|
|
368
|
-
sink.
|
|
368
|
+
sink.ur(this, byteCount);
|
|
369
369
|
};
|
|
370
|
-
protoOf(Buffer).
|
|
370
|
+
protoOf(Buffer).wr = function (sink) {
|
|
371
371
|
var byteCount = this.v();
|
|
372
372
|
if (compare(byteCount, new Long(0, 0)) > 0) {
|
|
373
|
-
sink.
|
|
373
|
+
sink.ur(this, byteCount);
|
|
374
374
|
}
|
|
375
375
|
return byteCount;
|
|
376
376
|
};
|
|
377
|
-
protoOf(Buffer).
|
|
377
|
+
protoOf(Buffer).xr = function () {
|
|
378
378
|
return buffered(new PeekSource(this));
|
|
379
379
|
};
|
|
380
|
-
protoOf(Buffer).
|
|
380
|
+
protoOf(Buffer).yr = function (minimumCapacity) {
|
|
381
381
|
// Inline function 'kotlin.require' call
|
|
382
382
|
if (!(minimumCapacity >= 1 && minimumCapacity <= 8192)) {
|
|
383
383
|
var message = 'unexpected capacity (' + minimumCapacity + '), should be in range [1, 8192]';
|
|
384
384
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
385
385
|
}
|
|
386
|
-
if (this.
|
|
387
|
-
var result = SegmentPool_instance.
|
|
388
|
-
this.
|
|
389
|
-
this.
|
|
386
|
+
if (this.pq_1 == null) {
|
|
387
|
+
var result = SegmentPool_instance.bs();
|
|
388
|
+
this.oq_1 = result;
|
|
389
|
+
this.pq_1 = result;
|
|
390
390
|
return result;
|
|
391
391
|
}
|
|
392
|
-
var t = ensureNotNull(this.
|
|
393
|
-
if ((t.
|
|
394
|
-
var newTail = t.
|
|
395
|
-
this.
|
|
392
|
+
var t = ensureNotNull(this.pq_1);
|
|
393
|
+
if ((t.yq_1 + minimumCapacity | 0) > 8192 || !t.ar_1) {
|
|
394
|
+
var newTail = t.kr(SegmentPool_instance.bs());
|
|
395
|
+
this.pq_1 = newTail;
|
|
396
396
|
return newTail;
|
|
397
397
|
}
|
|
398
398
|
return t;
|
|
399
399
|
};
|
|
400
|
-
protoOf(Buffer).
|
|
400
|
+
protoOf(Buffer).cs = function (source, startIndex, endIndex) {
|
|
401
401
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
402
402
|
var size = source.length;
|
|
403
403
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
404
404
|
var currentOffset = startIndex;
|
|
405
405
|
while (currentOffset < endIndex) {
|
|
406
|
-
var tail = this.
|
|
406
|
+
var tail = this.yr(1);
|
|
407
407
|
var tmp0 = endIndex - currentOffset | 0;
|
|
408
408
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
409
|
-
var b = tail.
|
|
409
|
+
var b = tail.ds();
|
|
410
410
|
var toCopy = Math.min(tmp0, b);
|
|
411
|
-
tail.
|
|
411
|
+
tail.es(source, currentOffset, currentOffset + toCopy | 0);
|
|
412
412
|
currentOffset = currentOffset + toCopy | 0;
|
|
413
413
|
}
|
|
414
414
|
var tmp = this;
|
|
415
|
-
var tmp0_0 = this.
|
|
415
|
+
var tmp0_0 = this.qq_1;
|
|
416
416
|
// Inline function 'kotlin.Long.plus' call
|
|
417
417
|
var other = endIndex - startIndex | 0;
|
|
418
|
-
tmp.
|
|
418
|
+
tmp.qq_1 = add(tmp0_0, fromInt(other));
|
|
419
419
|
};
|
|
420
|
-
protoOf(Buffer).
|
|
420
|
+
protoOf(Buffer).ur = function (source, byteCount) {
|
|
421
421
|
// Inline function 'kotlin.require' call
|
|
422
422
|
if (!!(source === this)) {
|
|
423
423
|
var message = 'source == this';
|
|
424
424
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
425
425
|
}
|
|
426
|
-
checkOffsetAndCount(source.
|
|
426
|
+
checkOffsetAndCount(source.qq_1, new Long(0, 0), byteCount);
|
|
427
427
|
var remainingByteCount = byteCount;
|
|
428
428
|
while (compare(remainingByteCount, new Long(0, 0)) > 0) {
|
|
429
|
-
if (compare(remainingByteCount, fromInt(ensureNotNull(source.
|
|
430
|
-
var tail = this.
|
|
429
|
+
if (compare(remainingByteCount, fromInt(ensureNotNull(source.oq_1).v())) < 0) {
|
|
430
|
+
var tail = this.pq_1;
|
|
431
431
|
var tmp;
|
|
432
|
-
if (!(tail == null) && tail.
|
|
432
|
+
if (!(tail == null) && tail.ar_1) {
|
|
433
433
|
var tmp0 = remainingByteCount;
|
|
434
434
|
// Inline function 'kotlin.Long.plus' call
|
|
435
|
-
var other = tail.
|
|
435
|
+
var other = tail.yq_1;
|
|
436
436
|
var tmp0_0 = add(tmp0, fromInt(other));
|
|
437
437
|
// Inline function 'kotlin.Long.minus' call
|
|
438
|
-
var other_0 = tail.
|
|
438
|
+
var other_0 = tail.gs() ? 0 : tail.xq_1;
|
|
439
439
|
var tmp$ret$3 = subtract(tmp0_0, fromInt(other_0));
|
|
440
440
|
tmp = compare(tmp$ret$3, new Long(8192, 0)) <= 0;
|
|
441
441
|
} else {
|
|
442
442
|
tmp = false;
|
|
443
443
|
}
|
|
444
444
|
if (tmp) {
|
|
445
|
-
ensureNotNull(source.
|
|
446
|
-
source.
|
|
447
|
-
this.
|
|
445
|
+
ensureNotNull(source.oq_1).is(tail, convertToInt(remainingByteCount));
|
|
446
|
+
source.qq_1 = subtract(source.qq_1, remainingByteCount);
|
|
447
|
+
this.qq_1 = add(this.qq_1, remainingByteCount);
|
|
448
448
|
return Unit_instance;
|
|
449
449
|
} else {
|
|
450
|
-
source.
|
|
450
|
+
source.oq_1 = ensureNotNull(source.oq_1).hs(convertToInt(remainingByteCount));
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
var segmentToMove = ensureNotNull(source.
|
|
453
|
+
var segmentToMove = ensureNotNull(source.oq_1);
|
|
454
454
|
var movedByteCount = fromInt(segmentToMove.v());
|
|
455
|
-
source.
|
|
456
|
-
if (source.
|
|
457
|
-
source.
|
|
455
|
+
source.oq_1 = segmentToMove.js();
|
|
456
|
+
if (source.oq_1 == null) {
|
|
457
|
+
source.pq_1 = null;
|
|
458
458
|
}
|
|
459
459
|
// Inline function 'kotlinx.io.Buffer.pushSegment' call
|
|
460
|
-
if (this.
|
|
461
|
-
this.
|
|
462
|
-
this.
|
|
460
|
+
if (this.oq_1 == null) {
|
|
461
|
+
this.oq_1 = segmentToMove;
|
|
462
|
+
this.pq_1 = segmentToMove;
|
|
463
463
|
} else if (true) {
|
|
464
|
-
this.
|
|
465
|
-
if (ensureNotNull(this.
|
|
466
|
-
this.
|
|
464
|
+
this.pq_1 = ensureNotNull(this.pq_1).kr(segmentToMove).lr();
|
|
465
|
+
if (ensureNotNull(this.pq_1).cr_1 == null) {
|
|
466
|
+
this.oq_1 = this.pq_1;
|
|
467
467
|
}
|
|
468
468
|
} else {
|
|
469
|
-
this.
|
|
469
|
+
this.pq_1 = ensureNotNull(this.pq_1).kr(segmentToMove);
|
|
470
470
|
}
|
|
471
|
-
source.
|
|
472
|
-
this.
|
|
471
|
+
source.qq_1 = subtract(source.qq_1, movedByteCount);
|
|
472
|
+
this.qq_1 = add(this.qq_1, movedByteCount);
|
|
473
473
|
remainingByteCount = subtract(remainingByteCount, movedByteCount);
|
|
474
474
|
}
|
|
475
475
|
};
|
|
476
|
-
protoOf(Buffer).
|
|
476
|
+
protoOf(Buffer).ks = function (source) {
|
|
477
477
|
var totalBytesRead = new Long(0, 0);
|
|
478
478
|
$l$loop: while (true) {
|
|
479
|
-
var readCount = source.
|
|
479
|
+
var readCount = source.tr(this, new Long(8192, 0));
|
|
480
480
|
if (equalsLong(readCount, new Long(-1, -1)))
|
|
481
481
|
break $l$loop;
|
|
482
482
|
totalBytesRead = add(totalBytesRead, readCount);
|
|
483
483
|
}
|
|
484
484
|
return totalBytesRead;
|
|
485
485
|
};
|
|
486
|
-
protoOf(Buffer).
|
|
487
|
-
this.
|
|
488
|
-
this.
|
|
486
|
+
protoOf(Buffer).ls = function (byte) {
|
|
487
|
+
this.yr(1).ms(byte);
|
|
488
|
+
this.qq_1 = add(this.qq_1, new Long(1, 0));
|
|
489
489
|
};
|
|
490
|
-
protoOf(Buffer).
|
|
491
|
-
this.
|
|
492
|
-
this.
|
|
490
|
+
protoOf(Buffer).ns = function (short) {
|
|
491
|
+
this.yr(2).os(short);
|
|
492
|
+
this.qq_1 = add(this.qq_1, new Long(2, 0));
|
|
493
493
|
};
|
|
494
|
-
protoOf(Buffer).
|
|
494
|
+
protoOf(Buffer).p3 = function () {
|
|
495
495
|
return Unit_instance;
|
|
496
496
|
};
|
|
497
497
|
protoOf(Buffer).toString = function () {
|
|
@@ -507,7 +507,7 @@ protoOf(Buffer).toString = function () {
|
|
|
507
507
|
var builder = StringBuilder_init_$Create$(imul(len, 2) + (compare(this.v(), fromInt(maxPrintableBytes)) > 0 ? 1 : 0) | 0);
|
|
508
508
|
var bytesWritten = 0;
|
|
509
509
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
510
|
-
var curr = this.
|
|
510
|
+
var curr = this.oq_1;
|
|
511
511
|
while (!(curr == null)) {
|
|
512
512
|
var tmp0 = get_SegmentReadContextImpl();
|
|
513
513
|
var segment = curr;
|
|
@@ -515,47 +515,47 @@ protoOf(Buffer).toString = function () {
|
|
|
515
515
|
while (bytesWritten < len && idx < segment.v()) {
|
|
516
516
|
var _unary__edvuaz = idx;
|
|
517
517
|
idx = _unary__edvuaz + 1 | 0;
|
|
518
|
-
var b_0 = tmp0.
|
|
518
|
+
var b_0 = tmp0.ps(segment, _unary__edvuaz);
|
|
519
519
|
bytesWritten = bytesWritten + 1 | 0;
|
|
520
520
|
var tmp = get_HEX_DIGIT_CHARS();
|
|
521
521
|
// Inline function 'kotlinx.io.shr' call
|
|
522
522
|
var tmp$ret$2 = b_0 >> 4;
|
|
523
|
-
var tmp_0 = builder.
|
|
523
|
+
var tmp_0 = builder.t7(tmp[tmp$ret$2 & 15]);
|
|
524
524
|
var tmp_1 = get_HEX_DIGIT_CHARS();
|
|
525
525
|
// Inline function 'kotlinx.io.and' call
|
|
526
526
|
var tmp$ret$3 = b_0 & 15;
|
|
527
|
-
tmp_0.
|
|
527
|
+
tmp_0.t7(tmp_1[tmp$ret$3]);
|
|
528
528
|
}
|
|
529
|
-
curr = curr.
|
|
529
|
+
curr = curr.br_1;
|
|
530
530
|
}
|
|
531
531
|
if (compare(this.v(), fromInt(maxPrintableBytes)) > 0) {
|
|
532
|
-
builder.
|
|
532
|
+
builder.t7(_Char___init__impl__6a9atx(8230));
|
|
533
533
|
}
|
|
534
534
|
return 'Buffer(size=' + this.v().toString() + ' hex=' + builder.toString() + ')';
|
|
535
535
|
};
|
|
536
|
-
protoOf(Buffer).
|
|
537
|
-
var oldHead = ensureNotNull(this.
|
|
538
|
-
var nextHead = oldHead.
|
|
539
|
-
this.
|
|
536
|
+
protoOf(Buffer).dr = function () {
|
|
537
|
+
var oldHead = ensureNotNull(this.oq_1);
|
|
538
|
+
var nextHead = oldHead.br_1;
|
|
539
|
+
this.oq_1 = nextHead;
|
|
540
540
|
if (nextHead == null) {
|
|
541
|
-
this.
|
|
541
|
+
this.pq_1 = null;
|
|
542
542
|
} else {
|
|
543
|
-
nextHead.
|
|
543
|
+
nextHead.cr_1 = null;
|
|
544
544
|
}
|
|
545
|
-
oldHead.
|
|
546
|
-
SegmentPool_instance.
|
|
545
|
+
oldHead.br_1 = null;
|
|
546
|
+
SegmentPool_instance.qs(oldHead);
|
|
547
547
|
};
|
|
548
|
-
protoOf(Buffer).
|
|
549
|
-
var oldTail = ensureNotNull(this.
|
|
550
|
-
var newTail = oldTail.
|
|
551
|
-
this.
|
|
548
|
+
protoOf(Buffer).rs = function () {
|
|
549
|
+
var oldTail = ensureNotNull(this.pq_1);
|
|
550
|
+
var newTail = oldTail.cr_1;
|
|
551
|
+
this.pq_1 = newTail;
|
|
552
552
|
if (newTail == null) {
|
|
553
|
-
this.
|
|
553
|
+
this.oq_1 = null;
|
|
554
554
|
} else {
|
|
555
|
-
newTail.
|
|
555
|
+
newTail.br_1 = null;
|
|
556
556
|
}
|
|
557
|
-
oldTail.
|
|
558
|
-
SegmentPool_instance.
|
|
557
|
+
oldTail.cr_1 = null;
|
|
558
|
+
SegmentPool_instance.qs(oldTail);
|
|
559
559
|
};
|
|
560
560
|
function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
561
561
|
startIndex = startIndex === VOID ? new Long(0, 0) : startIndex;
|
|
@@ -567,7 +567,7 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
567
567
|
if (equalsLong(startIndex, endOffset))
|
|
568
568
|
return new Long(-1, -1);
|
|
569
569
|
// Inline function 'kotlinx.io.seek' call
|
|
570
|
-
if (_this__u8e3s4.
|
|
570
|
+
if (_this__u8e3s4.oq_1 == null) {
|
|
571
571
|
var o = new Long(-1, -1);
|
|
572
572
|
if (equalsLong(o, new Long(-1, -1))) {
|
|
573
573
|
return new Long(-1, -1);
|
|
@@ -596,19 +596,19 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
596
596
|
// Inline function 'kotlin.Long.plus' call
|
|
597
597
|
var other = segment.v();
|
|
598
598
|
offset = add(tmp0_0, fromInt(other));
|
|
599
|
-
segment = segment.
|
|
599
|
+
segment = segment.br_1;
|
|
600
600
|
}
|
|
601
601
|
while (!(segment == null) && compare(offset, endOffset) < 0);
|
|
602
602
|
return new Long(-1, -1);
|
|
603
603
|
}
|
|
604
604
|
if (compare(subtract(_this__u8e3s4.v(), startIndex), startIndex) < 0) {
|
|
605
|
-
var s = _this__u8e3s4.
|
|
605
|
+
var s = _this__u8e3s4.pq_1;
|
|
606
606
|
var offset_0 = _this__u8e3s4.v();
|
|
607
607
|
$l$loop: while (!(s == null) && compare(offset_0, startIndex) > 0) {
|
|
608
|
-
offset_0 = subtract(offset_0, fromInt(s.
|
|
608
|
+
offset_0 = subtract(offset_0, fromInt(s.yq_1 - s.xq_1 | 0));
|
|
609
609
|
if (compare(offset_0, startIndex) <= 0)
|
|
610
610
|
break $l$loop;
|
|
611
|
-
s = s.
|
|
611
|
+
s = s.cr_1;
|
|
612
612
|
}
|
|
613
613
|
var tmp0_1 = s;
|
|
614
614
|
var o_0 = offset_0;
|
|
@@ -639,21 +639,21 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
639
639
|
// Inline function 'kotlin.Long.plus' call
|
|
640
640
|
var other_0 = segment_0.v();
|
|
641
641
|
offset_1 = add(tmp0_3, fromInt(other_0));
|
|
642
|
-
segment_0 = segment_0.
|
|
642
|
+
segment_0 = segment_0.br_1;
|
|
643
643
|
}
|
|
644
644
|
while (!(segment_0 == null) && compare(offset_1, endOffset) < 0);
|
|
645
645
|
return new Long(-1, -1);
|
|
646
646
|
} else {
|
|
647
|
-
var s_0 = _this__u8e3s4.
|
|
647
|
+
var s_0 = _this__u8e3s4.oq_1;
|
|
648
648
|
var offset_2 = new Long(0, 0);
|
|
649
649
|
$l$loop_0: while (!(s_0 == null)) {
|
|
650
650
|
var tmp0_4 = offset_2;
|
|
651
651
|
// Inline function 'kotlin.Long.plus' call
|
|
652
|
-
var other_1 = s_0.
|
|
652
|
+
var other_1 = s_0.yq_1 - s_0.xq_1 | 0;
|
|
653
653
|
var nextOffset = add(tmp0_4, fromInt(other_1));
|
|
654
654
|
if (compare(nextOffset, startIndex) > 0)
|
|
655
655
|
break $l$loop_0;
|
|
656
|
-
s_0 = s_0.
|
|
656
|
+
s_0 = s_0.br_1;
|
|
657
657
|
offset_2 = nextOffset;
|
|
658
658
|
}
|
|
659
659
|
var tmp0_5 = s_0;
|
|
@@ -685,32 +685,32 @@ function indexOf(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
685
685
|
// Inline function 'kotlin.Long.plus' call
|
|
686
686
|
var other_2 = segment_1.v();
|
|
687
687
|
offset_3 = add(tmp0_7, fromInt(other_2));
|
|
688
|
-
segment_1 = segment_1.
|
|
688
|
+
segment_1 = segment_1.br_1;
|
|
689
689
|
}
|
|
690
690
|
while (!(segment_1 == null) && compare(offset_3, endOffset) < 0);
|
|
691
691
|
return new Long(-1, -1);
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
function readByteString(_this__u8e3s4, byteCount) {
|
|
695
|
-
return UnsafeByteStringOperations_instance.
|
|
695
|
+
return UnsafeByteStringOperations_instance.nq(readByteArray_0(_this__u8e3s4, byteCount));
|
|
696
696
|
}
|
|
697
697
|
function buffered(_this__u8e3s4) {
|
|
698
698
|
return new RealSource(_this__u8e3s4);
|
|
699
699
|
}
|
|
700
700
|
function PeekSource(upstream) {
|
|
701
|
-
this.
|
|
702
|
-
this.
|
|
703
|
-
this.
|
|
701
|
+
this.ss_1 = upstream;
|
|
702
|
+
this.ts_1 = this.ss_1.rq();
|
|
703
|
+
this.us_1 = this.ts_1.oq_1;
|
|
704
704
|
var tmp = this;
|
|
705
|
-
var tmp0_safe_receiver = this.
|
|
706
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
707
|
-
tmp.
|
|
708
|
-
this.
|
|
709
|
-
this.
|
|
705
|
+
var tmp0_safe_receiver = this.ts_1.oq_1;
|
|
706
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.xq_1;
|
|
707
|
+
tmp.vs_1 = tmp1_elvis_lhs == null ? -1 : tmp1_elvis_lhs;
|
|
708
|
+
this.ws_1 = false;
|
|
709
|
+
this.xs_1 = new Long(0, 0);
|
|
710
710
|
}
|
|
711
|
-
protoOf(PeekSource).
|
|
711
|
+
protoOf(PeekSource).tr = function (sink, byteCount) {
|
|
712
712
|
// Inline function 'kotlin.check' call
|
|
713
|
-
if (!!this.
|
|
713
|
+
if (!!this.ws_1) {
|
|
714
714
|
var message = 'Source is closed.';
|
|
715
715
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
716
716
|
}
|
|
@@ -721,43 +721,43 @@ protoOf(PeekSource).xr = function (sink, byteCount) {
|
|
|
721
721
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
722
722
|
}
|
|
723
723
|
// Inline function 'kotlin.check' call
|
|
724
|
-
if (!(this.
|
|
724
|
+
if (!(this.us_1 == null || (this.us_1 === this.ts_1.oq_1 && this.vs_1 === ensureNotNull(this.ts_1.oq_1).xq_1))) {
|
|
725
725
|
var message_1 = 'Peek source is invalid because upstream source was used';
|
|
726
726
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
727
727
|
}
|
|
728
728
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
729
729
|
return new Long(0, 0);
|
|
730
730
|
// Inline function 'kotlin.Long.plus' call
|
|
731
|
-
var this_0 = this.
|
|
731
|
+
var this_0 = this.xs_1;
|
|
732
732
|
var tmp$ret$7 = add(this_0, fromInt(1));
|
|
733
|
-
if (!this.
|
|
733
|
+
if (!this.ss_1.uq(tmp$ret$7))
|
|
734
734
|
return new Long(-1, -1);
|
|
735
|
-
if (this.
|
|
736
|
-
this.
|
|
737
|
-
this.
|
|
735
|
+
if (this.us_1 == null && !(this.ts_1.oq_1 == null)) {
|
|
736
|
+
this.us_1 = this.ts_1.oq_1;
|
|
737
|
+
this.vs_1 = ensureNotNull(this.ts_1.oq_1).xq_1;
|
|
738
738
|
}
|
|
739
739
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
740
|
-
var b = subtract(this.
|
|
740
|
+
var b = subtract(this.ts_1.v(), this.xs_1);
|
|
741
741
|
var toCopy = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
742
|
-
this.
|
|
743
|
-
this.
|
|
742
|
+
this.ts_1.ir(sink, this.xs_1, add(this.xs_1, toCopy));
|
|
743
|
+
this.xs_1 = add(this.xs_1, toCopy);
|
|
744
744
|
return toCopy;
|
|
745
745
|
};
|
|
746
|
-
protoOf(PeekSource).
|
|
747
|
-
this.
|
|
746
|
+
protoOf(PeekSource).p3 = function () {
|
|
747
|
+
this.ws_1 = true;
|
|
748
748
|
};
|
|
749
749
|
function RealSource(source) {
|
|
750
|
-
this.
|
|
751
|
-
this.
|
|
752
|
-
this.
|
|
750
|
+
this.ys_1 = source;
|
|
751
|
+
this.zs_1 = false;
|
|
752
|
+
this.at_1 = new Buffer();
|
|
753
753
|
}
|
|
754
|
-
protoOf(RealSource).
|
|
755
|
-
return this.
|
|
754
|
+
protoOf(RealSource).rq = function () {
|
|
755
|
+
return this.at_1;
|
|
756
756
|
};
|
|
757
|
-
protoOf(RealSource).
|
|
757
|
+
protoOf(RealSource).tr = function (sink, byteCount) {
|
|
758
758
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
759
759
|
// Inline function 'kotlin.check' call
|
|
760
|
-
if (!!this.
|
|
760
|
+
if (!!this.zs_1) {
|
|
761
761
|
var message = 'Source is closed.';
|
|
762
762
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
763
763
|
}
|
|
@@ -766,33 +766,33 @@ protoOf(RealSource).xr = function (sink, byteCount) {
|
|
|
766
766
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
767
767
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
768
768
|
}
|
|
769
|
-
if (equalsLong(this.
|
|
770
|
-
var read = this.
|
|
769
|
+
if (equalsLong(this.at_1.v(), new Long(0, 0))) {
|
|
770
|
+
var read = this.ys_1.tr(this.at_1, new Long(8192, 0));
|
|
771
771
|
if (equalsLong(read, new Long(-1, -1)))
|
|
772
772
|
return new Long(-1, -1);
|
|
773
773
|
}
|
|
774
774
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
775
|
-
var b = this.
|
|
775
|
+
var b = this.at_1.v();
|
|
776
776
|
var toRead = compare(byteCount, b) <= 0 ? byteCount : b;
|
|
777
|
-
return this.
|
|
777
|
+
return this.at_1.tr(sink, toRead);
|
|
778
778
|
};
|
|
779
|
-
protoOf(RealSource).
|
|
779
|
+
protoOf(RealSource).sq = function () {
|
|
780
780
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
781
781
|
// Inline function 'kotlin.check' call
|
|
782
|
-
if (!!this.
|
|
782
|
+
if (!!this.zs_1) {
|
|
783
783
|
var message = 'Source is closed.';
|
|
784
784
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
785
785
|
}
|
|
786
|
-
return this.
|
|
786
|
+
return this.at_1.sq() && equalsLong(this.ys_1.tr(this.at_1, new Long(8192, 0)), new Long(-1, -1));
|
|
787
787
|
};
|
|
788
|
-
protoOf(RealSource).
|
|
789
|
-
if (!this.
|
|
788
|
+
protoOf(RealSource).tq = function (byteCount) {
|
|
789
|
+
if (!this.uq(byteCount))
|
|
790
790
|
throw EOFException_init_$Create$_0("Source doesn't contain required number of bytes (" + byteCount.toString() + ').');
|
|
791
791
|
};
|
|
792
|
-
protoOf(RealSource).
|
|
792
|
+
protoOf(RealSource).uq = function (byteCount) {
|
|
793
793
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
794
794
|
// Inline function 'kotlin.check' call
|
|
795
|
-
if (!!this.
|
|
795
|
+
if (!!this.zs_1) {
|
|
796
796
|
var message = 'Source is closed.';
|
|
797
797
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
798
798
|
}
|
|
@@ -801,91 +801,91 @@ protoOf(RealSource).yq = function (byteCount) {
|
|
|
801
801
|
var message_0 = 'byteCount: ' + byteCount.toString();
|
|
802
802
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
803
803
|
}
|
|
804
|
-
while (compare(this.
|
|
805
|
-
if (equalsLong(this.
|
|
804
|
+
while (compare(this.at_1.v(), byteCount) < 0) {
|
|
805
|
+
if (equalsLong(this.ys_1.tr(this.at_1, new Long(8192, 0)), new Long(-1, -1)))
|
|
806
806
|
return false;
|
|
807
807
|
}
|
|
808
808
|
return true;
|
|
809
809
|
};
|
|
810
|
-
protoOf(RealSource).
|
|
811
|
-
this.
|
|
812
|
-
return this.
|
|
810
|
+
protoOf(RealSource).vq = function () {
|
|
811
|
+
this.tq(new Long(1, 0));
|
|
812
|
+
return this.at_1.vq();
|
|
813
813
|
};
|
|
814
|
-
protoOf(RealSource).
|
|
814
|
+
protoOf(RealSource).qr = function (sink, startIndex, endIndex) {
|
|
815
815
|
// Inline function 'kotlinx.io.checkBounds' call
|
|
816
816
|
var size = sink.length;
|
|
817
817
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
818
|
-
if (equalsLong(this.
|
|
819
|
-
var read = this.
|
|
818
|
+
if (equalsLong(this.at_1.v(), new Long(0, 0))) {
|
|
819
|
+
var read = this.ys_1.tr(this.at_1, new Long(8192, 0));
|
|
820
820
|
if (equalsLong(read, new Long(-1, -1)))
|
|
821
821
|
return -1;
|
|
822
822
|
}
|
|
823
823
|
var tmp0 = endIndex - startIndex | 0;
|
|
824
824
|
// Inline function 'kotlinx.io.minOf' call
|
|
825
|
-
var b = this.
|
|
825
|
+
var b = this.at_1.v();
|
|
826
826
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
827
827
|
var a = fromInt(tmp0);
|
|
828
828
|
var tmp$ret$2 = compare(a, b) <= 0 ? a : b;
|
|
829
829
|
var toRead = convertToInt(tmp$ret$2);
|
|
830
|
-
return this.
|
|
830
|
+
return this.at_1.qr(sink, startIndex, startIndex + toRead | 0);
|
|
831
831
|
};
|
|
832
|
-
protoOf(RealSource).
|
|
832
|
+
protoOf(RealSource).vr = function (sink, byteCount) {
|
|
833
833
|
try {
|
|
834
|
-
this.
|
|
834
|
+
this.tq(byteCount);
|
|
835
835
|
} catch ($p) {
|
|
836
836
|
if ($p instanceof EOFException) {
|
|
837
837
|
var e = $p;
|
|
838
|
-
sink.
|
|
838
|
+
sink.ur(this.at_1, this.at_1.v());
|
|
839
839
|
throw e;
|
|
840
840
|
} else {
|
|
841
841
|
throw $p;
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
this.
|
|
844
|
+
this.at_1.vr(sink, byteCount);
|
|
845
845
|
};
|
|
846
|
-
protoOf(RealSource).
|
|
846
|
+
protoOf(RealSource).wr = function (sink) {
|
|
847
847
|
var totalBytesWritten = new Long(0, 0);
|
|
848
|
-
while (!equalsLong(this.
|
|
849
|
-
var emitByteCount = this.
|
|
848
|
+
while (!equalsLong(this.ys_1.tr(this.at_1, new Long(8192, 0)), new Long(-1, -1))) {
|
|
849
|
+
var emitByteCount = this.at_1.mr();
|
|
850
850
|
if (compare(emitByteCount, new Long(0, 0)) > 0) {
|
|
851
851
|
totalBytesWritten = add(totalBytesWritten, emitByteCount);
|
|
852
|
-
sink.
|
|
852
|
+
sink.ur(this.at_1, emitByteCount);
|
|
853
853
|
}
|
|
854
854
|
}
|
|
855
|
-
if (compare(this.
|
|
856
|
-
totalBytesWritten = add(totalBytesWritten, this.
|
|
857
|
-
sink.
|
|
855
|
+
if (compare(this.at_1.v(), new Long(0, 0)) > 0) {
|
|
856
|
+
totalBytesWritten = add(totalBytesWritten, this.at_1.v());
|
|
857
|
+
sink.ur(this.at_1, this.at_1.v());
|
|
858
858
|
}
|
|
859
859
|
return totalBytesWritten;
|
|
860
860
|
};
|
|
861
|
-
protoOf(RealSource).
|
|
862
|
-
this.
|
|
863
|
-
return this.
|
|
861
|
+
protoOf(RealSource).fr = function () {
|
|
862
|
+
this.tq(new Long(2, 0));
|
|
863
|
+
return this.at_1.fr();
|
|
864
864
|
};
|
|
865
|
-
protoOf(RealSource).
|
|
865
|
+
protoOf(RealSource).xr = function () {
|
|
866
866
|
// Inline function 'kotlinx.io.RealSource.checkNotClosed' call
|
|
867
867
|
// Inline function 'kotlin.check' call
|
|
868
|
-
if (!!this.
|
|
868
|
+
if (!!this.zs_1) {
|
|
869
869
|
var message = 'Source is closed.';
|
|
870
870
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
871
871
|
}
|
|
872
872
|
return buffered(new PeekSource(this));
|
|
873
873
|
};
|
|
874
|
-
protoOf(RealSource).
|
|
875
|
-
if (this.
|
|
874
|
+
protoOf(RealSource).p3 = function () {
|
|
875
|
+
if (this.zs_1)
|
|
876
876
|
return Unit_instance;
|
|
877
|
-
this.
|
|
878
|
-
this.
|
|
879
|
-
this.
|
|
877
|
+
this.zs_1 = true;
|
|
878
|
+
this.ys_1.p3();
|
|
879
|
+
this.at_1.i2();
|
|
880
880
|
};
|
|
881
881
|
protoOf(RealSource).toString = function () {
|
|
882
|
-
return 'buffered(' + toString(this.
|
|
882
|
+
return 'buffered(' + toString(this.ys_1) + ')';
|
|
883
883
|
};
|
|
884
884
|
function Segment_init_$Init$($this) {
|
|
885
885
|
Segment.call($this);
|
|
886
|
-
$this.
|
|
887
|
-
$this.
|
|
888
|
-
$this.
|
|
886
|
+
$this.wq_1 = new Int8Array(8192);
|
|
887
|
+
$this.ar_1 = true;
|
|
888
|
+
$this.zq_1 = null;
|
|
889
889
|
return $this;
|
|
890
890
|
}
|
|
891
891
|
function Segment_init_$Create$() {
|
|
@@ -893,87 +893,87 @@ function Segment_init_$Create$() {
|
|
|
893
893
|
}
|
|
894
894
|
function Segment_init_$Init$_0(data, pos, limit, shareToken, owner, $this) {
|
|
895
895
|
Segment.call($this);
|
|
896
|
-
$this.
|
|
897
|
-
$this.
|
|
898
|
-
$this.
|
|
899
|
-
$this.
|
|
900
|
-
$this.
|
|
896
|
+
$this.wq_1 = data;
|
|
897
|
+
$this.xq_1 = pos;
|
|
898
|
+
$this.yq_1 = limit;
|
|
899
|
+
$this.zq_1 = shareToken;
|
|
900
|
+
$this.ar_1 = owner;
|
|
901
901
|
return $this;
|
|
902
902
|
}
|
|
903
903
|
function Segment_init_$Create$_0(data, pos, limit, shareToken, owner) {
|
|
904
904
|
return Segment_init_$Init$_0(data, pos, limit, shareToken, owner, objectCreate(protoOf(Segment)));
|
|
905
905
|
}
|
|
906
906
|
function Companion() {
|
|
907
|
-
this.
|
|
908
|
-
this.
|
|
907
|
+
this.bt_1 = 8192;
|
|
908
|
+
this.ct_1 = 1024;
|
|
909
909
|
}
|
|
910
|
-
protoOf(Companion).
|
|
910
|
+
protoOf(Companion).dt = function () {
|
|
911
911
|
return Segment_init_$Create$();
|
|
912
912
|
};
|
|
913
913
|
var Companion_instance;
|
|
914
914
|
function Companion_getInstance() {
|
|
915
915
|
return Companion_instance;
|
|
916
916
|
}
|
|
917
|
-
protoOf(Segment).
|
|
918
|
-
var tmp0_safe_receiver = this.
|
|
919
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
917
|
+
protoOf(Segment).gs = function () {
|
|
918
|
+
var tmp0_safe_receiver = this.zq_1;
|
|
919
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.et();
|
|
920
920
|
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
|
|
921
921
|
};
|
|
922
|
-
protoOf(Segment).
|
|
923
|
-
var tmp0_elvis_lhs = this.
|
|
922
|
+
protoOf(Segment).jr = function () {
|
|
923
|
+
var tmp0_elvis_lhs = this.zq_1;
|
|
924
924
|
var tmp;
|
|
925
925
|
if (tmp0_elvis_lhs == null) {
|
|
926
926
|
// Inline function 'kotlin.also' call
|
|
927
|
-
var this_0 = SegmentPool_instance.
|
|
928
|
-
this.
|
|
927
|
+
var this_0 = SegmentPool_instance.ft();
|
|
928
|
+
this.zq_1 = this_0;
|
|
929
929
|
tmp = this_0;
|
|
930
930
|
} else {
|
|
931
931
|
tmp = tmp0_elvis_lhs;
|
|
932
932
|
}
|
|
933
933
|
var t = tmp;
|
|
934
|
-
var tmp_0 = this.
|
|
935
|
-
var tmp_1 = this.
|
|
934
|
+
var tmp_0 = this.xq_1;
|
|
935
|
+
var tmp_1 = this.yq_1;
|
|
936
936
|
// Inline function 'kotlin.also' call
|
|
937
|
-
t.
|
|
938
|
-
return Segment_init_$Create$_0(this.
|
|
937
|
+
t.gt();
|
|
938
|
+
return Segment_init_$Create$_0(this.wq_1, tmp_0, tmp_1, t, false);
|
|
939
939
|
};
|
|
940
|
-
protoOf(Segment).
|
|
941
|
-
var result = this.
|
|
942
|
-
if (!(this.
|
|
943
|
-
ensureNotNull(this.
|
|
940
|
+
protoOf(Segment).js = function () {
|
|
941
|
+
var result = this.br_1;
|
|
942
|
+
if (!(this.cr_1 == null)) {
|
|
943
|
+
ensureNotNull(this.cr_1).br_1 = this.br_1;
|
|
944
944
|
}
|
|
945
|
-
if (!(this.
|
|
946
|
-
ensureNotNull(this.
|
|
945
|
+
if (!(this.br_1 == null)) {
|
|
946
|
+
ensureNotNull(this.br_1).cr_1 = this.cr_1;
|
|
947
947
|
}
|
|
948
|
-
this.
|
|
949
|
-
this.
|
|
948
|
+
this.br_1 = null;
|
|
949
|
+
this.cr_1 = null;
|
|
950
950
|
return result;
|
|
951
951
|
};
|
|
952
|
-
protoOf(Segment).
|
|
953
|
-
segment.
|
|
954
|
-
segment.
|
|
955
|
-
if (!(this.
|
|
956
|
-
ensureNotNull(this.
|
|
952
|
+
protoOf(Segment).kr = function (segment) {
|
|
953
|
+
segment.cr_1 = this;
|
|
954
|
+
segment.br_1 = this.br_1;
|
|
955
|
+
if (!(this.br_1 == null)) {
|
|
956
|
+
ensureNotNull(this.br_1).cr_1 = segment;
|
|
957
957
|
}
|
|
958
|
-
this.
|
|
958
|
+
this.br_1 = segment;
|
|
959
959
|
return segment;
|
|
960
960
|
};
|
|
961
|
-
protoOf(Segment).
|
|
961
|
+
protoOf(Segment).hs = function (byteCount) {
|
|
962
962
|
// Inline function 'kotlin.require' call
|
|
963
|
-
if (!(byteCount > 0 && byteCount <= (this.
|
|
963
|
+
if (!(byteCount > 0 && byteCount <= (this.yq_1 - this.xq_1 | 0))) {
|
|
964
964
|
var message = 'byteCount out of range';
|
|
965
965
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
966
966
|
}
|
|
967
967
|
var prefix;
|
|
968
968
|
if (byteCount >= 1024) {
|
|
969
|
-
prefix = this.
|
|
969
|
+
prefix = this.jr();
|
|
970
970
|
} else {
|
|
971
|
-
prefix = SegmentPool_instance.
|
|
972
|
-
var tmp0 = this.
|
|
973
|
-
var tmp2 = prefix.
|
|
974
|
-
var tmp4 = this.
|
|
971
|
+
prefix = SegmentPool_instance.bs();
|
|
972
|
+
var tmp0 = this.wq_1;
|
|
973
|
+
var tmp2 = prefix.wq_1;
|
|
974
|
+
var tmp4 = this.xq_1;
|
|
975
975
|
// Inline function 'kotlin.collections.copyInto' call
|
|
976
|
-
var endIndex = this.
|
|
976
|
+
var endIndex = this.xq_1 + byteCount | 0;
|
|
977
977
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
978
978
|
// Inline function 'kotlin.js.asDynamic' call
|
|
979
979
|
var tmp = tmp0;
|
|
@@ -981,62 +981,62 @@ protoOf(Segment).ls = function (byteCount) {
|
|
|
981
981
|
// Inline function 'kotlin.js.asDynamic' call
|
|
982
982
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
983
983
|
}
|
|
984
|
-
prefix.
|
|
985
|
-
this.
|
|
986
|
-
if (!(this.
|
|
987
|
-
ensureNotNull(this.
|
|
984
|
+
prefix.yq_1 = prefix.xq_1 + byteCount | 0;
|
|
985
|
+
this.xq_1 = this.xq_1 + byteCount | 0;
|
|
986
|
+
if (!(this.cr_1 == null)) {
|
|
987
|
+
ensureNotNull(this.cr_1).kr(prefix);
|
|
988
988
|
} else {
|
|
989
|
-
prefix.
|
|
990
|
-
this.
|
|
989
|
+
prefix.br_1 = this;
|
|
990
|
+
this.cr_1 = prefix;
|
|
991
991
|
}
|
|
992
992
|
return prefix;
|
|
993
993
|
};
|
|
994
|
-
protoOf(Segment).
|
|
994
|
+
protoOf(Segment).lr = function () {
|
|
995
995
|
// Inline function 'kotlin.check' call
|
|
996
|
-
if (!!(this.
|
|
996
|
+
if (!!(this.cr_1 == null)) {
|
|
997
997
|
var message = 'cannot compact';
|
|
998
998
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
999
999
|
}
|
|
1000
|
-
if (!ensureNotNull(this.
|
|
1000
|
+
if (!ensureNotNull(this.cr_1).ar_1)
|
|
1001
1001
|
return this;
|
|
1002
|
-
var byteCount = this.
|
|
1003
|
-
var availableByteCount = (8192 - ensureNotNull(this.
|
|
1002
|
+
var byteCount = this.yq_1 - this.xq_1 | 0;
|
|
1003
|
+
var availableByteCount = (8192 - ensureNotNull(this.cr_1).yq_1 | 0) + (ensureNotNull(this.cr_1).gs() ? 0 : ensureNotNull(this.cr_1).xq_1) | 0;
|
|
1004
1004
|
if (byteCount > availableByteCount)
|
|
1005
1005
|
return this;
|
|
1006
|
-
var predecessor = this.
|
|
1007
|
-
this.
|
|
1008
|
-
var successor = this.
|
|
1006
|
+
var predecessor = this.cr_1;
|
|
1007
|
+
this.is(ensureNotNull(predecessor), byteCount);
|
|
1008
|
+
var successor = this.js();
|
|
1009
1009
|
// Inline function 'kotlin.check' call
|
|
1010
1010
|
if (!(successor == null)) {
|
|
1011
1011
|
throw IllegalStateException_init_$Create$('Check failed.');
|
|
1012
1012
|
}
|
|
1013
|
-
SegmentPool_instance.
|
|
1013
|
+
SegmentPool_instance.qs(this);
|
|
1014
1014
|
return predecessor;
|
|
1015
1015
|
};
|
|
1016
|
-
protoOf(Segment).
|
|
1017
|
-
var _unary__edvuaz = this.
|
|
1018
|
-
this.
|
|
1019
|
-
this.
|
|
1016
|
+
protoOf(Segment).ms = function (byte) {
|
|
1017
|
+
var _unary__edvuaz = this.yq_1;
|
|
1018
|
+
this.yq_1 = _unary__edvuaz + 1 | 0;
|
|
1019
|
+
this.wq_1[_unary__edvuaz] = byte;
|
|
1020
1020
|
};
|
|
1021
|
-
protoOf(Segment).
|
|
1022
|
-
var data = this.
|
|
1023
|
-
var limit = this.
|
|
1021
|
+
protoOf(Segment).os = function (short) {
|
|
1022
|
+
var data = this.wq_1;
|
|
1023
|
+
var limit = this.yq_1;
|
|
1024
1024
|
var _unary__edvuaz = limit;
|
|
1025
1025
|
limit = _unary__edvuaz + 1 | 0;
|
|
1026
1026
|
data[_unary__edvuaz] = toByte((short >>> 8 | 0) & 255);
|
|
1027
1027
|
var _unary__edvuaz_0 = limit;
|
|
1028
1028
|
limit = _unary__edvuaz_0 + 1 | 0;
|
|
1029
1029
|
data[_unary__edvuaz_0] = toByte(short & 255);
|
|
1030
|
-
this.
|
|
1030
|
+
this.yq_1 = limit;
|
|
1031
1031
|
};
|
|
1032
|
-
protoOf(Segment).
|
|
1033
|
-
var _unary__edvuaz = this.
|
|
1034
|
-
this.
|
|
1035
|
-
return this.
|
|
1032
|
+
protoOf(Segment).er = function () {
|
|
1033
|
+
var _unary__edvuaz = this.xq_1;
|
|
1034
|
+
this.xq_1 = _unary__edvuaz + 1 | 0;
|
|
1035
|
+
return this.wq_1[_unary__edvuaz];
|
|
1036
1036
|
};
|
|
1037
|
-
protoOf(Segment).
|
|
1038
|
-
var data = this.
|
|
1039
|
-
var pos = this.
|
|
1037
|
+
protoOf(Segment).gr = function () {
|
|
1038
|
+
var data = this.wq_1;
|
|
1039
|
+
var pos = this.xq_1;
|
|
1040
1040
|
var _unary__edvuaz = pos;
|
|
1041
1041
|
pos = _unary__edvuaz + 1 | 0;
|
|
1042
1042
|
// Inline function 'kotlinx.io.and' call
|
|
@@ -1046,118 +1046,118 @@ protoOf(Segment).kr = function () {
|
|
|
1046
1046
|
// Inline function 'kotlinx.io.and' call
|
|
1047
1047
|
var tmp$ret$1 = data[_unary__edvuaz_0] & 255;
|
|
1048
1048
|
var s = toShort(tmp | tmp$ret$1);
|
|
1049
|
-
this.
|
|
1049
|
+
this.xq_1 = pos;
|
|
1050
1050
|
return s;
|
|
1051
1051
|
};
|
|
1052
|
-
protoOf(Segment).
|
|
1052
|
+
protoOf(Segment).is = function (sink, byteCount) {
|
|
1053
1053
|
// Inline function 'kotlin.check' call
|
|
1054
|
-
if (!sink.
|
|
1054
|
+
if (!sink.ar_1) {
|
|
1055
1055
|
var message = 'only owner can write';
|
|
1056
1056
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1057
1057
|
}
|
|
1058
|
-
if ((sink.
|
|
1059
|
-
if (sink.
|
|
1058
|
+
if ((sink.yq_1 + byteCount | 0) > 8192) {
|
|
1059
|
+
if (sink.gs())
|
|
1060
1060
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1061
|
-
if (((sink.
|
|
1061
|
+
if (((sink.yq_1 + byteCount | 0) - sink.xq_1 | 0) > 8192)
|
|
1062
1062
|
throw IllegalArgumentException_init_$Create$_0();
|
|
1063
|
-
var tmp0 = sink.
|
|
1064
|
-
var tmp2 = sink.
|
|
1065
|
-
var tmp4 = sink.
|
|
1063
|
+
var tmp0 = sink.wq_1;
|
|
1064
|
+
var tmp2 = sink.wq_1;
|
|
1065
|
+
var tmp4 = sink.xq_1;
|
|
1066
1066
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1067
|
-
var endIndex = sink.
|
|
1067
|
+
var endIndex = sink.yq_1;
|
|
1068
1068
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1069
1069
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1070
1070
|
var tmp = tmp0;
|
|
1071
1071
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1072
1072
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1073
1073
|
arrayCopy(tmp, tmp2, 0, tmp4, endIndex);
|
|
1074
|
-
sink.
|
|
1075
|
-
sink.
|
|
1074
|
+
sink.yq_1 = sink.yq_1 - sink.xq_1 | 0;
|
|
1075
|
+
sink.xq_1 = 0;
|
|
1076
1076
|
}
|
|
1077
|
-
var tmp0_0 = this.
|
|
1078
|
-
var tmp2_0 = sink.
|
|
1079
|
-
var tmp4_0 = sink.
|
|
1080
|
-
var tmp6 = this.
|
|
1077
|
+
var tmp0_0 = this.wq_1;
|
|
1078
|
+
var tmp2_0 = sink.wq_1;
|
|
1079
|
+
var tmp4_0 = sink.yq_1;
|
|
1080
|
+
var tmp6 = this.xq_1;
|
|
1081
1081
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1082
|
-
var endIndex_0 = this.
|
|
1082
|
+
var endIndex_0 = this.xq_1 + byteCount | 0;
|
|
1083
1083
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1084
1084
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1085
1085
|
var tmp_0 = tmp0_0;
|
|
1086
1086
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1087
1087
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1088
1088
|
arrayCopy(tmp_0, tmp2_0, tmp4_0, tmp6, endIndex_0);
|
|
1089
|
-
sink.
|
|
1090
|
-
this.
|
|
1089
|
+
sink.yq_1 = sink.yq_1 + byteCount | 0;
|
|
1090
|
+
this.xq_1 = this.xq_1 + byteCount | 0;
|
|
1091
1091
|
};
|
|
1092
|
-
protoOf(Segment).
|
|
1092
|
+
protoOf(Segment).rr = function (dst, dstStartOffset, dstEndOffset) {
|
|
1093
1093
|
var len = dstEndOffset - dstStartOffset | 0;
|
|
1094
|
-
var tmp0 = this.
|
|
1095
|
-
var tmp6 = this.
|
|
1094
|
+
var tmp0 = this.wq_1;
|
|
1095
|
+
var tmp6 = this.xq_1;
|
|
1096
1096
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1097
|
-
var endIndex = this.
|
|
1097
|
+
var endIndex = this.xq_1 + len | 0;
|
|
1098
1098
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1099
1099
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1100
1100
|
var tmp = tmp0;
|
|
1101
1101
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1102
1102
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1103
1103
|
arrayCopy(tmp, dst, dstStartOffset, tmp6, endIndex);
|
|
1104
|
-
this.
|
|
1104
|
+
this.xq_1 = this.xq_1 + len | 0;
|
|
1105
1105
|
};
|
|
1106
|
-
protoOf(Segment).
|
|
1107
|
-
var tmp2 = this.
|
|
1106
|
+
protoOf(Segment).es = function (src, srcStartOffset, srcEndOffset) {
|
|
1107
|
+
var tmp2 = this.wq_1;
|
|
1108
1108
|
// Inline function 'kotlin.collections.copyInto' call
|
|
1109
|
-
var destinationOffset = this.
|
|
1109
|
+
var destinationOffset = this.yq_1;
|
|
1110
1110
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1111
1111
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1112
1112
|
var tmp = src;
|
|
1113
1113
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
1114
1114
|
// Inline function 'kotlin.js.asDynamic' call
|
|
1115
1115
|
arrayCopy(tmp, tmp2, destinationOffset, srcStartOffset, srcEndOffset);
|
|
1116
|
-
this.
|
|
1116
|
+
this.yq_1 = this.yq_1 + (srcEndOffset - srcStartOffset | 0) | 0;
|
|
1117
1117
|
};
|
|
1118
1118
|
protoOf(Segment).v = function () {
|
|
1119
|
-
return this.
|
|
1119
|
+
return this.yq_1 - this.xq_1 | 0;
|
|
1120
1120
|
};
|
|
1121
|
-
protoOf(Segment).
|
|
1122
|
-
return this.
|
|
1121
|
+
protoOf(Segment).ds = function () {
|
|
1122
|
+
return this.wq_1.length - this.yq_1 | 0;
|
|
1123
1123
|
};
|
|
1124
|
-
protoOf(Segment).
|
|
1125
|
-
return this.
|
|
1124
|
+
protoOf(Segment).ht = function (readOnly) {
|
|
1125
|
+
return this.wq_1;
|
|
1126
1126
|
};
|
|
1127
|
-
protoOf(Segment).
|
|
1128
|
-
return this.
|
|
1127
|
+
protoOf(Segment).or = function (index) {
|
|
1128
|
+
return this.wq_1[this.xq_1 + index | 0];
|
|
1129
1129
|
};
|
|
1130
|
-
protoOf(Segment).
|
|
1131
|
-
this.
|
|
1130
|
+
protoOf(Segment).it = function (index, value) {
|
|
1131
|
+
this.wq_1[this.yq_1 + index | 0] = value;
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(Segment).
|
|
1134
|
-
var d = this.
|
|
1135
|
-
var l = this.
|
|
1133
|
+
protoOf(Segment).jt = function (index, b0, b1) {
|
|
1134
|
+
var d = this.wq_1;
|
|
1135
|
+
var l = this.yq_1;
|
|
1136
1136
|
d[l + index | 0] = b0;
|
|
1137
1137
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1138
1138
|
};
|
|
1139
|
-
protoOf(Segment).
|
|
1140
|
-
var d = this.
|
|
1141
|
-
var l = this.
|
|
1139
|
+
protoOf(Segment).kt = function (index, b0, b1, b2) {
|
|
1140
|
+
var d = this.wq_1;
|
|
1141
|
+
var l = this.yq_1;
|
|
1142
1142
|
d[l + index | 0] = b0;
|
|
1143
1143
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1144
1144
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1145
1145
|
};
|
|
1146
|
-
protoOf(Segment).
|
|
1147
|
-
var d = this.
|
|
1148
|
-
var l = this.
|
|
1146
|
+
protoOf(Segment).lt = function (index, b0, b1, b2, b3) {
|
|
1147
|
+
var d = this.wq_1;
|
|
1148
|
+
var l = this.yq_1;
|
|
1149
1149
|
d[l + index | 0] = b0;
|
|
1150
1150
|
d[(l + index | 0) + 1 | 0] = b1;
|
|
1151
1151
|
d[(l + index | 0) + 2 | 0] = b2;
|
|
1152
1152
|
d[(l + index | 0) + 3 | 0] = b3;
|
|
1153
1153
|
};
|
|
1154
1154
|
function Segment() {
|
|
1155
|
-
this.
|
|
1156
|
-
this.
|
|
1157
|
-
this.
|
|
1158
|
-
this.
|
|
1159
|
-
this.
|
|
1160
|
-
this.
|
|
1155
|
+
this.xq_1 = 0;
|
|
1156
|
+
this.yq_1 = 0;
|
|
1157
|
+
this.zq_1 = null;
|
|
1158
|
+
this.ar_1 = false;
|
|
1159
|
+
this.br_1 = null;
|
|
1160
|
+
this.cr_1 = null;
|
|
1161
1161
|
}
|
|
1162
1162
|
function isEmpty(_this__u8e3s4) {
|
|
1163
1163
|
return _this__u8e3s4.v() === 0;
|
|
@@ -1168,10 +1168,10 @@ function AlwaysSharedCopyTracker() {
|
|
|
1168
1168
|
AlwaysSharedCopyTracker_instance = this;
|
|
1169
1169
|
SegmentCopyTracker.call(this);
|
|
1170
1170
|
}
|
|
1171
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1171
|
+
protoOf(AlwaysSharedCopyTracker).et = function () {
|
|
1172
1172
|
return true;
|
|
1173
1173
|
};
|
|
1174
|
-
protoOf(AlwaysSharedCopyTracker).
|
|
1174
|
+
protoOf(AlwaysSharedCopyTracker).gt = function () {
|
|
1175
1175
|
return Unit_instance;
|
|
1176
1176
|
};
|
|
1177
1177
|
var AlwaysSharedCopyTracker_instance;
|
|
@@ -1191,8 +1191,8 @@ function indexOf_0(_this__u8e3s4, byte, startOffset, endOffset) {
|
|
|
1191
1191
|
var message_0 = '' + endOffset;
|
|
1192
1192
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
1193
1193
|
}
|
|
1194
|
-
var p = _this__u8e3s4.
|
|
1195
|
-
var data = _this__u8e3s4.
|
|
1194
|
+
var p = _this__u8e3s4.xq_1;
|
|
1195
|
+
var data = _this__u8e3s4.ht(true);
|
|
1196
1196
|
var inductionVariable = startOffset;
|
|
1197
1197
|
if (inductionVariable < endOffset)
|
|
1198
1198
|
do {
|
|
@@ -1245,23 +1245,23 @@ function indexOf_1(_this__u8e3s4, byte, startIndex, endIndex) {
|
|
|
1245
1245
|
// Inline function 'kotlin.Long.plus' call
|
|
1246
1246
|
var this_0 = offset;
|
|
1247
1247
|
var tmp$ret$2 = add(this_0, fromInt(1));
|
|
1248
|
-
tmp_0 = _this__u8e3s4.
|
|
1248
|
+
tmp_0 = _this__u8e3s4.uq(tmp$ret$2);
|
|
1249
1249
|
} else {
|
|
1250
1250
|
tmp_0 = false;
|
|
1251
1251
|
}
|
|
1252
1252
|
if (!tmp_0) {
|
|
1253
1253
|
break $l$loop;
|
|
1254
1254
|
}
|
|
1255
|
-
var tmp_1 = _this__u8e3s4.
|
|
1255
|
+
var tmp_1 = _this__u8e3s4.rq();
|
|
1256
1256
|
var tmp_2 = offset;
|
|
1257
1257
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1258
|
-
var b = _this__u8e3s4.
|
|
1258
|
+
var b = _this__u8e3s4.rq().v();
|
|
1259
1259
|
var tmp$ret$3 = compare(endIndex, b) <= 0 ? endIndex : b;
|
|
1260
1260
|
var idx = indexOf(tmp_1, byte, tmp_2, tmp$ret$3);
|
|
1261
1261
|
if (!equalsLong(idx, new Long(-1, -1))) {
|
|
1262
1262
|
return idx;
|
|
1263
1263
|
}
|
|
1264
|
-
offset = _this__u8e3s4.
|
|
1264
|
+
offset = _this__u8e3s4.rq().v();
|
|
1265
1265
|
}
|
|
1266
1266
|
return new Long(-1, -1);
|
|
1267
1267
|
}
|
|
@@ -1269,22 +1269,22 @@ function readByteArrayImpl(_this__u8e3s4, size) {
|
|
|
1269
1269
|
var arraySize = size;
|
|
1270
1270
|
if (size === -1) {
|
|
1271
1271
|
var fetchSize = new Long(2147483647, 0);
|
|
1272
|
-
while (compare(_this__u8e3s4.
|
|
1272
|
+
while (compare(_this__u8e3s4.rq().v(), new Long(2147483647, 0)) < 0 && _this__u8e3s4.uq(fetchSize)) {
|
|
1273
1273
|
// Inline function 'kotlin.Long.times' call
|
|
1274
1274
|
var this_0 = fetchSize;
|
|
1275
1275
|
fetchSize = multiply(this_0, fromInt(2));
|
|
1276
1276
|
}
|
|
1277
1277
|
// Inline function 'kotlin.check' call
|
|
1278
|
-
if (!(compare(_this__u8e3s4.
|
|
1279
|
-
var message = "Can't create an array of size " + _this__u8e3s4.
|
|
1278
|
+
if (!(compare(_this__u8e3s4.rq().v(), new Long(2147483647, 0)) < 0)) {
|
|
1279
|
+
var message = "Can't create an array of size " + _this__u8e3s4.rq().v().toString();
|
|
1280
1280
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1281
1281
|
}
|
|
1282
|
-
arraySize = convertToInt(_this__u8e3s4.
|
|
1282
|
+
arraySize = convertToInt(_this__u8e3s4.rq().v());
|
|
1283
1283
|
} else {
|
|
1284
|
-
_this__u8e3s4.
|
|
1284
|
+
_this__u8e3s4.tq(fromInt(size));
|
|
1285
1285
|
}
|
|
1286
1286
|
var array = new Int8Array(arraySize);
|
|
1287
|
-
readTo(_this__u8e3s4.
|
|
1287
|
+
readTo(_this__u8e3s4.rq(), array);
|
|
1288
1288
|
return array;
|
|
1289
1289
|
}
|
|
1290
1290
|
function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
@@ -1295,7 +1295,7 @@ function readTo(_this__u8e3s4, sink, startIndex, endIndex) {
|
|
|
1295
1295
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1296
1296
|
var offset = startIndex;
|
|
1297
1297
|
while (offset < endIndex) {
|
|
1298
|
-
var bytesRead = _this__u8e3s4.
|
|
1298
|
+
var bytesRead = _this__u8e3s4.qr(sink, offset, endIndex);
|
|
1299
1299
|
if (bytesRead === -1) {
|
|
1300
1300
|
throw EOFException_init_$Create$_0('Source exhausted before reading ' + (endIndex - startIndex | 0) + ' bytes. ' + ('Only ' + bytesRead + ' bytes were read.'));
|
|
1301
1301
|
}
|
|
@@ -1310,7 +1310,7 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1310
1310
|
checkBounds(fromInt(size), fromInt(startIndex), fromInt(endIndex));
|
|
1311
1311
|
// Inline function 'kotlinx.io.writeToInternalBuffer' call
|
|
1312
1312
|
// Inline function 'kotlinx.io.commonWriteUtf8' call
|
|
1313
|
-
var this_0 = _this__u8e3s4.
|
|
1313
|
+
var this_0 = _this__u8e3s4.rq();
|
|
1314
1314
|
var i = startIndex;
|
|
1315
1315
|
while (i < endIndex) {
|
|
1316
1316
|
var p0 = i;
|
|
@@ -1320,15 +1320,15 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1320
1320
|
if (c < 128) {
|
|
1321
1321
|
$l$block_0: {
|
|
1322
1322
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1323
|
-
var tail = this_0.
|
|
1323
|
+
var tail = this_0.yr(1);
|
|
1324
1324
|
var ctx = get_SegmentWriteContextImpl();
|
|
1325
1325
|
var segmentOffset = -i | 0;
|
|
1326
1326
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1327
|
-
var b = i + tail.
|
|
1327
|
+
var b = i + tail.ds() | 0;
|
|
1328
1328
|
var runLimit = Math.min(endIndex, b);
|
|
1329
1329
|
var _unary__edvuaz = i;
|
|
1330
1330
|
i = _unary__edvuaz + 1 | 0;
|
|
1331
|
-
ctx.
|
|
1331
|
+
ctx.pt(tail, segmentOffset + _unary__edvuaz | 0, toByte(c));
|
|
1332
1332
|
$l$loop: while (i < runLimit) {
|
|
1333
1333
|
var p0_0 = i;
|
|
1334
1334
|
// Inline function 'kotlin.code' call
|
|
@@ -1338,95 +1338,95 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1338
1338
|
break $l$loop;
|
|
1339
1339
|
var _unary__edvuaz_0 = i;
|
|
1340
1340
|
i = _unary__edvuaz_0 + 1 | 0;
|
|
1341
|
-
ctx.
|
|
1341
|
+
ctx.pt(tail, segmentOffset + _unary__edvuaz_0 | 0, toByte(c));
|
|
1342
1342
|
}
|
|
1343
1343
|
var bytesWritten = i + segmentOffset | 0;
|
|
1344
1344
|
if (bytesWritten === 1) {
|
|
1345
|
-
tail.
|
|
1345
|
+
tail.yq_1 = tail.yq_1 + bytesWritten | 0;
|
|
1346
1346
|
var tmp = this_0;
|
|
1347
1347
|
// Inline function 'kotlin.Long.plus' call
|
|
1348
|
-
var this_3 = this_0.
|
|
1349
|
-
tmp.
|
|
1348
|
+
var this_3 = this_0.qq_1;
|
|
1349
|
+
tmp.qq_1 = add(this_3, fromInt(bytesWritten));
|
|
1350
1350
|
break $l$block_0;
|
|
1351
1351
|
}
|
|
1352
1352
|
// Inline function 'kotlin.check' call
|
|
1353
|
-
if (!(0 <= bytesWritten ? bytesWritten <= tail.
|
|
1354
|
-
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.
|
|
1353
|
+
if (!(0 <= bytesWritten ? bytesWritten <= tail.ds() : false)) {
|
|
1354
|
+
var message = 'Invalid number of bytes written: ' + bytesWritten + '. Should be in 0..' + tail.ds();
|
|
1355
1355
|
throw IllegalStateException_init_$Create$(toString(message));
|
|
1356
1356
|
}
|
|
1357
1357
|
if (!(bytesWritten === 0)) {
|
|
1358
|
-
tail.
|
|
1358
|
+
tail.yq_1 = tail.yq_1 + bytesWritten | 0;
|
|
1359
1359
|
var tmp_0 = this_0;
|
|
1360
1360
|
// Inline function 'kotlin.Long.plus' call
|
|
1361
|
-
var this_4 = this_0.
|
|
1362
|
-
tmp_0.
|
|
1361
|
+
var this_4 = this_0.qq_1;
|
|
1362
|
+
tmp_0.qq_1 = add(this_4, fromInt(bytesWritten));
|
|
1363
1363
|
break $l$block_0;
|
|
1364
1364
|
}
|
|
1365
1365
|
if (isEmpty(tail)) {
|
|
1366
|
-
this_0.
|
|
1366
|
+
this_0.rs();
|
|
1367
1367
|
}
|
|
1368
1368
|
}
|
|
1369
1369
|
} else if (c < 2048) {
|
|
1370
1370
|
$l$block_2: {
|
|
1371
1371
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1372
|
-
var tail_0 = this_0.
|
|
1373
|
-
get_SegmentWriteContextImpl().
|
|
1372
|
+
var tail_0 = this_0.yr(2);
|
|
1373
|
+
get_SegmentWriteContextImpl().ot(tail_0, 0, toByte(c >> 6 | 192), toByte(c & 63 | 128));
|
|
1374
1374
|
var bytesWritten_0 = 2;
|
|
1375
1375
|
if (bytesWritten_0 === 2) {
|
|
1376
|
-
tail_0.
|
|
1376
|
+
tail_0.yq_1 = tail_0.yq_1 + bytesWritten_0 | 0;
|
|
1377
1377
|
var tmp_1 = this_0;
|
|
1378
1378
|
// Inline function 'kotlin.Long.plus' call
|
|
1379
|
-
var this_5 = this_0.
|
|
1380
|
-
tmp_1.
|
|
1379
|
+
var this_5 = this_0.qq_1;
|
|
1380
|
+
tmp_1.qq_1 = add(this_5, fromInt(bytesWritten_0));
|
|
1381
1381
|
break $l$block_2;
|
|
1382
1382
|
}
|
|
1383
1383
|
// Inline function 'kotlin.check' call
|
|
1384
|
-
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.
|
|
1385
|
-
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.
|
|
1384
|
+
if (!(0 <= bytesWritten_0 ? bytesWritten_0 <= tail_0.ds() : false)) {
|
|
1385
|
+
var message_0 = 'Invalid number of bytes written: ' + bytesWritten_0 + '. Should be in 0..' + tail_0.ds();
|
|
1386
1386
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
1387
1387
|
}
|
|
1388
1388
|
if (!(bytesWritten_0 === 0)) {
|
|
1389
|
-
tail_0.
|
|
1389
|
+
tail_0.yq_1 = tail_0.yq_1 + bytesWritten_0 | 0;
|
|
1390
1390
|
var tmp_2 = this_0;
|
|
1391
1391
|
// Inline function 'kotlin.Long.plus' call
|
|
1392
|
-
var this_6 = this_0.
|
|
1393
|
-
tmp_2.
|
|
1392
|
+
var this_6 = this_0.qq_1;
|
|
1393
|
+
tmp_2.qq_1 = add(this_6, fromInt(bytesWritten_0));
|
|
1394
1394
|
break $l$block_2;
|
|
1395
1395
|
}
|
|
1396
1396
|
if (isEmpty(tail_0)) {
|
|
1397
|
-
this_0.
|
|
1397
|
+
this_0.rs();
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
i = i + 1 | 0;
|
|
1401
1401
|
} else if (c < 55296 || c > 57343) {
|
|
1402
1402
|
$l$block_4: {
|
|
1403
1403
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1404
|
-
var tail_1 = this_0.
|
|
1405
|
-
get_SegmentWriteContextImpl().
|
|
1404
|
+
var tail_1 = this_0.yr(3);
|
|
1405
|
+
get_SegmentWriteContextImpl().nt(tail_1, 0, toByte(c >> 12 | 224), toByte(c >> 6 & 63 | 128), toByte(c & 63 | 128));
|
|
1406
1406
|
var bytesWritten_1 = 3;
|
|
1407
1407
|
if (bytesWritten_1 === 3) {
|
|
1408
|
-
tail_1.
|
|
1408
|
+
tail_1.yq_1 = tail_1.yq_1 + bytesWritten_1 | 0;
|
|
1409
1409
|
var tmp_3 = this_0;
|
|
1410
1410
|
// Inline function 'kotlin.Long.plus' call
|
|
1411
|
-
var this_7 = this_0.
|
|
1412
|
-
tmp_3.
|
|
1411
|
+
var this_7 = this_0.qq_1;
|
|
1412
|
+
tmp_3.qq_1 = add(this_7, fromInt(bytesWritten_1));
|
|
1413
1413
|
break $l$block_4;
|
|
1414
1414
|
}
|
|
1415
1415
|
// Inline function 'kotlin.check' call
|
|
1416
|
-
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.
|
|
1417
|
-
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.
|
|
1416
|
+
if (!(0 <= bytesWritten_1 ? bytesWritten_1 <= tail_1.ds() : false)) {
|
|
1417
|
+
var message_1 = 'Invalid number of bytes written: ' + bytesWritten_1 + '. Should be in 0..' + tail_1.ds();
|
|
1418
1418
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
1419
1419
|
}
|
|
1420
1420
|
if (!(bytesWritten_1 === 0)) {
|
|
1421
|
-
tail_1.
|
|
1421
|
+
tail_1.yq_1 = tail_1.yq_1 + bytesWritten_1 | 0;
|
|
1422
1422
|
var tmp_4 = this_0;
|
|
1423
1423
|
// Inline function 'kotlin.Long.plus' call
|
|
1424
|
-
var this_8 = this_0.
|
|
1425
|
-
tmp_4.
|
|
1424
|
+
var this_8 = this_0.qq_1;
|
|
1425
|
+
tmp_4.qq_1 = add(this_8, fromInt(bytesWritten_1));
|
|
1426
1426
|
break $l$block_4;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (isEmpty(tail_1)) {
|
|
1429
|
-
this_0.
|
|
1429
|
+
this_0.rs();
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
i = i + 1 | 0;
|
|
@@ -1445,75 +1445,75 @@ function writeString(_this__u8e3s4, string, startIndex, endIndex) {
|
|
|
1445
1445
|
// Inline function 'kotlin.code' call
|
|
1446
1446
|
var this_10 = _Char___init__impl__6a9atx(63);
|
|
1447
1447
|
var tmp$ret$26 = Char__toInt_impl_vasixd(this_10);
|
|
1448
|
-
this_0.
|
|
1448
|
+
this_0.ls(toByte(tmp$ret$26));
|
|
1449
1449
|
i = i + 1 | 0;
|
|
1450
1450
|
} else {
|
|
1451
1451
|
var codePoint = 65536 + ((c & 1023) << 10 | low & 1023) | 0;
|
|
1452
1452
|
$l$block_6: {
|
|
1453
1453
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.writeToTail' call
|
|
1454
|
-
var tail_2 = this_0.
|
|
1455
|
-
get_SegmentWriteContextImpl().
|
|
1454
|
+
var tail_2 = this_0.yr(4);
|
|
1455
|
+
get_SegmentWriteContextImpl().mt(tail_2, 0, toByte(codePoint >> 18 | 240), toByte(codePoint >> 12 & 63 | 128), toByte(codePoint >> 6 & 63 | 128), toByte(codePoint & 63 | 128));
|
|
1456
1456
|
var bytesWritten_2 = 4;
|
|
1457
1457
|
if (bytesWritten_2 === 4) {
|
|
1458
|
-
tail_2.
|
|
1458
|
+
tail_2.yq_1 = tail_2.yq_1 + bytesWritten_2 | 0;
|
|
1459
1459
|
var tmp_6 = this_0;
|
|
1460
1460
|
// Inline function 'kotlin.Long.plus' call
|
|
1461
|
-
var this_11 = this_0.
|
|
1462
|
-
tmp_6.
|
|
1461
|
+
var this_11 = this_0.qq_1;
|
|
1462
|
+
tmp_6.qq_1 = add(this_11, fromInt(bytesWritten_2));
|
|
1463
1463
|
break $l$block_6;
|
|
1464
1464
|
}
|
|
1465
1465
|
// Inline function 'kotlin.check' call
|
|
1466
|
-
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.
|
|
1467
|
-
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.
|
|
1466
|
+
if (!(0 <= bytesWritten_2 ? bytesWritten_2 <= tail_2.ds() : false)) {
|
|
1467
|
+
var message_2 = 'Invalid number of bytes written: ' + bytesWritten_2 + '. Should be in 0..' + tail_2.ds();
|
|
1468
1468
|
throw IllegalStateException_init_$Create$(toString(message_2));
|
|
1469
1469
|
}
|
|
1470
1470
|
if (!(bytesWritten_2 === 0)) {
|
|
1471
|
-
tail_2.
|
|
1471
|
+
tail_2.yq_1 = tail_2.yq_1 + bytesWritten_2 | 0;
|
|
1472
1472
|
var tmp_7 = this_0;
|
|
1473
1473
|
// Inline function 'kotlin.Long.plus' call
|
|
1474
|
-
var this_12 = this_0.
|
|
1475
|
-
tmp_7.
|
|
1474
|
+
var this_12 = this_0.qq_1;
|
|
1475
|
+
tmp_7.qq_1 = add(this_12, fromInt(bytesWritten_2));
|
|
1476
1476
|
break $l$block_6;
|
|
1477
1477
|
}
|
|
1478
1478
|
if (isEmpty(tail_2)) {
|
|
1479
|
-
this_0.
|
|
1479
|
+
this_0.rs();
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
1482
|
i = i + 2 | 0;
|
|
1483
1483
|
}
|
|
1484
1484
|
}
|
|
1485
1485
|
}
|
|
1486
|
-
_this__u8e3s4.
|
|
1486
|
+
_this__u8e3s4.hr();
|
|
1487
1487
|
}
|
|
1488
1488
|
function readString(_this__u8e3s4) {
|
|
1489
1489
|
return commonReadUtf8(_this__u8e3s4, _this__u8e3s4.v());
|
|
1490
1490
|
}
|
|
1491
1491
|
function readString_0(_this__u8e3s4) {
|
|
1492
|
-
_this__u8e3s4.
|
|
1493
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1492
|
+
_this__u8e3s4.uq(new Long(-1, 2147483647));
|
|
1493
|
+
return commonReadUtf8(_this__u8e3s4.rq(), _this__u8e3s4.rq().v());
|
|
1494
1494
|
}
|
|
1495
1495
|
function readString_1(_this__u8e3s4, byteCount) {
|
|
1496
|
-
_this__u8e3s4.
|
|
1497
|
-
return commonReadUtf8(_this__u8e3s4.
|
|
1496
|
+
_this__u8e3s4.tq(byteCount);
|
|
1497
|
+
return commonReadUtf8(_this__u8e3s4.rq(), byteCount);
|
|
1498
1498
|
}
|
|
1499
1499
|
function commonReadUtf8(_this__u8e3s4, byteCount) {
|
|
1500
1500
|
if (equalsLong(byteCount, new Long(0, 0)))
|
|
1501
1501
|
return '';
|
|
1502
1502
|
// Inline function 'kotlinx.io.unsafe.UnsafeBufferOperations.forEachSegment' call
|
|
1503
|
-
var curr = _this__u8e3s4.
|
|
1503
|
+
var curr = _this__u8e3s4.oq_1;
|
|
1504
1504
|
while (!(curr == null)) {
|
|
1505
1505
|
get_SegmentReadContextImpl();
|
|
1506
1506
|
if (compare(fromInt(curr.v()), byteCount) >= 0) {
|
|
1507
1507
|
var result = '';
|
|
1508
1508
|
// Inline function 'kotlinx.io.unsafe.withData' call
|
|
1509
|
-
var tmp0 = curr.
|
|
1510
|
-
var tmp2 = curr.
|
|
1511
|
-
var tmp0_0 = curr.
|
|
1509
|
+
var tmp0 = curr.ht(true);
|
|
1510
|
+
var tmp2 = curr.xq_1;
|
|
1511
|
+
var tmp0_0 = curr.yq_1;
|
|
1512
1512
|
// Inline function 'kotlin.math.min' call
|
|
1513
1513
|
var b = tmp2 + convertToInt(byteCount) | 0;
|
|
1514
1514
|
var tmp$ret$0 = Math.min(tmp0_0, b);
|
|
1515
1515
|
result = commonToUtf8String(tmp0, tmp2, tmp$ret$0);
|
|
1516
|
-
_this__u8e3s4.
|
|
1516
|
+
_this__u8e3s4.pr(byteCount);
|
|
1517
1517
|
return result;
|
|
1518
1518
|
}
|
|
1519
1519
|
return commonToUtf8String(readByteArray_0(_this__u8e3s4, convertToInt(byteCount)));
|
|
@@ -1884,27 +1884,27 @@ function UnsafeBufferOperations_getInstance() {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
function SegmentReadContextImpl$1() {
|
|
1886
1886
|
}
|
|
1887
|
-
protoOf(SegmentReadContextImpl$1).
|
|
1888
|
-
return segment.
|
|
1887
|
+
protoOf(SegmentReadContextImpl$1).ps = function (segment, offset) {
|
|
1888
|
+
return segment.or(offset);
|
|
1889
1889
|
};
|
|
1890
1890
|
function SegmentWriteContextImpl$1() {
|
|
1891
1891
|
}
|
|
1892
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1893
|
-
segment.
|
|
1892
|
+
protoOf(SegmentWriteContextImpl$1).pt = function (segment, offset, value) {
|
|
1893
|
+
segment.it(offset, value);
|
|
1894
1894
|
};
|
|
1895
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1896
|
-
segment.
|
|
1895
|
+
protoOf(SegmentWriteContextImpl$1).ot = function (segment, offset, b0, b1) {
|
|
1896
|
+
segment.jt(offset, b0, b1);
|
|
1897
1897
|
};
|
|
1898
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1899
|
-
segment.
|
|
1898
|
+
protoOf(SegmentWriteContextImpl$1).nt = function (segment, offset, b0, b1, b2) {
|
|
1899
|
+
segment.kt(offset, b0, b1, b2);
|
|
1900
1900
|
};
|
|
1901
|
-
protoOf(SegmentWriteContextImpl$1).
|
|
1902
|
-
segment.
|
|
1901
|
+
protoOf(SegmentWriteContextImpl$1).mt = function (segment, offset, b0, b1, b2, b3) {
|
|
1902
|
+
segment.lt(offset, b0, b1, b2, b3);
|
|
1903
1903
|
};
|
|
1904
1904
|
function BufferIterationContextImpl$1() {
|
|
1905
1905
|
}
|
|
1906
|
-
protoOf(BufferIterationContextImpl$1).
|
|
1907
|
-
return get_SegmentReadContextImpl().
|
|
1906
|
+
protoOf(BufferIterationContextImpl$1).ps = function (segment, offset) {
|
|
1907
|
+
return get_SegmentReadContextImpl().ps(segment, offset);
|
|
1908
1908
|
};
|
|
1909
1909
|
var properties_initialized_UnsafeBufferOperations_kt_2xfgoc;
|
|
1910
1910
|
function _init_properties_UnsafeBufferOperations_kt__xw75gy() {
|
|
@@ -1972,15 +1972,15 @@ function EOFException() {
|
|
|
1972
1972
|
captureStack(this, EOFException);
|
|
1973
1973
|
}
|
|
1974
1974
|
function SegmentPool() {
|
|
1975
|
-
this.
|
|
1976
|
-
this.
|
|
1975
|
+
this.zr_1 = 0;
|
|
1976
|
+
this.as_1 = 0;
|
|
1977
1977
|
}
|
|
1978
|
-
protoOf(SegmentPool).
|
|
1979
|
-
return Companion_instance.
|
|
1978
|
+
protoOf(SegmentPool).bs = function () {
|
|
1979
|
+
return Companion_instance.dt();
|
|
1980
1980
|
};
|
|
1981
|
-
protoOf(SegmentPool).
|
|
1981
|
+
protoOf(SegmentPool).qs = function (segment) {
|
|
1982
1982
|
};
|
|
1983
|
-
protoOf(SegmentPool).
|
|
1983
|
+
protoOf(SegmentPool).ft = function () {
|
|
1984
1984
|
return AlwaysSharedCopyTracker_getInstance();
|
|
1985
1985
|
};
|
|
1986
1986
|
var SegmentPool_instance;
|
|
@@ -1988,9 +1988,9 @@ function SegmentPool_getInstance() {
|
|
|
1988
1988
|
return SegmentPool_instance;
|
|
1989
1989
|
}
|
|
1990
1990
|
//region block: post-declaration
|
|
1991
|
-
protoOf(Buffer).
|
|
1992
|
-
protoOf(Buffer).
|
|
1993
|
-
protoOf(RealSource).
|
|
1991
|
+
protoOf(Buffer).sr = readAtMostTo$default;
|
|
1992
|
+
protoOf(Buffer).fs = write$default;
|
|
1993
|
+
protoOf(RealSource).sr = readAtMostTo$default;
|
|
1994
1994
|
//endregion
|
|
1995
1995
|
//region block: init
|
|
1996
1996
|
Companion_instance = new Companion();
|