Commit ad506eeb authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Remove deprecated SharedFunctionInfo::dont_cache predicate.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1187563011

Cr-Commit-Position: refs/heads/master@{#29162}
parent 4f8761ca
...@@ -59,11 +59,6 @@ class AstNumberingVisitor final : public AstVisitor { ...@@ -59,11 +59,6 @@ class AstNumberingVisitor final : public AstVisitor {
dont_optimize_reason_ = reason; dont_optimize_reason_ = reason;
DisableSelfOptimization(); DisableSelfOptimization();
} }
void DisableCaching(BailoutReason reason) {
dont_optimize_reason_ = reason;
DisableSelfOptimization();
properties_.flags()->Add(kDontCache);
}
template <typename Node> template <typename Node>
void ReserveFeedbackSlots(Node* node) { void ReserveFeedbackSlots(Node* node) {
......
...@@ -127,9 +127,8 @@ AST_NODE_LIST(DEF_FORWARD_DECLARATION) ...@@ -127,9 +127,8 @@ AST_NODE_LIST(DEF_FORWARD_DECLARATION)
// Typedef only introduced to avoid unreadable code. // Typedef only introduced to avoid unreadable code.
// Please do appreciate the required space in "> >". typedef ZoneList<Handle<String>> ZoneStringList;
typedef ZoneList<Handle<String> > ZoneStringList; typedef ZoneList<Handle<Object>> ZoneObjectList;
typedef ZoneList<Handle<Object> > ZoneObjectList;
#define DECLARE_NODE_TYPE(type) \ #define DECLARE_NODE_TYPE(type) \
...@@ -138,12 +137,7 @@ typedef ZoneList<Handle<Object> > ZoneObjectList; ...@@ -138,12 +137,7 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
friend class AstNodeFactory; friend class AstNodeFactory;
enum AstPropertiesFlag { enum AstPropertiesFlag { kDontSelfOptimize, kDontCrankshaft };
kDontSelfOptimize,
kDontSoftInline,
kDontCrankshaft,
kDontCache
};
class FeedbackVectorRequirements { class FeedbackVectorRequirements {
......
...@@ -744,7 +744,6 @@ static bool Renumber(ParseInfo* parse_info) { ...@@ -744,7 +744,6 @@ static bool Renumber(ParseInfo* parse_info) {
shared_info->set_ast_node_count(lit->ast_node_count()); shared_info->set_ast_node_count(lit->ast_node_count());
MaybeDisableOptimization(shared_info, lit->dont_optimize_reason()); MaybeDisableOptimization(shared_info, lit->dont_optimize_reason());
shared_info->set_dont_crankshaft(lit->flags()->Contains(kDontCrankshaft)); shared_info->set_dont_crankshaft(lit->flags()->Contains(kDontCrankshaft));
shared_info->set_dont_cache(lit->flags()->Contains(kDontCache));
} }
return true; return true;
} }
...@@ -1175,10 +1174,8 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( ...@@ -1175,10 +1174,8 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
// If caller is strict mode, the result must be in strict mode as well. // If caller is strict mode, the result must be in strict mode as well.
DCHECK(is_sloppy(language_mode) || DCHECK(is_sloppy(language_mode) ||
is_strict(shared_info->language_mode())); is_strict(shared_info->language_mode()));
if (!shared_info->dont_cache()) { compilation_cache->PutEval(source, outer_info, context, shared_info,
compilation_cache->PutEval(source, outer_info, context, shared_info, scope_position);
scope_position);
}
} }
} else if (shared_info->ic_age() != isolate->heap()->global_ic_age()) { } else if (shared_info->ic_age() != isolate->heap()->global_ic_age()) {
shared_info->ResetForNewContext(isolate->heap()->global_ic_age()); shared_info->ResetForNewContext(isolate->heap()->global_ic_age());
...@@ -1239,7 +1236,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript( ...@@ -1239,7 +1236,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
if (CodeSerializer::Deserialize(isolate, *cached_data, source) if (CodeSerializer::Deserialize(isolate, *cached_data, source)
.ToHandle(&result)) { .ToHandle(&result)) {
// Promote to per-isolate compilation cache. // Promote to per-isolate compilation cache.
DCHECK(!result->dont_cache());
compilation_cache->PutScript(source, context, language_mode, result); compilation_cache->PutScript(source, context, language_mode, result);
return result; return result;
} }
...@@ -1294,7 +1290,7 @@ Handle<SharedFunctionInfo> Compiler::CompileScript( ...@@ -1294,7 +1290,7 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
parse_info.set_language_mode( parse_info.set_language_mode(
static_cast<LanguageMode>(info.language_mode() | language_mode)); static_cast<LanguageMode>(info.language_mode() | language_mode));
result = CompileToplevel(&info); result = CompileToplevel(&info);
if (extension == NULL && !result.is_null() && !result->dont_cache()) { if (extension == NULL && !result.is_null()) {
compilation_cache->PutScript(source, context, language_mode, result); compilation_cache->PutScript(source, context, language_mode, result);
if (FLAG_serialize_toplevel && if (FLAG_serialize_toplevel &&
compile_options == ScriptCompiler::kProduceCodeCache) { compile_options == ScriptCompiler::kProduceCodeCache) {
......
...@@ -5388,7 +5388,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) ...@@ -5388,7 +5388,6 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_crankshaft, BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_crankshaft,
kDontCrankshaft) kDontCrankshaft)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
......
...@@ -10660,8 +10660,6 @@ void SharedFunctionInfo::InitFromFunctionLiteral( ...@@ -10660,8 +10660,6 @@ void SharedFunctionInfo::InitFromFunctionLiteral(
} }
shared_info->set_dont_crankshaft( shared_info->set_dont_crankshaft(
lit->flags()->Contains(AstPropertiesFlag::kDontCrankshaft)); lit->flags()->Contains(AstPropertiesFlag::kDontCrankshaft));
shared_info->set_dont_cache(
lit->flags()->Contains(AstPropertiesFlag::kDontCache));
shared_info->set_kind(lit->kind()); shared_info->set_kind(lit->kind());
shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject()); shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject());
shared_info->set_asm_function(lit->scope()->asm_function()); shared_info->set_asm_function(lit->scope()->asm_function());
......
...@@ -6852,9 +6852,6 @@ class SharedFunctionInfo: public HeapObject { ...@@ -6852,9 +6852,6 @@ class SharedFunctionInfo: public HeapObject {
// Indicates that code for this function cannot be compiled with Crankshaft. // Indicates that code for this function cannot be compiled with Crankshaft.
DECL_BOOLEAN_ACCESSORS(dont_crankshaft) DECL_BOOLEAN_ACCESSORS(dont_crankshaft)
// Indicates that code for this function cannot be cached.
DECL_BOOLEAN_ACCESSORS(dont_cache)
// Indicates that code for this function cannot be flushed. // Indicates that code for this function cannot be flushed.
DECL_BOOLEAN_ACCESSORS(dont_flush) DECL_BOOLEAN_ACCESSORS(dont_flush)
...@@ -7117,7 +7114,6 @@ class SharedFunctionInfo: public HeapObject { ...@@ -7117,7 +7114,6 @@ class SharedFunctionInfo: public HeapObject {
kNameShouldPrintAsAnonymous, kNameShouldPrintAsAnonymous,
kIsFunction, kIsFunction,
kDontCrankshaft, kDontCrankshaft,
kDontCache,
kDontFlush, kDontFlush,
kIsArrow, kIsArrow,
kIsGenerator, kIsGenerator,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment