void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
increase_node_count(); \
set_dont_optimize_reason(k##NodeType); \
- add_flag(kDontInline); \
add_flag(kDontSelfOptimize); \
}
#define DONT_SELFOPTIMIZE_NODE(NodeType) \
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
increase_node_count(); \
set_dont_optimize_reason(k##NodeType); \
- add_flag(kDontInline); \
add_flag(kDontSelfOptimize); \
add_flag(kDontCache); \
}
REGULAR_NODE_WITH_FEEDBACK_SLOTS(Call)
REGULAR_NODE_WITH_FEEDBACK_SLOTS(CallNew)
// In theory, for VariableProxy we'd have to add:
-// if (node->var()->IsLookupSlot()) add_flag(kDontInline);
+// if (node->var()->IsLookupSlot())
+// set_dont_optimize_reason(kReferenceToAVariableWhichRequiresDynamicLookup);
// But node->var() is usually not bound yet at VariableProxy creation time, and
// LOOKUP variables only result from constructs that cannot be inlined anyway.
REGULAR_NODE(VariableProxy)
void AstConstructionVisitor::VisitCallRuntime(CallRuntime* node) {
increase_node_count();
if (node->is_jsruntime()) {
- // Don't try to inline JS runtime calls because we don't (currently) even
- // optimize them.
- add_flag(kDontInline);
+ // Don't try to optimize JS runtime calls because we bailout on them.
+ set_dont_optimize_reason(kCallToAJavaScriptRuntimeFunction);
}
}
enum AstPropertiesFlag {
- kDontInline,
kDontSelfOptimize,
kDontSoftInline,
kDontCache
// Check the function has compiled code.
ASSERT(shared->is_compiled());
- shared->set_dont_optimize_reason(lit->dont_optimize_reason());
- shared->set_dont_inline(lit->flags()->Contains(kDontInline));
+ shared->set_bailout_reason(lit->dont_optimize_reason());
shared->set_ast_node_count(lit->ast_node_count());
shared->set_strict_mode(lit->strict_mode());
}
function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters());
function_info->set_ast_node_count(lit->ast_node_count());
function_info->set_is_function(lit->is_function());
- function_info->set_dont_optimize_reason(lit->dont_optimize_reason());
- function_info->set_dont_inline(lit->flags()->Contains(kDontInline));
+ function_info->set_bailout_reason(lit->dont_optimize_reason());
function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
function_info->set_is_generator(lit->is_generator());
}
TraceInline(target, caller, "target not inlineable");
return kNotInlinable;
}
- if (target_shared->dont_inline()) {
+ if (target_shared->DisableOptimizationReason() != kNoReason) {
TraceInline(target, caller, "target contains unsupported syntax [early]");
return kNotInlinable;
}
TraceInline(target, caller, "target AST is too large [late]");
return false;
}
- AstProperties::Flags* flags(function->flags());
- if (flags->Contains(kDontInline) || function->dont_optimize()) {
+ if (function->dont_optimize()) {
TraceInline(target, caller, "target contains unsupported syntax [late]");
return false;
}
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction)
-BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_inline, kDontInline)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
// Is this a function or top-level/eval code.
DECL_BOOLEAN_ACCESSORS(is_function)
- // Indicates that the function cannot be inlined.
- DECL_BOOLEAN_ACCESSORS(dont_inline)
-
// Indicates that code for this function cannot be cached.
DECL_BOOLEAN_ACCESSORS(dont_cache)
reason));
}
- void set_dont_optimize_reason(BailoutReason reason) {
- set_bailout_reason(reason);
- set_dont_inline(reason != kNoReason);
- }
-
// Check whether or not this function is inlineable.
bool IsInlineable();
kIsAnonymous,
kNameShouldPrintAsAnonymous,
kIsFunction,
- kDontInline,
kDontCache,
kDontFlush,
kIsGenerator,