private -> internal where it's necessary
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.google.dart.compiler.backend.js.ast.metadata
|
||||
|
||||
private class MetadataProperty<in T : HasMetadata, R>(val default: R) {
|
||||
internal class MetadataProperty<in T : HasMetadata, R>(val default: R) {
|
||||
fun get(thisRef: T, desc: PropertyMetadata): R {
|
||||
if (!thisRef.hasData(desc.name)) return default
|
||||
return thisRef.getData<R>(desc.name)
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline.clean
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.JsVisitorWithContextImpl
|
||||
import com.google.dart.compiler.backend.js.ast.JsNode
|
||||
import com.google.dart.compiler.backend.js.ast.JsContext
|
||||
import com.google.dart.compiler.backend.js.ast.JsNode
|
||||
import com.google.dart.compiler.backend.js.ast.JsVisitorWithContextImpl
|
||||
|
||||
private class NodeRemover<T>(val klass: Class<T>, val predicate: (T) -> Boolean): JsVisitorWithContextImpl() {
|
||||
internal class NodeRemover<T>(val klass: Class<T>, val predicate: (T) -> Boolean): JsVisitorWithContextImpl() {
|
||||
|
||||
override fun <T : JsNode> doTraverse(node: T, ctx: JsContext<*>) {
|
||||
if (klass.isInstance(node)) {
|
||||
|
||||
@@ -16,12 +16,11 @@
|
||||
|
||||
package org.jetbrains.kotlin.js.inline.clean
|
||||
|
||||
import com.google.dart.compiler.backend.js.ast.*
|
||||
import com.google.dart.compiler.backend.js.ast.JsNode
|
||||
import org.jetbrains.kotlin.js.inline.util.IdentitySet
|
||||
import java.util.*
|
||||
|
||||
import java.util.IdentityHashMap
|
||||
|
||||
private class ReferenceTracker<Reference, RemoveCandidate : JsNode> {
|
||||
internal class ReferenceTracker<Reference, RemoveCandidate : JsNode> {
|
||||
private val reachable = IdentityHashMap<Reference, Boolean>()
|
||||
private val removableCandidates = IdentityHashMap<Reference, RemoveCandidate>()
|
||||
private val referenceFromTo = IdentityHashMap<Reference, MutableSet<Reference>>()
|
||||
|
||||
@@ -70,11 +70,11 @@ public fun lazy<T>(mode: LazyThreadSafetyMode, initializer: () -> T): Lazy<T> =
|
||||
public fun lazy<T>(lock: Any?, initializer: () -> T): Lazy<T> = UnsafeLazyImpl(initializer)
|
||||
|
||||
|
||||
private fun <T> arrayOfNulls(reference: Array<out T>, size: Int): Array<T> {
|
||||
internal fun <T> arrayOfNulls(reference: Array<out T>, size: Int): Array<T> {
|
||||
return arrayOfNulls<Any>(size) as Array<T>
|
||||
}
|
||||
|
||||
private fun arrayCopyResize(source: dynamic, newSize: Int, defaultValue: Any?): dynamic {
|
||||
internal fun arrayCopyResize(source: dynamic, newSize: Int, defaultValue: Any?): dynamic {
|
||||
val result = source.slice(0, newSize)
|
||||
var index: Int = source.length
|
||||
if (newSize > index) {
|
||||
@@ -84,10 +84,10 @@ private fun arrayCopyResize(source: dynamic, newSize: Int, defaultValue: Any?):
|
||||
return result
|
||||
}
|
||||
|
||||
private fun <T> arrayPlusCollection(array: dynamic, collection: Collection<T>): dynamic {
|
||||
internal fun <T> arrayPlusCollection(array: dynamic, collection: Collection<T>): dynamic {
|
||||
val result = array.slice(0)
|
||||
result.length += collection.size()
|
||||
var index: Int = array.length
|
||||
for (element in collection) result[index++] = element
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package kotlin
|
||||
|
||||
private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
|
||||
internal class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
|
||||
@Volatile private var sequenceRef: Sequence<T>? = sequence
|
||||
//private val lock = Any()
|
||||
|
||||
@@ -26,4 +26,4 @@ private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
|
||||
sequenceRef = null
|
||||
return sequence.iterator()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user