Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: src/api.cc

Issue 2223523002: [Interpreter] Avoid dereferencing handles on BytecodeGenerator for AST operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_const_array
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index a2780f9d27ec225c753fba1afe6865bdc8e7be17..09b17a7abaabfa927a398bd591fcd3d7813a3ef7 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2172,6 +2172,11 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
source->info->set_script(script);
source->info->set_context(isolate->native_context());
+ // Create a canonical handle scope before internalizing parsed values if
+ // compiling bytecode. This is required for off-thread bytecode generation.
+ std::unique_ptr<i::CanonicalHandleScope> canonical;
+ if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
+
// Do the parsing tasks which need to be done on the main thread. This will
// also handle parse errors.
source->parser->Internalize(isolate, script,
« no previous file with comments | « no previous file | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698