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

Unified Diff: src/compiler.h

Issue 2579973002: Don't compile inner functions when compiling via the dispatcher (Closed)
Patch Set: Created 4 years 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/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index 03c6f8199fe105e0cec8480db71f79fd6cf4143a..a8b4e524ba46a0f7d43dea6c625badf3c414fa24 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -23,6 +23,8 @@ class JavaScriptFrame;
class ParseInfo;
class ScriptData;
+enum class LazyCompilationMode { kAlways, kIfRequested };
+
// The V8 compiler API.
//
// This is the central hub for dispatching to the various compilers within V8.
@@ -53,7 +55,7 @@ class Compiler : public AllStatic {
// Prepare a compilation job for unoptimized code. Requires ParseAndAnalyse.
Michael Starzinger 2016/12/16 11:44:02 nit: Can we add a comment which explains that the
static CompilationJob* PrepareUnoptimizedCompilationJob(
- CompilationInfo* info);
+ CompilationInfo* info, LazyCompilationMode mode);
// Generate and install code from previously queued compilation job.
static bool FinalizeCompilationJob(CompilationJob* job);
@@ -115,7 +117,8 @@ class Compiler : public AllStatic {
// Create a shared function info object (the code may be lazily compiled).
static Handle<SharedFunctionInfo> GetSharedFunctionInfo(
- FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer);
+ FunctionLiteral* node, Handle<Script> script, CompilationInfo* outer,
+ LazyCompilationMode mode = LazyCompilationMode::kIfRequested);
// Create a shared function info object for a native function literal.
static Handle<SharedFunctionInfo> GetSharedFunctionInfoForNative(
« no previous file with comments | « no previous file | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698