Commit 1e9ead8a authored by Mythri's avatar Mythri Committed by Commit Bot

Deprecate unsupported ScriptCompiler::CompileOptions

After adding an explicit API to create code caches the compile
options related to producing code caches are no longer supported.
Parser caches are also no longer supported.

Bug: v8:8015
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I6eb5d7cf6b03437834eb1a1d326374f09fbce5a9
Reviewed-on: https://chromium-review.googlesource.com/c/1238493
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57399}
parent d0562944
......@@ -1425,10 +1425,6 @@ class V8_EXPORT ScriptCompiler {
enum CompileOptions {
kNoCompileOptions = 0,
kProduceParserCache,
kConsumeParserCache,
kProduceCodeCache,
kProduceFullCodeCache,
kConsumeCodeCache,
kEagerCompile
};
......
......@@ -2326,18 +2326,6 @@ MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal(
ENTER_V8_NO_SCRIPT(isolate, v8_isolate->GetCurrentContext(), ScriptCompiler,
CompileUnbound, MaybeLocal<UnboundScript>(),
InternalEscapableScope);
// ProduceParserCache, ProduceCodeCache, ProduceFullCodeCache and
// ConsumeParserCache are not supported. They are present only for
// backward compatability. All these options behave as kNoCompileOptions.
if (options == kConsumeParserCache) {
// We do not support parser caches anymore. Just set cached_data to
// rejected to signal an error.
options = kNoCompileOptions;
source->cached_data->rejected = true;
} else if (options == kProduceParserCache || options == kProduceCodeCache ||
options == kProduceFullCodeCache) {
options = kNoCompileOptions;
}
i::ScriptData* script_data = nullptr;
if (options == kConsumeCodeCache) {
......
......@@ -478,8 +478,6 @@ bool Shell::ExecuteString(Isolate* isolate, Local<String> source,
Local<Context> context(isolate->GetCurrentContext());
ScriptOrigin origin(name);
DCHECK(options.compile_options != ScriptCompiler::kProduceParserCache);
DCHECK(options.compile_options != ScriptCompiler::kConsumeParserCache);
if (options.compile_options == ScriptCompiler::kConsumeCodeCache) {
ScriptCompiler::CachedData* cached_code =
LookupCodeCache(isolate, source);
......
......@@ -2070,7 +2070,7 @@ v8::ScriptCompiler::CachedData* CompileRunAndProduceCache(
v8::ScriptCompiler::CompileOptions options;
switch (cacheType) {
case CodeCacheType::kEager:
options = v8::ScriptCompiler::kProduceFullCodeCache;
options = v8::ScriptCompiler::kEagerCompile;
break;
case CodeCacheType::kLazy:
case CodeCacheType::kAfterExecute:
......
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