From: mstarzinger Date: Fri, 19 Jun 2015 18:55:47 +0000 (-0700) Subject: Remove deprecated SharedFunctionInfo::dont_cache predicate. X-Git-Tag: upstream/4.7.83~1878 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad506eebbb0d2f8b1e5833cacba5952af4db10aa;p=platform%2Fupstream%2Fv8.git Remove deprecated SharedFunctionInfo::dont_cache predicate. R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1187563011 Cr-Commit-Position: refs/heads/master@{#29162} --- diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc index ce8299888..ab8a6b281 100644 --- a/src/ast-numbering.cc +++ b/src/ast-numbering.cc @@ -59,11 +59,6 @@ class AstNumberingVisitor final : public AstVisitor { dont_optimize_reason_ = reason; DisableSelfOptimization(); } - void DisableCaching(BailoutReason reason) { - dont_optimize_reason_ = reason; - DisableSelfOptimization(); - properties_.flags()->Add(kDontCache); - } template void ReserveFeedbackSlots(Node* node) { diff --git a/src/ast.h b/src/ast.h index c6f7dbd10..3a3d89626 100644 --- a/src/ast.h +++ b/src/ast.h @@ -127,9 +127,8 @@ AST_NODE_LIST(DEF_FORWARD_DECLARATION) // Typedef only introduced to avoid unreadable code. -// Please do appreciate the required space in "> >". -typedef ZoneList > ZoneStringList; -typedef ZoneList > ZoneObjectList; +typedef ZoneList> ZoneStringList; +typedef ZoneList> ZoneObjectList; #define DECLARE_NODE_TYPE(type) \ @@ -138,12 +137,7 @@ typedef ZoneList > ZoneObjectList; friend class AstNodeFactory; -enum AstPropertiesFlag { - kDontSelfOptimize, - kDontSoftInline, - kDontCrankshaft, - kDontCache -}; +enum AstPropertiesFlag { kDontSelfOptimize, kDontCrankshaft }; class FeedbackVectorRequirements { diff --git a/src/compiler.cc b/src/compiler.cc index db92c2b20..7441f19e5 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -744,7 +744,6 @@ static bool Renumber(ParseInfo* parse_info) { shared_info->set_ast_node_count(lit->ast_node_count()); MaybeDisableOptimization(shared_info, lit->dont_optimize_reason()); shared_info->set_dont_crankshaft(lit->flags()->Contains(kDontCrankshaft)); - shared_info->set_dont_cache(lit->flags()->Contains(kDontCache)); } return true; } @@ -1175,10 +1174,8 @@ MaybeHandle Compiler::GetFunctionFromEval( // If caller is strict mode, the result must be in strict mode as well. DCHECK(is_sloppy(language_mode) || is_strict(shared_info->language_mode())); - if (!shared_info->dont_cache()) { - compilation_cache->PutEval(source, outer_info, context, shared_info, - scope_position); - } + compilation_cache->PutEval(source, outer_info, context, shared_info, + scope_position); } } else if (shared_info->ic_age() != isolate->heap()->global_ic_age()) { shared_info->ResetForNewContext(isolate->heap()->global_ic_age()); @@ -1239,7 +1236,6 @@ Handle Compiler::CompileScript( if (CodeSerializer::Deserialize(isolate, *cached_data, source) .ToHandle(&result)) { // Promote to per-isolate compilation cache. - DCHECK(!result->dont_cache()); compilation_cache->PutScript(source, context, language_mode, result); return result; } @@ -1294,7 +1290,7 @@ Handle Compiler::CompileScript( parse_info.set_language_mode( static_cast(info.language_mode() | language_mode)); 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); if (FLAG_serialize_toplevel && compile_options == ScriptCompiler::kProduceCodeCache) { diff --git a/src/objects-inl.h b/src/objects-inl.h index 50e8176c2..b3638110f 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -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, dont_crankshaft, kDontCrankshaft) -BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) diff --git a/src/objects.cc b/src/objects.cc index 44b3721b1..bd7abad1e 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -10660,8 +10660,6 @@ void SharedFunctionInfo::InitFromFunctionLiteral( } shared_info->set_dont_crankshaft( lit->flags()->Contains(AstPropertiesFlag::kDontCrankshaft)); - shared_info->set_dont_cache( - lit->flags()->Contains(AstPropertiesFlag::kDontCache)); shared_info->set_kind(lit->kind()); shared_info->set_needs_home_object(lit->scope()->NeedsHomeObject()); shared_info->set_asm_function(lit->scope()->asm_function()); diff --git a/src/objects.h b/src/objects.h index dbe4727ae..8ab9993dc 100644 --- a/src/objects.h +++ b/src/objects.h @@ -6852,9 +6852,6 @@ class SharedFunctionInfo: public HeapObject { // Indicates that code for this function cannot be compiled with 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. DECL_BOOLEAN_ACCESSORS(dont_flush) @@ -7117,7 +7114,6 @@ class SharedFunctionInfo: public HeapObject { kNameShouldPrintAsAnonymous, kIsFunction, kDontCrankshaft, - kDontCache, kDontFlush, kIsArrow, kIsGenerator,