mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-14 00:21:27 +00:00
Refactoring: use constants instead of string literals
This commit is contained in:
committed by
Nikolay Krasko
parent
fa5728b288
commit
cd92e3fc98
@@ -4907,7 +4907,8 @@ The "returned" value of try expression with no finally is either the last expres
|
||||
public NameGenerator getInlineNameGenerator() {
|
||||
NameGenerator nameGenerator = getParentCodegen().getInlineNameGenerator();
|
||||
Name name = context.getContextDescriptor().getName();
|
||||
return nameGenerator.subGenerator((name.isSpecial() ? "$special" : name.asString()) + "$$inlined" );
|
||||
String inlinedName = name.isSpecial() ? InlineCodegenUtil.SPECIAL_TRANSFORMATION_NAME : name.asString();
|
||||
return nameGenerator.subGenerator(inlinedName + InlineCodegenUtil.INLINE_CALL_TRANSFORMATION_SUFFIX);
|
||||
}
|
||||
|
||||
public Type getReturnType() {
|
||||
|
||||
@@ -81,7 +81,9 @@ public class InlineCodegenUtil {
|
||||
private static final String INLINE_MARKER_AFTER_METHOD_NAME = "afterInlineCall";
|
||||
private static final String INLINE_MARKER_FINALLY_START = "finallyStart";
|
||||
private static final String INLINE_MARKER_FINALLY_END = "finallyEnd";
|
||||
public static final String SPECIAL_TRANSFORMATION_NAME = "$special";
|
||||
public static final String INLINE_TRANSFORMATION_SUFFIX = "$inlined";
|
||||
public static final String INLINE_CALL_TRANSFORMATION_SUFFIX = "$" + INLINE_TRANSFORMATION_SUFFIX;
|
||||
public static final String INLINE_FUN_THIS_0_SUFFIX = "$inline_fun";
|
||||
public static final String INLINE_FUN_VAR_SUFFIX = "$iv";
|
||||
|
||||
|
||||
@@ -232,8 +232,8 @@ class DebuggerClassNameProvider(val myDebugProcess: DebugProcess, val scopes: Li
|
||||
|
||||
val mangledInternalClassName =
|
||||
className +
|
||||
(if (ownerDescriptor.name.isSpecial) "\$\$special\$" else "$") +
|
||||
InlineCodegenUtil.INLINE_TRANSFORMATION_SUFFIX + "$" +
|
||||
(if (ownerDescriptor.name.isSpecial) "$" + InlineCodegenUtil.SPECIAL_TRANSFORMATION_NAME else "") +
|
||||
InlineCodegenUtil.INLINE_CALL_TRANSFORMATION_SUFFIX + "$" +
|
||||
inlineFunctionName
|
||||
|
||||
return listOf("$mangledInternalClassName*")
|
||||
|
||||
Reference in New Issue
Block a user