Remove deprecated SharedFunctionInfo::dont_cache predicate.
authormstarzinger <mstarzinger@chromium.org>
Fri, 19 Jun 2015 18:55:47 +0000 (11:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 19 Jun 2015 18:55:56 +0000 (18:55 +0000)
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29162}

src/ast-numbering.cc
src/ast.h
src/compiler.cc
src/objects-inl.h
src/objects.cc
src/objects.h

index ce82998..ab8a6b2 100644 (file)
@@ -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 <typename Node>
   void ReserveFeedbackSlots(Node* node) {
index c6f7dbd..3a3d896 100644 (file)
--- 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<Handle<String> > ZoneStringList;
-typedef ZoneList<Handle<Object> > ZoneObjectList;
+typedef ZoneList<Handle<String>> ZoneStringList;
+typedef ZoneList<Handle<Object>> ZoneObjectList;
 
 
 #define DECLARE_NODE_TYPE(type)                                          \
@@ -138,12 +137,7 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
   friend class AstNodeFactory;
 
 
-enum AstPropertiesFlag {
-  kDontSelfOptimize,
-  kDontSoftInline,
-  kDontCrankshaft,
-  kDontCache
-};
+enum AstPropertiesFlag { kDontSelfOptimize, kDontCrankshaft };
 
 
 class FeedbackVectorRequirements {
index db92c2b..7441f19 100644 (file)
@@ -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<JSFunction> 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<SharedFunctionInfo> 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<SharedFunctionInfo> Compiler::CompileScript(
     parse_info.set_language_mode(
         static_cast<LanguageMode>(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) {
index 50e8176..b363811 100644 (file)
@@ -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)
index 44b3721..bd7abad 100644 (file)
@@ -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());
index dbe4727..8ab9993 100644 (file)
@@ -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,