Default inline flag = true

This commit is contained in:
Mikhael Bogdanov
2014-02-20 12:33:18 +04:00
parent c716b6eda0
commit ee136d6594
9 changed files with 14 additions and 11 deletions
@@ -2121,9 +2121,12 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
@NotNull ResolvedCall<? extends CallableDescriptor> resolvedCall,
@NotNull StackValue receiver
) {
boolean disable = false;
CallableDescriptor descriptor = resolvedCall.getResultingDescriptor();
boolean isInline = call != null && descriptor instanceof SimpleFunctionDescriptor && ((SimpleFunctionDescriptor) descriptor).getInlineStrategy().isInline();
boolean isInline = state.isInlineEnabled() &&
call != null &&
descriptor instanceof SimpleFunctionDescriptor &&
((SimpleFunctionDescriptor) descriptor).getInlineStrategy().isInline();
Inliner inliner = !isInline ? Inliner.NOT_INLINE :
new InlineCodegen(this, state, (SimpleFunctionDescriptor) unwrapFakeOverride(
(CallableMemberDescriptor) descriptor.getOriginal()), call);
@@ -66,6 +66,6 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@Argument(value = "kotlinHome", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery")
public String kotlinHome;
@Argument(value = "inline", description = "Inlining mode: on/off (default is off)")
@Argument(value = "inline", description = "Inlining mode: on/off (default is on)")
public String enableInline;
}
@@ -107,7 +107,7 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
configuration.put(JVMConfigurationKeys.GENERATE_NOT_NULL_ASSERTIONS, arguments.notNullAssertions);
configuration.put(JVMConfigurationKeys.GENERATE_NOT_NULL_PARAMETER_ASSERTIONS, arguments.notNullParamAssertions);
configuration.put(JVMConfigurationKeys.ENABLE_INLINE, "on".equalsIgnoreCase(arguments.enableInline));
configuration.put(JVMConfigurationKeys.ENABLE_INLINE, !"off".equalsIgnoreCase(arguments.enableInline));
configuration.put(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY, messageCollector);
+1 -1
View File
@@ -13,7 +13,7 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
-module [String] module to compile
-script [flag] evaluate script
-kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery
-inline [String] Inlining mode: on/off (default is off)
-inline [String] Inlining mode: on/off (default is on)
-tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag
-verbose [flag] Enable verbose logging output
-version [flag] Display compiler version
+1 -1
View File
@@ -13,7 +13,7 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
-module [String] module to compile
-script [flag] evaluate script
-kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery
-inline [String] Inlining mode: on/off (default is off)
-inline [String] Inlining mode: on/off (default is on)
-tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag
-verbose [flag] Enable verbose logging output
-version [flag] Display compiler version
+1 -1
View File
@@ -13,7 +13,7 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
-module [String] module to compile
-script [flag] evaluate script
-kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery
-inline [String] Inlining mode: on/off (default is off)
-inline [String] Inlining mode: on/off (default is on)
-tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag
-verbose [flag] Enable verbose logging output
-version [flag] Display compiler version
+1 -1
View File
@@ -14,7 +14,7 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
-module [String] module to compile
-script [flag] evaluate script
-kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery
-inline [String] Inlining mode: on/off (default is off)
-inline [String] Inlining mode: on/off (default is on)
-tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag
-verbose [flag] Enable verbose logging output
-version [flag] Display compiler version
+1 -1
View File
@@ -14,7 +14,7 @@ Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments
-module [String] module to compile
-script [flag] evaluate script
-kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery
-inline [String] Inlining mode: on/off (default is off)
-inline [String] Inlining mode: on/off (default is on)
-tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag
-verbose [flag] Enable verbose logging output
-version [flag] Display compiler version
@@ -29,11 +29,11 @@ import org.jetbrains.jet.lang.resolve.constants.EnumValue;
public class InlineUtil {
public static boolean DEFAULT_INLINE_FLAG = false;
public static boolean DEFAULT_INLINE_FLAG = true;
public static boolean DEFAULT_INLINE_FLAG_FOR_TEST = true;
public static boolean DEFAULT_INLINE_FLAG_FOR_TOOLWINDOW = false;
public static boolean DEFAULT_INLINE_FLAG_FOR_TOOLWINDOW = true;
public static boolean DEFAULT_INLINE_FLAG_FOR_STUB = false; /*always false*/