Reviewers: Yang,
Message:
Please advise on whether this is intended for some future use which I am not
aware of. Otherwise I vote for removing it.
Description:
Remove deprecated SharedFunctionInfo::dont_cache predicate.
[email protected]
Please review this at https://codereview.chromium.org/1187563011/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+6, -28 lines):
M src/ast.h
M src/ast-numbering.cc
M src/compiler.cc
M src/objects.h
M src/objects.cc
M src/objects-inl.h
Index: src/ast-numbering.cc
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc
index
ce8299888516e0d3bb89f9b7043a083db024fd3e..ab8a6b281c45be49576fd85d809195d4a2ec21c6
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 <typename Node>
void ReserveFeedbackSlots(Node* node) {
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index
8eae849358dd5de1c3d168b0cd8d9b42baf38454..61a6ea936963bab05811fc36f53a4ca58bc6f308
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<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: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
ef21f1f46f9e65ff227bdefb703fe4132101c59e..737d0f3317b1b31e324c73bd9ad17eb1ac1e4e08
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;
}
@@ -1172,10 +1171,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());
@@ -1236,7 +1233,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;
}
@@ -1291,7 +1287,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: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index
86a3fe7b35bc7455b830902ad8029959589592b9..ded90ea795aacee1923a75c0d28dea10e8629e4b
100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5393,7 +5393,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: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
0b224200089a02da5a7c70b187083abfdc2db247..8d20a64f9fd3529ee09b3f1c42b686792ebac41c
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10592,8 +10592,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: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index
ccf3506f272fb0b20101d8938aece144b51e4ec5..22b954d5a8ca554c037dabbc410b9c013e93e46c
100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6855,9 +6855,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)
@@ -7120,7 +7117,6 @@ class SharedFunctionInfo: public HeapObject {
kNameShouldPrintAsAnonymous,
kIsFunction,
kDontCrankshaft,
- kDontCache,
kDontFlush,
kIsArrow,
kIsGenerator,
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.