Remove kDontInline and simplify compiler hints.
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/359733004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
75050d8ccc
commit
b7d3d51a62
10
src/ast.cc
10
src/ast.cc
@ -1028,7 +1028,6 @@ CaseClause::CaseClause(Zone* zone,
|
||||
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) \
|
||||
@ -1046,7 +1045,6 @@ CaseClause::CaseClause(Zone* zone,
|
||||
void AstConstructionVisitor::Visit##NodeType(NodeType* node) { \
|
||||
increase_node_count(); \
|
||||
set_dont_optimize_reason(k##NodeType); \
|
||||
add_flag(kDontInline); \
|
||||
add_flag(kDontSelfOptimize); \
|
||||
add_flag(kDontCache); \
|
||||
}
|
||||
@ -1079,7 +1077,8 @@ REGULAR_NODE(ThisFunction)
|
||||
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)
|
||||
@ -1111,9 +1110,8 @@ DONT_CACHE_NODE(ModuleLiteral)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,6 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
|
||||
|
||||
|
||||
enum AstPropertiesFlag {
|
||||
kDontInline,
|
||||
kDontSelfOptimize,
|
||||
kDontSoftInline,
|
||||
kDontCache
|
||||
|
@ -580,8 +580,7 @@ static void UpdateSharedFunctionInfo(CompilationInfo* info) {
|
||||
|
||||
// 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());
|
||||
}
|
||||
@ -613,8 +612,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
|
||||
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());
|
||||
}
|
||||
|
@ -7576,7 +7576,7 @@ int HOptimizedGraphBuilder::InliningAstSize(Handle<JSFunction> target) {
|
||||
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;
|
||||
}
|
||||
@ -7663,8 +7663,7 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
|
||||
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;
|
||||
}
|
||||
|
@ -5447,7 +5447,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
|
||||
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)
|
||||
|
@ -7223,9 +7223,6 @@ class SharedFunctionInfo: public HeapObject {
|
||||
// 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)
|
||||
|
||||
@ -7287,11 +7284,6 @@ class SharedFunctionInfo: public HeapObject {
|
||||
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();
|
||||
|
||||
@ -7434,7 +7426,6 @@ class SharedFunctionInfo: public HeapObject {
|
||||
kIsAnonymous,
|
||||
kNameShouldPrintAsAnonymous,
|
||||
kIsFunction,
|
||||
kDontInline,
|
||||
kDontCache,
|
||||
kDontFlush,
|
||||
kIsGenerator,
|
||||
|
Loading…
Reference in New Issue
Block a user