Chromium Code Reviews| 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( |