Code cleanup: removed redundant semicolons

This commit is contained in:
Valentin Kipyatkov
2016-04-26 23:30:42 +03:00
parent e1d8c72aa7
commit b551886889
141 changed files with 2520 additions and 239 deletions
@@ -43,13 +43,13 @@ open class BranchedValue(
v.visitLabel(branchJumpLabel)
v.iconst(0)
v.visitLabel(endLabel)
coerceTo(type, v);
coerceTo(type, v)
}
open fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
if (arg1 is CondJump) arg1.condJump(jumpLabel, v, jumpIfFalse) else arg1.put(operandType, v)
arg2?.put(operandType, v)
v.visitJumpInsn(patchOpcode(if (jumpIfFalse) opcode else negatedOperations[opcode]!!, v), jumpLabel);
v.visitJumpInsn(patchOpcode(if (jumpIfFalse) opcode else negatedOperations[opcode]!!, v), jumpLabel)
}
open fun loopJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen;
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.org.objectweb.asm.Type
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen;
package org.jetbrains.kotlin.codegen
import org.jetbrains.kotlin.load.java.JvmAbi
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind
@@ -42,7 +42,7 @@ class DefaultCallArgs(val size: Int) {
for (i in 0..size - 1) {
if (i != 0 && i % Integer.SIZE == 0) {
masks.add(mask)
mask = 0;
mask = 0
}
mask = mask or if (bits.get(i)) 1 shl (i % Integer.SIZE) else 0
}
@@ -61,6 +61,6 @@ class DefaultCallArgs(val size: Int) {
val parameterType = if (isConstructor) AsmTypes.DEFAULT_CONSTRUCTOR_MARKER else AsmTypes.OBJECT_TYPE
callGenerator.putValueIfNeeded(parameterType, StackValue.constant(null, parameterType))
}
return toInts.isNotEmpty();
return toInts.isNotEmpty()
}
}
@@ -156,7 +156,7 @@ class DefaultParameterValueSubstitutor(val state: GenerationState) {
val delegateOwner = delegateFunctionDescriptor.containingDeclaration
if (delegateOwner is ClassDescriptor && delegateOwner.isCompanionObject) {
val singletonValue = StackValue.singleton(delegateOwner, typeMapper)
singletonValue.put(singletonValue.type, v);
singletonValue.put(singletonValue.type, v)
}
}
@@ -149,7 +149,7 @@ class InterfaceImplBodyCodegen(
override fun generateKotlinMetadataAnnotation() {
(v as InterfaceImplClassBuilder).stopCounting()
writeSyntheticClassMetadata(v);
writeSyntheticClassMetadata(v)
}
override fun done() {
@@ -29,7 +29,7 @@ class AsmTypeRemapper(val typeRemapper: TypeRemapper, val isDefaultGeneration: B
override fun createRemappingSignatureAdapter(v: SignatureVisitor?): SignatureVisitor {
if (isDefaultGeneration) {
return super.createRemappingSignatureAdapter(v);
return super.createRemappingSignatureAdapter(v)
}
return object : RemappingSignatureAdapter(v, this) {
@@ -71,7 +71,7 @@ abstract class CoveringTryCatchNodeProcessor(parameterSize: Int) {
}
Collections.sort<TryCatchBlockNodeInfo>(intervals, comp)
return intervals;
return intervals
}
protected fun substituteTryBlockNodes(node: MethodNode) {
@@ -84,7 +84,7 @@ class ReifiedTypeInliner(private val parametersMapping: TypeParameterMappings?)
Opcodes.INVOKESTATIC,
IntrinsicMethods.INTRINSICS_CLASS_NAME, NEED_CLASS_REIFICATION_MARKER_METHOD_NAME,
Type.getMethodDescriptor(Type.VOID_TYPE), false
);
)
}
}
@@ -113,7 +113,7 @@ open class NestedSourceMapper(
value, key ->
if (key.dest in value) 0 else RangeMapping.Comparator.compare(value, key)
})
return if (index < 0) null else ranges[index];
return if (index < 0) null else ranges[index]
}
}
@@ -188,7 +188,7 @@ open class DefaultSourceMapper(val sourceInfo: SourceInfo) : SourceMapper {
protected val origin: RawFileMapping
var callSiteMarker: CallSiteMarker? = null;
var callSiteMarker: CallSiteMarker? = null
set(value) {
lastMappedWithChanges = null
field = value
@@ -105,6 +105,6 @@ class AnonymousObjectTransformationInfo internal constructor(
}
override fun createTransformer(inliningContext: InliningContext, sameModule: Boolean): ObjectTransformer<*> {
return AnonymousObjectTransformer(this, inliningContext, sameModule);
return AnonymousObjectTransformer(this, inliningContext, sameModule)
}
}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.intrinsics;
package org.jetbrains.kotlin.codegen.intrinsics
import org.jetbrains.kotlin.codegen.AsmUtil.correctElementType
import org.jetbrains.kotlin.codegen.Callable
@@ -37,8 +37,8 @@ class BinaryOp(private val opcode: Int) : IntrinsicMethod() {
return createBinaryIntrinsicCallable(returnType, paramType, operandType) {
v ->
v.visitInsn(returnType.getOpcode(opcode));
if (operandType != returnType)
v.visitInsn(returnType.getOpcode(opcode))
if (operandType != returnType)
StackValue.coerce(operandType, returnType, v)
}
}
@@ -169,7 +169,7 @@ object TypeIntrinsics {
private val OBJECT_TYPE = Type.getObjectType("java/lang/Object")
private fun getAsMutableCollectionDescriptor(asmType: Type): String =
Type.getMethodDescriptor(asmType, OBJECT_TYPE);
Type.getMethodDescriptor(asmType, OBJECT_TYPE)
private val BEFORE_CHECKCAST_TO_FUNCTION_OF_ARITY = "beforeCheckcastToFunctionOfArity"
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.optimization.boxing;
package org.jetbrains.kotlin.codegen.optimization.boxing
import com.google.common.collect.ImmutableSet
import org.jetbrains.kotlin.codegen.AsmUtil
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.jetbrains.kotlin.codegen.optimization.boxing;
package org.jetbrains.kotlin.codegen.optimization.boxing
import com.google.common.collect.ImmutableSet
import org.jetbrains.org.objectweb.asm.Opcodes